Commit 8fb7021f authored by mjs's avatar mjs

Reviewed by Geoff, checked in by Maciej.

        
        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9236
        REGRESSION: focus method does not work on some elements before they are laid out
        
        * dom/Element.cpp: (WebCore::Element::focus): Do the updateLayout call before
        calling isFocusable, since isFocusable looks at the size of the renderer.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@14699 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent ffa0bf6f
2006-06-02 Darin Adler <darin@apple.com>
Reviewed by Geoff, checked in by Maciej.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9236
REGRESSION: focus method does not work on some elements before they are laid out
* dom/Element.cpp: (WebCore::Element::focus): Do the updateLayout call before
calling isFocusable, since isFocusable looks at the size of the renderer.
2006-06-02 Steve Falkenburg <sfalken@apple.com>
Reviewed by darin.
......
......@@ -821,12 +821,12 @@ CSSStyleDeclaration *Element::style()
void Element::focus()
{
if (!isFocusable())
return;
Document* doc = document();
doc->updateLayout();
if (!isFocusable())
return;
doc->setFocusNode(this);
if (this == rootEditableElement()) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment