<?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>37197</bug_id>
          
          <creation_ts>2010-04-07 03:10:34 -0700</creation_ts>
          <short_desc>Crash with -webkit-user-select and contenteditables</short_desc>
          <delta_ts>2010-06-06 05:51:27 -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>WebCore Misc.</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>DUPLICATE</resolution>
          <dup_id>39989</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Kalle Vahlman">zuh</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>209553</commentid>
    <comment_count>0</comment_count>
      <attachid>52721</attachid>
    <who name="Kalle Vahlman">zuh</who>
    <bug_when>2010-04-07 03:10:34 -0700</bug_when>
    <thetext>Created attachment 52721
A QtWebKit test program for the crash

Using this snippet of CSS as the user CSS:

* {
-webkit-user-select: none !important;
}

*[contenteditable],
*[contenteditable=true] {
-webkit-user-select: text !important;
}

and the rich text tests of browserscope at

 http://www.browserscope.org/richtext/test

makes WebKit crash with a backtrace like

#0  0xb6d98c39 in WebCore::ApplyStyleCommand::splitTextElementAtEndIfNeeded(WebCore::Position const&amp;, WebCore::Position const&amp;) ()
   from WebKitBuild/Release/lib/libQtWebKit.so.4
#1  0xb6da1aa8 in WebCore::ApplyStyleCommand::applyInlineStyle(WebCore::CSSMutableStyleDeclaration*) () from WebKitBuild/Release/lib/libQtWebKit.so.4
#2  0xb6da36c3 in WebCore::ApplyStyleCommand::doApply() ()
   from WebKitBuild/Release/lib/libQtWebKit.so.4
#3  0xb6dba7e2 in WebCore::EditCommand::apply() ()
   from WebKitBuild/Release/lib/libQtWebKit.so.4
#4  0xb6dbd2df in WebCore::Editor::applyStyle(WebCore::CSSStyleDeclaration*, WebCore::EditAction) () from WebKitBuild/Release/lib/libQtWebKit.so.4
#5  0xb6dc70d4 in WebCore::applyCommandToFrame(WebCore::Frame*, WebCore::EditorCommandSource, WebCore::EditAction, WebCore::CSSMutableStyleDeclaration*) ()
   from WebKitBuild/Release/lib/libQtWebKit.so.4
#6  0xb6dc9735 in WebCore::executeApplyStyle(WebCore::Frame*, WebCore::EditorCommandSource, WebCore::EditAction, int, WebCore::String const&amp;) ()
   from WebKitBuild/Release/lib/libQtWebKit.so.4
#7  0xb6dc6fbe in WebCore::Editor::Command::execute(WebCore::String const&amp;, WebCore::Event*) const () from WebKitBuild/Release/lib/libQtWebKit.so.4
#8  0xb6d2e7f9 in WebCore::Document::execCommand(WebCore::String const&amp;, bool, WebCore::String const&amp;) () from WebKitBuild/Release/lib/libQtWebKit.so.4
#9  0xb68c1a58 in WebCore::jsDocumentPrototypeFunctionExecCommand(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, JSC::ArgList const&amp;) ()</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>233361</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2010-06-02 11:33:20 -0700</bug_when>
    <thetext>Can this be reproduced in a browser?

See also: bug 39989.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>234654</commentid>
    <comment_count>2</comment_count>
    <who name="Kalle Vahlman">zuh</who>
    <bug_when>2010-06-06 05:51:27 -0700</bug_when>
    <thetext>(In reply to comment #1)
&gt; Can this be reproduced in a browser?

Yes, for example Google Chrome 6.0.414.0 (48010) on Ubuntu exhibits this crash after pasting the snippet to $profile/User StyleSheets/Custom.css

&gt; See also: bug 39989.

Judging from the description and backtrace, these bugs are quite likely the same.

Although this bug is older, I&apos;ll mark this as dupe of bug 39989 since it has a better testcase.

*** This bug has been marked as a duplicate of bug 39989 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>52721</attachid>
            <date>2010-04-07 03:10:34 -0700</date>
            <delta_ts>2010-04-07 03:10:34 -0700</delta_ts>
            <desc>A QtWebKit test program for the crash</desc>
            <filename>contenteditable-css-crash.cpp</filename>
            <type>text/x-c++src</type>
            <size>551</size>
            <attacher name="Kalle Vahlman">zuh</attacher>
            
              <data encoding="base64">I2luY2x1ZGUgPFFBcHBsaWNhdGlvbj4KI2luY2x1ZGUgPFF0V2ViS2l0PgoKI2RlZmluZSBDU1Mg
IiIgXAoiKiB7IC13ZWJraXQtdXNlci1zZWxlY3Q6IG5vbmUgIWltcG9ydGFudDsgfSIgXA0KIipb
Y29udGVudGVkaXRhYmxlXSwgKltjb250ZW50ZWRpdGFibGU9dHJ1ZV0geyAtd2Via2l0LXVzZXIt
c2VsZWN0OiB0ZXh0ICFpbXBvcnRhbnQ7IH0iIFwNCgppbnQgbWFpbihpbnQgYXJnYywgY2hhciAq
KmFyZ3YpCnsKICBRQXBwbGljYXRpb24gYXBwKGFyZ2MsIGFyZ3YpOwogIFFXZWJWaWV3IHc7CiAg
UVN0cmluZyB1c2VyQ1NTID0gImRhdGE6dGV4dC9jc3M7Y2hhcnNldD11dGYtODtiYXNlNjQsIjsK
ICB1c2VyQ1NTLmFwcGVuZChRU3RyaW5nKENTUykudG9VdGY4KCkudG9CYXNlNjQoKSk7CiAgdy5z
ZXR0aW5ncygpLT5zZXRVc2VyU3R5bGVTaGVldFVybCh1c2VyQ1NTKTsKICB3LmxvYWQoUVVybCgi
aHR0cDovL3d3dy5icm93c2Vyc2NvcGUub3JnL3JpY2h0ZXh0L3Rlc3Q/YXV0b3J1bj0xIikpOwog
IHcuc2hvdygpOwogIAogIHJldHVybiBhcHAuZXhlYygpOwp9Cgo=
</data>

          </attachment>
      

    </bug>

</bugzilla>