Chromium Code Reviews

Unified Diff: third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp

Issue 2107233002: Reland "Implement FullScreen using top layer." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix ::backdrop for replaced content Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp
diff --git a/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp b/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp
index 21f77974b4d1972111d3706080b499877612f2c9..d98cbd86379dc88a892b72ac056d17a23686a3f3 100644
--- a/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp
@@ -887,7 +887,10 @@ PseudoElement* StyleResolver::createPseudoElementIfNeeded(Element& parent, Pseud
if (pseudoId == PseudoIdFirstLetter && (parent.isSVGElement() || !FirstLetterPseudoElement::firstLetterTextLayoutObject(parent)))
return nullptr;
- if (!canHaveGeneratedChildren(*parentLayoutObject))
+ // The backdrop pseudo element generates a new stacking context and its
+ // layout object does not become a child of |parentLayoutObject|. The
+ // exemption is needed so that replaced content also gets a backdrop.
+ if (pseudoId != PseudoIdBackdrop && !canHaveGeneratedChildren(*parentLayoutObject))
foolip 2016/07/07 16:11:55 The comment is written with confidence, but please
eae 2016/07/12 17:09:49 Can we add asserts to ensure that our assumptions
foolip 2016/07/12 20:19:48 Good, idea, at some point it should be possible to
return nullptr;
ComputedStyle* parentStyle = parentLayoutObject->mutableStyle();

Powered by Google App Engine