Bug 71600

Summary: --webkit-visual-word crash when create legacy position for shadowRoot
Product: WebKit Reporter: Xiaomei Ji <xji>
Component: HTML EditingAssignee: Nobody <webkit-unassigned>
Severity: Normal CC: amir.aharoni, rniwa
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 25298    
Description Flags
patch w/ layout test rniwa: review+

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>