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

Unified Diff: Source/core/layout/style/LayoutStyle.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/layout/style/LayoutStyle.cpp
diff --git a/Source/core/layout/style/LayoutStyle.cpp b/Source/core/layout/style/LayoutStyle.cpp
index dffc38df541777fb9afcde630341b37d4ba0f70c..4c3875614249d80f116eca03f3db75a448dc42e7 100644
--- a/Source/core/layout/style/LayoutStyle.cpp
+++ b/Source/core/layout/style/LayoutStyle.cpp
@@ -331,8 +331,8 @@ void LayoutStyle::removeCachedPseudoStyle(PseudoId pid)
if (!m_cachedPseudoStyles)
return;
for (size_t i = 0; i < m_cachedPseudoStyles->size(); ++i) {
- LayoutStyle* pseudoStyle = m_cachedPseudoStyles->at(i).get();
- if (pseudoStyle->styleType() == pid) {
+ const LayoutStyle& pseudoStyle = *m_cachedPseudoStyles->at(i);
+ if (pseudoStyle.styleType() == pid) {
m_cachedPseudoStyles->remove(i);
return;
}

Powered by Google App Engine
This is Rietveld 408576698