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.
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().
(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!
Created attachment 183174 [details] Patch
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
(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 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 on attachment 183174 [details] Patch Clearing flags on attachment: 183174 Committed r140007: <http://trac.webkit.org/changeset/140007>
All reviewed patches have been landed. Closing bug.