<?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>119823</bug_id>
          
          <creation_ts>2013-08-14 16:05:00 -0700</creation_ts>
          <short_desc>ASSERT(!renderer()-&gt;needsLayout()) when entering Chinese text via Google Chinese Pinyin IME</short_desc>
          <delta_ts>2014-02-06 08:53:20 -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>Text</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows 7</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc>http://www.google.com</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Major</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>79668</blocked>
          <everconfirmed>0</everconfirmed>
          <reporter name="Stephen">sfcheng</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>allan.jensen</cc>
    
    <cc>ap</cc>
    
    <cc>jturcotte</cc>
    
    <cc>ossy</cc>
    
    <cc>rniwa</cc>
    
    <cc>sfcheng</cc>
    
    <cc>simon.fraser</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>917318</commentid>
    <comment_count>0</comment_count>
    <who name="Stephen">sfcheng</who>
    <bug_when>2013-08-14 16:05:00 -0700</bug_when>
    <thetext>I am using QtWebkit 5.1.0 on Windows 7. When I enter some Chinese text via Google Chinese Pinyin IME into the search box on Google homepage, every now and then, webkit crashes due to the following assert:

bool Node::isFocusable() const
{
    if (!inDocument() || !supportsFocus())
        return false;
    
    // Elements in canvas fallback content are not rendered, but they are allowed to be
    // focusable as long as their canvas is displayed and visible.
    if (isElementNode() &amp;&amp; toElement(this)-&gt;isInCanvasSubtree()) {
        const Element* e = toElement(this);
        while (e &amp;&amp; !e-&gt;hasLocalName(canvasTag))
            e = e-&gt;parentElement();
        ASSERT(e);
        return e-&gt;renderer() &amp;&amp; e-&gt;renderer()-&gt;style()-&gt;visibility() == VISIBLE;
    }

    if (renderer())
------&gt;      ASSERT(!renderer()-&gt;needsLayout());  
    else
        // If the node is in a display:none tree it might say it needs style recalc but
        // the whole document is actually up to date.
        ASSERT(!document()-&gt;childNeedsStyleRecalc());

    // FIXME: Even if we are not visible, we might have a child that is visible.
    // Hyatt wants to fix that some day with a &quot;has visible content&quot; flag or the like.
    if (!renderer() || renderer()-&gt;style()-&gt;visibility() != VISIBLE)
        return false;

    return true;
}


Here is entire stack:

 	ntdll.dll!_ZwRaiseException@12()  + 0x12 bytes	
 	ntdll.dll!_ZwRaiseException@12()  + 0x12 bytes	
