1. Load apple.com 2. Wait a few seconds. 1 com.apple.JavaScriptCore 0x113e9d3f7 WTFCrash + 0x27 2 com.apple.WebCore 0x1174d62b2 WebCore::TextIteratorCopyableText::set(WTF::String&&, unsigned int, unsigned int) + 0x92 (TextIterator.cpp:292) 3 com.apple.WebCore 0x1174d0684 WebCore::TextIterator::emitText(WebCore::Text&, WebCore::RenderText&, int, int) + 0x1e4 (TextIterator.cpp:1128) 4 com.apple.WebCore 0x1174cf66b WebCore::TextIterator::handleTextNode() + 0xfbb (TextIterator.cpp:601) 5 com.apple.WebCore 0x1174cd67b WebCore::TextIterator::advance() + 0x2fb (TextIterator.cpp:437) 6 com.apple.WebCore 0x1174d44a7 WebCore::plainText(WebCore::Range const*, unsigned short, bool) + 0x107 (TextIterator.cpp:2567) 7 com.apple.WebKit 0x110a6c985 WebKit::WebFrame::contentsAsString() const + 0x265 (WebFrame.cpp:355) 8 com.apple.WebKit 0x110b81fc3 WebKit::WebPage::getContentsAsString(unsigned long long) + 0x33 (WebPage.cpp:2500)
rdar://problem/20689877
Created attachment 252389 [details] Patch
Created attachment 252390 [details] Patch
Comment on attachment 252390 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=252390&action=review > Source/WebCore/editing/TextIterator.cpp:620 > + } Should not we have a loop here to collect all the prefix tabs and newlines in one emitText() instead of emitting each one in emitCharacter()?
Comment on attachment 252390 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=252390&action=review >> Source/WebCore/editing/TextIterator.cpp:620 >> + } > > Should not we have a loop here to collect all the prefix tabs and newlines in one emitText() instead of emitting each one in emitCharacter()? Whitespace is usually collapsed.
Comment on attachment 252390 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=252390&action=review >>> Source/WebCore/editing/TextIterator.cpp:620 >>> + } >> >> Should not we have a loop here to collect all the prefix tabs and newlines in one emitText() instead of emitting each one in emitCharacter()? > > Whitespace is usually collapsed. Non-collapsed case is handled separately. (see TextIterator::handleTextNode -> if (!renderer.style().collapseWhiteSpace()))
Created attachment 252406 [details] Patch
Comment on attachment 252406 [details] Patch r=me
Comment on attachment 252406 [details] Patch Clearing flags on attachment: 252406 Committed r183835: <http://trac.webkit.org/changeset/183835>
All reviewed patches have been landed. Closing bug.