RESOLVED FIXED 108195
Move ElementShadow creation to ElementRareData
https://bugs.webkit.org/show_bug.cgi?id=108195
Summary Move ElementShadow creation to ElementRareData
Elliott Sprehn
Reported 2013-01-29 07:57:17 PST
Move ElementShadow creation to ElementRareData
Attachments
Patch (3.04 KB, patch)
2013-01-29 07:58 PST, Elliott Sprehn
no flags
Patch for landing (3.19 KB, patch)
2013-01-29 10:04 PST, Elliott Sprehn
no flags
Elliott Sprehn
Comment 1 2013-01-29 07:58:44 PST
Dimitri Glazkov (Google)
Comment 2 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".
Elliott Sprehn
Comment 3 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.
Elliott Sprehn
Comment 4 2013-01-29 10:04:54 PST
Created attachment 185257 [details] Patch for landing
WebKit Review Bot
Comment 5 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>
WebKit Review Bot
Comment 6 2013-01-29 10:23:38 PST
All reviewed patches have been landed. Closing bug.
Darin Adler
Comment 7 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.
Elliott Sprehn
Comment 8 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.
Darin Adler
Comment 9 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.
Note You need to log in before you can comment on or make changes to this bug.