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

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

Issue 2536453002: Rename some functions about layout locations (Closed)
Patch Set: Add test Created 4 years, 1 month 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.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.h b/third_party/WebKit/Source/core/layout/LayoutBox.h
index 875b65502d09adeaebdbba62bab12b1e6c1f346c..c923285e53afc305eed1bab0016c7b38bc97473e 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.h
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.h
@@ -327,7 +327,7 @@ class CORE_EXPORT LayoutBox : public LayoutBoxModelObject {
frameRectChanged();
}
- // The ancestor box that this object's location and topLeftLocation are
+ // The ancestor box that this object's location and physicalLocation are
// relative to.
virtual LayoutBox* locationContainer() const;
@@ -1179,14 +1179,13 @@ class CORE_EXPORT LayoutBox : public LayoutBoxModelObject {
return;
rect.setX(m_frameRect.width() - rect.maxX());
}
- // These represent your location relative to your container as a physical
- // offset. In layout related methods you almost always want the logical
- // location (e.g. x() and y()). Passing |container| causes flipped-block
- // flipping w.r.t. that container, or containingBlock() otherwise.
- LayoutPoint topLeftLocation(
+
+ // Passing |container| causes flipped-block flipping w.r.t. that container,
+ // or containingBlock() otherwise.
+ LayoutPoint physicalLocation(
const LayoutBox* flippedBlocksContainer = nullptr) const;
- LayoutSize topLeftLocationOffset() const {
- return toLayoutSize(topLeftLocation());
+ LayoutSize physicalLocationOffset() const {
+ return toLayoutSize(physicalLocation());
}
LayoutRect logicalVisualOverflowRectForPropagation(

Powered by Google App Engine
This is Rietveld 408576698