Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(725)

Unified Diff: Source/core/css/resolver/StyleResolverState.cpp

Issue 19232002: Do not modify document in StyleResolverState (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/css/resolver/StyleResolverState.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/resolver/StyleResolverState.cpp
diff --git a/Source/core/css/resolver/StyleResolverState.cpp b/Source/core/css/resolver/StyleResolverState.cpp
index 8a1f2f6885c146c9dc3119b8c572c4e791d55acf..4ca481b38fdf9dd22bc930aabd334254219dce97 100644
--- a/Source/core/css/resolver/StyleResolverState.cpp
+++ b/Source/core/css/resolver/StyleResolverState.cpp
@@ -47,7 +47,7 @@ ElementResolveContext::ElementResolveContext(Element* element)
m_rootElementStyle = documentElement && element != documentElement ? documentElement->renderStyle() : documentStyle;
}
-StyleResolveScope::StyleResolveScope(StyleResolverState* state, Document* document, Element* e, RenderStyle* parentStyle, RenderRegion* regionForStyling)
+StyleResolveScope::StyleResolveScope(StyleResolverState* state, const Document* document, Element* e, RenderStyle* parentStyle, RenderRegion* regionForStyling)
: m_state(state)
{
m_state->initForStyleResolve(document, e, parentStyle, regionForStyling);
@@ -67,7 +67,7 @@ void StyleResolverState::clear()
m_elementStyleResources.clear();
}
-void StyleResolverState::initForStyleResolve(Document* newDocument, Element* newElement, RenderStyle* parentStyle, RenderRegion* regionForStyling)
+void StyleResolverState::initForStyleResolve(const Document* newDocument, Element* newElement, RenderStyle* parentStyle, RenderRegion* regionForStyling)
{
ASSERT(!element() || document() == newDocument);
if (newElement != element()) {
@@ -75,12 +75,6 @@ void StyleResolverState::initForStyleResolve(Document* newDocument, Element* new
m_elementContext = ElementResolveContext(newElement);
else
m_elementContext = ElementResolveContext();
-
- // FIXME: This method should not be modifying Document.
- if (m_elementContext.isDocumentElement()) {
- document()->setDirectionSetOnDocumentElement(false);
- document()->setWritingModeSetOnDocumentElement(false);
- }
}
m_regionForStyling = regionForStyling;
« no previous file with comments | « Source/core/css/resolver/StyleResolverState.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698