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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp

Issue 1511003003: Use refs for non-null GraphicsContext, Scrollbar, etc. in scrollbar related code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ScrollbarRemove
Patch Set: yet another mac fix Created 5 years 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "core/paint/PaintLayerPainter.h" 6 #include "core/paint/PaintLayerPainter.h"
7 7
8 #include "core/frame/Settings.h" 8 #include "core/frame/Settings.h"
9 #include "core/layout/ClipPathOperation.h" 9 #include "core/layout/ClipPathOperation.h"
10 #include "core/layout/LayoutBlock.h" 10 #include "core/layout/LayoutBlock.h"
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 Optional<ScopeRecorder> scopeRecorder; 560 Optional<ScopeRecorder> scopeRecorder;
561 if (needsScope) 561 if (needsScope)
562 scopeRecorder.emplace(*context); 562 scopeRecorder.emplace(*context);
563 563
564 Optional<LayerClipRecorder> clipRecorder; 564 Optional<LayerClipRecorder> clipRecorder;
565 565
566 if (needsToClip(localPaintingInfo, fragment.backgroundRect)) 566 if (needsToClip(localPaintingInfo, fragment.backgroundRect))
567 clipRecorder.emplace(*context, *m_paintLayer.layoutObject(), Display Item::ClipLayerOverflowControls, fragment.backgroundRect, &localPaintingInfo, fr agment.paginationOffset, paintFlags); 567 clipRecorder.emplace(*context, *m_paintLayer.layoutObject(), Display Item::ClipLayerOverflowControls, fragment.backgroundRect, &localPaintingInfo, fr agment.paginationOffset, paintFlags);
568 if (PaintLayerScrollableArea* scrollableArea = m_paintLayer.scrollableAr ea()) { 568 if (PaintLayerScrollableArea* scrollableArea = m_paintLayer.scrollableAr ea()) {
569 CullRect cullRect(pixelSnappedIntRect(fragment.backgroundRect.rect() )); 569 CullRect cullRect(pixelSnappedIntRect(fragment.backgroundRect.rect() ));
570 ScrollableAreaPainter(*scrollableArea).paintOverflowControls(context , roundedIntPoint(toPoint(fragment.layerBounds.location() - m_paintLayer.layoutB oxLocation())), cullRect, true); 570 ScrollableAreaPainter(*scrollableArea).paintOverflowControls(*contex t, roundedIntPoint(toPoint(fragment.layerBounds.location() - m_paintLayer.layout BoxLocation())), cullRect, true);
571 } 571 }
572 } 572 }
573 } 573 }
574 574
575 void PaintLayerPainter::paintFragmentWithPhase(PaintPhase phase, const PaintLaye rFragment& fragment, GraphicsContext* context, const ClipRect& clipRect, const P aintLayerPaintingInfo& paintingInfo, LayoutObject* paintingRootForLayoutObject, PaintLayerFlags paintFlags, ClipState clipState) 575 void PaintLayerPainter::paintFragmentWithPhase(PaintPhase phase, const PaintLaye rFragment& fragment, GraphicsContext* context, const ClipRect& clipRect, const P aintLayerPaintingInfo& paintingInfo, LayoutObject* paintingRootForLayoutObject, PaintLayerFlags paintFlags, ClipState clipState)
576 { 576 {
577 ASSERT(m_paintLayer.isSelfPaintingLayer()); 577 ASSERT(m_paintLayer.isSelfPaintingLayer());
578 578
579 Optional<LayerClipRecorder> clipRecorder; 579 Optional<LayerClipRecorder> clipRecorder;
580 if (clipState != HasClipped && paintingInfo.clipToDirtyRect && needsToClip(p aintingInfo, clipRect)) { 580 if (clipState != HasClipped && paintingInfo.clipToDirtyRect && needsToClip(p aintingInfo, clipRect)) {
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
708 if (!m_paintLayer.containsDirtyOverlayScrollbars()) 708 if (!m_paintLayer.containsDirtyOverlayScrollbars())
709 return; 709 return;
710 710
711 PaintLayerPaintingInfo paintingInfo(&m_paintLayer, LayoutRect(enclosingIntRe ct(damageRect)), paintFlags, LayoutSize(), paintingRoot); 711 PaintLayerPaintingInfo paintingInfo(&m_paintLayer, LayoutRect(enclosingIntRe ct(damageRect)), paintFlags, LayoutSize(), paintingRoot);
712 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars); 712 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars);
713 713
714 m_paintLayer.setContainsDirtyOverlayScrollbars(false); 714 m_paintLayer.setContainsDirtyOverlayScrollbars(false);
715 } 715 }
716 716
717 } // namespace blink 717 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698