Bug 119959

Summary: Add TextNodeTraversal
Product: WebKit Reporter: Antti Koivisto <koivisto>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: buildbot, kling, rniwa
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch
kling: review+, buildbot: commit-queue-
Archive of layout-test-results from webkit-ews-12 for mac-mountainlion-wk2 none

Description Antti Koivisto 2013-08-17 12:55:20 PDT
Better traversal for text nodes.
Comment 1 Antti Koivisto 2013-08-17 13:32:02 PDT
Created attachment 209005 [details]
patch
Comment 2 Andreas Kling 2013-08-17 13:51:05 PDT
Comment on attachment 209005 [details]
patch

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

r=me

> Source/WebCore/dom/Text.cpp:139
> +        resultLength += text->data().length();

text->length() here would avoid some String ref churn.

> Source/WebCore/dom/TextNodeTraversal.h:68
> +    // Except for the root containers, only elements can have element children.

Copypasta detected.

> Source/WebCore/dom/TextNodeTraversal.h:80
> +    // Except for the root containers, only elements can have element children.

Copypasta detected.

> Source/WebCore/editing/ApplyStyleCommand.cpp:1525
>      Vector<RefPtr<Text> > textNodes;

Might as well >> this one too. It's so close!
Comment 3 Build Bot 2013-08-17 14:19:59 PDT
Comment on attachment 209005 [details]
patch

Attachment 209005 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/1387363

New failing tests:
fast/dom/Text/replaceWholeText.html
Comment 4 Build Bot 2013-08-17 14:20:00 PDT
Created attachment 209008 [details]
Archive of layout-test-results from webkit-ews-12 for mac-mountainlion-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-12  Port: mac-mountainlion-wk2  Platform: Mac OS X 10.8.4
Comment 5 Antti Koivisto 2013-08-17 14:32:43 PDT
http://trac.webkit.org/changeset/154240 (with a bug fix)