From 95217a662a9bdf75bcd22acb92bccce312ea974b Mon Sep 17 00:00:00 2001 From: Teng-Hui Zhu Date: Mon, 16 Apr 2012 15:08:36 -0700 Subject: Revert "Cherry-pick WebKit change r92139 to fix a LayoutTest crash" This was causing HTML5 video to crash. bug:6342146 This reverts commit d60e027437c746fb2412aef1c1cad6b1347c1b5e. Change-Id: I15893f6c49bba2f0f738590d29c8b0c9024a98e6 --- Source/WebCore/css/CSSStyleSelector.cpp | 22 +++++++++------------- Source/WebCore/dom/Node.cpp | 2 +- 2 files changed, 10 insertions(+), 14 deletions(-) (limited to 'Source/WebCore') diff --git a/Source/WebCore/css/CSSStyleSelector.cpp b/Source/WebCore/css/CSSStyleSelector.cpp index e49ad2a..2424349 100644 --- a/Source/WebCore/css/CSSStyleSelector.cpp +++ b/Source/WebCore/css/CSSStyleSelector.cpp @@ -1237,15 +1237,6 @@ PassRefPtr CSSStyleSelector::styleForDocument(Document* document) return documentStyle.release(); } -static inline bool isAtShadowBoundary(Element* element) -{ - if (!element) - return false; - - ContainerNode* parentNode = element->parentNode(); - return parentNode && parentNode->isShadowBoundary(); -} - // If resolveForRootDefault is true, style based on user agent style sheet only. This is used in media queries, where // relative units are interpreted according to document root element style, styled only with UA stylesheet @@ -1288,10 +1279,6 @@ PassRefPtr CSSStyleSelector::styleForElement(Element* e, RenderStyl initForStyleResolve(e, defaultParent); } - // Don't propagate user-modify into shadow DOM - if (isAtShadowBoundary(e)) - m_style->setUserModify(RenderStyle::initialUserModify()); - m_checker.m_matchVisitedPseudoClass = matchVisitedPseudoClass; m_style = RenderStyle::create(); @@ -1786,6 +1773,15 @@ static void addIntrinsicMargins(RenderStyle* style) } } +static inline bool isAtShadowBoundary(Element* element) +{ + if (!element) + return false; + + ContainerNode* parentNode = element->parentNode(); + return parentNode && parentNode->isShadowBoundary(); +} + void CSSStyleSelector::adjustRenderStyle(RenderStyle* style, RenderStyle* parentStyle, Element *e) { // Cache our original display. diff --git a/Source/WebCore/dom/Node.cpp b/Source/WebCore/dom/Node.cpp index ec5c423..da4312c 100644 --- a/Source/WebCore/dom/Node.cpp +++ b/Source/WebCore/dom/Node.cpp @@ -770,7 +770,7 @@ bool Node::isContentEditable() const bool Node::rendererIsEditable(EditableLevel editableLevel) const { - if (document()->frame() && document()->frame()->page() && document()->frame()->page()->isEditable() && !shadowTreeRootNode()) + if (document()->frame() && document()->frame()->page() && document()->frame()->page()->isEditable()) return true; // Ideally we'd call ASSERT(!needsStyleRecalc()) here, but -- cgit v1.1