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

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: Updated change after Doug's review. 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
« no previous file with comments | « Source/core/css/CSSGradientValue.cpp ('k') | Source/core/css/resolver/ElementResolveContext.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/SelectorChecker.cpp
diff --git a/Source/core/css/SelectorChecker.cpp b/Source/core/css/SelectorChecker.cpp
index caa4eaccf6f50f87e4270a0b7bcf17f6fe99635b..175765ebb8fcf96ba8275e4d07303ca7ac273a19 100644
--- a/Source/core/css/SelectorChecker.cpp
+++ b/Source/core/css/SelectorChecker.cpp
@@ -625,8 +625,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;
}
@@ -702,7 +702,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();
+ const LayoutStyle* childStyle = context.elementStyle ? context.elementStyle : element.layoutStyle();
if (childStyle)
childStyle->setUnique();
parent->setChildrenAffectedByForwardPositionalRules();
« no previous file with comments | « Source/core/css/CSSGradientValue.cpp ('k') | Source/core/css/resolver/ElementResolveContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698