Bug 100990 - Only resolve presentation attribute style once per shared ElementAttributeData.
Summary: Only resolve presentation attribute style once per shared ElementAttributeData.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andreas Kling
URL:
Keywords:
Depends on: 101198
Blocks:
  Show dependency treegraph
 
Reported: 2012-11-01 14:42 PDT by Andreas Kling
Modified: 2012-11-14 13:58 PST (History)
3 users (show)

See Also:


Attachments
Patch (1.90 KB, patch)
2012-11-01 14:46 PDT, Andreas Kling
no flags Details | Formatted Diff | Diff
Cooler patch (22.90 KB, patch)
2012-11-02 04:33 PDT, Andreas Kling
koivisto: review+
Details | Formatted Diff | Diff
Coolest(?) patch (8.45 KB, patch)
2012-11-14 12:57 PST, Andreas Kling
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Kling 2012-11-01 14:42:29 PDT
We should exploit the fact that ElementAttributeData may be shared between multiple elements and only resolve presentation attribute style once per ElementAttributeData instead of once per Element.
Comment 1 Andreas Kling 2012-11-01 14:46:59 PDT
Created attachment 171937 [details]
Patch
Comment 2 Andreas Kling 2012-11-01 15:17:13 PDT
Comment on attachment 171937 [details]
Patch

Actually, we can do better than that.
Comment 3 Andreas Kling 2012-11-02 04:33:03 PDT
Created attachment 172033 [details]
Cooler patch
Comment 4 Antti Koivisto 2012-11-02 04:39:01 PDT
Comment on attachment 172033 [details]
Cooler patch

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

r=me

> Source/WebCore/dom/ElementAttributeData.h:101
> +    void setStyleAttributeIsDirty(bool f) const { m_styleAttributeIsDirty = f; }
> +    bool presentationAttributeStyleIsDirty() const { return m_presentationAttributeStyleIsDirty; }
> +    void setPresentationAttributeStyleIsDirty(bool f) const { m_presentationAttributeStyleIsDirty = f; }

f?!

> Source/WebCore/dom/Node.h:714
> -    // 2 bits remaining
> +    // 4 bits remaining

Nice!
Comment 5 Andreas Kling 2012-11-02 04:53:26 PDT
(In reply to comment #4)
> (From update of attachment 172033 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=172033&action=review
> > Source/WebCore/dom/ElementAttributeData.h:101
> > +    void setStyleAttributeIsDirty(bool f) const { m_styleAttributeIsDirty = f; }
> > +    bool presentationAttributeStyleIsDirty() const { return m_presentationAttributeStyleIsDirty; }
> > +    void setPresentationAttributeStyleIsDirty(bool f) const { m_presentationAttributeStyleIsDirty = f; }
> 
> f?!

Yeah, I went there!
Comment 6 Andreas Kling 2012-11-02 05:11:10 PDT
Committed r133286: <http://trac.webkit.org/changeset/133286>
Comment 7 WebKit Review Bot 2012-11-05 02:15:39 PST
Re-opened since this is blocked by bug 101198
Comment 8 Andreas Kling 2012-11-14 12:57:17 PST
Created attachment 174233 [details]
Coolest(?) patch

Okay, let's try this again with a smaller scope: Just the presentation attribute style.
Comment 9 Antti Koivisto 2012-11-14 13:04:42 PST
Comment on attachment 174233 [details]
Coolest(?) patch

r=me
Comment 10 WebKit Review Bot 2012-11-14 13:58:46 PST
Comment on attachment 174233 [details]
Coolest(?) patch

Clearing flags on attachment: 174233

Committed r134664: <http://trac.webkit.org/changeset/134664>
Comment 11 WebKit Review Bot 2012-11-14 13:58:50 PST
All reviewed patches have been landed.  Closing bug.