Bug 119959 - Add TextNodeTraversal
Summary: Add TextNodeTraversal
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-17 12:55 PDT by Antti Koivisto
Modified: 2013-08-17 14:32 PDT (History)
3 users (show)

See Also:


Attachments
patch (31.62 KB, patch)
2013-08-17 13:32 PDT, Antti Koivisto
kling: review+
buildbot: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from webkit-ews-12 for mac-mountainlion-wk2 (504.51 KB, application/zip)
2013-08-17 14:20 PDT, Build Bot
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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)