Typing is slow in Gmail on iPads
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 6 Jun 2015 08:21:20 +0000 (08:21 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 6 Jun 2015 08:21:20 +0000 (08:21 +0000)
commit9aff6b7c7454fd1e7016ed4777c4d3f4a3dfb86b
treef162b1702c013bcd69dbdfda9da36fb6875dce04
parent9e3556903c4db5fa0b41e618b29a25b8573b1a73
Typing is slow in Gmail on iPads
https://bugs.webkit.org/show_bug.cgi?id=145686

Reviewed by Enrica Casucci.

The bug was caused by nextCandidate and nextVisuallyDistinctCandidate traversing through each character
in a text node without a renderer. Skip any node that doesn't have a renderer in both of those functions
and corresponding previous* functions.

It's fine to skip unrendered nodes in PositionIterator because only other clients of PositionIterator
are Position::upstream and Position::downstream and they don't care about un-rendered nodes either.

* dom/PositionIterator.cpp:
(WebCore::PositionIterator::increment):
(WebCore::PositionIterator::decrement):
* editing/htmlediting.cpp:
(WebCore::nextVisuallyDistinctCandidate):
(WebCore::previousVisuallyDistinctCandidate):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@185287 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/dom/PositionIterator.cpp
Source/WebCore/editing/htmlediting.cpp