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

Side by Side Diff: Source/core/rendering/RenderLayerModelObject.cpp

Issue 889563002: Make RenderObject::style() return a const object (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Blind fix for Mac. 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 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
7 * Copyright (C) 2010, 2012 Google Inc. All rights reserved. 7 * Copyright (C) 2010, 2012 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 84
85 RenderObject::willBeDestroyed(); 85 RenderObject::willBeDestroyed();
86 86
87 destroyLayer(); 87 destroyLayer();
88 } 88 }
89 89
90 void RenderLayerModelObject::styleWillChange(StyleDifference diff, const RenderS tyle& newStyle) 90 void RenderLayerModelObject::styleWillChange(StyleDifference diff, const RenderS tyle& newStyle)
91 { 91 {
92 s_wasFloating = isFloating(); 92 s_wasFloating = isFloating();
93 93
94 if (RenderStyle* oldStyle = style()) { 94 if (const RenderStyle* oldStyle = style()) {
95 if (parent() && diff.needsPaintInvalidationLayer()) { 95 if (parent() && diff.needsPaintInvalidationLayer()) {
96 if (oldStyle->hasAutoClip() != newStyle.hasAutoClip() 96 if (oldStyle->hasAutoClip() != newStyle.hasAutoClip()
97 || oldStyle->clip() != newStyle.clip()) 97 || oldStyle->clip() != newStyle.clip())
98 layer()->clipper().clearClipRectsIncludingDescendants(); 98 layer()->clipper().clearClipRectsIncludingDescendants();
99 } 99 }
100 } 100 }
101 101
102 RenderObject::styleWillChange(diff, newStyle); 102 RenderObject::styleWillChange(diff, newStyle);
103 } 103 }
104 104
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 if (!rect.isEmpty()) { 236 if (!rect.isEmpty()) {
237 rect.moveBy(additionalOffset); 237 rect.moveBy(additionalOffset);
238 rects.append(rect); 238 rects.append(rect);
239 } 239 }
240 } 240 }
241 } 241 }
242 } 242 }
243 243
244 } // namespace blink 244 } // namespace blink
245 245
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698