Bug 116965 - Move computed style extraction out of CSSComputedStyleDeclaration.
Summary: Move computed style extraction out of CSSComputedStyleDeclaration.
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andreas Kling
Keywords: Performance
Depends on:
Reported: 2013-05-29 08:17 PDT by Andreas Kling
Modified: 2013-05-29 09:30 PDT (History)
10 users (show)

See Also:

Patch (17.81 KB, patch)
2013-05-29 08:21 PDT, Andreas Kling
koivisto: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Kling 2013-05-29 08:17:27 PDT
Move computed style extraction out of CSSComputedStyleDeclaration.
Comment 1 Andreas Kling 2013-05-29 08:21:53 PDT
Created attachment 203202 [details]
Comment 2 WebKit Commit Bot 2013-05-29 08:23:12 PDT
Attachment 203202 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCore/css/CSSComputedStyleDeclaration.cpp', u'Source/WebCore/css/CSSComputedStyleDeclaration.h', u'Source/WebCore/css/SVGCSSComputedStyleDeclaration.cpp', u'Source/WebCore/rendering/style/RenderStyle.h', u'Source/WebCore/svg/SVGPaint.h']" exit_code: 1
Source/WebCore/css/CSSComputedStyleDeclaration.h:52:  The parameter name "node" adds no information, so it should be removed.  [readability/parameter_name] [5]
Total errors found: 1 in 6 files

If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Antti Koivisto 2013-05-29 08:35:00 PDT
Comment on attachment 203202 [details]

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


> Source/WebCore/css/CSSComputedStyleDeclaration.h:78
> +    PassRefPtr<CSSValueList> getCSSPropertyValuesForShorthandProperties(const StylePropertyShorthand&) const;
> +    PassRefPtr<CSSValueList> getCSSPropertyValuesForSidesShorthand(const StylePropertyShorthand&) const;
> +    PassRefPtr<CSSValueList> getBackgroundShorthandValue() const;
> +    PassRefPtr<CSSValueList> getCSSPropertyValuesForGridShorthand(const StylePropertyShorthand&) const;

At some point we should fix the naming to follow WebKit style.

> Source/WebCore/css/SVGCSSComputedStyleDeclaration.cpp:63
> -PassRefPtr<SVGPaint> CSSComputedStyleDeclaration::adjustSVGPaintForCurrentColor(PassRefPtr<SVGPaint> newPaint, RenderStyle* style) const
> +PassRefPtr<SVGPaint> ComputedStyleExtractor::adjustSVGPaintForCurrentColor(PassRefPtr<SVGPaint> newPaint, RenderStyle* style) const

Annoying how this is spread out to multiple files.
Comment 4 Andreas Kling 2013-05-29 09:30:44 PDT
Committed r150901: <http://trac.webkit.org/changeset/150901>