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

Side by Side Diff: Source/WebCore/rendering/RenderScrollbarPart.cpp

Issue 13679002: Add StyleChangeState to get rid of a bunch of static state in the render tree. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 8 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) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 void RenderScrollbarPart::computePreferredLogicalWidths() 133 void RenderScrollbarPart::computePreferredLogicalWidths()
134 { 134 {
135 if (!preferredLogicalWidthsDirty()) 135 if (!preferredLogicalWidthsDirty())
136 return; 136 return;
137 137
138 m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = 0; 138 m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = 0;
139 139
140 setPreferredLogicalWidthsDirty(false); 140 setPreferredLogicalWidthsDirty(false);
141 } 141 }
142 142
143 void RenderScrollbarPart::styleWillChange(StyleDifference diff, const RenderStyl e* newStyle) 143 void RenderScrollbarPart::styleWillChange(StyleDifference diff, const RenderStyl e* newStyle, StyleChangeState& state)
144 { 144 {
145 RenderBlock::styleWillChange(diff, newStyle); 145 RenderBlock::styleWillChange(diff, newStyle, state);
146 setInline(false); 146 setInline(false);
147 } 147 }
148 148
149 void RenderScrollbarPart::styleDidChange(StyleDifference diff, const RenderStyle * oldStyle) 149 void RenderScrollbarPart::styleDidChange(StyleDifference diff, const RenderStyle * oldStyle, const StyleChangeState& state)
150 { 150 {
151 RenderBlock::styleDidChange(diff, oldStyle); 151 RenderBlock::styleDidChange(diff, oldStyle, state);
152 setInline(false); 152 setInline(false);
153 clearPositionedState(); 153 clearPositionedState();
154 setFloating(false); 154 setFloating(false);
155 setHasOverflowClip(false); 155 setHasOverflowClip(false);
156 if (oldStyle && m_scrollbar && m_part != NoPart && diff >= StyleDifferenceRe paint) 156 if (oldStyle && m_scrollbar && m_part != NoPart && diff >= StyleDifferenceRe paint)
157 m_scrollbar->theme()->invalidatePart(m_scrollbar, m_part); 157 m_scrollbar->theme()->invalidatePart(m_scrollbar, m_part);
158 } 158 }
159 159
160 void RenderScrollbarPart::imageChanged(WrappedImagePtr image, const IntRect* rec t) 160 void RenderScrollbarPart::imageChanged(WrappedImagePtr image, const IntRect* rec t)
161 { 161 {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 } 197 }
198 198
199 RenderObject* RenderScrollbarPart::rendererOwningScrollbar() const 199 RenderObject* RenderScrollbarPart::rendererOwningScrollbar() const
200 { 200 {
201 if (!m_scrollbar) 201 if (!m_scrollbar)
202 return 0; 202 return 0;
203 return m_scrollbar->owningRenderer(); 203 return m_scrollbar->owningRenderer();
204 } 204 }
205 205
206 } 206 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698