Changeset 60984 in webkit


Ignore:
Timestamp:
Jun 10, 2010 5:49:10 PM (14 years ago)
Author:
tony@chromium.org
Message:

2010-06-10 Tony Chang <tony@chromium.org>

Reviewed by Kent Tamura.

crash when focus is changed while trying to focus next element
https://bugs.webkit.org/show_bug.cgi?id=40407

  • fast/events/focus-change-crash-expected.txt: Added.
  • fast/events/focus-change-crash.html: Added.

2010-06-10 Tony Chang <tony@chromium.org>

Reviewed by Kent Tamura.

crash when focus is changed while trying to focus next element
https://bugs.webkit.org/show_bug.cgi?id=40407

Test: fast/events/focus-change-crash.html

  • dom/Element.cpp: (WebCore::Element::focus):
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r60980 r60984  
     12010-06-10  Tony Chang  <tony@chromium.org>
     2
     3        Reviewed by Kent Tamura.
     4
     5        crash when focus is changed while trying to focus next element
     6        https://bugs.webkit.org/show_bug.cgi?id=40407
     7
     8        * fast/events/focus-change-crash-expected.txt: Added.
     9        * fast/events/focus-change-crash.html: Added.
     10
    1112010-06-10  Sheriff Bot  <webkit.review.bot@gmail.com>
    212
  • trunk/WebCore/ChangeLog

    r60980 r60984  
     12010-06-10  Tony Chang  <tony@chromium.org>
     2
     3        Reviewed by Kent Tamura.
     4
     5        crash when focus is changed while trying to focus next element
     6        https://bugs.webkit.org/show_bug.cgi?id=40407
     7
     8        Test: fast/events/focus-change-crash.html
     9
     10        * dom/Element.cpp:
     11        (WebCore::Element::focus):
     12
    1132010-06-10  Sheriff Bot  <webkit.review.bot@gmail.com>
    214
  • trunk/WebCore/dom/Element.cpp

    r60943 r60984  
    13221322    }
    13231323
    1324     if (Page* page = doc->page())
     1324    RefPtr<Node> protect;
     1325    if (Page* page = doc->page()) {
     1326        // Focus and change event handlers can cause us to lose our last ref.
     1327        protect = this;
    13251328        page->focusController()->setFocusedNode(this, doc->frame());
     1329    }
    13261330
    13271331    // Setting the focused node above might have invalidated the layout due to scripts.
Note: See TracChangeset for help on using the changeset viewer.