Bug 560455. Be more careful about the namespace when finding HTML frame construction data. r=bzbarsky

This commit is contained in:
Timothy Nikkel 2010-07-15 14:20:32 -05:00
parent 1c8da3bc96
commit 573b988e78
4 changed files with 32 additions and 4 deletions

View File

@ -3551,8 +3551,7 @@ nsCSSFrameConstructor::FindHTMLData(nsIContent* aContent,
// Ignore the tag if it's not HTML content and if it doesn't extend (via XBL)
// a valid HTML namespace. This check must match the one in
// ShouldHaveFirstLineStyle.
if (!aContent->IsHTML() &&
aNameSpaceID != kNameSpaceID_XHTML) {
if (aNameSpaceID != kNameSpaceID_XHTML) {
return nsnull;
}
@ -9171,8 +9170,7 @@ nsCSSFrameConstructor::ShouldHaveFirstLineStyle(nsIContent* aContent,
&namespaceID);
// This check must match the one in FindHTMLData.
hasFirstLine = tag != nsGkAtoms::fieldset ||
(namespaceID != kNameSpaceID_XHTML &&
!aContent->IsHTML());
namespaceID != kNameSpaceID_XHTML;
}
return hasFirstLine;

View File

@ -0,0 +1,9 @@
<?xml version="1.0"?>
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<hbox style="display: block">
<button style="-moz-binding: none; width: 0; display: block;
overflow: hidden; padding: 10px; border: 1px solid black; ">Correct</button>
</hbox>
</window>

View File

@ -0,0 +1,20 @@
<?xml version="1.0"?>
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<hbox style="display: none">
<bindings xmlns="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<binding id="test" extends="xul:button">
</binding>
</bindings>
</hbox>
<hbox style="display: block">
<div style="-moz-binding: url(#test); width: 0; display: block;
overflow: hidden; padding: 10px; border: 1px solid black; "
xmlns="http://www.w3.org/1999/xhtml">Correct</div>
</hbox>
</window>

View File

@ -1431,6 +1431,7 @@ random-if(!haveTestPlugin) == 546071-1.html 546071-1-ref.html
== 556661-1.html 556661-1-ref.html
== 557736-1.html 557736-1-ref.html
== 559284-1.html 559284-1-ref.html
== 560455-1.xul 560455-1-ref.xul
== 561981-1.html 561981-1-ref.html
== 561981-2.html 561981-2-ref.html
== 561981-3.html 561981-3-ref.html