Ignore whitespace-only children of XUL boxes (like the XUL content sink does in the content tree, when in XUL documents). b=403505 r+sr=roc a=blocking1.9+

This commit is contained in:
dbaron%dbaron.org 2007-11-15 18:07:11 +00:00
Родитель af678afb37
Коммит 0b49a262db
4 изменённых файлов: 22 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1 @@
<?xml version="1.0"?><!DOCTYPE window><window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"><hbox><label value="test" flex="3" /><label value="test2" /><label value="test3" flex="1" /></hbox></window>

Просмотреть файл

@ -0,0 +1,13 @@
<?xml version="1.0"?>
<!--
Intentionally testing XUL loaded through the XML content sink rather
than the XUL content sink.
-->
<!DOCTYPE window>
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<hbox>
<label value="test" flex="3" />
<label value="test2" />
<label value="test3" flex="1" />
</hbox>
</window>

Просмотреть файл

@ -443,6 +443,7 @@ fails == 393655-2.html 393655-2-ref.html # Remove 'fails' when 393655 lands
== 400171-2c.html 400171-2-ref.html
== 400421-1.html 400421-1-ref.html
== 400826-1.html 400826-1-ref.html
== 403505-1.xml 403505-1-ref.xul
== 403519-1.html 403519-1-ref.html
== 403656-1.html 403656-1-ref.html
== 403656-2.html 403656-2-ref.html

Просмотреть файл

@ -201,6 +201,13 @@ nsBoxFrame::Init(nsIContent* aContent,
nsresult rv = nsContainerFrame::Init(aContent, aParent, aPrevInFlow);
NS_ENSURE_SUCCESS(rv, rv);
// record that children that are ignorable whitespace should be excluded
// (When content was loaded via the XUL content sink, it's already
// been excluded, but we need this for when the XUL namespace is used
// in other MIME types or when the XUL CSS display types are used with
// non-XUL elements.)
mState |= NS_FRAME_EXCLUDE_IGNORABLE_WHITESPACE;
MarkIntrinsicWidthsDirty();
// see if we need a widget