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

Unified Diff: third_party/WebKit/Source/core/paint/LayerClipRecorder.cpp

Issue 2692853016: Change PaintLayer::m_layoutObject to a reference. (Closed)
Patch Set: restore inadvertantly removed null check 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/paint/LayerClipRecorder.cpp
diff --git a/third_party/WebKit/Source/core/paint/LayerClipRecorder.cpp b/third_party/WebKit/Source/core/paint/LayerClipRecorder.cpp
index 2cf7ede534dd723a148b3ddd9fd7649022f41f8e..8a05a8f500b379ed9c7fc176a2ded38f85dc9317 100644
--- a/third_party/WebKit/Source/core/paint/LayerClipRecorder.cpp
+++ b/third_party/WebKit/Source/core/paint/LayerClipRecorder.cpp
@@ -42,9 +42,9 @@ static bool inContainingBlockChain(PaintLayer* startLayer,
if (startLayer == endLayer)
return true;
- LayoutView* view = startLayer->layoutObject()->view();
+ LayoutView* view = startLayer->layoutObject().view();
for (const LayoutBlock* currentBlock =
- startLayer->layoutObject()->containingBlock();
+ startLayer->layoutObject().containingBlock();
currentBlock && currentBlock != view;
currentBlock = currentBlock->containingBlock()) {
if (currentBlock->layer() == endLayer)
@@ -81,8 +81,8 @@ void LayerClipRecorder::collectRoundedRectClips(
paintFlags & PaintLayerPaintingAncestorClippingMaskPhase))
break;
- if (layer->layoutObject()->hasOverflowClip() &&
- layer->layoutObject()->style()->hasBorderRadius() &&
+ if (layer->layoutObject().hasOverflowClip() &&
+ layer->layoutObject().style()->hasBorderRadius() &&
inContainingBlockChain(&paintLayer, layer)) {
LayoutPoint delta(fragmentOffset);
layer->convertToLayerCoords(clipRoot, delta);
@@ -91,10 +91,10 @@ void LayerClipRecorder::collectRoundedRectClips(
// use a pre-snapped border rect for clipping, since
// getRoundedInnerBorderFor assumes it has not been snapped yet.
LayoutSize size(layer->layoutBox()
- ? toLayoutBox(layer->layoutObject())->size()
+ ? toLayoutBox(layer->layoutObject()).size()
: LayoutSize(layer->size()));
roundedRectClips.push_back(
- layer->layoutObject()->style()->getRoundedInnerBorderFor(
+ layer->layoutObject().style()->getRoundedInnerBorderFor(
LayoutRect(delta, size)));
}

Powered by Google App Engine
This is Rietveld 408576698