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

Unified Diff: Source/core/css/SelectorChecker.cpp

Issue 889563002: Make RenderObject::style() return a const object (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Blind fix for Mac. Created 5 years, 11 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
Index: Source/core/css/SelectorChecker.cpp
diff --git a/Source/core/css/SelectorChecker.cpp b/Source/core/css/SelectorChecker.cpp
index 410cea96028b933a79131d0c0dc204ad93a89cdd..3de60a812ccc84cf4e9bc0c981a32a3cd5226f26 100644
--- a/Source/core/css/SelectorChecker.cpp
+++ b/Source/core/css/SelectorChecker.cpp
@@ -613,8 +613,8 @@ bool SelectorChecker::checkPseudoClass(const SelectorCheckingContext& context, c
element.setStyleAffectedByEmpty();
if (context.elementStyle)
context.elementStyle->setEmptyState(result);
- else if (element.renderStyle() && (element.document().styleEngine()->usesSiblingRules() || element.renderStyle()->unique()))
- element.renderStyle()->setEmptyState(result);
+ else if (element.mutableRenderStyle() && (element.document().styleEngine()->usesSiblingRules() || element.mutableRenderStyle()->unique()))
+ element.mutableRenderStyle()->setEmptyState(result);
}
return result;
}
@@ -690,7 +690,7 @@ bool SelectorChecker::checkPseudoClass(const SelectorCheckingContext& context, c
if (ContainerNode* parent = element.parentElementOrDocumentFragment()) {
int count = 1 + siblingTraversalStrategy.countElementsBefore(element);
if (m_mode == ResolvingStyle) {
- RenderStyle* childStyle = context.elementStyle ? context.elementStyle : element.renderStyle();
+ RenderStyle* childStyle = context.elementStyle ? context.elementStyle : element.mutableRenderStyle();
if (childStyle)
childStyle->setUnique();
parent->setChildrenAffectedByForwardPositionalRules();

Powered by Google App Engine
This is Rietveld 408576698