Bug 106006 - Widows and orphans test4 fails if isolated
Summary: Widows and orphans test4 fails if isolated
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andrei Bucur
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-03 01:45 PST by Andrei Bucur
Modified: 2013-01-17 11:16 PST (History)
7 users (show)

See Also:


Attachments
Test case (5.78 KB, text/html)
2013-01-03 01:45 PST, Andrei Bucur
no flags Details
Patch (10.12 KB, patch)
2013-01-17 05:52 PST, Andrei Bucur
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrei Bucur 2013-01-03 01:45:11 PST
Created attachment 181158 [details]
Test case

The test4 from the widows and orphans test in multicol fails if isolated/window is resized. See the attached test case.
Comment 1 Andrei Bucur 2013-01-16 08:56:59 PST
I've found the issue and I have the patch almost ready (I just have to add a test). It seems that using lineCount() inside adjustLinePositionForPagination is not reliable. It only works during a full layout, when lineCount() actually returns the index of the lineBox.
In subsequent layouts, determineStartPosition will call adjustLinePositionForPagination but lineCount() will iterate through all the lines and not stop to the lineBox. So orphans() will never be greater than lineCount().
Comment 2 Dean Jackson 2013-01-16 12:15:03 PST
(In reply to comment #1)
> I've found the issue and I have the patch almost ready (I just have to add a test). It seems that using lineCount() inside adjustLinePositionForPagination is not reliable. It only works during a full layout, when lineCount() actually returns the index of the lineBox.
> In subsequent layouts, determineStartPosition will call adjustLinePositionForPagination but lineCount() will iterate through all the lines and not stop to the lineBox. So orphans() will never be greater than lineCount().

You're right. My mistake!
Comment 3 Andrei Bucur 2013-01-17 05:52:10 PST
Created attachment 183174 [details]
Patch
Comment 4 Build Bot 2013-01-17 06:31:41 PST
Comment on attachment 183174 [details]
Patch

Attachment 183174 [details] did not pass mac-ews (mac):
Output: http://queues.webkit.org/results/15913767

New failing tests:
svg/as-image/img-relative-height.html
Comment 5 Andrei Bucur 2013-01-17 09:36:58 PST
(In reply to comment #4)
> (From update of attachment 183174 [details])
> Attachment 183174 [details] did not pass mac-ews (mac):
> Output: http://queues.webkit.org/results/15913767
> 
> New failing tests:
> svg/as-image/img-relative-height.html

This doesn't seem to be caused by my patch. The test also fails on build.webkit.org with the trunk version.
Comment 6 Dean Jackson 2013-01-17 10:46:41 PST
Comment on attachment 183174 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=183174&action=review

> Source/WebCore/ChangeLog:9
> +        To determine if the orphans condition is not respected, every time a fragmentation break is encountered adjustLinePositionForPagination() is called for the current line.
> +        If the index on the line in the block is smaller than the number of orphans specified in the style object, the block is shifted in the next fragmentainer. The index of

For future ref, It seems people usually wrap changelog entries to about 80-100 chars.
Comment 7 WebKit Review Bot 2013-01-17 11:16:49 PST
Comment on attachment 183174 [details]
Patch

Clearing flags on attachment: 183174

Committed r140007: <http://trac.webkit.org/changeset/140007>
Comment 8 WebKit Review Bot 2013-01-17 11:16:53 PST
All reviewed patches have been landed.  Closing bug.