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

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

Issue 2074353002: The element's offset isn't relevant when comparing its dimensions with that of its overflow (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@621359
Patch Set: bug 619509 Created 4 years, 5 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/LayoutBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
index 4fc4b88d0b30ee3b40066ef8b3237f68d14340cc..7e6fa47e78c3b1213081cba605525f99102ee6d8 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -450,22 +450,22 @@ LayoutUnit LayoutBox::clientHeight() const
int LayoutBox::pixelSnappedClientWidth() const
{
- return snapSizeToPixel(clientWidth(), location().x() + clientLeft());
+ return snapSizeToPixel(clientWidth(), clientLeft());
eae 2016/07/13 20:18:33 The location is needed to correctly snap the clien
rhogan 2016/07/17 18:37:45 OK, so do we have to live with a scrollbar on this
}
int LayoutBox::pixelSnappedClientHeight() const
{
- return snapSizeToPixel(clientHeight(), location().y() + clientTop());
+ return snapSizeToPixel(clientHeight(), clientTop());
}
int LayoutBox::pixelSnappedOffsetWidth(const Element*) const
{
- return snapSizeToPixel(offsetWidth(), location().x() + clientLeft());
+ return snapSizeToPixel(offsetWidth(), clientLeft());
}
int LayoutBox::pixelSnappedOffsetHeight(const Element*) const
{
- return snapSizeToPixel(offsetHeight(), location().y() + clientTop());
+ return snapSizeToPixel(offsetHeight(), clientTop());
}
LayoutUnit LayoutBox::scrollWidth() const
@@ -500,7 +500,7 @@ LayoutUnit LayoutBox::scrollTop() const
int LayoutBox::pixelSnappedScrollWidth() const
{
- return snapSizeToPixel(scrollWidth(), location().x() + clientLeft());
+ return snapSizeToPixel(scrollWidth(), clientLeft());
}
int LayoutBox::pixelSnappedScrollHeight() const
@@ -509,7 +509,7 @@ int LayoutBox::pixelSnappedScrollHeight() const
return snapSizeToPixel(getScrollableArea()->scrollHeight(), location().y() + clientTop());
// For objects with visible overflow, this matches IE.
// FIXME: Need to work right with writing modes.
- return snapSizeToPixel(scrollHeight(), location().y() + clientTop());
+ return snapSizeToPixel(scrollHeight(), clientTop());
}
void LayoutBox::setScrollLeft(LayoutUnit newLeft)

Powered by Google App Engine
This is Rietveld 408576698