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

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

Issue 2444193009: LayoutState doesn't need to store both layout and pagination offset. (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutState.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 9bb04a993e62ab288ebeb0f8cc56f97fcd5c7f9d..c62fdc8632f18da5600b4615ae6b90e0ad6d292d 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -5259,10 +5259,8 @@ LayoutUnit LayoutBox::offsetFromLogicalTopOfFirstPage() const {
return LayoutUnit();
if (layoutState->layoutObject() == this) {
- LayoutSize offsetDelta =
- layoutState->layoutOffset() - layoutState->pageOffset();
- return isHorizontalWritingMode() ? offsetDelta.height()
- : offsetDelta.width();
+ LayoutSize offset = layoutState->paginationOffset();
+ return isHorizontalWritingMode() ? offset.height() : offset.width();
}
// A LayoutBlock always establishes a layout state, and this method is only
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698