Commit 0928918d authored by paulmeyer's avatar paulmeyer Committed by Commit bot

Revert of Fragment blocks with non-visible overflow as normally when printing....

Revert of Fragment blocks with non-visible overflow as normally when printing. (patchset #1 id:1 of https://codereview.chromium.org/2298193002/ )

Reason for revert:
Suspected cause of "virtual/threaded/fast/scroll-behavior/smooth-scroll/main-thread-scrolling-reason-correctness.html" failures in webkit_tests on "WebKit Linux (dbg)" bot.

example: https://build.chromium.org/p/chromium.webkit/builders/WebKit%20Linux%20%28dbg%29/builds/9099

Original issue's description:
> Fragment blocks with non-visible overflow as normally when printing.
>
> Splitting scrollbars into multiple fragmentainers is only problematic in
> interactive media. We don't need to impose any such pagination restrictions
> when printing, since printing is non-interactive,
>
> BUG=641983
>
> Committed: https://crrev.com/53d4d7aff8e25eae2ece5bbf5a53eec940871fa8
> Cr-Commit-Position: refs/heads/master@{#415645}

TBR=eae@chromium.org,mstensho@opera.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=641983

Review-Url: https://codereview.chromium.org/2300763002
Cr-Commit-Position: refs/heads/master@{#415712}
parent 01cdf399
<!DOCTYPE html>
<script>
if (window.testRunner)
testRunner.setPrinting();
</script>
<p>There should be some text below this paragraph, on this page. The text should flow nicely into
the next page. The number of pages should be 6.</p>
<div style="font-size:4em; height:510vh; orphans:1; widows:1;">
Line of text.<br>
Line of text.<br>
Line of text.<br>
Line of text.<br>
Line of text.<br>
Line of text.<br>
Line of text.<br>
Line of text.<br>
Line of text.<br>
Line of text.<br>
Line of text.<br>
Line of text.<br>
Line of text.<br>
Line of text.<br>
Line of text.<br>
Line of text.<br>
Line of text.<br>
Line of text.<br>
Line of text.<br>
Line of text.<br>
</div>
<!DOCTYPE html>
<script>
if (window.testRunner)
testRunner.setPrinting();
</script>
<p>There should be some text below this paragraph, on this page. The text should flow nicely into
the next page. The number of pages should be 6.</p>
<div style="overflow:auto; font-size:4em; height:510vh; orphans:1; widows:1;">
Line of text.<br>
Line of text.<br>
Line of text.<br>
Line of text.<br>
Line of text.<br>
Line of text.<br>
Line of text.<br>
Line of text.<br>
Line of text.<br>
Line of text.<br>
Line of text.<br>
Line of text.<br>
Line of text.<br>
Line of text.<br>
Line of text.<br>
Line of text.<br>
Line of text.<br>
Line of text.<br>
Line of text.<br>
Line of text.<br>
</div>
...@@ -4220,12 +4220,6 @@ bool LayoutBox::hasUnsplittableScrollingOverflow() const ...@@ -4220,12 +4220,6 @@ bool LayoutBox::hasUnsplittableScrollingOverflow() const
if ((isHorizontal && !scrollsOverflowY()) || (!isHorizontal && !scrollsOverflowX())) if ((isHorizontal && !scrollsOverflowY()) || (!isHorizontal && !scrollsOverflowX()))
return false; return false;
// Fragmenting scrollbars is only problematic in interactive media, e.g. multicol on a
// screen. If we're printing, which is non-interactive media, we should allow objects with
// non-visible overflow to be paginated as normally.
if (document().printing())
return false;
// We do have overflow. We'll still be willing to paginate as long as the block // We do have overflow. We'll still be willing to paginate as long as the block
// has auto logical height, auto or undefined max-logical-height and a zero or auto min-logical-height. // has auto logical height, auto or undefined max-logical-height and a zero or auto min-logical-height.
// Note this is just a heuristic, and it's still possible to have overflow under these // Note this is just a heuristic, and it's still possible to have overflow under these
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment