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

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: Fixed web/mac/WebSubstringUtil.mm Created 5 years, 10 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 43d37084b2fb61d5d7922e267ce4444a0d9d7258..6c93eb76bb22da001d61a810ce2352883103dd28 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.layoutStyle() && (element.document().styleEngine()->usesSiblingRules() || element.layoutStyle()->unique()))
- element.layoutStyle()->setEmptyState(result);
+ else if (element.mutableLayoutStyle() && (element.document().styleEngine()->usesSiblingRules() || element.mutableLayoutStyle()->unique()))
+ element.mutableLayoutStyle()->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) {
- LayoutStyle* childStyle = context.elementStyle ? context.elementStyle : element.layoutStyle();
+ LayoutStyle* childStyle = context.elementStyle ? context.elementStyle : element.mutableLayoutStyle();
dstockwell 2015/02/19 00:41:50 Why this change? setUnique() is const now (given m
Julien - ping for review 2015/02/19 21:04:13 Good catch, updated.
if (childStyle)
childStyle->setUnique();
parent->setChildrenAffectedByForwardPositionalRules();

Powered by Google App Engine
This is Rietveld 408576698