<?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>54978</bug_id>
          
          <creation_ts>2011-02-22 11:57:59 -0800</creation_ts>
          <short_desc>REGRESSION (r72489): TinyMCE not working in nightlies</short_desc>
          <delta_ts>2011-03-03 23:00:03 -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>JavaScriptCore</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://tinymce.moxiecode.com/tryit/full.php</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar, NeedsReduction, Regression</keywords>
          <priority>P1</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>46719</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alexander Romanovich">alex</reporter>
          <assigned_to name="Michael Saboff">msaboff</assigned_to>
          <cc>aestes</cc>
    
    <cc>ap</cc>
    
    <cc>barraclough</cc>
    
    <cc>darin</cc>
    
    <cc>enrica</cc>
    
    <cc>estranged</cc>
    
    <cc>ggaren</cc>
    
    <cc>jparent</cc>
    
    <cc>leviw</cc>
    
    <cc>msaboff</cc>
    
    <cc>ojan</cc>
    
    <cc>pvarga</cc>
    
    <cc>rniwa</cc>
    
    <cc>spam</cc>
    
    <cc>tony</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>355461</commentid>
    <comment_count>0</comment_count>
    <who name="Alexander Romanovich">alex</who>
    <bug_when>2011-02-22 11:57:59 -0800</bug_when>
    <thetext>I don&apos;t know when this started, but it seems to have broken some time ago. The attached TinyMCE example page (from their site) works in Safari release but not in WebKit.

In Safari, the content inside the box is rendered. In the nightlies, the raw HTML source is displayed. My concern of course is making sure that the breakage doesn&apos;t find its way into a Safari release.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>355726</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2011-02-22 17:26:07 -0800</bug_when>
    <thetext>&lt;rdar://problem/9039914&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>355740</commentid>
    <comment_count>2</comment_count>
    <who name="Andy Estes">aestes</who>
    <bug_when>2011-02-22 18:05:57 -0800</bug_when>
    <thetext>This is due to &lt;http://trac.webkit.org/changeset/72489&gt;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>358793</commentid>
    <comment_count>3</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2011-02-27 14:57:23 -0800</bug_when>
    <thetext>Could you make a reduction for this bug?  In particular, it&apos;s not clear what javascript isn&apos;t ran properly.  It&apos;ll be much easier for us to debug if we had 10 line html/javascript that demonstrates the bug.  Also, this bug might be a duplicate of https://bugs.webkit.org/show_bug.cgi?id=52106.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>359042</commentid>
    <comment_count>4</comment_count>
    <who name="Alexander Romanovich">alex</who>
    <bug_when>2011-02-28 07:33:39 -0800</bug_when>
    <thetext>This is the simplest test case I know how to make, not being associated with TinyMCE in any way:

http://www.sirensclef.com/webkit/tinymce/

It will render the contents of the textarea in Safari release, but show (broken) source in nightlies. If you need further reductions, you could contact the TinyMCE folks directly, so that they know about this bug and can help diagnose it further.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>359972</commentid>
    <comment_count>5</comment_count>
    <who name="Michael Saboff">msaboff</who>
    <bug_when>2011-03-01 09:57:35 -0800</bug_when>
    <thetext>This bug is caused by improper handling of the regular expression /&lt;(?:(?:!--([\w\W]*?)--&gt;)|(?:!\[CDATA\[([\w\W]*?)\]\]&gt;)|(?:!DOCTYPE([\w\W]*?)&gt;)|(?:\?([^\s\/&lt;&gt;]+) ?([\w\W]*?)[?/]&gt;)|(?:\/([^&gt;]+)&gt;)|(?:([^\s\/&lt;&gt;]+)\s*((?:[^&quot;&apos;&gt;]+(?:(?:&quot;[^&quot;]*&quot;)|(?:&apos;[^&apos;]*&apos;)|[^&gt;]*))*)&gt;))/

This regular expression appears to be looking for the contents inside &lt;&gt; HTML constructs.

The failing regular expression has been reduced to: /&lt;((ABC&gt;)|(\/([^&gt;]+)&gt;)|(([^&gt;]+)&gt;))/
with the (ABC&gt;) added to make it fail.

