Bug 108195 - Move ElementShadow creation to ElementRareData
Summary: Move ElementShadow creation to ElementRareData
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Elliott Sprehn
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-29 07:57 PST by Elliott Sprehn
Modified: 2013-01-29 10:37 PST (History)
7 users (show)

See Also:


Attachments
Patch (3.04 KB, patch)
2013-01-29 07:58 PST, Elliott Sprehn
no flags Details | Formatted Diff | Diff
Patch for landing (3.19 KB, patch)
2013-01-29 10:04 PST, Elliott Sprehn
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Elliott Sprehn 2013-01-29 07:57:17 PST
Move ElementShadow creation to ElementRareData
Comment 1 Elliott Sprehn 2013-01-29 07:58:44 PST
Created attachment 185248 [details]
Patch
Comment 2 Dimitri Glazkov (Google) 2013-01-29 09:49:52 PST
Comment on attachment 185248 [details]
Patch

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

> Source/WebCore/ChangeLog:13
> +        * dom/Element.cpp:

It's good WebKit practice to describe changes inline here. Darin Adler once told me: "If you're not putting anything here, might as well delete this text".
Comment 3 Elliott Sprehn 2013-01-29 10:04:44 PST
Comment on attachment 185248 [details]
Patch

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

>> Source/WebCore/ChangeLog:13
>> +        * dom/Element.cpp:
> 
> It's good WebKit practice to describe changes inline here. Darin Adler once told me: "If you're not putting anything here, might as well delete this text".

Okay.
Comment 4 Elliott Sprehn 2013-01-29 10:04:54 PST
Created attachment 185257 [details]
Patch for landing
Comment 5 WebKit Review Bot 2013-01-29 10:23:34 PST
Comment on attachment 185257 [details]
Patch for landing

Clearing flags on attachment: 185257

Committed r141132: <http://trac.webkit.org/changeset/141132>
Comment 6 WebKit Review Bot 2013-01-29 10:23:38 PST
All reviewed patches have been landed.  Closing bug.
Comment 7 Darin Adler 2013-01-29 10:27:38 PST
This kind of change is OK, but the name “data” in the names of classes like NodeRareData and ElementRareData is supposed to indicate that those classes hold data but not policy, and generally speaking we want most of the code to be in the Node and Element class, not the NodeRareData and ElementRareData classes. As soon as the code was anything more than ElementShadow::create() I think we’d not want to make this sort of change.
Comment 8 Elliott Sprehn 2013-01-29 10:33:42 PST
(In reply to comment #7)
> This kind of change is OK, but the name “data” in the names of classes like NodeRareData and ElementRareData is supposed to indicate that those classes hold data but not policy, and generally speaking we want most of the code to be in the Node and Element class, not the NodeRareData and ElementRareData classes. As soon as the code was anything more than ElementShadow::create() I think we’d not want to make this sort of change.

Okay. My change is inline with all the code in NodeRareData though: see ensureNodeLists, ensureMutationObserverData, ensureMicroDataTokenLists etc.
Comment 9 Darin Adler 2013-01-29 10:37:07 PST
(In reply to comment #8)
> My change is inline with all the code in NodeRareData though: see ensureNodeLists, ensureMutationObserverData, ensureMicroDataTokenLists etc.

Sure. Yours was just the one I happened to spot. I haven’t been watching all the check-ins as much as I used to.