Chromium Code Reviews| Index: Source/core/css/resolver/StyleResolver.cpp |
| diff --git a/Source/core/css/resolver/StyleResolver.cpp b/Source/core/css/resolver/StyleResolver.cpp |
| index 6b7e2e1d73d0f7bc42cbace38f311f3d8af8d2db..d87f45a20c47042df11345364da75b8eb878692c 100644 |
| --- a/Source/core/css/resolver/StyleResolver.cpp |
| +++ b/Source/core/css/resolver/StyleResolver.cpp |
| @@ -1245,7 +1245,7 @@ PassRefPtr<RenderStyle> StyleResolver::pseudoStyleForElement(Element* e, const P |
| state.initForStyleResolve(document(), e, parentStyle); |
| - if (m_state.parentStyle()) { |
| + if (pseudoStyleRequest.pseudoId != BACKDROP && m_state.parentStyle()) { |
|
Julien - ping for review
2013/06/27 22:49:00
It's weird to disallow style cascading for ::backd
falken
2013/06/28 08:06:52
The spec says ::backdrop "does not inherit from an
|
| state.setStyle(RenderStyle::create()); |
| state.style()->inheritFrom(m_state.parentStyle()); |
| } else { |
| @@ -1494,8 +1494,10 @@ void StyleResolver::adjustRenderStyle(RenderStyle* style, RenderStyle* parentSty |
| style->setDisplay(BLOCK); |
| // Per the spec, position 'static' and 'relative' in the top layer compute to 'absolute'. |
| - if (e && e->isInTopLayer() && (style->position() == StaticPosition || style->position() == RelativePosition)) |
| - style->setPosition(AbsolutePosition); |
| + if ((e && e->isInTopLayer()) || style->styleType() == BACKDROP) { |
| + if (style->position() == StaticPosition || style->position() == RelativePosition) |
| + style->setPosition(AbsolutePosition); |
| + } |
| // Absolute/fixed positioned elements, floating elements and the document element need block-like outside display. |
| if (style->hasOutOfFlowPosition() || style->isFloating() || (e && e->document()->documentElement() == e)) |