The bug appears to be an issue with the &quot;Beginning Characters&quot; optimization added that seems to have a problem in the YARR interpreter.  When the beginning characters optimization is disabled, the failing page operates correctly.  The reason the (ABC&gt;) was added to the above expression was that without that alternative, the beginning characters optimization worked correctly.  It seems that the bug has to do with how far down the alternatives the begin characters setup code analyzes when creating the data for the  optimization to use at runtime.

I will create a patch that will disable the beginning characters optimization and then create a new defect to address the beginning characters bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>360013</commentid>
    <comment_count>6</comment_count>
      <attachid>84251</attachid>
    <who name="Michael Saboff">msaboff</who>
    <bug_when>2011-03-01 10:55:41 -0800</bug_when>
    <thetext>Created attachment 84251
Patch to temporarily disable begin characters optimization</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>360059</commentid>
    <comment_count>7</comment_count>
      <attachid>84251</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2011-03-01 11:48:54 -0800</bug_when>
    <thetext>Comment on attachment 84251
Patch to temporarily disable begin characters optimization

OK.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>360079</commentid>
    <comment_count>8</comment_count>
    <who name="Michael Saboff">msaboff</who>
    <bug_when>2011-03-01 11:54:58 -0800</bug_when>
    <thetext>Committed r80018: &lt;http://trac.webkit.org/changeset/80018&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>360097</commentid>
    <comment_count>9</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2011-03-01 12:14:17 -0800</bug_when>
    <thetext>No regression test?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>360101</commentid>
    <comment_count>10</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2011-03-01 12:15:59 -0800</bug_when>
    <thetext>(In reply to comment #9)
&gt; No regression test?

I think the intent is to add the test when we turn the optimization back on, but I agree that it would be good to add the test now.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>360835</commentid>
    <comment_count>11</comment_count>
    <who name="Michael Saboff">msaboff</who>
    <bug_when>2011-03-02 09:15:31 -0800</bug_when>
    <thetext>*** Bug 55520 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>362297</commentid>
    <comment_count>12</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2011-03-03 23:00:03 -0800</bug_when>
    <thetext>*** Bug 52106 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>84251</attachid>
            <date>2011-03-01 10:55:41 -0800</date>
            <delta_ts>2011-03-01 11:48:53 -0800</delta_ts>
            <desc>Patch to temporarily disable begin characters optimization</desc>
            <filename>54978.patch</filename>
            <type>text/plain</type>
            <size>1504</size>
            <attacher name="Michael Saboff">msaboff</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9KYXZhU2NyaXB0Q29yZS9DaGFuZ2VMb2cKPT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gU291
cmNlL0phdmFTY3JpcHRDb3JlL0NoYW5nZUxvZwkocmV2aXNpb24gODAwMTApCisrKyBTb3VyY2Uv
SmF2YVNjcmlwdENvcmUvQ2hhbmdlT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EAgLTk5Miw3ICs5
OTIsMTEgQEAgY29uc3QgY2hhciogWWFyclBhdHRlcm46OmNvbXBpbGUoY29uc3QgVQogICAgIGNv
bnN0cnVjdG9yLm9wdGltaXplQk9MKCk7CiAgICAgICAgIAogICAgIGNvbnN0cnVjdG9yLnNldHVw
T2Zmc2V0cygpOwotICAgIGNvbnN0cnVjdG9yLnNldHVwQmVnaW5DaGFycygpOworICAgIC8vIFRP
RE86IERpc2FibGluZyB0aGUgYmVnaW4gY2hhcmFjdGVycyBvcHRpbWl6YXRpb24gZHVlIHRvIHBy
b2JsZW1zIGZvdW5kCisgICAgLy8gICAgaW4gaHR0cHM6Ly9idWdzLndlYmtpdC5vcmcvc2hvd19i
dWcuY2dpP2lkPTU0OTc4LgorICAgIC8vICAgIEEgbmV3IGRlZmVjdCB3YXMgZmlsZWQgdG8gdHJh
Y2sgdGhpcyBpc3N1ZTogCisgICAgLy8gICAgICAgIGh0dHBzOi8vYnVncy53ZWJraXQub3JnL3No
b3dfYnVnLmNnaT9pZD01NTQ3OQorICAgIC8vIGNvbnN0cnVjdG9yLnNldHVwQmVnaW5DaGFycygp
OwogCiAgICAgcmV0dXJuIDA7CiB9Cg==
</data>
<flag name="review"
          id="76225"
          type_id="1"
          status="+"
          setter="darin"
    />
          </attachment>
      

    </bug>

</bugzilla>