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

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

Issue 613503002: Move paint code for RenderScrollbar and RenderScrollbarPart into ScrollbarPainter. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 if (frameView->isFrameViewScrollCorner(this)) { 162 if (frameView->isFrameViewScrollCorner(this)) {
163 frameView->invalidateScrollCorner(frameView->scrollCornerRect()) ; 163 frameView->invalidateScrollCorner(frameView->scrollCornerRect()) ;
164 return; 164 return;
165 } 165 }
166 } 166 }
167 167
168 RenderBlock::imageChanged(image, rect); 168 RenderBlock::imageChanged(image, rect);
169 } 169 }
170 } 170 }
171 171
172 void RenderScrollbarPart::paintIntoRect(GraphicsContext* graphicsContext, const LayoutPoint& paintOffset, const LayoutRect& rect)
173 {
174 // Make sure our dimensions match the rect.
175 setLocation(rect.location() - toSize(paintOffset));
176 setWidth(rect.width());
177 setHeight(rect.height());
178
179 // Now do the paint.
180 PaintInfo paintInfo(graphicsContext, pixelSnappedIntRect(rect), PaintPhaseBl ockBackground, PaintBehaviorNormal);
181 paint(paintInfo, paintOffset);
182 paintInfo.phase = PaintPhaseChildBlockBackgrounds;
183 paint(paintInfo, paintOffset);
184 paintInfo.phase = PaintPhaseFloat;
185 paint(paintInfo, paintOffset);
186 paintInfo.phase = PaintPhaseForeground;
187 paint(paintInfo, paintOffset);
188 paintInfo.phase = PaintPhaseOutline;
189 paint(paintInfo, paintOffset);
190 }
191
192 RenderObject* RenderScrollbarPart::rendererOwningScrollbar() const 172 RenderObject* RenderScrollbarPart::rendererOwningScrollbar() const
193 { 173 {
194 if (!m_scrollbar) 174 if (!m_scrollbar)
195 return 0; 175 return 0;
196 return m_scrollbar->owningRenderer(); 176 return m_scrollbar->owningRenderer();
197 } 177 }
198 178
199 } 179 }
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderScrollbarPart.h ('k') | Source/core/rendering/RenderScrollbarTheme.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698