[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.17-1283-gcf603cf
mitz at apple.com
mitz at apple.com
Tue Jan 5 23:49:11 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 9fdaefd5d3a009229a37c8a0761de0fda8e5bb93
Author: mitz at apple.com <mitz at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Dec 14 18:04:37 2009 +0000
<rdar://problem/7458272> REGRESSION (r50470) Reproducible ASSERT in
RenderWidget::setWidgetGeometry()
Reviewed by Darin Adler.
WebCore:
Test: fast/forms/defer-updateFromElement.html
* html/HTMLFormControlElement.cpp:
(WebCore::updateFromElementCallback): Added this post-attach callback
that invokes updateFromElement().
(WebCore::HTMLFormControlElement::recalcStyle): Instead of calling
updateFromElement(), enqueue a post-attach (in this case, post-style
recalc) callback to do it. updateFromElement() can cause the selection
to change, and in turn trigger synchronous layout, so it must not be
called during style recalc.
LayoutTests:
* fast/forms/defer-updateFromElement-expected.txt: Added.
* fast/forms/defer-updateFromElement.html: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52100 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index bad274c..ce0bcf8 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+2009-12-14 Dan Bernstein <mitz at apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/7458272> REGRESSION (r50470) Reproducible ASSERT in
+ RenderWidget::setWidgetGeometry()
+
+ * fast/forms/defer-updateFromElement-expected.txt: Added.
+ * fast/forms/defer-updateFromElement.html: Added.
+
2009-12-14 Eric Carlson <eric.carlson at apple.com>
Not reviewed, build fix.
diff --git a/LayoutTests/fast/forms/defer-updateFromElement-expected.txt b/LayoutTests/fast/forms/defer-updateFromElement-expected.txt
new file mode 100644
index 0000000..ed8147a
--- /dev/null
+++ b/LayoutTests/fast/forms/defer-updateFromElement-expected.txt
@@ -0,0 +1,3 @@
+Test for rdar://problem/7458272 REGRESSION (r50470) Reproducible ASSERT in RenderWidget::setWidgetGeometry().
+
+
diff --git a/LayoutTests/fast/forms/defer-updateFromElement.html b/LayoutTests/fast/forms/defer-updateFromElement.html
new file mode 100644
index 0000000..423cc30
--- /dev/null
+++ b/LayoutTests/fast/forms/defer-updateFromElement.html
@@ -0,0 +1,19 @@
+<p>
+ Test for <i><a href="rdar://problem/7458272">rdar://problem/7458272</a>
+ REGRESSION (r50470) Reproducible ASSERT in
+ RenderWidget::setWidgetGeometry()</i>.
+</p>
+<iframe></iframe>
+<textarea id="target">Test did not run</textarea>
+<script>
+ if (window.layoutTestController)
+ layoutTestController.dumpAsText();
+
+ var target = document.getElementById("target");
+ target.offsetTop;
+ target.selectionEnd = 2;
+ target.style.height = "100px";
+ target.value = "";
+
+ target.value = "Finished";
+</script>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 3fd6c3f..7ec03a0 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,21 @@
+2009-12-14 Dan Bernstein <mitz at apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/7458272> REGRESSION (r50470) Reproducible ASSERT in
+ RenderWidget::setWidgetGeometry()
+
+ Test: fast/forms/defer-updateFromElement.html
+
+ * html/HTMLFormControlElement.cpp:
+ (WebCore::updateFromElementCallback): Added this post-attach callback
+ that invokes updateFromElement().
+ (WebCore::HTMLFormControlElement::recalcStyle): Instead of calling
+ updateFromElement(), enqueue a post-attach (in this case, post-style
+ recalc) callback to do it. updateFromElement() can cause the selection
+ to change, and in turn trigger synchronous layout, so it must not be
+ called during style recalc.
+
2009-12-14 Pavel Feldman <pfeldman at chromium.org>
Reviewed by Timothy Hatcher.
diff --git a/WebCore/html/HTMLFormControlElement.cpp b/WebCore/html/HTMLFormControlElement.cpp
index 2531c48..4e20dc3 100644
--- a/WebCore/html/HTMLFormControlElement.cpp
+++ b/WebCore/html/HTMLFormControlElement.cpp
@@ -233,12 +233,23 @@ void HTMLFormControlElement::setRequired(bool b)
setAttribute(requiredAttr, b ? "required" : 0);
}
+static void updateFromElementCallback(Node* node)
+{
+ ASSERT_ARG(node, node->isElementNode());
+ ASSERT_ARG(node, static_cast<Element*>(node)->isFormControlElement());
+ ASSERT(node->renderer());
+ if (RenderObject* renderer = node->renderer())
+ renderer->updateFromElement();
+}
+
void HTMLFormControlElement::recalcStyle(StyleChange change)
{
HTMLElement::recalcStyle(change);
+ // updateFromElement() can cause the selection to change, and in turn
+ // trigger synchronous layout, so it must not be called during style recalc.
if (renderer())
- renderer()->updateFromElement();
+ queuePostAttachCallback(updateFromElementCallback, this);
}
bool HTMLFormControlElement::supportsFocus() const
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list