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

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

Issue 2462643002: Be more restrictive about forcing relayout of children for pagination. (Closed)
Patch Set: No need to call updateFragmentationInfoForChild() when not paginated. 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
Index: third_party/WebKit/Source/core/layout/LayoutTableRow.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutTableRow.cpp b/third_party/WebKit/Source/core/layout/LayoutTableRow.cpp
index d2980040fcc290a115ad78f34391c488c9f2a398..03d700d75400191d07e1f9765d41a195ecd982ca 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTableRow.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutTableRow.cpp
@@ -32,6 +32,7 @@
#include "core/layout/LayoutAnalyzer.h"
#include "core/layout/LayoutState.h"
#include "core/layout/LayoutTableCell.h"
+#include "core/layout/LayoutView.h"
#include "core/layout/SubtreeLayoutScope.h"
#include "core/paint/TableRowPainter.h"
#include "core/style/StyleInheritedData.h"
@@ -189,6 +190,7 @@ void LayoutTableRow::addChild(LayoutObject* child, LayoutObject* beforeChild) {
void LayoutTableRow::layout() {
ASSERT(needsLayout());
LayoutAnalyzer::Scope analyzer(*this);
+ bool paginated = view()->layoutState()->isPaginated();
for (LayoutTableCell* cell = firstCell(); cell; cell = cell->nextCell()) {
SubtreeLayoutScope layouter(*cell);
@@ -197,6 +199,8 @@ void LayoutTableRow::layout() {
section()->markChildForPaginationRelayoutIfNeeded(*cell, layouter);
if (cell->needsLayout())
cell->layout();
+ if (paginated)
+ section()->updateFragmentationInfoForChild(*cell);
}
m_overflow.reset();
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTable.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutTableSection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698