Changeset 96348 in webkit
- Timestamp:
- Sep 29, 2011 12:40:34 PM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r96346 r96348 1 2011-09-29 Alexey Proskuryakov <ap@apple.com> 2 3 https://bugs.webkit.org/show_bug.cgi?id=69040 4 ScrollbarThemeComposite requires a ScrollView to draw scroll corner 5 6 Reviewed by Simon Fraser. 7 8 No new tests. This will be needed later. 9 10 * platform/ScrollbarThemeComposite.cpp: 11 (WebCore::pageForScrollView): 12 (WebCore::ScrollbarThemeComposite::paintScrollCorner): 13 Use pageForScrollView() function which already existed in this file, used in another similar 14 location. 15 16 * platform/chromium/FramelessScrollView.cpp: 17 * platform/chromium/FramelessScrollView.h: 18 * platform/gtk/ScrollbarThemeGtk.cpp: 19 * platform/gtk/ScrollbarThemeGtk.h: 20 * platform/wx/ScrollbarThemeWx.cpp: 21 * platform/wx/ScrollbarThemeWx.h: 22 All these overrides are no longer needed, ScrollbarThemeComposite will do the right thing. 23 24 * platform/qt/ScrollbarThemeQt.cpp: (WebCore::ScrollbarThemeQt::paintScrollCorner): 25 Removed a special case for updatingControlTints phase. The same case is present in cross-platform 26 code now, and Qt doesn't have any custom subclasses of ScrollableArea or ScrollView to need 27 special handling. 28 This was added in r37377 without a bug or much ChangeLog explanation. 29 1 30 2011-09-29 Mark Hahnenberg <mhahnenberg@apple.com> 2 31 -
trunk/Source/WebCore/platform/ScrollbarThemeComposite.cpp
r95901 r96348 42 42 namespace WebCore { 43 43 44 #if PLATFORM(WIN)45 44 static Page* pageForScrollView(ScrollView* view) 46 45 { … … 54 53 return frameView->frame()->page(); 55 54 } 56 #endif57 55 58 56 bool ScrollbarThemeComposite::paint(Scrollbar* scrollbar, GraphicsContext* graphicsContext, const IntRect& damageRect) … … 309 307 void ScrollbarThemeComposite::paintScrollCorner(ScrollView* view, GraphicsContext* context, const IntRect& cornerRect) 310 308 { 311 FrameView* frameView = static_cast<FrameView*>(view); 312 Page* page = frameView->frame() ? frameView->frame()->page() : 0; 309 Page* page = pageForScrollView(view); 313 310 if (page && page->settings()->shouldPaintCustomScrollbars() && page->chrome()->client()->paintCustomScrollCorner(context, cornerRect)) 314 311 return; -
trunk/Source/WebCore/platform/chromium/FramelessScrollView.cpp
r95901 r96348 84 84 } 85 85 86 void FramelessScrollView::paintScrollCorner(GraphicsContext* context, const IntRect& cornerRect)87 {88 // ScrollbarThemeComposite::paintScrollCorner incorrectly assumes that the ScrollView is a FrameView.89 ScrollbarTheme::defaultPaintScrollCorner(context, cornerRect);90 }91 92 86 void FramelessScrollView::contentsResized() 93 87 { -
trunk/Source/WebCore/platform/chromium/FramelessScrollView.h
r95901 r96348 89 89 // ScrollView protected methods: 90 90 virtual void paintContents(GraphicsContext*, const IntRect&); 91 virtual void paintScrollCorner(GraphicsContext*, const IntRect& cornerRect);92 91 virtual void contentsResized(); 93 92 virtual void visibleContentsResized(); -
trunk/Source/WebCore/platform/gtk/ScrollbarThemeGtk.cpp
r95901 r96348 252 252 } 253 253 254 void ScrollbarThemeGtk::paintScrollCorner(ScrollView* view, GraphicsContext* context, const IntRect& cornerRect)255 {256 // ScrollbarThemeComposite::paintScrollCorner incorrectly assumes that the257 // ScrollView is a FrameView (see FramelessScrollView), so we cannot let258 // that code run. For FrameView's this is correct since we don't do custom259 // scrollbar corner rendering, which ScrollbarThemeComposite supports.260 ScrollbarTheme::paintScrollCorner(view, context, cornerRect);261 }262 263 254 bool ScrollbarThemeGtk::shouldCenterOnThumb(Scrollbar*, const PlatformMouseEvent& event) 264 255 { -
trunk/Source/WebCore/platform/gtk/ScrollbarThemeGtk.h
r95901 r96348 49 49 void paintThumb(GraphicsContext*, Scrollbar*, const IntRect&); 50 50 virtual void paintButton(GraphicsContext*, Scrollbar*, const IntRect&, ScrollbarPart); 51 virtual void paintScrollCorner(ScrollView*, GraphicsContext*, const IntRect&);52 51 virtual bool shouldCenterOnThumb(Scrollbar*, const PlatformMouseEvent&); 53 52 virtual int scrollbarThickness(ScrollbarControlSize); -
trunk/Source/WebCore/platform/qt/ScrollbarThemeQt.cpp
r95901 r96348 242 242 } 243 243 244 void ScrollbarThemeQt::paintScrollCorner(ScrollView* scrollView, GraphicsContext* context, const IntRect& rect) 245 { 246 if (context->updatingControlTints()) { 247 scrollView->invalidateRect(rect); 248 return; 249 } 250 244 void ScrollbarThemeQt::paintScrollCorner(ScrollView*, GraphicsContext* context, const IntRect& rect) 245 { 251 246 StylePainter p(this, context); 252 247 if (!p.isValid()) -
trunk/Source/WebCore/platform/wx/ScrollbarThemeWx.cpp
r95901 r96348 180 180 } 181 181 182 void ScrollbarThemeWx::paintScrollCorner(ScrollView* view, GraphicsContext* context, const IntRect& cornerRect)183 {184 // ScrollbarThemeComposite::paintScrollCorner incorrectly assumes that the185 // ScrollView is a FrameView (see FramelessScrollView), so we cannot let186 // that code run. For FrameView's this is correct since we don't do custom187 // scrollbar corner rendering, which ScrollbarThemeComposite supports.188 ScrollbarTheme::paintScrollCorner(view, context, cornerRect);189 }190 191 182 bool ScrollbarThemeWx::paint(Scrollbar* scrollbar, GraphicsContext* context, const IntRect& rect) 192 183 { -
trunk/Source/WebCore/platform/wx/ScrollbarThemeWx.h
r95901 r96348 37 37 virtual int scrollbarThickness(ScrollbarControlSize = RegularScrollbar); 38 38 virtual bool paint(Scrollbar*, GraphicsContext*, const IntRect&); 39 40 virtual void paintScrollCorner(ScrollView*, GraphicsContext*, const IntRect& cornerRect);41 39 42 40 protected:
Note: See TracChangeset
for help on using the changeset viewer.