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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBoxModelObject.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/LayoutBoxModelObject.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
index 2b869f79db28311e900a4ba41ad5071f9a8bebc6..144633cb36b4defe52d6961fdc5144f94d550701 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
@@ -209,7 +209,7 @@ void LayoutBoxModelObject::willBeDestroyed() {
if (LocalFrame* frame = this->frame()) {
if (FrameView* frameView = frame->view()) {
if (style()->hasViewportConstrainedPosition())
- frameView->removeViewportConstrainedObject(this);
+ frameView->removeViewportConstrainedObject(*this);
}
}
}
@@ -405,7 +405,7 @@ void LayoutBoxModelObject::styleDidChange(StyleDifference diff,
} else {
// This may get re-added to viewport constrained objects if the object
// went from sticky to fixed.
- frameView->removeViewportConstrainedObject(this);
+ frameView->removeViewportConstrainedObject(*this);
// Remove sticky constraints for this layer.
if (layer()) {
@@ -426,9 +426,9 @@ void LayoutBoxModelObject::styleDidChange(StyleDifference diff,
if (newStyleIsViewportConstained != oldStyleIsViewportConstrained) {
if (newStyleIsViewportConstained && layer())
- frameView->addViewportConstrainedObject(this);
+ frameView->addViewportConstrainedObject(*this);
else
- frameView->removeViewportConstrainedObject(this);
+ frameView->removeViewportConstrainedObject(*this);
}
}
}
@@ -458,7 +458,7 @@ void LayoutBoxModelObject::invalidateStickyConstraints() {
void LayoutBoxModelObject::createLayer() {
ASSERT(!m_layer);
- m_layer = WTF::makeUnique<PaintLayer>(this);
+ m_layer = WTF::makeUnique<PaintLayer>(*this);
setHasLayer(true);
m_layer->insertOnlyThisLayerAfterStyleChange();
}
@@ -811,7 +811,7 @@ void LayoutBoxModelObject::updateStickyPositionConstraints() const {
LayoutBox* scrollAncestor =
layer()->ancestorOverflowLayer()->isRootLayer()
? nullptr
- : toLayoutBox(layer()->ancestorOverflowLayer()->layoutObject());
+ : &toLayoutBox(layer()->ancestorOverflowLayer()->layoutObject());
LayoutUnit maxContainerWidth =
containingBlock->isLayoutView()
@@ -970,7 +970,8 @@ FloatRect LayoutBoxModelObject::computeStickyConstrainingRect() const {
return view()->frameView()->visibleContentRect();
LayoutBox* enclosingClippingBox =
- toLayoutBox(layer()->ancestorOverflowLayer()->layoutObject());
+ layer()->ancestorOverflowLayer()->layoutBox();
+ DCHECK(enclosingClippingBox);
FloatRect constrainingRect;
constrainingRect =
FloatRect(enclosingClippingBox->overflowClipRect(LayoutPoint(DoublePoint(
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBox.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutGeometryMap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698