&gt;	Qt5WebKitd.dll!WebCore::Node::isFocusable()  Line 927 + 0x3c bytes	C++
 	Qt5WebKitd.dll!WebCore::HTMLFormControlElement::isFocusable()  Line 330	C++
 	Qt5WebKitd.dll!WebCore::HTMLInputElement::isTextFormControlFocusable()  Line 398	C++
 	Qt5WebKitd.dll!WebCore::TextFieldInputType::isMouseFocusable()  Line 79	C++
 	Qt5WebKitd.dll!WebCore::HTMLInputElement::isMouseFocusable()  Line 393	C++
 	Qt5WebKitd.dll!WebCore::FrameSelection::setFocusedNodeIfNeeded()  Line 1884 + 0x16 bytes	C++
 	Qt5WebKitd.dll!WebCore::FrameSelection::setSelection(const WebCore::VisibleSelection &amp; newSelection={...}, unsigned int options=0, WebCore::FrameSelection::CursorAlignOnScroll align=AlignCursorOnScrollIfNeeded, WebCore::TextGranularity granularity=CharacterGranularity)  Line 298	C++
 	Qt5WebKitd.dll!WebCore::Editor::selectComposition()  Line 1321	C++
 	Qt5WebKitd.dll!WebCore::Editor::setComposition(const WTF::String &amp; text={...}, const WTF::Vector&lt;WebCore::CompositionUnderline,0&gt; &amp; underlines={...}, unsigned int selectionStart=0, unsigned int selectionEnd=0)  Line 1400	C++
 	Qt5WebKitd.dll!QWebPageAdapter::inputMethodEvent(QInputMethodEvent * ev=0x16dd2220)  Line 710 + 0x2c bytes	C++
 	Qt5WebKitWidgetsd.dll!QWebPage::event(QEvent * ev=0x16dd2220)  Line 2543	C++
 	MyApp.exe!WebPage::event(QEvent * e=0x16dd2220)  Line 1021	C++
 	Qt5WebKitWidgetsd.dll!QWebView::inputMethodEvent(QInputMethodEvent * e=0x16dd2220)  Line 1031	C++
 	Qt5Widgetsd.dll!QWidget::event(QEvent * event=0x16dd2220)  Line 7951	C++
 	Qt5WebKitWidgetsd.dll!QWebView::event(QEvent * e=0x16dd2220)  Line 734	C++
 	Qt5Widgetsd.dll!QApplicationPrivate::notify_helper(QObject * receiver=0x0d5daa08, QEvent * e=0x16dd2220)  Line 3455 + 0x11 bytes	C++
 	Qt5Widgetsd.dll!QApplication::notify(QObject * receiver=0x0d5daa08, QEvent * e=0x16dd2220)  Line 3420 + 0x10 bytes	C++
 	Qt5Cored.dll!QCoreApplication::notifyInternal(QObject * receiver=0x0d5daa08, QEvent * event=0x16dd2220)  Line 871 + 0x15 bytes	C++
 	Qt5Cored.dll!QCoreApplication::sendEvent(QObject * receiver=0x0d5daa08, QEvent * event=0x16dd2220)  Line 232 + 0x39 bytes	C++
 	qwindowsd.dll!QWindowsInputContext::composition(HWND__ * hwnd=0x00311056, long lParamIn=184)  Line 443 + 0x13 bytes	C++
 	qwindowsd.dll!QWindowsContext::windowsProc(HWND__ * hwnd=0x00311056, unsigned int message=271, QtWindows::WindowsEventType et=InputMethodCompositionEvent, unsigned int wParam=0, long lParam=184, long * result=0x0025d9a8)  Line 736 + 0x14 bytes	C++
 	qwindowsd.dll!qWindowsWndProc(HWND__ * hwnd=0x00311056, unsigned int message=271, unsigned int wParam=0, long lParam=184)  Line 951 + 0x24 bytes	C++
 	user32.dll!_InternalCallWinProc@20()  + 0x23 bytes	
 	user32.dll!_UserCallWinProcCheckWow@32()  + 0xb7 bytes	
 	user32.dll!_DispatchMessageWorker@8()  + 0xed bytes	
 	user32.dll!_DispatchMessageW@4()  + 0xf bytes	
 	Qt5Cored.dll!QEventDispatcherWin32::processEvents(QFlags&lt;enum QEventLoop::ProcessEventsFlag&gt; flags={...})  Line 752	C++
 	qwindowsd.dll!QWindowsGuiEventDispatcher::processEvents(QFlags&lt;enum QEventLoop::ProcessEventsFlag&gt; flags={...})  Line 78 + 0xd bytes	C++
 	Qt5Cored.dll!QEventLoop::processEvents(QFlags&lt;enum QEventLoop::ProcessEventsFlag&gt; flags={...})  Line 137	C++
 	Qt5Cored.dll!QEventLoop::exec(QFlags&lt;enum QEventLoop::ProcessEventsFlag&gt; flags={...})  Line 212 + 0x26 bytes	C++
 	Qt5Cored.dll!QCoreApplication::exec()  Line 1124 + 0x15 bytes	C++
 	Qt5Guid.dll!QGuiApplication::exec()  Line 1197	C++
 	Qt5Widgetsd.dll!QApplication::exec()  Line 2690	C++</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>