Bug 58460 - childTypeAllowed() should be const
Summary: childTypeAllowed() should be const
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Minor
Assignee: Roland Steiner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-13 11:32 PDT by Roland Steiner
Modified: 2011-04-14 00:09 PDT (History)
3 users (show)

See Also:


Attachments
Patch (11.69 KB, patch)
2011-04-13 11:38 PDT, Roland Steiner
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Roland Steiner 2011-04-13 11:32:18 PDT
childTypeAllowed() is a pure info method without side effects and as such should be const.
Comment 1 Roland Steiner 2011-04-13 11:35:11 PDT
Incidentally, I wonder why this method, as well as nodeName() and nodeType() are private within all subclasses of Node...
Comment 2 Roland Steiner 2011-04-13 11:38:09 PDT
Created attachment 89415 [details]
Patch
Comment 3 Dimitri Glazkov (Google) 2011-04-13 12:48:35 PDT
(In reply to comment #1)
> Incidentally, I wonder why this method, as well as nodeName() and nodeType() are private within all subclasses of Node...

making a virtual impl private is a great trick for preventing the users of the function call them directly. It's also a great visual indication, saying "DON'T USE THIS METHOD DIRECTLY."
Comment 4 WebKit Commit Bot 2011-04-13 22:44:51 PDT
Comment on attachment 89415 [details]
Patch

Clearing flags on attachment: 89415

Committed r83816: <http://trac.webkit.org/changeset/83816>
Comment 5 WebKit Commit Bot 2011-04-13 22:44:56 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 WebKit Commit Bot 2011-04-14 00:09:19 PDT
The commit-queue encountered the following flaky tests while processing attachment 89415 [details]:

http/tests/misc/favicon-loads-with-icon-loading-override.html bug 58412 (author: alice.liu@apple.com)
The commit-queue is continuing to process your patch.