Bug 54425 - Extract a function to process ancestor and their sibling nodes from processContents
Summary: Extract a function to process ancestor and their sibling nodes from processCo...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Enhancement
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 51006
  Show dependency treegraph
 
Reported: 2011-02-14 17:50 PST by Ryosuke Niwa
Modified: 2011-02-15 21:05 PST (History)
5 users (show)

See Also:


Attachments
54425 (7.88 KB, patch)
2011-02-14 17:57 PST, Ryosuke Niwa
no flags Details | Formatted Diff | Diff
Patch for landing (8.04 KB, patch)
2011-02-15 17:48 PST, Ryosuke Niwa
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2011-02-14 17:50:22 PST
This is a cleanup.
Comment 1 Ryosuke Niwa 2011-02-14 17:57:50 PST
Created attachment 82400 [details]
54425
Comment 2 Darin Adler 2011-02-15 09:15:07 PST
Comment on attachment 82400 [details]
54425

View in context: https://bugs.webkit.org/attachment.cgi?id=82400&action=review

Seems OK. Not sure it needs to be a member function. I don’t see uses of data or function members. If I am right it could be a static member function or event a non-member function. Non-member would be good because we wouldn’t have to touch the header file.

> Source/WebCore/dom/Range.cpp:866
> +    return clonedContainer;

Should be clonedContainer.release().
Comment 3 Ryosuke Niwa 2011-02-15 15:53:38 PST
(In reply to comment #2)
> (From update of attachment 82400 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=82400&action=review
> 
> Seems OK. Not sure it needs to be a member function. I don’t see uses of data or function members. If I am right it could be a static member function or event a non-member function. Non-member would be good because we wouldn’t have to touch the header file.

The reason this function had to be a member function was because ActionType is declared private.  I could make ActionType public as well but then it seems to unnecessarily pollute WebCore namespace.
Comment 4 Darin Adler 2011-02-15 15:54:16 PST
(In reply to comment #3)
> The reason this function had to be a member function was because ActionType is declared private.

OK. It can be a static member function, then.
Comment 5 Ryosuke Niwa 2011-02-15 17:45:40 PST
(In reply to comment #4)
> (In reply to comment #3)
> > The reason this function had to be a member function was because ActionType is declared private.
> 
> OK. It can be a static member function, then.

Yes, I'll make processContentsBetweenOffsets and processAncestorsAndTheirSiblings static functions before landing it.

Thanks for the review!
Comment 6 Ryosuke Niwa 2011-02-15 17:48:50 PST
Created attachment 82561 [details]
Patch for landing
Comment 7 WebKit Commit Bot 2011-02-15 21:04:11 PST
The commit-queue encountered the following flaky tests while processing attachment 82561 [details]:

media/invalid-media-url-crash.html bug 51138 (author: inferno@chromium.org)
The commit-queue is continuing to process your patch.
Comment 8 WebKit Commit Bot 2011-02-15 21:05:50 PST
Comment on attachment 82561 [details]
Patch for landing

Clearing flags on attachment: 82561

Committed r78679: <http://trac.webkit.org/changeset/78679>
Comment 9 WebKit Commit Bot 2011-02-15 21:05:56 PST
All reviewed patches have been landed.  Closing bug.