+2013-09-06 Ryosuke Niwa <rniwa@webkit.org>
+
+ Internals should always cause a layout before calling into TextIterator
+ https://bugs.webkit.org/show_bug.cgi?id=120891
+
+ Reviewed by Antti Koivisto.
+
+ Progression.
+
+ * platform/mac/editing/input/caret-primary-bidi-expected.txt:
+
2013-09-09 Mark Lam <mark.lam@apple.com>
Change some remaining fast/* files to use pre and post js files in LayoutTests/resources.
+2013-09-06 Ryosuke Niwa <rniwa@webkit.org>
+
+ Internals should always cause a layout before calling into TextIterator
+ https://bugs.webkit.org/show_bug.cgi?id=120891
+
+ Reviewed by Antti Koivisto.
+
+ Inspired by https://chromium.googlesource.com/chromium/blink/+/5fee5da7b04a710171c79bd6e87eca3533188e45.
+
+ Force a layout in the constructors of TextIterator, and SimplifiedBackwardsTextIterator and remove
+ superfluous calls to updateLayout() in other places.
+
+ As much as I hate for a constructor to have a side effect like this, I couldn't think of a better place
+ to update the layout. Unfortunately, we're slowly moving away from manually createing TextIterator and
+ wrapping them in a static function.
+
+ * editing/TextIterator.cpp:
+ (WebCore::TextIterator::TextIterator):
+ (WebCore::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator):
+ (WebCore::TextIterator::rangeFromLocationAndLength):
+ (WebCore::findPlainText):
+
2013-09-09 David Hyatt <hyatt@apple.com>
Move layoutBlock and layoutBlockChildren into RenderBlockFlow
if (!r)
return;
+ r->ownerDocument().updateLayoutIgnorePendingStylesheets();
+
// get and validate the range endpoints
Node* startContainer = r->startContainer();
if (!startContainer)
if (!r)
return;
+ r->ownerDocument().updateLayoutIgnorePendingStylesheets();
+
Node* startNode = r->startContainer();
if (!startNode)
return;
// FIXME: This is a workaround for the fact that the end of a run is often at the wrong
// position for emitted '\n's.
if (len == 1 && it.characterAt(0) == '\n') {
- scope->document().updateLayoutIgnorePendingStylesheets();
it.advance();
if (!it.atEnd()) {
RefPtr<Range> range = it.range();
PassRefPtr<Range> findPlainText(const Range* range, const String& target, FindOptions options)
{
- // CharacterIterator requires renderers to be up-to-date
- range->ownerDocument().updateLayout();
-
// First, find the text.
size_t matchStart;
size_t matchLength;