WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
79304
Make parsing color presentation attributes do less pointless work.
https://bugs.webkit.org/show_bug.cgi?id=79304
Summary
Make parsing color presentation attributes do less pointless work.
Andreas Kling
Reported
2012-02-22 16:47:47 PST
HTMLElement::addHTMLColorToStyle() already knows how to extract a color from the string it receives. We should create the CSSValue there instead of simply validating the string before sending it through CSSParser.
Attachments
Le Patch
(6.71 KB, patch)
2012-02-22 17:00 PST
,
Andreas Kling
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Andreas Kling
Comment 1
2012-02-22 17:00:46 PST
Created
attachment 128337
[details]
Le Patch
Antti Koivisto
Comment 2
2012-02-22 17:07:10 PST
Comment on
attachment 128337
[details]
Le Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=128337&action=review
> Source/WebCore/ChangeLog:10 > + > + Let HTMLElement::addHTMLColorToStyle() construct the color CSSValue directly > + rather than passing a string that has to go through CSSParser. > +
A word about performance?
> Source/WebCore/css/StylePropertySet.h:74 > + // These expand shorthand properties into multiple properties. > + bool setProperty(int propertyID, const String& value, bool important = false, CSSStyleSheet* contextStyleSheet = 0); > + void setProperty(int propertyID, PassRefPtr<CSSValue>, bool important = false); > + > + // These do not. FIXME: This is too messy, we can do better. > bool setProperty(int propertyID, int value, bool important = false, CSSStyleSheet* contextStyleSheet = 0); > bool setProperty(int propertyID, double value, CSSPrimitiveValue::UnitTypes, bool important = false, CSSStyleSheet* contextStyleSheet = 0); > - bool setProperty(int propertyID, const String& value, bool important = false, CSSStyleSheet* contextStyleSheet = 0); > void setProperty(const CSSProperty&, CSSProperty* slot = 0);
This really needs cleaning up. Oh well, you have the FIXME.
Andreas Kling
Comment 3
2012-02-22 17:39:48 PST
Comment on
attachment 128337
[details]
Le Patch Clearing flags on attachment: 128337 Committed
r108586
: <
http://trac.webkit.org/changeset/108586
>
Andreas Kling
Comment 4
2012-02-22 17:39:56 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug