WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
144930
Modernize ContainerNode::childElementCount
https://bugs.webkit.org/show_bug.cgi?id=144930
Summary
Modernize ContainerNode::childElementCount
Sam Weinig
Reported
2015-05-12 14:42:02 PDT
Modernize ContainerNode::childElementCount
Attachments
Patch
(2.97 KB, patch)
2015-05-12 14:45 PDT
,
Sam Weinig
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Sam Weinig
Comment 1
2015-05-12 14:45:52 PDT
Created
attachment 252986
[details]
Patch
WebKit Commit Bot
Comment 2
2015-05-12 14:48:05 PDT
Attachment 252986
[details]
did not pass style-queue: ERROR: Source/WebCore/dom/ElementChildIterator.h:36: value_type is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/dom/ElementChildIterator.h:37: difference_type is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/dom/ElementChildIterator.h:40: iterator_category is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/dom/ElementChildIterator.h:50: value_type is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/dom/ElementChildIterator.h:51: difference_type is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/dom/ElementChildIterator.h:54: iterator_category is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] Total errors found: 6 in 3 files If any of these errors are false positives, please file a bug against check-webkit-style.
Darin Adler
Comment 3
2015-05-12 21:46:00 PDT
Comment on
attachment 252986
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=252986&action=review
> Source/WebCore/dom/ElementChildIterator.h:40 > + typedef ElementType value_type; > + typedef ptrdiff_t difference_type; > + typedef ElementType* pointer; > + typedef ElementType& reference; > + typedef std::forward_iterator_tag iterator_category;
The modern way to do this is to derive from std::iterator<std::forward_iterator_tag, ElementType>; std::iterator handles the rest by default.
> Source/WebCore/dom/ElementChildIterator.h:54 > + typedef const ElementType value_type; > + typedef ptrdiff_t difference_type; > + typedef const ElementType* pointer; > + typedef const ElementType& reference; > + typedef std::forward_iterator_tag iterator_category;
The modern way to do this is to derive from std::iterator<std::forward_iterator_tag, const ElementType>; std::iterator handles the rest by default.
WebKit Commit Bot
Comment 4
2015-05-13 15:08:13 PDT
Comment on
attachment 252986
[details]
Patch Clearing flags on attachment: 252986 Committed
r184309
: <
http://trac.webkit.org/changeset/184309
>
WebKit Commit Bot
Comment 5
2015-05-13 15:08:18 PDT
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.
Top of Page
Format For Printing
XML
Clone This Bug