<?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>51477</bug_id>
          
          <creation_ts>2010-12-22 09:52:01 -0800</creation_ts>
          <short_desc>Web Inspector: ASSERT removing inline HTML style property</short_desc>
          <delta_ts>2010-12-24 09:06:15 -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>Web Inspector (Deprecated)</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <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="Joseph Pecoraro">joepeck</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>apavlov</cc>
    
    <cc>bweinstein</cc>
    
    <cc>joepeck</cc>
    
    <cc>keishi</cc>
    
    <cc>loislo</cc>
    
    <cc>pfeldman</cc>
    
    <cc>pmuellr</cc>
    
    <cc>rik</cc>
    
    <cc>timothy</cc>
    
    <cc>yurys</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>325530</commentid>
    <comment_count>0</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2010-12-22 09:52:01 -0800</bug_when>
    <thetext>Steps to Reproduce:

    1. Inspect &lt;body&gt; on webkit.org
    2. Add a new element.style of &quot;height: 20px&quot; (commit it with enter)
    3. Double click the new style=&quot;height: 20px&quot; in &lt;body&gt; in the Elements Tree Hierarchy
    4. Delete the value leaving it just style=&quot;&quot; (commit with enter)
    =&gt; ASSERTION FAILED: end &lt;= styleDeclaration.length()
        (WebCore/inspector/InspectorStyleSheet.h:110 void WebCore::InspectorStyleProperty::setRawTextFromStyleDeclaration(const WTF::String&amp;))

Assertion:

    void setRawTextFromStyleDeclaration(const String&amp; styleDeclaration)
    {
        unsigned start = sourceData.range.start;
        unsigned end = sourceData.range.end;
        ASSERT(start &lt; end);
        ASSERT(end &lt;= styleDeclaration.length()); // &lt;-- this one
        rawText = styleDeclaration.substring(start, end - start);
    }

Limited Crash Report:

    Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
    Exception Codes: KERN_INVALID_ADDRESS at 0x00000000bbadbeef
    Crashed Thread:  0  Dispatch queue: com.apple.main-thread
    
    Thread 0 Crashed:  Dispatch queue: com.apple.main-thread
    0   WebCore::InspectorStyleProperty::setRawTextFromStyleDeclaration(WTF::String const&amp;) + 148 (InspectorStyleSheet.h:110)
    1   WebCore::InspectorStyle::populateAllProperties(WTF::Vector&lt;WebCore::InspectorStyleProperty, 0ul&gt;*) const + 695 (InspectorStyleSheet.cpp:398)
    2   WebCore::InspectorStyle::populateObjectWithStyleProperties(WebCore::InspectorObject*) const + 73 (InspectorStyleSheet.cpp:425)
    3   WebCore::InspectorStyle::buildObjectForStyle() const + 1007 (InspectorStyleSheet.cpp:153)
    4   WebCore::InspectorStyleSheet::buildObjectForStyle(WebCore::CSSStyleDeclaration*) + 566 (InspectorStyleSheet.cpp:739)
    5   WebCore::InspectorCSSAgent::getStylesForNode2(long, WTF::RefPtr&lt;WebCore::InspectorValue&gt;*) + 163 (InspectorCSSAgent.cpp:186)
    6   WebCore::InspectorBackendDispatcher::getStylesForNode2(long, WebCore::InspectorObject*) + 412 (InspectorBackendDispatcher.cpp:1445)
    7   WebCore::InspectorBackendDispatcher::dispatch(WTF::String const&amp;) + 10143 (InspectorBackendDispatcher.cpp:2876)
    8   WebCore::InspectorFrontendClientLocal::sendMessageToBackend(WTF::String const&amp;) + 41 (InspectorFrontendClientLocal.cpp:155)
    9   WebCore::InspectorFrontendHost::sendMessageToBackend(WTF::String const&amp;) + 48 (InspectorFrontendHost.cpp:224)
    10  WebCore::jsInspectorFrontendHostPrototypeFunctionSendMessageToBackend(JSC::ExecState*) + 202 (JSInspectorFrontendHost.cpp:405)
    11  0 + 104292579017144
    12  JSC::JITCode::execute(JSC::RegisterFile*, JSC::ExecState*, JSC::JSGlobalData*) + 73 (JITCode.h:77)
    13  JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&amp;, JSC::JSValue, JSC::ArgList const&amp;) + 1107 (Interpreter.cpp:849)
    14  JSC::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&amp;, JSC::JSValue, JSC::ArgList const&amp;) + 162 (CallData.cpp:39)
    15  WebCore::JSMainThreadExecState::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&amp;, JSC::JSValue, JSC::ArgList const&amp;) + 87 (JSMainThreadExecState.h:48)
    16  WebCore::JSEventListener::handleEvent(WebCore::ScriptExecutionContext*, WebCore::Event*) + 1222 (JSEventListener.cpp:124)
    17  WebCore::EventTarget::fireEventListeners(WebCore::Event*, WebCore::EventTargetData*, WTF::Vector&lt;WebCore::RegisteredEventListener, 1ul&gt;&amp;) + 296 (EventTarget.cpp:328)
    18  WebCore::EventTarget::fireEventListeners(WebCore::Event*) + 334 (EventTarget.cpp:313)
    19  WebCore::Node::handleLocalEvents(WebCore::Event*) + 159 (Node.cpp:2512)
    20  WebCore::Node::dispatchGenericEvent(WTF::PassRefPtr&lt;WebCore::Event&gt;) + 1002 (Node.cpp:2637)
    21  WebCore::Node::dispatchEvent(WTF::PassRefPtr&lt;WebCore::Event&gt;) + 149 (Node.cpp:2580)
    22  WebCore::EventTarget::dispatchEvent(WTF::PassRefPtr&lt;WebCore::Event&gt;, int&amp;) + 178 (EventTarget.cpp:289)
    23  WebCore::EventHandler::keyEvent(WebCore::PlatformKeyboardEvent const&amp;) + 1053 (EventHandler.cpp:2352)
    24  WebCore::EventHandler::keyEvent(NSEvent*) + 181 (EventHandlerMac.mm:148)
    25  -[WebHTMLView keyDown:] + 430 (WebHTMLView.mm:4217)
    26  -[NSWindow sendEvent:] + 8769
    27  -[NSApplication sendEvent:] + 4719
    28  0x100000000 + 233798
    29  -[NSApplication run] + 474
    30  NSApplicationMain + 364
    31  0x100000000 + 41408</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>326635</commentid>
    <comment_count>1</comment_count>
    <who name="Alexander Pavlov (apavlov)">apavlov</who>
    <bug_when>2010-12-24 09:06:08 -0800</bug_when>
    <thetext>Fixed with bug 51478.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>