Title: [118866] branches/chromium/1132

Diff

Copied: branches/chromium/1132/LayoutTests/fast/runin/progress-run-in-crash-expected.txt (from rev 118236, trunk/LayoutTests/fast/runin/progress-run-in-crash-expected.txt) (0 => 118866)


--- branches/chromium/1132/LayoutTests/fast/runin/progress-run-in-crash-expected.txt	                        (rev 0)
+++ branches/chromium/1132/LayoutTests/fast/runin/progress-run-in-crash-expected.txt	2012-05-30 01:00:30 UTC (rev 118866)
@@ -0,0 +1,4 @@
+WebKit Bug 87274 - ASSERT failure toRenderProgress in HTMLProgressElement::didElementStateChange.
+Test passes if it does not crash.
+
+

Copied: branches/chromium/1132/LayoutTests/fast/runin/progress-run-in-crash.html (from rev 118236, trunk/LayoutTests/fast/runin/progress-run-in-crash.html) (0 => 118866)


--- branches/chromium/1132/LayoutTests/fast/runin/progress-run-in-crash.html	                        (rev 0)
+++ branches/chromium/1132/LayoutTests/fast/runin/progress-run-in-crash.html	2012-05-30 01:00:30 UTC (rev 118866)
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+WebKit Bug 87274 - ASSERT failure toRenderProgress in HTMLProgressElement::didElementStateChange.<br />
+Test passes if it does not crash.<br />
+<body>
+<progress id="progress1" style="-webkit-appearance: none"></progress><div></div>
+<script>
+if (window.layoutTestController)
+    layoutTestController.dumpAsText();
+
+document.body.offsetTop;
+progress1.style.display = 'run-in';
+</script>
+</body>
+</html>

Modified: branches/chromium/1132/Source/WebCore/html/HTMLProgressElement.cpp (118865 => 118866)


--- branches/chromium/1132/Source/WebCore/html/HTMLProgressElement.cpp	2012-05-30 00:56:58 UTC (rev 118865)
+++ branches/chromium/1132/Source/WebCore/html/HTMLProgressElement.cpp	2012-05-30 01:00:30 UTC (rev 118866)
@@ -140,7 +140,7 @@
 void HTMLProgressElement::didElementStateChange()
 {
     m_value->setWidthPercentage(position() * 100);
-    if (renderer()) {
+    if (renderer() && renderer()->isProgress()) {
         RenderProgress* render = toRenderProgress(renderer());
         bool wasDeterminate = render->isDeterminate();
         renderer()->updateFromElement();

Modified: branches/chromium/1132/Source/WebCore/rendering/RenderBlock.cpp (118865 => 118866)


--- branches/chromium/1132/Source/WebCore/rendering/RenderBlock.cpp	2012-05-30 00:56:58 UTC (rev 118865)
+++ branches/chromium/1132/Source/WebCore/rendering/RenderBlock.cpp	2012-05-30 01:00:30 UTC (rev 118866)
@@ -1845,6 +1845,9 @@
     if (runInNode && runInNode->hasTagName(selectTag))
         return;
 
+    if (runInNode && runInNode->hasTagName(progressTag))
+        return;
+
     RenderObject* curr = runIn->nextSibling();
     if (!curr || !curr->isRenderBlock() || !curr->childrenInline())
         return;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to