| Summary: | Ranges given to createMarkupInternal might not be canonicalized | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Myles C. Maxfield <mmaxfield> | ||||||
| Component: | New Bugs | Assignee: | Myles C. Maxfield <mmaxfield> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | dino, rniwa, sam, simon.fraser, thorton | ||||||
| Priority: | P2 | ||||||||
| Version: | 528+ (Nightly build) | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Attachments: |
|
||||||||
|
Description
Myles C. Maxfield
2014-02-26 16:18:06 PST
Created attachment 225317 [details]
Patch
Comment on attachment 225317 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=225317&action=review > Source/WebCore/ChangeLog:9 > + No new tests because this codepath will only be reached via SPI. > + We need to describe why we're making this change. > Source/WebCore/editing/markup.cpp:575 > - if (body && areRangesEqual(VisibleSelection::selectionFromContentsOfNode(body).toNormalizedRange().get(), &range)) > + if (body && areRangesEqual(VisibleSelection::selectionFromContentsOfNode(body).toNormalizedRange().get(), > + VisibleSelection(range.startPosition(), range.endPosition()).toNormalizedRange().get())) This is very inefficient way of checking this condition anyways. It's probably better to do VisiblePosition(firstPositionInNode(body)) == VisiblePosition(range.startPosition()) and the similar for the end. Created attachment 225326 [details]
Patch
|