2011-03-10 Berend-Jan Wever <skylined@chromium.org>
Reviewed by Darin Adler.
Calling focus() on an area element not in a document should not cause a NULL ptr crash
https://bugs.webkit.org/show_bug.cgi?id=54877
* fast/dom/HTMLAreaElement: Added.
* fast/dom/HTMLAreaElement/area-islink-focus-null-ptr-crash-expected.txt: Added.
* fast/dom/HTMLAreaElement/area-islink-focus-null-ptr-crash.html: Added.
2011-03-10 Berend-Jan Wever <skylined@chromium.org>
Reviewed by Darin Adler.
Calling focus() on an area element not in a document should not cause a NULL ptr crash
https://bugs.webkit.org/show_bug.cgi?id=54877
Test: fast/dom/HTMLAreaElement/area-islink-focus-null-ptr-crash.html
* dom/Element.cpp:
(WebCore::Element::focus): Check element is in the document before allowing focus
* html/HTMLAreaElement.cpp:
(WebCore::HTMLAreaElement::imageElement): Check element has a parent before checking if its parent is a map
git-svn-id: svn://svn.chromium.org/blink/trunk@80779 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Showing
Please register or sign in to comment