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

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: 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 unified diff | Download patch | Annotate | Revision Log
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 1319 matching lines...) Expand 10 before | Expand all | Expand 10 after
1665 horizontal || includeLogicalRightEdge); 1665 horizontal || includeLogicalRightEdge);
1666 1666
1667 edges[BSLeft] = BorderEdge(borderLeftWidth(), 1667 edges[BSLeft] = BorderEdge(borderLeftWidth(),
1668 visitedDependentColor(CSSPropertyBorderLeftColor), 1668 visitedDependentColor(CSSPropertyBorderLeftColor),
1669 borderLeftStyle(), 1669 borderLeftStyle(),
1670 borderLeftIsTransparent(), 1670 borderLeftIsTransparent(),
1671 !horizontal || includeLogicalLeftEdge); 1671 !horizontal || includeLogicalLeftEdge);
1672 } 1672 }
1673 1673
1674 } // namespace blink 1674 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698