[webkit-reviews] review granted: [Bug 112240] execCommand("RemoveFormat") might remove format after the selection : [Attachment 198354] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Apr 16 11:57:03 PDT 2013


Ryosuke Niwa <rniwa at webkit.org> has granted Claudio Saavedra
<csaavedra at igalia.com>'s request for review:
Bug 112240: execCommand("RemoveFormat") might remove format after the selection
https://bugs.webkit.org/show_bug.cgi?id=112240

Attachment 198354: Patch
https://bugs.webkit.org/attachment.cgi?id=198354&action=review

------- Additional Comments from Ryosuke Niwa <rniwa at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=198354&action=review


> Source/WebCore/editing/ApplyStyleCommand.cpp:1094
>  

We should probably assert that start & end are not in a middle of text node
either.
If they were, then we failed to split the text nodes properly.

> Source/WebCore/editing/ApplyStyleCommand.cpp:1109
> +    // The tree may have changed and Position::upstream(), which is used in
nodeFullySelected(), relies
> +    // on an up-to-date layout.
> +    node->document()->updateLayoutIgnorePendingStylesheets();

On my second thought, we probably need to call this inside nodeFullySelected.


More information about the webkit-reviews mailing list