Bug 71600 - --webkit-visual-word crash when create legacy position for shadowRoot
Summary: --webkit-visual-word crash when create legacy position for shadowRoot
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 25298
  Show dependency treegraph
 
Reported: 2011-11-04 17:26 PDT by Xiaomei Ji
Modified: 2011-11-10 11:52 PST (History)
2 users (show)

See Also:


Attachments
patch w/ layout test (4.37 KB, patch)
2011-11-04 17:40 PDT, Xiaomei Ji
rniwa: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Xiaomei Ji 2011-11-04 17:26:39 PDT
crash in previousRootInlineBox due to pass in shadowRoot node to create legacy position.
Comment 1 Xiaomei Ji 2011-11-04 17:40:09 PDT
Created attachment 113740 [details]
patch w/ layout test
Comment 2 Ryosuke Niwa 2011-11-10 10:45:25 PST
Comment on attachment 113740 [details]
patch w/ layout test

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

> LayoutTests/editing/selection/move-by-word-visually-crash-test-textarea.html:4
> +    try {

Why do we need try?

> LayoutTests/editing/selection/move-by-word-visually-crash-test-textarea.html:16
> +        sel = window.getSelection();
> +        sel.modify("move", "left", "-webkit-visual-word");
> +        sel.modify("move", "left", "-webkit-visual-word");

This can be written as:
getSelection().modify("move", "left", "-webkit-visual-word");
getSelection().modify("move", "left", "-webkit-visual-word");
Comment 3 Xiaomei Ji 2011-11-10 11:52:18 PST
Committed r99886: <http://trac.webkit.org/changeset/99886>