Changeset 155378 in webkit
- Timestamp:
- Sep 9, 2013, 1:28:39 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/platform/mac/editing/input/caret-primary-bidi-expected.txt (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/editing/TextIterator.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r155369 r155378 1 2013-09-06 Ryosuke Niwa <rniwa@webkit.org> 2 3 Internals should always cause a layout before calling into TextIterator 4 https://bugs.webkit.org/show_bug.cgi?id=120891 5 6 Reviewed by Antti Koivisto. 7 8 Progression. 9 10 * platform/mac/editing/input/caret-primary-bidi-expected.txt: 11 1 12 2013-09-09 Mark Lam <mark.lam@apple.com> 2 13 -
trunk/LayoutTests/platform/mac/editing/input/caret-primary-bidi-expected.txt
r153060 r155378 1 0: 124,508,0,281 0: 8,564,0,28 2 2 1: 21,564,0,28 3 3 2: 36,564,0,28 -
trunk/Source/WebCore/ChangeLog
r155377 r155378 1 2013-09-06 Ryosuke Niwa <rniwa@webkit.org> 2 3 Internals should always cause a layout before calling into TextIterator 4 https://bugs.webkit.org/show_bug.cgi?id=120891 5 6 Reviewed by Antti Koivisto. 7 8 Inspired by https://chromium.googlesource.com/chromium/blink/+/5fee5da7b04a710171c79bd6e87eca3533188e45. 9 10 Force a layout in the constructors of TextIterator, and SimplifiedBackwardsTextIterator and remove 11 superfluous calls to updateLayout() in other places. 12 13 As much as I hate for a constructor to have a side effect like this, I couldn't think of a better place 14 to update the layout. Unfortunately, we're slowly moving away from manually createing TextIterator and 15 wrapping them in a static function. 16 17 * editing/TextIterator.cpp: 18 (WebCore::TextIterator::TextIterator): 19 (WebCore::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator): 20 (WebCore::TextIterator::rangeFromLocationAndLength): 21 (WebCore::findPlainText): 22 1 23 2013-09-09 David Hyatt <hyatt@apple.com> 2 24 -
trunk/Source/WebCore/editing/TextIterator.cpp
r155366 r155378 293 293 if (!r) 294 294 return; 295 296 r->ownerDocument().updateLayoutIgnorePendingStylesheets(); 295 297 296 298 // get and validate the range endpoints … … 1118 1120 if (!r) 1119 1121 return; 1122 1123 r->ownerDocument().updateLayoutIgnorePendingStylesheets(); 1120 1124 1121 1125 Node* startNode = r->startContainer(); … … 2428 2432 // position for emitted '\n's. 2429 2433 if (len == 1 && it.characterAt(0) == '\n') { 2430 scope->document().updateLayoutIgnorePendingStylesheets();2431 2434 it.advance(); 2432 2435 if (!it.atEnd()) { … … 2594 2597 PassRefPtr<Range> findPlainText(const Range* range, const String& target, FindOptions options) 2595 2598 { 2596 // CharacterIterator requires renderers to be up-to-date2597 range->ownerDocument().updateLayout();2598 2599 2599 // First, find the text. 2600 2600 size_t matchStart;
Note:
See TracChangeset
for help on using the changeset viewer.