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

Side by Side 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: 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/layout/style/LayoutStyle.h ('k') | Source/core/page/EventHandler.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org) 2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
4 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. 4 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 m_cachedPseudoStyles->append(pseudo); 324 m_cachedPseudoStyles->append(pseudo);
325 325
326 return result; 326 return result;
327 } 327 }
328 328
329 void LayoutStyle::removeCachedPseudoStyle(PseudoId pid) 329 void LayoutStyle::removeCachedPseudoStyle(PseudoId pid)
330 { 330 {
331 if (!m_cachedPseudoStyles) 331 if (!m_cachedPseudoStyles)
332 return; 332 return;
333 for (size_t i = 0; i < m_cachedPseudoStyles->size(); ++i) { 333 for (size_t i = 0; i < m_cachedPseudoStyles->size(); ++i) {
334 LayoutStyle* pseudoStyle = m_cachedPseudoStyles->at(i).get(); 334 const LayoutStyle& pseudoStyle = *m_cachedPseudoStyles->at(i);
335 if (pseudoStyle->styleType() == pid) { 335 if (pseudoStyle.styleType() == pid) {
336 m_cachedPseudoStyles->remove(i); 336 m_cachedPseudoStyles->remove(i);
337 return; 337 return;
338 } 338 }
339 } 339 }
340 } 340 }
341 341
342 bool LayoutStyle::inheritedNotEqual(const LayoutStyle& other) const 342 bool LayoutStyle::inheritedNotEqual(const LayoutStyle& other) const
343 { 343 {
344 return inherited_flags != other.inherited_flags 344 return inherited_flags != other.inherited_flags
345 || inherited != other.inherited 345 || inherited != other.inherited
(...skipping 1333 matching lines...) Expand 10 before | Expand all | Expand 10 after
1679 horizontal || includeLogicalRightEdge); 1679 horizontal || includeLogicalRightEdge);
1680 1680
1681 edges[BSLeft] = BorderEdge(borderLeftWidth(), 1681 edges[BSLeft] = BorderEdge(borderLeftWidth(),
1682 visitedDependentColor(CSSPropertyBorderLeftColor), 1682 visitedDependentColor(CSSPropertyBorderLeftColor),
1683 borderLeftStyle(), 1683 borderLeftStyle(),
1684 borderLeftIsTransparent(), 1684 borderLeftIsTransparent(),
1685 !horizontal || includeLogicalLeftEdge); 1685 !horizontal || includeLogicalLeftEdge);
1686 } 1686 }
1687 1687
1688 } // namespace blink 1688 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/layout/style/LayoutStyle.h ('k') | Source/core/page/EventHandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698