Bug 1387942: Relax backdrop frame parenthood assertion, and re-enable test. r?xidorn
MozReview-Commit-ID: 99I3apwe52l
--- a/dom/html/test/test_fullscreen-api.html
+++ b/dom/html/test/test_fullscreen-api.html
@@ -72,25 +72,16 @@ function shouldSkipTest(test) {
navigator.platform.indexOf('Linux') >= 0) {
for (let item of gLinuxE10sSkipList) {
if (item.test == test) {
todo(false, `${test} skipped due to ${item.reason}`);
return true;
}
}
}
- if (SpecialPowers.DOMWindowUtils.isStyledByServo &&
- SpecialPowers.isDebugBuild &&
- navigator.platform.indexOf('Mac') >= 0) {
- if (test == "file_fullscreen-backdrop.html") {
- todo(false, `${test} skipped due to bug 1387942`);
- return true;
- }
- }
-
return false;
}
function waitForEvent(eventTarget, eventName, checkFn, callback) {
eventTarget.addEventListener(eventName, function listener(event) {
if (checkFn && !checkFn(event)) {
return;
}
--- a/layout/base/ServoRestyleManager.cpp
+++ b/layout/base/ServoRestyleManager.cpp
@@ -551,18 +551,20 @@ UpdateBackdropIfNeeded(nsIFrame* aFrame,
RefPtr<nsStyleContext> newContext =
aStyleSet.ResolvePseudoElementStyle(aFrame->GetContent()->AsElement(),
CSSPseudoElementType::backdrop,
aFrame->StyleContext()->AsServo(),
/* aPseudoElement = */ nullptr);
// NOTE(emilio): We can't use the changes handled for the owner of the
- // backdrop frame, since it's out of flow, and parented to the viewport frame.
- MOZ_ASSERT(backdropFrame->GetParent()->IsViewportFrame());
+ // backdrop frame, since it's out of flow, and parented to the viewport or
+ // canvas frame (depending on the `position` value).
+ MOZ_ASSERT(backdropFrame->GetParent()->IsViewportFrame() ||
+ backdropFrame->GetParent()->IsCanvasFrame());
nsTArray<nsIFrame*> wrappersToRestyle;
ServoRestyleState state(aStyleSet, aChangeList, wrappersToRestyle);
aFrame->UpdateStyleOfOwnedChildFrame(backdropFrame, newContext, state);
}
static void
UpdateFirstLetterIfNeeded(nsIFrame* aFrame, ServoRestyleState& aRestyleState)
{