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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBoxModelObject.h

Issue 2051703002: Implement closed shadow adjustment for Element.offsetParent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add one more test case. Created 4 years, 6 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.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.h b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.h
index f61090f4c32613bfdc8f7f456ef4c972f8f8a64e..95b027df60856a60608e6515c581b86e4d70bfaf 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.h
+++ b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.h
@@ -150,15 +150,15 @@ public:
// IE extensions. Used to calculate offsetWidth/Height. Overridden by inlines (LayoutFlow)
// to return the remaining width on a given line (and the height of a single line).
- virtual LayoutUnit offsetLeft() const;
- virtual LayoutUnit offsetTop() const;
+ virtual LayoutUnit offsetLeft(const Element*) const;
+ virtual LayoutUnit offsetTop(const Element*) const;
virtual LayoutUnit offsetWidth() const = 0;
virtual LayoutUnit offsetHeight() const = 0;
- int pixelSnappedOffsetLeft() const { return roundToInt(offsetLeft()); }
- int pixelSnappedOffsetTop() const { return roundToInt(offsetTop()); }
- virtual int pixelSnappedOffsetWidth() const;
- virtual int pixelSnappedOffsetHeight() const;
+ int pixelSnappedOffsetLeft(const Element* parent) const { return roundToInt(offsetLeft(parent)); }
+ int pixelSnappedOffsetTop(const Element* parent) const { return roundToInt(offsetTop(parent)); }
+ virtual int pixelSnappedOffsetWidth(const Element*) const;
+ virtual int pixelSnappedOffsetHeight(const Element*) const;
bool hasSelfPaintingLayer() const;
PaintLayer* layer() const { return m_layer.get(); }
@@ -302,7 +302,7 @@ public:
protected:
void willBeDestroyed() override;
- LayoutPoint adjustedPositionRelativeToOffsetParent(const LayoutPoint&) const;
+ LayoutPoint adjustedPositionRelativeTo(const LayoutPoint&, const Element*) const;
bool calculateHasBoxDecorations() const;
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBox.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698