[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
hyatt
hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:12:39 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit e053ea33862a76a9fc01b527ad20a6c57286887a
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Nov 17 00:02:04 2003 +0000
Fix for 3485766.
Make sure DOM elements that are programmatically focused at a time when they have no render objects restore the
focus to their widgets when render objects get built.
Reviewed by darin
* khtml/html/html_formimpl.cpp:
(HTMLGenericFormElementImpl::attach):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5529 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 76ebf06..e882f95 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,5 +1,17 @@
2003-11-16 David Hyatt <hyatt at apple.com>
+ Fix for 3485766.
+
+ Make sure DOM elements that are programmatically focused at a time when they have no render objects restore the
+ focus to their widgets when render objects get built.
+
+ Reviewed by darin
+
+ * khtml/html/html_formimpl.cpp:
+ (HTMLGenericFormElementImpl::attach):
+
+2003-11-16 David Hyatt <hyatt at apple.com>
+
Add border info to the render tree dumper.
* khtml/rendering/render_style.h:
diff --git a/WebCore/khtml/html/html_formimpl.cpp b/WebCore/khtml/html/html_formimpl.cpp
index c058060..a032bc5 100644
--- a/WebCore/khtml/html/html_formimpl.cpp
+++ b/WebCore/khtml/html/html_formimpl.cpp
@@ -761,6 +761,15 @@ void HTMLGenericFormElementImpl::attach()
// on the renderer.
if (m_render)
m_render->updateFromElement();
+
+ // Delayed attachment in order to prevent FOUC can result in an object being
+ // programmatically focused before it has a render object. If we have been focused
+ // (i.e., if we are the focusNode) then go ahead and focus our corresponding native widget.
+ // (Attach/detach can also happen as a result of display type changes, e.g., making a widget
+ // block instead of inline, and focus should be restored in that case as well.)
+ if (getDocument()->focusNode() == this && m_render->isWidget() &&
+ static_cast<RenderWidget*>(renderer())->widget())
+ static_cast<RenderWidget*>(renderer())->widget()->setFocus();
}
HTMLFormElementImpl *HTMLGenericFormElementImpl::getForm() const
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list