Bug 18620 - Long hang under TextIterator::advance() when loading http://www.lsvd.de/
Summary: Long hang under TextIterator::advance() when loading http://www.lsvd.de/
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P1 Normal
Assignee: Nobody
URL: http://www.lsvd.de
Keywords: NeedsReduction
Depends on:
Blocks:
 
Reported: 2008-04-19 03:22 PDT by hoagie
Modified: 2008-11-13 13:05 PST (History)
5 users (show)

See Also:


Attachments
patch (3.39 KB, patch)
2008-11-12 03:35 PST, Justin Garcia
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description hoagie 2008-04-19 03:22:50 PDT
As soon as I click into the SEARCH (Suchen) field on the Website www.lsvd.de the Browser hangs it self up and is not responding anylonger.
When I do the same with the regular Safari Browser I can work on the website with no problems.

I have sent the system report to Apple and would have pasted into this text field but it was too long.
Comment 1 Alexey Proskuryakov 2008-04-21 07:55:07 PDT
With a local debug build, I got a temporary freeze (for ~30 seconds) when opening the page, but not when clicking in the search field.
Comment 2 Eric Seidel (no email) 2008-11-11 11:02:17 PST
I can confirm ap's findings.  I don't see a hang when clicking the search field, but I do see one on load:

	0.0%	99.8%	Safari	0xb2776 [unknown]	
	0.0%	99.8%	AppKit	 NSApplicationMain	
	0.0%	99.8%	AppKit	  -[NSApplication run]	
	0.0%	99.8%	Safari	   0x7ae0 [105B]	
	0.0%	99.8%	AppKit	    -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:]	
	0.0%	99.8%	AppKit	     _DPSNextEvent	
	0.0%	99.8%	HIToolbox	      BlockUntilNextEventMatchingListInMode	
	0.0%	99.8%	HIToolbox	       ReceiveNextEventCommon	
	0.0%	99.8%	HIToolbox	        RunCurrentEventLoopInMode	
	0.0%	99.8%	CoreFoundation	         CFRunLoopRunInMode	
	0.0%	99.8%	CoreFoundation	          CFRunLoopRunSpecific	
	0.0%	99.8%	Foundation	           __NSFireTimer	
	0.0%	99.8%	Safari	            0x100840 [169B]	
	0.0%	99.8%	Safari	             0x26d90 [264B]	
	0.0%	99.8%	Safari	              0x27154 [unknown]	
	0.0%	99.8%	Safari	               0x27480 [421B]	
	0.0%	99.8%	WebKit	                -[WebHTMLView(WebDocumentPrivateProtocols) string]	
	0.0%	99.8%	WebKit	                 -[WebFrame(WebInternal) _stringForRange:]	
	0.0%	99.8%	WebCore	                  WebCore::plainTextToMallocAllocatedBuffer(WebCore::Range const*, unsigned int&)	
	0.0%	99.8%	WebCore	                   WebCore::TextIterator::TextIterator(WebCore::Range const*, bool, bool)	
	0.0%	99.8%	WebCore	                    WebCore::TextIterator::advance()	
	0.0%	99.8%	WebCore	                     WebCore::TextIterator::handleNonTextNode()	
	0.0%	99.8%	WebCore	                      WebCore::TextIterator::representNodeOffsetZero()	
	0.0%	99.8%	WebCore	                       WebCore::TextIterator::shouldRepresentNodeOffsetZero()	
	0.0%	76.0%	WebCore	                        WebCore::inSameLine(WebCore::VisiblePosition const&, WebCore::VisiblePosition const&)	
	0.0%	76.0%	WebCore	                         WebCore::startOfLine(WebCore::VisiblePosition const&)	
	0.0%	76.0%	WebCore	                          _ZN7WebCoreL20startPositionForLineERKNS_15VisiblePositionE	
	0.0%	76.0%	WebCore	                           _ZN7WebCoreL36positionAvoidingFirstPositionInTableERKNS_15VisiblePositionE	
	0.0%	76.0%	WebCore	                            WebCore::VisiblePosition::previous(bool) const	
	3.4%	75.4%	WebCore	                             WebCore::previousVisuallyDistinctCandidate(WebCore::Position const&)	
	6.5%	31.2%	WebCore	                              WebCore::Position::previous(WebCore::EUsingComposedCharacters) const	


I'm not sure why Safari's asking for the text content of the page at load, but the TextIterator seems to have some trouble iterating through this large page. :)
Comment 3 Justin Garcia 2008-11-12 00:31:41 PST
(In reply to comment #2)
> I'm not sure why Safari's asking for the text content of the page at load, but
> the TextIterator seems to have some trouble iterating through this large page.

I believe it's for indexing.  I'll take a look at this...
Comment 4 Justin Garcia 2008-11-12 03:35:15 PST
Created attachment 25094 [details]
patch
Comment 5 Darin Adler 2008-11-12 10:02:40 PST
Comment on attachment 25094 [details]
patch

r=me

Could you add a test case?
Comment 6 Justin Garcia 2008-11-13 13:04:29 PST
(In reply to comment #5)
> (From update of attachment 25094 [details] [review])
> r=me
> 
> Could you add a test case?

Not currently.  There's no way to create a test that makes an explicit call to plainText or to a function that calls plainText with the kind of Range necessary to invoke this code.  Filed:

https://bugs.webkit.org/show_bug.cgi?id=22236
Comment 7 Justin Garcia 2008-11-13 13:05:38 PST
http://trac.webkit.org/changeset/38376