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

Unified Diff: Source/core/dom/Node.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/dom/Node.cpp
diff --git a/Source/core/dom/Node.cpp b/Source/core/dom/Node.cpp
index 04356d0b344fbfe5426e8b81ea019cbf6708687a..9b58992c849e75b8c9bee0808a855ddb292a1235 100644
--- a/Source/core/dom/Node.cpp
+++ b/Source/core/dom/Node.cpp
@@ -1036,10 +1036,10 @@ bool Node::canStartSelection() const
return true;
if (renderer()) {
- LayoutStyle* style = renderer()->style();
+ const LayoutStyle& style = renderer()->styleRef();
// We allow selections to begin within an element that has -webkit-user-select: none set,
// but if the element is draggable then dragging should take priority over selection.
- if (style->userDrag() == DRAG_ELEMENT && style->userSelect() == SELECT_NONE)
+ if (style.userDrag() == DRAG_ELEMENT && style.userSelect() == SELECT_NONE)
return false;
}
return parentOrShadowHostNode() ? parentOrShadowHostNode()->canStartSelection() : true;

Powered by Google App Engine
This is Rietveld 408576698