Chromium: https://code.google.com/p/chromium/issues/detail?id=88926 <body onload="go()"></body> <script> function go() { document.open(); var oUElement = document.createElement("U"); oUElement.hidden=true; oUElement.innerHTML="<style>*{-webkit-border-before-style:groove}"; document.appendChild(oUElement); document.close(); } </script> (Adam, this is the bug I emailed you about before) The repro triggers an ASSERT in Document::setCompatibilityMode: webkit\source\webcore\dom\document.cpp void Document::setCompatibilityMode(CompatibilityMode mode) { if (m_compatibilityModeLocked || mode == m_compatibilityMode) return; ASSERT(!m_styleSheets->length()); bool wasInQuirksMode = inQuirksMode(); m_compatibilityMode = mode; if (inQuirksMode() != wasInQuirksMode) { // All user stylesheets have to reparse using the different mode. clearPageUserSheet(); clearPageGroupUserSheets(); } } The stylesheet specified in the innerHTML has been added, so m_styleSheets->length() == 1. This ASSERT does not seem to be obviously related to the eventual NULL ptr crash in RenderBox::paintBoxDecorations: webkit\source\webcore\rendering\renderbox.cpp void RenderBox::paintBoxDecorations(PaintInfo& paintInfo, const LayoutPoint& paintOffset) { <snip> // If we have a native theme appearance, paint that before painting our background. // The theme will tell us whether or not we should also paint the CSS background. bool themePainted = style()->hasAppearance() && !theme()->paint(this, paintInfo, paintRect); if (!themePainted) { if (isRoot()) paintRootBoxFillLayers(paintInfo); else if (!isBody() || document()->documentElement()->renderer()->hasBackground()) { <snip> } The last line results in an attempt to call "hasBackground" on the m_style property of a RenderObject. This property is NULL, so this leads to a NULL ptr crash.
The
Created attachment 114174 [details] Proposed fix: NULL-check the documentElement's renderer.
Created attachment 114306 [details] Same as previously but added the test to the test_expectations.txt as it ASSERT's in Debug.
Created attachment 114332 [details] Fixed EFL Skipped file.
Comment on attachment 114332 [details] Fixed EFL Skipped file. View in context: https://bugs.webkit.org/attachment.cgi?id=114332&action=review > LayoutTests/fast/dynamic/crash-paint-no-documentElement-renderer.html:8 > + if (window.layoutTestController) > + layoutTestController.dumpAsText(true); Why do we need a png?
Comment on attachment 114332 [details] Fixed EFL Skipped file. View in context: https://bugs.webkit.org/attachment.cgi?id=114332&action=review >> LayoutTests/fast/dynamic/crash-paint-no-documentElement-renderer.html:8 >> + layoutTestController.dumpAsText(true); > > Why do we need a png? We need to make sure the painting code is called or we won't reproduce the crash. I don't think of any way to ensure that without dumping the png. However we really don't care about the image nor the render tree dump.
(In reply to comment #6) > We need to make sure the painting code is called or we won't reproduce the crash. I don't think of any way to ensure that without dumping the png. However we really don't care about the image nor the render tree dump. I'm pretty certain painting code is exercised regardless of whether png image is generated or not.
(In reply to comment #7) > (In reply to comment #6) > > We need to make sure the painting code is called or we won't reproduce the crash. I don't think of any way to ensure that without dumping the png. However we really don't care about the image nor the render tree dump. > > I'm pretty certain painting code is exercised regardless of whether png image is generated or not. I will double check before landing and adapt the output accordingly.
Created attachment 119226 [details] Patch for landing
> > I'm pretty certain painting code is exercised regardless of whether png image is generated or not. > > I will double check before landing and adapt the output accordingly. Ryosuke was right and I updated the test to dumpAsText() (no png).
Comment on attachment 119226 [details] Patch for landing Clearing flags on attachment: 119226 Committed r102787: <http://trac.webkit.org/changeset/102787>
All reviewed patches have been landed. Closing bug.
*** Bug 51647 has been marked as a duplicate of this bug. ***