[LayoutNG] Too early to detect viewport pagination at style recalc.
Style recalculation of HTML/BODY is what determines whether the viewport will be paginated or not. If paged overflow happens to be specified on BODY, we'll already have walked past HTML and therefore won't have forced legacy layout on it. Therefore perform this check during layout tree building. Detection of printing, on the other hand, needs to remain in the style calculation phase. A style recalc is forced on the root element before re-laying out for printing, and forcing legacy layout on computed style is what triggers a full subtree reattach, which is what we need. Checking for printing during layout tree building may not be necessary, but I added that as well, for good measure. Also get rid of Document::Paginated(), since it was confusing, in that it wouldn't return true if the viewport got paginated by paged overflow. This fixes one test. Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng Change-Id: I36337b5597478d1029b9529bf6e6a24e407086bb Reviewed-on: https://chromium-review.googlesource.com/1092573Reviewed-by:Emil A Eklund <eae@chromium.org> Reviewed-by:
Rune Lillesveen <futhark@chromium.org> Commit-Queue: Morten Stenshorne <mstensho@chromium.org> Cr-Commit-Position: refs/heads/master@{#565964}
Showing
Please register or sign in to comment