<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>18620</bug_id>
          
          <creation_ts>2008-04-19 03:22:50 -0700</creation_ts>
          <short_desc>Long hang under TextIterator::advance() when loading http://www.lsvd.de/</short_desc>
          <delta_ts>2008-11-13 13:05:38 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>HTML Editing</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://www.lsvd.de</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>NeedsReduction</keywords>
          <priority>P1</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>hoagie</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>hoagie</cc>
    
    <cc>justin.garcia</cc>
    
    <cc>mihnea</cc>
    
    <cc>mitz</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>78251</commentid>
    <comment_count>0</comment_count>
    <who name="">hoagie</who>
    <bug_when>2008-04-19 03:22:50 -0700</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78399</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2008-04-21 07:55:07 -0700</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98309</commentid>
    <comment_count>2</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2008-11-11 11:02:17 -0800</bug_when>
    <thetext>I can confirm ap&apos;s findings.  I don&apos;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&amp;)	
	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&amp;, WebCore::VisiblePosition const&amp;)	
	0.0%	76.0%	WebCore	                         WebCore::startOfLine(WebCore::VisiblePosition const&amp;)	
	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&amp;)	
	6.5%	31.2%	WebCore	                              WebCore::Position::previous(WebCore::EUsingComposedCharacters) const	


I&apos;m not sure why Safari&apos;s asking for the text content of the page at load, but the TextIterator seems to have some trouble iterating through this large page. :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98448</commentid>
    <comment_count>3</comment_count>
    <who name="Justin Garcia">justin.garcia</who>
    <bug_when>2008-11-12 00:31:41 -0800</bug_when>
    <thetext>(In reply to comment #2)
&gt; I&apos;m not sure why Safari&apos;s asking for the text content of the page at load, but
&gt; the TextIterator seems to have some trouble iterating through this large page.

I believe it&apos;s for indexing.  I&apos;ll take a look at this...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98462</commentid>
    <comment_count>4</comment_count>
      <attachid>25094</attachid>
    <who name="Justin Garcia">justin.garcia</who>
    <bug_when>2008-11-12 03:35:15 -0800</bug_when>
    <thetext>Created attachment 25094
patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98480</commentid>
    <comment_count>5</comment_count>
      <attachid>25094</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2008-11-12 10:02:40 -0800</bug_when>
    <thetext>Comment on attachment 25094
patch

r=me

Could you add a test case?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98638</commentid>
    <comment_count>6</comment_count>
    <who name="Justin Garcia">justin.garcia</who>
    <bug_when>2008-11-13 13:04:29 -0800</bug_when>
    <thetext>(In reply to comment #5)
&gt; (From update of attachment 25094 [review])
&gt; r=me
&gt; 
&gt; Could you add a test case?

Not currently.  There&apos;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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98639</commentid>
    <comment_count>7</comment_count>
    <who name="Justin Garcia">justin.garcia</who>
    <bug_when>2008-11-13 13:05:38 -0800</bug_when>
    <thetext>http://trac.webkit.org/changeset/38376</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>25094</attachid>
            <date>2008-11-12 03:35:15 -0800</date>
            <delta_ts>2008-11-12 10:02:40 -0800</delta_ts>
            <desc>patch</desc>
            <filename>textiterator.txt</filename>
            <type>text/plain</type>
            <size>3476</size>
            <attacher name="Justin Garcia">justin.garcia</attacher>
            
              <data encoding="base64">SW5kZXg6IENoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBDaGFuZ2VMb2cJKHJldmlzaW9uIDM4MzMz
KQorKysgQ2hhbmdlTG9nCSh3b3JraW5nIGNvcHkpCkBAIC0xLDMgKzEsMTkgQEAKKzIwMDgtMTEt
MTIgIEp1c3RpbiBHYXJjaWEgIDxqdXN0aW4uZ2FyY2lhQGFwcGxlLmNvbT4KKworICAgICAgICBS
ZXZpZXdlZCBieSBOT0JPRFkgKE9PUFMhKS4KKworICAgICAgICBodHRwczovL2J1Z3Mud2Via2l0
Lm9yZy9zaG93X2J1Zy5jZ2k/aWQ9MTg2MjAKKyAgICAgICAgTG9uZyBo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9iYWJs
eQogICAgIC8vIGltbWF0ZXJpYWwgc2luY2Ugd2UgbGlrZWx5IHdvdWxkIGhhdmUgYWxyZWFkeSBl
bWl0dGVkIHNvbWV0aGluZyBieSBub3cuCiAgICAgaWYgKG1fc3RhcnRPZmZzZXQgPT0gMCkKICAg
ICAgICAgcmV0dXJuIGZhbHNlOworICAgICAgICAKKyAgICAvLyBJZiB0aGlzIG5vZGUgaXMgdW5y
ZW5kZXJlZCBvciBpbnZpc2libGUgdGhlIFZpc2libGVQb3NpdGlvbiBjaGVja3MgYmVsb3cgd29u
J3QgaGF2ZSBtdWNoIG1lYW5pbmcuCisgICAgLy8gQWRkaXRpb25hbGx5LCBpZiB0aGUgcmFuZ2Ug
d2UgYXJlIGl0ZXJhdGluZyBvdmVyIGNvbnRhaW5zIGh1Z2Ugc2VjdGlvbnMgb2YgdW5yZW5kZXJl
ZCBjb250ZW50LCAKKyAgICAvLyB3ZSB3b3VsZCBjcmVhdGUgVmlzaWJsZVBvc2l0aW9ucyBvbiBl
dmVyeSBjYWxsIHRvIHRoaXMgZnVuY3Rpb24gd2l0aG91dCB0aGlzIGNoZWNrLgorICAgIGlmICgh
bV9ub2RlLT5yZW5kZXJlcigpIHx8IG1fbm9kZS0+cmVuZGVyZXIoKS0+c3R5bGUoKS0+dmlzaWJp
bGl0eSgpICE9IFZJU0lCTEUpCisgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAKICAgICAvLyBU
aGUgY3VyclBvcy5pc05vdE51bGwoKSBjaGVjayBpcyBuZWVkZWQgYmVjYXVzZSBwb3NpdGlvbnMg
aW4gbm9uLWh0bWwgY29udGVudAogICAgIC8vIChsaWtlIHN2ZykgZG8gbm90IGhhdmUgdmlzaWJs
ZSBwb3NpdGlvbnMsIGFuZCB3ZSBkb24ndCB3YW50IHRvIGVtaXQgZm9yIHRoZW0gZWl0aGVyLgo=
</data>
<flag name="review"
          id="11548"
          type_id="1"
          status="+"
          setter="darin"
    />
          </attachment>
      

    </bug>

</bugzilla>