Bug 82384

Summary: Separate @import rules from other rules in CSSStyleSheet
Product: WebKit Reporter: Antti Koivisto <koivisto>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: dglazkov, kling, macpherson, menard, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 77745    
Attachments:
Description Flags
patch
kling: review+, webkit.review.bot: commit-queue-
Archive of layout-test-results from ec2-cr-linux-03 none

Description Antti Koivisto 2012-03-27 14:46:51 PDT
Import rules always come before all other rules (except @charset). They currently live in the generic child rule vector. They can be moved to a vector of their own for stronger typing and more focused traversal. This will also make future refactoring easier.
Comment 1 Antti Koivisto 2012-03-27 15:03:38 PDT
Created attachment 134145 [details]
patch
Comment 2 WebKit Review Bot 2012-03-27 15:07:32 PDT
Attachment 134145 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1
Source/WebCore/css/CSSStyleSheet.cpp:347:  Missing space before {  [whitespace/braces] [5]
Total errors found: 1 in 4 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Alexis Menard (darktears) 2012-03-27 15:13:42 PDT
Comment on attachment 134145 [details]
patch

Looks good to me. You need to fix the style issue (or as kling would say : "where you derped")
Comment 4 WebKit Review Bot 2012-03-27 16:02:56 PDT
Comment on attachment 134145 [details]
patch

Attachment 134145 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/12143810

New failing tests:
fast/dom/css-cached-import-rule.html
fast/css/import-and-insert-rule-no-update.html
fast/dom/css-insert-import-rule.html
Comment 5 WebKit Review Bot 2012-03-27 16:03:03 PDT
Created attachment 134159 [details]
Archive of layout-test-results from ec2-cr-linux-03

The attached test failures were seen while running run-webkit-tests on the chromium-ews.
Bot: ec2-cr-linux-03  Port: <class 'webkitpy.common.config.ports.ChromiumXVFBPort'>  Platform: Linux-2.6.35-28-virtual-x86_64-with-Ubuntu-10.10-maverick
Comment 6 Andreas Kling 2012-03-27 16:06:53 PDT
(In reply to comment #4)
> (From update of attachment 134145 [details])
> Attachment 134145 [details] did not pass chromium-ews (chromium-xvfb):
> Output: http://queues.webkit.org/results/12143810
> 
> New failing tests:
> fast/dom/css-cached-import-rule.html
> fast/css/import-and-insert-rule-no-update.html
> fast/dom/css-insert-import-rule.html

I trusted you, man :'(
Comment 7 Alexis Menard (darktears) 2012-03-27 16:09:35 PDT
(In reply to comment #6)
> (In reply to comment #4)
> > (From update of attachment 134145 [details] [details])
> > Attachment 134145 [details] [details] did not pass chromium-ews (chromium-xvfb):
> > Output: http://queues.webkit.org/results/12143810
> > 
> > New failing tests:
> > fast/dom/css-cached-import-rule.html
> > fast/css/import-and-insert-rule-no-update.html
> > fast/dom/css-insert-import-rule.html
> 
> I trusted you, man :'(

Ouuchhhhh </3
Comment 8 Antti Koivisto 2012-03-28 03:43:07 PDT
http://trac.webkit.org/changeset/112382

Turned out that that removing explicit styleSheetChanged() call for @import insertions causes problems so I kept that for now with a FIXME.