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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutTreeAsText.cpp

Issue 2692853016: Change PaintLayer::m_layoutObject to a reference. (Closed)
Patch Set: Added TODO Created 3 years, 10 months 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/LayoutTreeAsText.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutTreeAsText.cpp b/third_party/WebKit/Source/core/layout/LayoutTreeAsText.cpp
index 4ee2ed2c8b89c4276c0766fa3a64e697e9db39fc..de5d6c013a730b09b09727255e75ad6f7c6685b6 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTreeAsText.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutTreeAsText.cpp
@@ -562,16 +562,16 @@ static void write(TextStream& ts,
IntRect adjustedClipRect = pixelSnappedIntRect(clipRect);
bool reportFrameScrollInfo =
- layer.layoutObject()->isLayoutView() &&
+ layer.layoutObject().isLayoutView() &&
!RuntimeEnabledFeatures::rootLayerScrollingEnabled();
if (reportFrameScrollInfo) {
- LayoutView* layoutView = toLayoutView(layer.layoutObject());
+ LayoutView& layoutView = toLayoutView(layer.layoutObject());
adjustedLayoutBoundsWithScrollbars.setWidth(
- layoutView->viewWidth(IncludeScrollbars));
+ layoutView.viewWidth(IncludeScrollbars));
adjustedLayoutBoundsWithScrollbars.setHeight(
- layoutView->viewHeight(IncludeScrollbars));
+ layoutView.viewHeight(IncludeScrollbars));
}
if (markedLayer)
@@ -579,7 +579,7 @@ static void write(TextStream& ts,
writeIndent(ts, indent);
- if (layer.layoutObject()->style()->visibility() == EVisibility::kHidden)
+ if (layer.layoutObject().style()->visibility() == EVisibility::kHidden)
ts << "hidden ";
ts << "layer ";
@@ -598,10 +598,10 @@ static void write(TextStream& ts,
if (layer.isTransparent())
ts << " transparent";
- if (layer.layoutObject()->hasOverflowClip() || reportFrameScrollInfo) {
+ if (layer.layoutObject().hasOverflowClip() || reportFrameScrollInfo) {
ScrollableArea* scrollableArea;
if (reportFrameScrollInfo)
- scrollableArea = toLayoutView(layer.layoutObject())->frameView();
+ scrollableArea = toLayoutView(layer.layoutObject()).frameView();
else
scrollableArea = layer.getScrollableArea();
@@ -627,10 +627,11 @@ static void write(TextStream& ts,
else if (paintPhase == LayerPaintPhaseForeground)
ts << " layerType: foreground only";
- if (layer.layoutObject()->style()->hasBlendMode())
+ if (layer.layoutObject().style()->hasBlendMode()) {
ts << " blendMode: "
<< compositeOperatorName(CompositeSourceOver,
- layer.layoutObject()->style()->blendMode());
+ layer.layoutObject().style()->blendMode());
+ }
if (behavior & LayoutAsTextShowCompositedLayers) {
if (layer.hasCompositedLayerMapping()) {
@@ -648,7 +649,7 @@ static void write(TextStream& ts,
ts << "\n";
if (paintPhase != LayerPaintPhaseBackground)
- write(ts, *layer.layoutObject(), indent + 1, behavior);
+ write(ts, layer.layoutObject(), indent + 1, behavior);
}
static Vector<PaintLayerStackingNode*> normalFlowListFor(
@@ -684,8 +685,8 @@ void LayoutTreeAsText::writeLayers(TextStream& ts,
: layer->intersectsDamageRect(
layerBounds, damageRect.rect(), offsetFromRoot);
- if (layer->layoutObject()->isLayoutPart() &&
- toLayoutPart(layer->layoutObject())->isThrottledFrameView())
+ if (layer->layoutObject().isLayoutPart() &&
+ toLayoutPart(layer->layoutObject()).isThrottledFrameView())
shouldPaint = false;
Vector<PaintLayerStackingNode*>* negList =

Powered by Google App Engine
This is Rietveld 408576698