<?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>26557</bug_id>
          
          <creation_ts>2009-06-19 12:44:18 -0700</creation_ts>
          <short_desc>Crash in WebCore::pushFullyClippedState due to BitStack size assert</short_desc>
          <delta_ts>2009-06-19 13:45:20 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>New Bugs</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>26528</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P1</priority>
          <bug_severity>Major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Finnur Thorarinsson">finnur.webkit</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>darin</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>126998</commentid>
    <comment_count>0</comment_count>
    <who name="Finnur Thorarinsson">finnur.webkit</who>
    <bug_when>2009-06-19 12:44:18 -0700</bug_when>
    <thetext>I have reduced the crash to this piece of HTML:

&lt;html&gt; 
&lt;body&gt; 
  &lt;form&gt;&lt;input type=&quot;text&quot; id=&quot;search&quot; /&gt;&lt;/form&gt; 
  &lt;script type=&quot;text/javascript&quot;&gt; 
    document.getElementById(&quot;search&quot;).setAttribute(&quot;type&quot;,&quot;search&quot;);
  &lt;/script&gt; 
&lt;/body&gt; 
&lt;/html&gt;


If you call WebCore::findPlainText(...) specifying any text as parameter, you&apos;ll get an ASSERT here:

static void pushFullyClippedState(BitStack&amp; stack, Node* node)
{
    ASSERT(stack.size() == depthCrossingShadowBoundaries(node));

    ... snip ...
}

Stepping through this, I see that stack.size() returns 5 but depthCrossingShadowBoundaries returns 6, because it goes through this hierarchy of parent nodes:

HTMLDocument
HTMLHtmlElement
HTMLBodyElement
HTMLFormElement
HTMLInputElement (shadow parent)
TextControlInnerTextElement

Darin, if you have something simple you&apos;d like me to try, feel free to suggest changes and I can try it out, formulate a patch and submit it to WebKit.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>127005</commentid>
    <comment_count>1</comment_count>
    <who name="Finnur Thorarinsson">finnur.webkit</who>
    <bug_when>2009-06-19 12:54:22 -0700</bug_when>
    <thetext>And, I should mention this bug fix is what seems to have triggered this:
https://bugs.webkit.org/show_bug.cgi?id=26364</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>127024</commentid>
    <comment_count>2</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2009-06-19 13:45:20 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of 26528 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>