Bug 136775

Summary: Generate toFooElementData() using ELEMENT_DATA_TYPE_CASTS
Product: WebKit Reporter: Gyuyoung Kim <gyuyoung.kim>
Component: WebKit Misc.Assignee: Gyuyoung Kim <gyuyoung.kim>
Status: RESOLVED FIXED    
Severity: Normal CC: cmarcelo, commit-queue, darin, d-r, esprehn+autocc, fmalita, kangil.han, pdr, schenney, sergio
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 136773    
Attachments:
Description Flags
Patch none

Gyuyoung Kim
Reported 2014-09-12 00:51:43 PDT
SSIA
Attachments
Patch (7.10 KB, patch)
2014-09-12 00:58 PDT, Gyuyoung Kim
no flags
Gyuyoung Kim
Comment 1 2014-09-12 00:58:18 PDT
Gyuyoung Kim
Comment 2 2014-09-13 07:02:41 PDT
CC'ing Darin
Darin Adler
Comment 3 2014-09-14 12:32:46 PDT
Comment on attachment 238019 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=238019&action=review > Source/WebCore/dom/ElementData.h:186 > + TYPE_CASTS_BASE(ToValueTypeName, ElementData, elementData, pointerPredicate, referencePredicate) We need to fix TYPE_CASTS_BASE. It’s kind of dumb that we need one expression for -> and one for . in every single invocation. We can use *(x) in the macro to dereference the pointer instead. We should go make that change globally to make every single use of the macro simpler.
Gyuyoung Kim
Comment 4 2014-09-14 20:03:12 PDT
(In reply to comment #3) > (From update of attachment 238019 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=238019&action=review > > > Source/WebCore/dom/ElementData.h:186 > > + TYPE_CASTS_BASE(ToValueTypeName, ElementData, elementData, pointerPredicate, referencePredicate) > > We need to fix TYPE_CASTS_BASE. It’s kind of dumb that we need one expression for -> and one for . in every single invocation. We can use *(x) in the macro to dereference the pointer instead. We should go make that change globally to make every single use of the macro simpler. I agree your suggestion. It looks it would be nicer to file a new bug to handle this suggestion. I'm going to file a bug for this.
Gyuyoung Kim
Comment 5 2014-09-14 20:05:33 PDT
(In reply to comment #4) > (In reply to comment #3) > > (From update of attachment 238019 [details] [details]) > > View in context: https://bugs.webkit.org/attachment.cgi?id=238019&action=review > > > > > Source/WebCore/dom/ElementData.h:186 > > > + TYPE_CASTS_BASE(ToValueTypeName, ElementData, elementData, pointerPredicate, referencePredicate) > > > > We need to fix TYPE_CASTS_BASE. It’s kind of dumb that we need one expression for -> and one for . in every single invocation. We can use *(x) in the macro to dereference the pointer instead. We should go make that change globally to make every single use of the macro simpler. > > I agree your suggestion. It looks it would be nicer to file a new bug to handle this suggestion. I'm going to file a bug for this. I file a Bug 136809. I'm gonna upload a patch for this.
WebKit Commit Bot
Comment 6 2014-09-14 20:40:27 PDT
Comment on attachment 238019 [details] Patch Clearing flags on attachment: 238019 Committed r173610: <http://trac.webkit.org/changeset/173610>
WebKit Commit Bot
Comment 7 2014-09-14 20:40:32 PDT
All reviewed patches have been landed. Closing bug.
Darin Adler
Comment 8 2014-09-14 22:13:49 PDT
(In reply to comment #5) > I file a Bug 136809. I'm gonna upload a patch for this. Bug 136809 is about .get(); doesn’t sound like the same thing to me. Maybe you filed a different bug about the -> vs. dot thing?
Gyuyoung Kim
Comment 9 2014-09-14 22:21:54 PDT
(In reply to comment #8) > (In reply to comment #5) > > I file a Bug 136809. I'm gonna upload a patch for this. > > Bug 136809 is about .get(); doesn’t sound like the same thing to me. Maybe you filed a different bug about the -> vs. dot thing? Darin, now I understand that you suggested to dereference a pointer in TYPE_CAST_BASE using *(x) use, and then we can adjust it to WebKit globally, right ? If so, Bug 136809 will handle it. If bug title is a little strange, I will change the title when I prepare a patch for the bug.
Darin Adler
Comment 10 2014-09-14 22:23:35 PDT
Great, looking forward to seeing it.
Gyuyoung Kim
Comment 11 2014-09-14 22:24:39 PDT
(In reply to comment #10) > Great, looking forward to seeing it. Now I have very urgent local work, So, I will be able to prepare the patch after going back to my home. :) Please wait for my patch !
Darin Adler
Comment 12 2014-09-14 22:28:14 PDT
Absolutely. I will wait patiently. I may not have a chance to look at it for a while since I have more patch reviewing time on weekends.
Note You need to log in before you can comment on or make changes to this bug.