RESOLVED FIXED 120691
[DOM4] Have ProcessingInstruction inherit CharacterData
https://bugs.webkit.org/show_bug.cgi?id=120691
Summary [DOM4] Have ProcessingInstruction inherit CharacterData
Ryosuke Niwa
Reported Wednesday, September 4, 2013 8:21:25 PM UTC
Merge https://chromium.googlesource.com/chromium/blink/+/f4784150a3cc4b972fe6b2ea8c2d823106351f10 Have ProcessingInstruction inherit CharacterData as per the latest DOM4 specification: http://dom.spec.whatwg.org/#processinginstruction Previously, ProcessingInstruction was inheriting from Node as per DOM Level 3. Firefox already follows DOM4 but not IE10. This change leads to less code duplication.
Attachments
Patch (14.85 KB, patch)
2013-09-05 01:15 PDT, Chris Dumez
no flags
Patch (14.91 KB, patch)
2013-09-05 02:26 PDT, Chris Dumez
no flags
Patch (15.55 KB, patch)
2013-09-05 02:57 PDT, Chris Dumez
no flags
Patch (15.63 KB, patch)
2013-09-08 23:58 PDT, Chris Dumez
no flags
Chris Dumez
Comment 1 Wednesday, September 4, 2013 8:24:01 PM UTC
I can work on merging this tomorrow.
Chris Dumez
Comment 2 Thursday, September 5, 2013 9:15:09 AM UTC
Build Bot
Comment 3 Thursday, September 5, 2013 9:41:03 AM UTC
Build Bot
Comment 4 Thursday, September 5, 2013 9:57:19 AM UTC
Chris Dumez
Comment 5 Thursday, September 5, 2013 10:26:44 AM UTC
Build Bot
Comment 6 Thursday, September 5, 2013 10:47:47 AM UTC
Chris Dumez
Comment 7 Thursday, September 5, 2013 10:57:31 AM UTC
WebKit Commit Bot
Comment 8 Thursday, September 5, 2013 10:59:13 AM UTC
Please wait for approval from timothy@apple.com (or another member of the Apple Safari Team) before submitting because this patch contains changes to the Apple Mac WebKit.framework public API.
Timothy Hatcher
Comment 9 Thursday, September 5, 2013 8:42:59 PM UTC
Comment on attachment 210593 [details] Patch This is fine for the ObjC API.
Darin Adler
Comment 10 Friday, September 6, 2013 9:30:05 PM UTC
Comment on attachment 210593 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=210593&action=review Looks OK except for two small issues. I’m going to say r=me but we should check into these two things. > Source/WebCore/bindings/objc/PublicDOMInterfaces.h:318 > -@interface DOMProcessingInstruction : DOMNode WEBKIT_VERSION_1_3 > +@interface DOMProcessingInstruction : DOMCharacterData WEBKIT_VERSION_1_3 I am not sure this is OK to change. Changing the inheritance could break OS X apps. We should ask Tim Hatcher what his risk assessment is. > Source/WebCore/dom/CharacterData.cpp:207 > + if (nodeType() == PROCESSING_INSTRUCTION_NODE) > + toProcessingInstruction(this)->checkStyleSheet(); This is unfortunate, because nodeType is a virtual function dispatch. I guess this is not such a hot code path, though. > Source/WebCore/dom/CharacterData.h:65 > + String m_data; Does ProcessingInstruction really need direct access to the data member? I can’t tell why from the patch. Typically I’d prefer a small inline function instead of exposing the data member.
Chris Dumez
Comment 11 Friday, September 6, 2013 9:45:05 PM UTC
Comment on attachment 210593 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=210593&action=review >> Source/WebCore/bindings/objc/PublicDOMInterfaces.h:318 >> +@interface DOMProcessingInstruction : DOMCharacterData WEBKIT_VERSION_1_3 > > I am not sure this is OK to change. Changing the inheritance could break OS X apps. We should ask Tim Hatcher what his risk assessment is. Tim said it was OK in https://bugs.webkit.org/show_bug.cgi?id=120691#c9 >> Source/WebCore/dom/CharacterData.h:65 >> + String m_data; > > Does ProcessingInstruction really need direct access to the data member? I can’t tell why from the patch. Typically I’d prefer a small inline function instead of exposing the data member. I'll check.
Timothy Hatcher
Comment 12 Saturday, September 7, 2013 9:43:52 PM UTC
Comment on attachment 210593 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=210593&action=review >>> Source/WebCore/bindings/objc/PublicDOMInterfaces.h:318 >>> +@interface DOMProcessingInstruction : DOMCharacterData WEBKIT_VERSION_1_3 >> >> I am not sure this is OK to change. Changing the inheritance could break OS X apps. We should ask Tim Hatcher what his risk assessment is. > > Tim said it was OK in https://bugs.webkit.org/show_bug.cgi?id=120691#c9 It is OK because DOMCharacterData has a data method and it still inherits from DOMNode.
Chris Dumez
Comment 13 Monday, September 9, 2013 7:58:44 AM UTC
WebKit Commit Bot
Comment 14 Monday, September 9, 2013 10:55:17 AM UTC
Comment on attachment 211013 [details] Patch Clearing flags on attachment: 211013 Committed r155340: <http://trac.webkit.org/changeset/155340>
WebKit Commit Bot
Comment 15 Monday, September 9, 2013 10:55:21 AM UTC
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.