Changeset 80353 in webkit
- Timestamp:
- Mar 4, 2011 8:07:12 AM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r80350 r80353 1 2011-03-04 Ilya Sherman <isherman@chromium.org> 2 3 Reviewed by James Robinson. 4 5 Override paintScrollCorner() for FramelessScrollView to forego any custom scrollbar corner rendering. 6 This was previously done in ScrollbarThemeChromium, but we also need this on the Mac when the ScrollView 7 is a FramelessScrollView -- which is mostly just for Autofill. 8 In service of http://crbug.com/73772 (crash) 9 https://bugs.webkit.org/show_bug.cgi?id=55557 10 11 No tests added because this fix is Chromium-specific and the code is currently untestable from within WebKit. 12 In particular, DRT crashes when trying to render a FramelessScrollView. 13 14 * platform/ScrollbarTheme.h: 15 (WebCore::ScrollbarTheme::paintScrollCorner): Body moved to static function defaultPaintScrollCorner(). 16 (WebCore::ScrollbarTheme::defaultPaintScrollCorner): Added. 17 * platform/chromium/FramelessScrollView.cpp: 18 (WebCore::FramelessScrollView::paintContents): 19 (WebCore::FramelessScrollView::paintScrollCorner): Fix implementation moved to here from ScrollbarThemeChromium 20 * platform/chromium/FramelessScrollView.h: 21 * platform/chromium/ScrollbarThemeChromium.cpp: 22 * platform/chromium/ScrollbarThemeChromium.h: 23 1 24 2011-03-04 Yury Semikhatsky <yurys@chromium.org> 2 25 -
trunk/Source/WebCore/platform/ScrollbarTheme.h
r76248 r80353 77 77 virtual void invalidatePart(Scrollbar*, ScrollbarPart) {} 78 78 79 virtual void paintScrollCorner(ScrollView*, GraphicsContext* context, const IntRect& cornerRect) { context->fillRect(cornerRect, Color::white, ColorSpaceDeviceRGB); } 79 virtual void paintScrollCorner(ScrollView*, GraphicsContext* context, const IntRect& cornerRect) { defaultPaintScrollCorner(context, cornerRect); } 80 static void defaultPaintScrollCorner(GraphicsContext* context, const IntRect& cornerRect) { context->fillRect(cornerRect, Color::white, ColorSpaceDeviceRGB); } 80 81 81 82 virtual bool shouldCenterOnThumb(Scrollbar*, const PlatformMouseEvent&) { return false; } -
trunk/Source/WebCore/platform/chromium/FramelessScrollView.cpp
r55675 r80353 33 33 34 34 #include "FramelessScrollViewClient.h" 35 #include "ScrollbarTheme.h" 35 36 36 37 namespace WebCore { … … 73 74 } 74 75 75 void FramelessScrollView::paintContents(GraphicsContext*, const IntRect& damageRect)76 void FramelessScrollView::paintContents(GraphicsContext*, const IntRect&) 76 77 { 78 } 79 80 void FramelessScrollView::paintScrollCorner(GraphicsContext* context, const IntRect& cornerRect) 81 { 82 // ScrollbarThemeComposite::paintScrollCorner incorrectly assumes that the ScrollView is a FrameView. 83 ScrollbarTheme::defaultPaintScrollCorner(context, cornerRect); 77 84 } 78 85 -
trunk/Source/WebCore/platform/chromium/FramelessScrollView.h
r76378 r80353 75 75 protected: 76 76 // ScrollView protected methods: 77 virtual void paintContents(GraphicsContext*, const IntRect& damageRect); 77 virtual void paintContents(GraphicsContext*, const IntRect&); 78 virtual void paintScrollCorner(GraphicsContext*, const IntRect& cornerRect); 78 79 virtual void contentsResized(); 79 80 virtual void visibleContentsResized(); -
trunk/Source/WebCore/platform/chromium/ScrollbarThemeChromium.cpp
r77286 r80353 138 138 } 139 139 140 void ScrollbarThemeChromium::paintScrollCorner(ScrollView* view, GraphicsContext* context, const IntRect& cornerRect)141 {142 // ScrollbarThemeComposite::paintScrollCorner incorrectly assumes that the143 // ScrollView is a FrameView (see FramelessScrollView), so we cannot let144 // that code run. For FrameView's this is correct since we don't do custom145 // scrollbar corner rendering, which ScrollbarThemeComposite supports.146 ScrollbarTheme::paintScrollCorner(view, context, cornerRect);147 }148 149 140 } // namespace WebCore -
trunk/Source/WebCore/platform/chromium/ScrollbarThemeChromium.h
r45459 r80353 49 49 virtual IntRect trackRect(Scrollbar*, bool painting = false); 50 50 51 virtual void paintScrollCorner(ScrollView*, GraphicsContext*, const IntRect&);52 53 51 virtual void paintTrackBackground(GraphicsContext*, Scrollbar*, const IntRect&); 54 52 virtual void paintTickmarks(GraphicsContext*, Scrollbar*, const IntRect&);
Note: See TracChangeset
for help on using the changeset viewer.