Bug 81901

Summary: [CSS Regions] In region styling (@-webkit-region) the position for CSS rules is incorrectly computed
Product: WebKit Reporter: Mihai Balan <mibalan>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: macpherson, menard, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 57312    
Attachments:
Description Flags
Proposed fix and ref-tests
koivisto: review+, kling: commit-queue-
Fixed duplicate changelog entry.
koivisto: commit-queue-
Fixed changelog problems. none

Description Mihai Balan 2012-03-22 05:59:31 PDT
When having multiple @-webkit-region rules for the same region that contain the same declaration, the latter declaration does not override the former declaration. However, this only happens if the former @-webkit-region rule contains a CSS declaration for the * selector.
Comment 1 Mihai Balan 2012-03-26 05:13:30 PDT
After some more investigations the problem turned out to be the fact that the position associated with a RuleSet was incorrectly computed for region styling - the number of rules inside the @-webkit-region declarations was basically ignored when computing the position for the rules inside them.
Comment 2 Mihai Balan 2012-03-26 06:03:45 PDT
Created attachment 133789 [details]
Proposed fix and ref-tests
Comment 3 Antti Koivisto 2012-03-26 06:38:57 PDT
Comment on attachment 133789 [details]
Proposed fix and ref-tests

r=me

m_ruleCount is pretty silly, some sort of refactoring would be good.
Comment 4 Andreas Kling 2012-03-26 06:40:21 PDT
Comment on attachment 133789 [details]
Proposed fix and ref-tests

Double changelog entries needs to be fixed before landing.
Comment 5 Antti Koivisto 2012-03-26 06:40:58 PDT
Comment on attachment 133789 [details]
Proposed fix and ref-tests

ChangeLogs are doubled.
Comment 6 Mihai Balan 2012-03-26 06:48:35 PDT
Created attachment 133794 [details]
Fixed duplicate changelog entry.
Comment 7 Antti Koivisto 2012-03-26 07:19:05 PDT
Comment on attachment 133794 [details]
Fixed duplicate changelog entry.

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

> Source/WebCore/ChangeLog:12
> +2012-03-26  Mihai Balan  <mibalan@adobe.com>
> +
> +        Fixing style
> +
> +        Cleaned up code
> +
> +        Initial fix and tests
> +
> +        [CSS Regions] In region styling (@-webkit-region) the position for CSS rules is incorrectly computed
> +        https://bugs.webkit.org/show_bug.cgi?id=81901
> +
> +        Reviewed by NOBODY (OOPS!).

Please also update the ChangeLogs to follow our usual format:

Bug title.
Bug URL.

Reviewed by ...

The reasoning for and description of the code change
Comment 8 Mihai Balan 2012-03-26 07:29:55 PDT
Created attachment 133807 [details]
Fixed changelog problems.
Comment 9 WebKit Review Bot 2012-03-26 08:16:53 PDT
Comment on attachment 133807 [details]
Fixed changelog problems.

Clearing flags on attachment: 133807

Committed r112099: <http://trac.webkit.org/changeset/112099>
Comment 10 WebKit Review Bot 2012-03-26 08:16:57 PDT
All reviewed patches have been landed.  Closing bug.