Import GNU Classpath (libgcj-import-20070727).
libjava/ 2007-08-04 Matthias Klose <doko@ubuntu.com> Import GNU Classpath (libgcj-import-20070727). * Regenerate class and header files. * Regenerate auto* files. * include/jvm.h: * jni-libjvm.cc (Jv_JNI_InvokeFunctions): Rename type. * jni.cc (_Jv_JNIFunctions, _Jv_JNI_InvokeFunctions): Likewise. * jni.cc (_Jv_JNI_CallAnyMethodA, _Jv_JNI_CallAnyVoidMethodA, _Jv_JNI_CallMethodA, _Jv_JNI_CallVoidMethodA, _Jv_JNI_CallStaticMethodA, _Jv_JNI_CallStaticVoidMethodA, _Jv_JNI_NewObjectA, _Jv_JNI_SetPrimitiveArrayRegion): Constify jvalue parameter. * java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA): Likewise. * java/lang/VMFloat.java (toString, parseFloat): New. * gnu/awt/xlib/XToolkit.java (setAlwaysOnTop, isModalityTypeSupported, isModalExclusionTypeSupported): New (stub only). * gnu/awt/xlib/XCanvasPeer.java (requestFocus): Likewise. * gnu/awt/xlib/XFramePeer.java (updateMinimumSize, updateIconImages, updateFocusableWindowState, setModalBlocked, getBoundsPrivate, setAlwaysOnTop): Likewise. * gnu/awt/xlib/XFontPeer.java (canDisplay): Update signature. * scripts/makemake.tcl: Ignore gnu/javax/sound/sampled/gstreamer, ignore javax.sound.sampled.spi.MixerProvider, ignore .in files. * HACKING: Mention --enable-gstreamer-peer, removal of generated files. libjava/classpath/ 2007-08-04 Matthias Klose <doko@ubuntu.com> * java/util/EnumMap.java (clone): Add cast. From-SVN: r127204
This commit is contained in:
@@ -87,6 +87,7 @@ public class DomDocument
|
||||
private final DOMImplementation implementation;
|
||||
private boolean checkingCharacters = true;
|
||||
boolean checkingWellformedness = true;
|
||||
private boolean defaultAttributes = true;
|
||||
|
||||
boolean building; // if true, skip mutation events in the tree
|
||||
|
||||
@@ -155,7 +156,15 @@ public class DomDocument
|
||||
public void setCheckingCharacters(boolean flag)
|
||||
{
|
||||
checkingCharacters = flag;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets whether to default attributes for new elements.
|
||||
*/
|
||||
public void setDefaultAttributes(boolean flag)
|
||||
{
|
||||
defaultAttributes = flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* <b>DOM L1</b>
|
||||
@@ -607,7 +616,8 @@ public class DomDocument
|
||||
domElement.localName = null;
|
||||
element = domElement;
|
||||
}
|
||||
defaultAttributes(element, name);
|
||||
if (defaultAttributes)
|
||||
setDefaultAttributes(element, name);
|
||||
return element;
|
||||
}
|
||||
|
||||
@@ -652,11 +662,12 @@ public class DomDocument
|
||||
}
|
||||
|
||||
Element element = new DomElement(this, namespaceURI, name);
|
||||
defaultAttributes(element, name);
|
||||
if (defaultAttributes)
|
||||
setDefaultAttributes(element, name);
|
||||
return element;
|
||||
}
|
||||
|
||||
private void defaultAttributes(Element element, String name)
|
||||
private void setDefaultAttributes(Element element, String name)
|
||||
{
|
||||
DomDoctype doctype = (DomDoctype) getDoctype();
|
||||
if (doctype == null)
|
||||
@@ -671,9 +682,11 @@ public class DomDocument
|
||||
for (Iterator i = info.attributes(); i != null && i.hasNext(); )
|
||||
{
|
||||
DTDAttributeTypeInfo attr = (DTDAttributeTypeInfo) i.next();
|
||||
String value = attr.value;
|
||||
if ("#IMPLIED".equals(attr.mode) && value == null)
|
||||
continue;
|
||||
DomAttr node = (DomAttr) createAttribute(attr.name);
|
||||
|
||||
String value = attr.value;
|
||||
if (value == null)
|
||||
{
|
||||
value = "";
|
||||
|
||||
Reference in New Issue
Block a user