mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
Bug 1323655 - Handle unstyled elements when applying XBL bindings. r=heycam
This commit is contained in:
parent
d549af8fc6
commit
3ae99d4463
@ -31,7 +31,7 @@ load 515829-2.html
|
||||
load 564461.xhtml
|
||||
load 570566-1.html
|
||||
load 571428-1.html
|
||||
skip-if(stylo) load 580507-1.xhtml # bug 1323655
|
||||
load 580507-1.xhtml
|
||||
load 590387.html
|
||||
load 596785-1.html
|
||||
load 596785-2.html
|
||||
|
@ -418,7 +418,17 @@ public:
|
||||
nsIPresShell* presShell = mElement->OwnerDoc()->GetShell();
|
||||
ServoStyleSet* servoSet = presShell ? presShell->StyleSet()->GetAsServo() : nullptr;
|
||||
if (servoSet) {
|
||||
servoSet->StyleNewChildren(mElement);
|
||||
// In general the element is always styled by the time we're applying XBL
|
||||
// bindings, because we need to style the element to know what the binding
|
||||
// URI is. However, programmatic consumers of the XBL service (like the
|
||||
// XML pretty printer) _can_ apply bindings without having styled the bound
|
||||
// element. We could assert against this and require the callers manually
|
||||
// resolve the style first, but it's easy enough to just handle here.
|
||||
if (MOZ_UNLIKELY(!mElement->HasServoData())) {
|
||||
servoSet->StyleNewSubtree(mElement);
|
||||
} else {
|
||||
servoSet->StyleNewChildren(mElement);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,7 @@ load 503709-1.xhtml
|
||||
skip-if(stylo) load 513375-1.xhtml # bug 1323654
|
||||
load 535632-1.xhtml
|
||||
load 574558-1.xhtml
|
||||
skip-if(stylo) load 580151-1.xhtml # bug 1323655
|
||||
load 580151-1.xhtml
|
||||
load 582138-1.xhtml
|
||||
load 612565-1.html
|
||||
load 615015-1.html
|
||||
|
Loading…
Reference in New Issue
Block a user