Unreviewed, rolling out r142820.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Feb 2013 17:23:48 +0000 (17:23 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Feb 2013 17:23:48 +0000 (17:23 +0000)
http://trac.webkit.org/changeset/142820
https://bugs.webkit.org/show_bug.cgi?id=109839

Causing crashes on chromium canaries (Requested by atwilson_
on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2013-02-14

Source/WebCore:

* dom/Document.cpp:
(WebCore::Document::updateLayout):
(WebCore::Document::implicitClose):
* rendering/RenderQuote.h:
(RenderQuote):
* rendering/RenderView.cpp:
* rendering/RenderView.h:

LayoutTests:

* fast/block/float/float-not-removed-from-pre-block-expected.txt:
* fast/css-generated-content/quote-layout-focus-crash-expected.txt: Removed.
* fast/css-generated-content/quote-layout-focus-crash.html: Removed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@142885 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/fast/block/float/float-not-removed-from-pre-block-expected.txt
LayoutTests/fast/css-generated-content/quote-layout-focus-crash-expected.txt [deleted file]
LayoutTests/fast/css-generated-content/quote-layout-focus-crash.html [deleted file]
Source/WebCore/ChangeLog
Source/WebCore/dom/Document.cpp
Source/WebCore/rendering/RenderQuote.h
Source/WebCore/rendering/RenderView.cpp
Source/WebCore/rendering/RenderView.h

index 4b066c6c3f80f01bdeb08b5032a097ff815a769f..91c9d64a9c60d52eadfd8a5cd53b9a2a48924686 100644 (file)
@@ -1,3 +1,16 @@
+2013-02-14  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r142820.
+        http://trac.webkit.org/changeset/142820
+        https://bugs.webkit.org/show_bug.cgi?id=109839
+
+        Causing crashes on chromium canaries (Requested by atwilson_
+        on #webkit).
+
+        * fast/block/float/float-not-removed-from-pre-block-expected.txt:
+        * fast/css-generated-content/quote-layout-focus-crash-expected.txt: Removed.
+        * fast/css-generated-content/quote-layout-focus-crash.html: Removed.
+
 2013-02-14  Mario Sanchez Prada  <mario.prada@samsung.com>
 
         [GTK] Missing call to g_object_ref while retrieving accessible table cells
index dfdf44574a94e3c2cb9ece5f7de9fc57cd526591..acbf0fbc135ad40a6f1a5ec4c4af970379d38180 100644 (file)
@@ -1,3 +1,3 @@
 Bug 101970: Heap-use-after-free in WebCore::RenderLayerModelObject::hasSelfPaintingLayer
 Test passes if it does not crash.
-  
+
diff --git a/LayoutTests/fast/css-generated-content/quote-layout-focus-crash-expected.txt b/LayoutTests/fast/css-generated-content/quote-layout-focus-crash-expected.txt
deleted file mode 100644 (file)
index 026735a..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-Bug 109616 - ASSERT(!renderer()->needsLayout()) when calling Element::focus() with generated content
-
-
diff --git a/LayoutTests/fast/css-generated-content/quote-layout-focus-crash.html b/LayoutTests/fast/css-generated-content/quote-layout-focus-crash.html
deleted file mode 100644 (file)
index fcbb558..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-<!DOCTYPE html>
-
-<style>
-    /* Must be positioned absolute or static, must have margins to push it out view. */
-    .positioned {
-        position: absolute;
-        margin-top: 100%;
-    }
-
-    /* Any kind of quote will do, can be either :before or :after */
-    .positioned:before,
-    .focusable:before {
-        content: open-quote;
-    }
-</style>
-
-<p>Bug 109616 - ASSERT(!renderer()->needsLayout()) when calling Element::focus() with generated content</p>
-
-<!--
-    This is testing a case where RenderQuote::updateDepth will mark the RenderQuote
-    and its ancestors as needing layout in the middle of a layout of its ancestor.
-    When its ancestor finishes the layout it will mark itself and the ancestors
-    farther up as no longer needing layout. The end result is some subtree
-    needing layout, but the RenderView and possibly other ancestors of the subtree
-    not needing layout.
-
-    ex.
-
-    RenderView <- !needsLayout
-        \
-       RenderBlock (.focusable) <- needsLayout
-            \
-             RenderBlock (generated content) <- needsLayout
-                \
-                 RenderQuote <- needsLayout
--->
-
-<div class="positioned"></div>
-<div class="focusable" tabindex="1"></div>
-
-<script>
-    if (window.testRunner)
-        testRunner.dumpAsText();
-    // .focusable still needs layout at this point, but RenderView doesn't
-    // think any descendants need layout.
-    document.querySelector('.focusable').focus();
-</script>
index 2bbaf170b851cbe6b92ed7b5ad8e689b635d7eb6..ae39db543e1a802647d4eb3ee85187b2e4fc2d67 100644 (file)
@@ -1,3 +1,20 @@
+2013-02-14  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r142820.
+        http://trac.webkit.org/changeset/142820
+        https://bugs.webkit.org/show_bug.cgi?id=109839
+
+        Causing crashes on chromium canaries (Requested by atwilson_
+        on #webkit).
+
+        * dom/Document.cpp:
+        (WebCore::Document::updateLayout):
+        (WebCore::Document::implicitClose):
+        * rendering/RenderQuote.h:
+        (RenderQuote):
+        * rendering/RenderView.cpp:
+        * rendering/RenderView.h:
+
 2013-02-14  Mario Sanchez Prada  <mario.prada@samsung.com>
 
         [GTK] Missing call to g_object_ref while retrieving accessible table cells
index a5ab994b09227e74bec64c5c05779d28625581c8..4d62963ca11e5098f0e1f77772f1ad891c588d37 100644 (file)
@@ -1884,9 +1884,6 @@ void Document::updateLayout()
 
     StackStats::LayoutCheckPoint layoutCheckPoint;
 
-    if (renderView())
-        renderView()->markQuoteContainingBlocksForLayoutIfNeeded();
-
     // Only do a layout if changes have occurred that make it necessary.      
     if (frameView && renderer() && (frameView->layoutPending() || renderer()->needsLayout()))
         frameView->layout();
@@ -2439,10 +2436,7 @@ void Document::implicitClose()
     m_overMinimumLayoutThreshold = true;
     if (!ownerElement() || (ownerElement()->renderer() && !ownerElement()->renderer()->needsLayout())) {
         updateStyleIfNeeded();
-
-        if (renderView())
-            renderView()->markQuoteContainingBlocksForLayoutIfNeeded();
-
+        
         // Always do a layout after loading if needed.
         if (view() && renderObject && (!renderObject->firstChild() || renderObject->needsLayout()))
             view()->layout();
index 00ede86ebe4ebbbd2e55da3f6a051c9eb61616c8..17e97b26755f9236b18258cbc97cb1ce8e97e39f 100644 (file)
@@ -38,8 +38,6 @@ public:
     void attachQuote();
     void detachQuote();
 
-    RenderQuote* next() { return m_next; }
-
 private:
     virtual void willBeDestroyed() OVERRIDE;
     virtual const char* renderName() const OVERRIDE { return "RenderQuote"; };
index ed415fc79a3d9b3aa8a64e60195396e0f4ea3ae8..7d1f84bbd0c92a6918fc2ad8283bb2babd6c8d66 100644 (file)
@@ -36,7 +36,6 @@
 #include "RenderLayer.h"
 #include "RenderLayerBacking.h"
 #include "RenderNamedFlowThread.h"
-#include "RenderQuote.h"
 #include "RenderSelectionInfo.h"
 #include "RenderWidget.h"
 #include "RenderWidgetProtector.h"
@@ -1069,18 +1068,6 @@ RenderBlock::IntervalArena* RenderView::intervalArena()
     return m_intervalArena.get();
 }
 
-void RenderView::markQuoteContainingBlocksForLayoutIfNeeded()
-{
-    for (RenderQuote* quote = m_renderQuoteHead; quote; quote = quote->next()) {
-        if (!quote->needsLayout())
-            continue;
-        // Can't use markContainingBlocksForLayout because it would abort as soon
-        // as it sees a parent that already thinks it needs layout.
-        for (RenderObject* renderer = quote->parent(); renderer; renderer = renderer->parent())
-            renderer->setChildNeedsLayout(true, MarkOnlyThis);
-    }
-}
-
 void RenderView::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
     MemoryClassInfo info(memoryObjectInfo, this, PlatformMemoryTypes::Rendering);
index 1dcbea292ea0221bc7e55c163f6164fe7f59e36a..ea310622e178e13de4a8a18926bd0d61bcffaa1a 100644 (file)
@@ -230,11 +230,6 @@ public:
     void removeRenderCounter() { ASSERT(m_renderCounterCount > 0); m_renderCounterCount--; }
     bool hasRenderCounters() { return m_renderCounterCount; }
 
-    // FIXME: This is a hack until we have proper pre layout tasks to handle quote attachment.
-    // See RenderQuote::updateDepth for more details about what this is a workaround for.
-    // See: https://bugs.webkit.org/show_bug.cgi?id=109628
-    void markQuoteContainingBlocksForLayoutIfNeeded();
-
 protected:
     virtual void mapLocalToContainer(const RenderLayerModelObject* repaintContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed = 0) const OVERRIDE;
     virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObject* ancestorToStopAt, RenderGeometryMap&) const OVERRIDE;