RESOLVED FIXED 120344
Clean ClassList and DOMSettableTokenList
https://bugs.webkit.org/show_bug.cgi?id=120344
Summary Clean ClassList and DOMSettableTokenList
Benjamin Poulain
Reported 2013-08-27 01:29:04 PDT
Clean ClassList and DOMSettableTokenList
Attachments
Patch (9.67 KB, patch)
2013-08-27 01:32 PDT, Benjamin Poulain
no flags
Patch (10.09 KB, patch)
2013-08-27 01:49 PDT, Benjamin Poulain
rniwa: review+
Benjamin Poulain
Comment 1 2013-08-27 01:32:58 PDT
Build Bot
Comment 2 2013-08-27 01:36:05 PDT
kov's GTK+ EWS bot
Comment 3 2013-08-27 01:40:27 PDT
Benjamin Poulain
Comment 4 2013-08-27 01:49:54 PDT
Ryosuke Niwa
Comment 5 2013-08-27 02:14:42 PDT
Comment on attachment 209727 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=209727&action=review > Source/WebCore/ChangeLog:13 > + -Move the implementation of virtual functions to the cpp file. > + -Clean the #includes. > + -Make the implemented pure virtual methods final. > + -Make the element() accessor const. Maybe put a space after each "-"? > Source/WebCore/html/ClassList.cpp:85 > if (m_element->document()->inQuirksMode()) { I don't get this. It's not like m_element's document transition between quirks mode and strict mode... We should be able to determine this at the creation time (probably not in this patch though). > Source/WebCore/html/DOMSettableTokenList.h:55 > AtomicString m_value; We should get rid of this member variable.
Ryosuke Niwa
Comment 6 2013-08-27 02:35:58 PDT
Comment on attachment 209727 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=209727&action=review >> Source/WebCore/html/ClassList.cpp:85 >> if (m_element->document()->inQuirksMode()) { > > I don't get this. It's not like m_element's document transition between quirks mode and strict mode... > We should be able to determine this at the creation time (probably not in this patch though). Hm... I suppose you can move the element from a strict mode document to a quirks mode document.
Benjamin Poulain
Comment 7 2013-08-27 13:49:10 PDT
Darin Adler
Comment 8 2013-08-27 14:58:25 PDT
Comment on attachment 209727 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=209727&action=review > Source/WebCore/html/ClassList.h:40 > + virtual void ref() OVERRIDE FINAL; Is the class ClassList not something we can mark FINAL? If we did we could save marking all those functions final. > Source/WebCore/html/DOMSettableTokenList.h:38 > class DOMSettableTokenList : public DOMTokenList, public RefCounted<DOMSettableTokenList> { Can this class be marked FINAL?
Benjamin Poulain
Comment 9 2013-08-27 15:09:29 PDT
(In reply to comment #8) > (From update of attachment 209727 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=209727&action=review > > > Source/WebCore/html/ClassList.h:40 > > + virtual void ref() OVERRIDE FINAL; > > Is the class ClassList not something we can mark FINAL? If we did we could save marking all those functions final. > > > Source/WebCore/html/DOMSettableTokenList.h:38 > > class DOMSettableTokenList : public DOMTokenList, public RefCounted<DOMSettableTokenList> { > > Can this class be marked FINAL? That's what I tried with the previous patch that did not build. The bindings subclasses those. I have more refactoring in progress. The end result should be nicer.
Note You need to log in before you can comment on or make changes to this bug.