summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/css
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2012-04-12 12:28:30 +0100
committerSteve Block <steveblock@google.com>2012-04-12 17:42:38 +0100
commitd60e027437c746fb2412aef1c1cad6b1347c1b5e (patch)
tree3a5ad24793bacf9a1a510e0b93564127c0fd2d0d /Source/WebCore/css
parentaee2a095ee4baa61c2e8b86cfa8076967a7f34ac (diff)
downloadexternal_webkit-d60e027437c746fb2412aef1c1cad6b1347c1b5e.zip
external_webkit-d60e027437c746fb2412aef1c1cad6b1347c1b5e.tar.gz
external_webkit-d60e027437c746fb2412aef1c1cad6b1347c1b5e.tar.bz2
Cherry-pick WebKit change r92139 to fix a LayoutTest crash
editing/input/search-field-crash-in-designmode.html Manually resolved a merge conflict in CSSStyleSelector::isAtShadowBoundary() due to http://trac.webkit.org/changeset/88476. See http://trac.webkit.org/changeset/92139 Bug: 6329073 Change-Id: If869bd58a689bb918ef47048c4f5d2e84e4b6f89
Diffstat (limited to 'Source/WebCore/css')
-rw-r--r--Source/WebCore/css/CSSStyleSelector.cpp22
1 files changed, 13 insertions, 9 deletions
diff --git a/Source/WebCore/css/CSSStyleSelector.cpp b/Source/WebCore/css/CSSStyleSelector.cpp
index 8edf0dd..613bf4a 100644
--- a/Source/WebCore/css/CSSStyleSelector.cpp
+++ b/Source/WebCore/css/CSSStyleSelector.cpp
@@ -1237,6 +1237,15 @@ PassRefPtr<RenderStyle> 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
@@ -1279,6 +1288,10 @@ PassRefPtr<RenderStyle> 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();
@@ -1773,15 +1786,6 @@ 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.