Changeset 135071 in webkit
- Timestamp:
- Nov 18, 2012, 10:06:58 AM (13 years ago)
- Location:
- branches/safari-536.28-branch/Source/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-536.28-branch/Source/WebCore/ChangeLog
r135070 r135071 1 2012-11-18 Simon Fraser <simon.fraser@apple.com> 2 3 <rdar://problem/12725980> Fix overlay scrollbar painting in compositing layers (102442) 4 Merge r135029 5 6 2012-11-16 Simon Fraser <simon.fraser@apple.com> 7 8 Fix overlay scrollbar painting in compositing layers 9 https://bugs.webkit.org/show_bug.cgi?id=102442 10 11 Reviewed by Beth Dakin. 12 13 There were two issues with overlay scrollbar painting in 14 compositing layers. 15 16 First, we'd only ever call setContainsDirtyOverlayScrollbars() 17 on the RenderView's layer, even when encountering an overlay scrollbar 18 in some descendant compositing layer. This meant that we'd never 19 run the paintOverlayScrollbars() code for those child compositing 20 layers, so sometimes scrollbars were missing there. 21 22 Even after fixing that, we would fail to render scrollbars that 23 were not in the composited RenderLayer itself. This happened because 24 we called into RenderLayer::paintOverlayScrollbars(), which called 25 paintLayer() with flags that only said to paint the overlay scrollbars 26 but not any descendants, so this paint path would not walk child 27 RenderLayers. 28 29 Also remove the containsScrollableAreaWithOverlayScrollbars() flag on 30 ScrollView which is no longer used. 31 32 * platform/ScrollView.cpp: 33 (WebCore::ScrollView::ScrollView): Remove containsScrollableAreaWithOverlayScrollbars(). 34 (WebCore::ScrollView::paint): Remove setting of m_containsScrollableAreaWithOverlayScrollbars. 35 * platform/ScrollView.h: 36 * rendering/RenderLayer.cpp: 37 (WebCore::RenderLayer::paintOverflowControls): Call setContainsDirtyOverlayScrollbars() 38 on the compositing ancestor or the root. 39 Remove call to setContainsScrollableAreaWithOverlayScrollbars(). 40 (WebCore::RenderLayer::paintOverlayScrollbars): When painting overlay 41 scrollbars, no need to say we have transparency, and no need to use 42 temporary clip rects. 43 (WebCore::RenderLayer::paintLayer): The PaintLayerPaintingOverlayScrollbars 44 check here was only needed because the compositing entrypoint to painting 45 overlay scrollbars went via paintLayer(), which isn't normally used as 46 a composited painting entry point. Now that we no longer call that, we 47 don't need this special check. 48 * rendering/RenderLayerBacking.cpp: 49 (WebCore::RenderLayerBacking::paintIntoLayer): Jump into overlay scrollbar 50 painting via paintLayerContents(), not paintOverlayScrollbars(), since 51 the latter does not traverse sublayers. 52 1 53 2012-11-18 Simon Fraser <simon.fraser@apple.com> 2 54 -
branches/safari-536.28-branch/Source/WebCore/platform/ScrollView.cpp
r115401 r135071 58 58 , m_clipsRepaints(true) 59 59 , m_delegatesScrolling(false) 60 , m_containsScrollableAreaWithOverlayScrollbars(false)61 60 { 62 61 platformInit(); … … 1040 1039 1041 1040 notifyPageThatContentAreaWillPaint(); 1042 1043 // If we encounter any overlay scrollbars as we paint, this will be set to true.1044 m_containsScrollableAreaWithOverlayScrollbars = false;1045 1041 1046 1042 IntRect clipRect = frameRect(); -
branches/safari-536.28-branch/Source/WebCore/platform/ScrollView.h
r111139 r135071 280 280 virtual IntPoint convertFromContainingViewToScrollbar(const Scrollbar*, const IntPoint&) const; 281 281 282 bool containsScrollableAreaWithOverlayScrollbars() const { return m_containsScrollableAreaWithOverlayScrollbars; }283 void setContainsScrollableAreaWithOverlayScrollbars(bool contains) { m_containsScrollableAreaWithOverlayScrollbars = contains; }284 285 282 void calculateAndPaintOverhangAreas(GraphicsContext*, const IntRect& dirtyRect); 286 283 … … 352 349 bool m_clipsRepaints; 353 350 bool m_delegatesScrolling; 354 355 bool m_containsScrollableAreaWithOverlayScrollbars;356 351 357 352 void init(); -
branches/safari-536.28-branch/Source/WebCore/rendering/RenderLayer.cpp
r135070 r135071 2531 2531 #endif 2532 2532 RenderView* renderView = renderer()->view(); 2533 renderView->layer()->setContainsDirtyOverlayScrollbars(true); 2534 renderView->frameView()->setContainsScrollableAreaWithOverlayScrollbars(true); 2533 2534 RenderLayer* paintingRoot = enclosingCompositingLayer(); 2535 if (!paintingRoot) 2536 paintingRoot = renderView->layer(); 2537 2538 paintingRoot->setContainsDirtyOverlayScrollbars(true); 2535 2539 return; 2536 2540 } … … 2752 2756 2753 2757 LayerPaintingInfo paintingInfo(this, enclosingIntRect(damageRect), paintBehavior, paintingRoot); 2754 paintLayer(context, paintingInfo, PaintLayer HaveTransparency | PaintLayerTemporaryClipRects | PaintLayerPaintingOverlayScrollbars);2758 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars); 2755 2759 2756 2760 m_containsDirtyOverlayScrollbars = false; … … 2857 2861 paintFlags |= PaintLayerTemporaryClipRects; 2858 2862 else if (!backing()->paintsIntoWindow() 2859 && !shouldDoSoftwarePaint(this, paintFlags & PaintLayerPaintingReflection) 2860 && !(paintingInfo.rootLayer->containsDirtyOverlayScrollbars() 2861 && (paintFlags & PaintLayerPaintingOverlayScrollbars))) { 2863 && !shouldDoSoftwarePaint(this, paintFlags & PaintLayerPaintingReflection)) { 2862 2864 // If this RenderLayer should paint into its backing, that will be done via RenderLayerBacking::paintIntoLayer(). 2863 2865 return; -
branches/safari-536.28-branch/Source/WebCore/rendering/RenderLayerBacking.cpp
r135070 r135071 1214 1214 1215 1215 if (m_owningLayer->containsDirtyOverlayScrollbars()) 1216 m_owningLayer->paint OverlayScrollbars(context, paintDirtyRect, paintBehavior);1216 m_owningLayer->paintLayerContents(context, paintingInfo, paintFlags | RenderLayer::PaintLayerPaintingOverlayScrollbars); 1217 1217 1218 1218 ASSERT(!m_owningLayer->m_usedTransparency);
Note:
See TracChangeset
for help on using the changeset viewer.