Bug 103975

Summary: [CSS Regions] Add tests for lists and counters
Product: WebKit Reporter: Mihai Balan <mibalan>
Component: CSSAssignee: Andrei Bucur <abucur>
Status: RESOLVED FIXED    
Severity: Normal CC: abucur, commit-queue, kadam, ossy, WebkitBugTracker, zarvai, zoltan
Priority: P2 Keywords: AdobeTracked
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 110352, 114519    
Bug Blocks: 57312    
Attachments:
Description Flags
HTML file highlighting the problem
none
HTML file highlighting the second problem
none
Patch none

Description Mihai Balan 2012-12-04 00:09:04 PST
Created attachment 177430 [details]
HTML file highlighting the problem

If list items from multiple lists (<ul>/<ol>) are flowed into regions, the internal list counters are not reset when moving from one list to the other. This leads to continuous numbering across all list items, regardless of their origin, list numbering style, etc.

In the attached sample, the items labeled "First..", "Second..", ... are numbered 5, 6, ... where they should have been 1, 2, ...
Comment 1 Mihai Balan 2012-12-10 07:05:32 PST
Also, if flowing only *some* individual list items, the numbering for both the list items in the named flow and the list items in the document flow are messed up.
More specifically, suppose we have two numbered lists, and extract the first <li> in a named-flow via the :first-child pseudo-class and flow them into a region.

The list items left in the document will look like:
1. Item 2
2. Item 3

a. Item b
b. Item c

while those in the region will look like:
1. Item 1
b. Item a
Comment 2 Mihai Balan 2012-12-10 07:07:40 PST
Created attachment 178543 [details]
HTML file highlighting the second problem

If the cause for this behavior ( comment 1 ) is not the same as the initial bug, just let me know and I'll split them.
Comment 3 Zoltan Horvath 2013-01-03 10:52:57 PST
FYI: it's because the counters are calculated on the DOM and not on the RenderObjects, they have no notion that they are in the flow threads.
Comment 4 Andrei Bucur 2013-04-10 04:22:16 PDT
Created attachment 197247 [details]
Patch
Comment 5 Andrei Bucur 2013-04-10 04:24:00 PDT
Comment on attachment 197247 [details]
Patch

Regions work correctly with lists and counters since https://bugs.webkit.org/show_bug.cgi?id=110352 . This patch only brings better test coverage for the feature.
Comment 6 WebKit Commit Bot 2013-04-10 06:45:59 PDT
Comment on attachment 197247 [details]
Patch

Clearing flags on attachment: 197247

Committed r148092: <http://trac.webkit.org/changeset/148092>
Comment 7 WebKit Commit Bot 2013-04-10 06:46:00 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 WebKit Commit Bot 2013-04-12 10:54:51 PDT
Re-opened since this is blocked by bug 114519
Comment 9 Andrei Bucur 2013-04-22 04:23:31 PDT
Comment on attachment 197247 [details]
Patch

Re-land after http://trac.webkit.org/changeset/148863 .
Comment 10 WebKit Commit Bot 2013-04-22 04:25:36 PDT
Comment on attachment 197247 [details]
Patch

Rejecting attachment 197247 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.appspot.com', '--bot-id=webkit-cq-02', 'validate-changelog', '--non-interactive', 197247, '--port=mac']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit

/Volumes/Data/EWS/WebKit/LayoutTests/ChangeLog neither lists a valid reviewer nor contains the string "Unreviewed" or "Rubber stamp" (case insensitive).

Full output: http://webkit-queues.appspot.com/results/88769
Comment 11 Andreas Kling 2013-04-22 04:53:33 PDT
Comment on attachment 197247 [details]
Patch

re-r+ing
Comment 12 WebKit Commit Bot 2013-04-22 05:38:14 PDT
Comment on attachment 197247 [details]
Patch

Clearing flags on attachment: 197247

Committed r148878: <http://trac.webkit.org/changeset/148878>
Comment 13 WebKit Commit Bot 2013-04-22 05:38:16 PDT
All reviewed patches have been landed.  Closing bug.
Comment 14 Ádám Kallai 2013-04-22 08:55:26 PDT
This test is failing on Qt. Could you check what happened to it?a

 * fast/regions/counters/extract-list-items-013.html

http://build.webkit.sed.hu/results/x86-64%20Linux%20Qt%20Release/r148878%20(50369)/fast/regions/counters/extract-list-items-013-diffs.html
Comment 15 Andrei Bucur 2013-04-22 09:29:38 PDT
(In reply to comment #14)
> This test is failing on Qt. Could you check what happened to it?a
> 
>  * fast/regions/counters/extract-list-items-013.html
> 
> http://build.webkit.sed.hu/results/x86-64%20Linux%20Qt%20Release/r148878%20(50369)/fast/regions/counters/extract-list-items-013-diffs.html

Baaaah :(. it's that font smoothing bug again. I'd like to do a smarter fix for this so is it possible for you to disable the test for now? I'll make sure to re-enable once I land a proper fix for all of the ref-tests we have.