Changeset 109483 in webkit
- Timestamp:
- Mar 1, 2012 6:39:38 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r109480 r109483 1 2012-03-01 MORITA Hajime <morrita@google.com> 2 3 Custom scrollbars do not support transparency 4 https://bugs.webkit.org/show_bug.cgi?id=50547 5 6 Reviewed by James Robinson. 7 8 * fast/frames/transparent-scrollbar.html: Added. 9 * fast/frames/transparent-scrollbar-expected.txt: Added. 10 * platform/chromium-linux/fast/frames/transparent-scrollbar-expected.png: Added. 11 1 12 2012-03-01 Kent Tamura <tkent@chromium.org> 2 13 -
trunk/Source/WebCore/ChangeLog
r109480 r109483 1 2012-03-01 Hajime Morrita <morrita@chromium.org> 2 3 Custom scrollbars do not support transparency 4 https://bugs.webkit.org/show_bug.cgi?id=50547 5 6 Reviewed by James Robinson. 7 8 RenderScrollbar, which is used even for outermost frame when 9 -webkit-scrollbar is specified, assumes that its background is 10 painted by the enclosing container. But there is no such container 11 for outermost frame. This causes visual glitches when the 12 scrollbar has transparency. 13 14 This change clears background region for custom 15 outermostscrollbars to erase such glitches. 16 17 Test: fast/frames/transparent-scrollbar.html 18 19 * page/FrameView.cpp: 20 (WebCore::FrameView::paintScrollbar): The background is cleared here. 21 (WebCore): 22 * page/FrameView.h: 23 (FrameView): 24 * platform/ScrollView.cpp: 25 (WebCore::ScrollView::paintScrollbar): Added to hook in FrameView 26 (WebCore): 27 (WebCore::ScrollView::paintScrollbars): 28 * platform/ScrollView.h: 29 (ScrollView): 30 1 31 2012-03-01 Kent Tamura <tkent@chromium.org> 2 32 -
trunk/Source/WebCore/page/FrameView.cpp
r109288 r109483 2703 2703 2704 2704 if (m_scrollCorner) { 2705 bool needsBackgorund = m_frame->page() && m_frame->page()->mainFrame() == m_frame; 2706 if (needsBackgorund) 2707 context->fillRect(cornerRect, baseBackgroundColor(), ColorSpaceDeviceRGB); 2705 2708 m_scrollCorner->paintIntoRect(context, cornerRect.location(), cornerRect); 2706 2709 return; … … 2708 2711 2709 2712 ScrollView::paintScrollCorner(context, cornerRect); 2713 } 2714 2715 void FrameView::paintScrollbar(GraphicsContext* context, Scrollbar* bar, const IntRect& rect) 2716 { 2717 bool needsBackgorund = bar->isCustomScrollbar() && (m_frame->page() && m_frame->page()->mainFrame() == m_frame); 2718 if (needsBackgorund) { 2719 IntRect toFill = bar->frameRect(); 2720 toFill.intersect(rect); 2721 context->fillRect(toFill, baseBackgroundColor(), ColorSpaceDeviceRGB); 2722 } 2723 2724 ScrollView::paintScrollbar(context, bar, rect); 2710 2725 } 2711 2726 -
trunk/Source/WebCore/page/FrameView.h
r109406 r109483 231 231 virtual void paintOverhangAreas(GraphicsContext*, const IntRect& horizontalOverhangArea, const IntRect& verticalOverhangArea, const IntRect& dirtyRect); 232 232 virtual void paintScrollCorner(GraphicsContext*, const IntRect& cornerRect); 233 virtual void paintScrollbar(GraphicsContext*, Scrollbar*, const IntRect&) OVERRIDE; 233 234 234 235 Color documentBackgroundColor() const; -
trunk/Source/WebCore/platform/ScrollView.cpp
r109431 r109483 971 971 } 972 972 973 void ScrollView::paintScrollbar(GraphicsContext* context, Scrollbar* bar, const IntRect& rect) 974 { 975 bar->paint(context, rect); 976 } 977 973 978 void ScrollView::invalidateScrollCornerRect(const IntRect& rect) 974 979 { … … 983 988 #endif 984 989 ) 985 m_horizontalScrollbar->paint(context, rect);990 paintScrollbar(context, m_horizontalScrollbar.get(), rect); 986 991 if (m_verticalScrollbar 987 992 #if USE(ACCELERATED_COMPOSITING) … … 989 994 #endif 990 995 ) 991 m_verticalScrollbar->paint(context, rect);996 paintScrollbar(context, m_verticalScrollbar.get(), rect); 992 997 993 998 #if USE(ACCELERATED_COMPOSITING) -
trunk/Source/WebCore/platform/ScrollView.h
r108536 r109483 273 273 virtual IntRect scrollCornerRect() const; 274 274 virtual void paintScrollCorner(GraphicsContext*, const IntRect& cornerRect); 275 virtual void paintScrollbar(GraphicsContext*, Scrollbar*, const IntRect&); 275 276 276 277 virtual IntRect convertFromScrollbarToContainingView(const Scrollbar*, const IntRect&) const;
Note: See TracChangeset
for help on using the changeset viewer.