Bug 83998 - Capture CSS parser context
Summary: Capture CSS parser context
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 84013
Blocks: 77745
  Show dependency treegraph
 
Reported: 2012-04-15 09:13 PDT by Antti Koivisto
Modified: 2012-04-16 01:34 PDT (History)
10 users (show)

See Also:


Attachments
patch (47.04 KB, patch)
2012-04-15 09:25 PDT, Antti Koivisto
no flags Details | Formatted Diff | Diff
rebased (47.03 KB, patch)
2012-04-15 09:38 PDT, Antti Koivisto
webkit.review.bot: commit-queue-
Details | Formatted Diff | Diff
try to fix chromium build (47.67 KB, patch)
2012-04-15 10:17 PDT, Antti Koivisto
webkit.review.bot: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ec2-cr-linux-03 (6.52 MB, application/zip)
2012-04-15 11:17 PDT, WebKit Review Bot
no flags Details
modify the failing tests to not expect settings to change the behavior of the existing stylesheets (50.28 KB, patch)
2012-04-15 12:14 PDT, Antti Koivisto
kling: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antti Koivisto 2012-04-15 09:13:37 PDT
Currently the CSS parser calls to the Document and StyleSheetInternal objects to get settings, base URL etc. The required information should be passed in on parser construction instead. The parser should not need to know about Document at all.
Comment 1 Antti Koivisto 2012-04-15 09:25:09 PDT
Created attachment 137237 [details]
patch
Comment 2 Antti Koivisto 2012-04-15 09:38:02 PDT
Created attachment 137238 [details]
rebased
Comment 3 WebKit Review Bot 2012-04-15 09:40:12 PDT
Attachment 137238 [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/CSSParser.h:329:  The parameter name "context" adds no information, so it should be removed.  [readability/parameter_name] [5]
Total errors found: 1 in 23 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 WebKit Review Bot 2012-04-15 10:10:06 PDT
Comment on attachment 137238 [details]
rebased

Attachment 137238 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/12405802
Comment 5 Antti Koivisto 2012-04-15 10:17:54 PDT
Created attachment 137239 [details]
try to fix chromium build
Comment 6 WebKit Review Bot 2012-04-15 11:17:13 PDT
Comment on attachment 137239 [details]
try to fix chromium build

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

New failing tests:
fast/regions/css-regions-disabled.html
css3/filters/custom/custom-filter-property-parsing.html
Comment 7 WebKit Review Bot 2012-04-15 11:17:19 PDT
Created attachment 137240 [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 8 Antti Koivisto 2012-04-15 12:14:26 PDT
Created attachment 137242 [details]
modify the failing tests to not expect settings to change the behavior of the existing stylesheets
Comment 9 Sam Weinig 2012-04-15 16:08:10 PDT
Are there any cases where we keep a CSSParser object around for a while?  Are we sure the baseURL of the Document can never change in the lifetime of the parser?
Comment 10 Antti Koivisto 2012-04-15 19:07:48 PDT
(In reply to comment #9)
> Are there any cases where we keep a CSSParser object around for a while?  

No. It is always stack allocated and thrown away after parsing finishes.

> Are we sure the baseURL of the Document can never change in the lifetime of the parser?

Pretty sure.
Comment 11 Andreas Kling 2012-04-15 19:29:30 PDT
Comment on attachment 137242 [details]
modify the failing tests to not expect settings to change the behavior of the existing stylesheets

r=me.
Comment 12 Antti Koivisto 2012-04-15 19:47:16 PDT
http://trac.webkit.org/changeset/114217
Comment 13 Eric Seidel (no email) 2012-04-15 20:49:06 PDT
Is this in preparation for moving CSSParsing off into another thread?  Just curious, as we've discussed such for the HTML parser.
Comment 14 Andreas Kling 2012-04-15 21:00:52 PDT
(In reply to comment #13)
> Is this in preparation for moving CSSParsing off into another thread?  Just curious, as we've discussed such for the HTML parser.

This is prep work for sharable style sheets (see the meta bug I just added as a dependent.)

Moving CSS parsing to a secondary thread is certainly made easier by this effort, but not currently a goal in itself.
Comment 15 Zoltan Arvai 2012-04-16 01:31:36 PDT
(In reply to comment #12)
> http://trac.webkit.org/changeset/114217

It seems after the commit 
fast/repaint/line-flow-with-floats-in-regions.html
layout test fails on Qt Release bots

http://build.webkit.org/results/Qt%20Linux%20Release/r114217%20%2845824%29/fast/repaint/line-flow-with-floats-in-regions-pretty-diff.html