Bug 52250 - Stop instantiating legacy editing positions in ApplyBlockElementCommand and ApplyStyleCommand
Summary: Stop instantiating legacy editing positions in ApplyBlockElementCommand and A...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 52099
  Show dependency treegraph
 
Reported: 2011-01-11 14:06 PST by Ryosuke Niwa
Modified: 2011-01-14 14:10 PST (History)
7 users (show)

See Also:


Attachments
Patch (14.62 KB, patch)
2011-01-11 14:09 PST, Ryosuke Niwa
no flags Details | Formatted Diff | Diff
cleanup (17.20 KB, patch)
2011-01-11 16:18 PST, Ryosuke Niwa
no flags Details | Formatted Diff | Diff
don't generate bogus position like [br, 0] (21.35 KB, patch)
2011-01-11 18:03 PST, Ryosuke Niwa
eric: review+
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-01-11 14:06:52 PST
This is a cleanup.
Comment 1 Ryosuke Niwa 2011-01-11 14:09:52 PST
Created attachment 78597 [details]
Patch
Comment 2 Eric Seidel (no email) 2011-01-11 15:37:57 PST
Comment on attachment 78597 [details]
Patch

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

> WebCore/editing/ApplyStyleCommand.cpp:571
> +    Position rangeStart = firstPositionInNode(scope);

Does this cause ref-churn for scope?
Comment 3 Ryosuke Niwa 2011-01-11 16:18:12 PST
Created attachment 78618 [details]
cleanup
Comment 4 Ryosuke Niwa 2011-01-11 16:18:49 PST
(In reply to comment #2)
> (From update of attachment 78597 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=78597&action=review
> 
> > WebCore/editing/ApplyStyleCommand.cpp:571
> > +    Position rangeStart = firstPositionInNode(scope);
> 
> Does this cause ref-churn for scope?

Good point. Removed.
Comment 5 Ryosuke Niwa 2011-01-11 16:54:27 PST
Comment on attachment 78618 [details]
cleanup

On my second thought, I have to be more careful about what kind of Position I'm creating.
Comment 6 Ryosuke Niwa 2011-01-11 18:03:57 PST
Created attachment 78633 [details]
don't generate bogus position like [br, 0]
Comment 7 Eric Seidel (no email) 2011-01-12 17:06:07 PST
Comment on attachment 78633 [details]
don't generate bogus position like [br, 0]

Seems sane.
Comment 8 Ryosuke Niwa 2011-01-12 19:04:21 PST
(In reply to comment #7)
> (From update of attachment 78633 [details])
> Seems sane.

Thanks for the review, Eric.  Landing now.