Changeset 69237 in webkit
- Timestamp:
- Oct 6, 2010 3:09:04 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r69231 r69237 1 2010-10-06 Chris Fleizach <cfleizach@apple.com> 2 3 Reviewed by Beth Dakin. 4 5 REGRESSION (r53857): AREA tag with tabindex="-1" displays focus ring after multiple mouse clicks. 6 https://bugs.webkit.org/show_bug.cgi?id=45832 7 8 * fast/events/mouse-focus-imagemap-expected.txt: Added. 9 * fast/events/mouse-focus-imagemap.html: Added. 10 * fast/events/resources/tabindex-focus-blur-all.js: 11 (testProgrammaticFocus): 12 * fast/events/tabindex-focus-blur-all-expected.txt: 13 Update test to reflect that AREA with tabindex=-1 should not be focusable. 14 1 15 2010-10-06 Albert J. Wong <ajwong@chromium.org> 2 16 -
trunk/LayoutTests/fast/events/resources/tabindex-focus-blur-all.js
r53857 r69237 53 53 homeBase[0].focus(); 54 54 55 var resultSummary = focusCount+" focus / "+blurCount+" blur events dispatched, and should be 33 7 / 337";55 var resultSummary = focusCount+" focus / "+blurCount+" blur events dispatched, and should be 331 / 331 "; 56 56 resultSummary += (focusCount==blurCount) ? "<span style='color:green'>PASSED</span><br>" : "<span style='color:red'>FAILED</span><br>"; 57 57 resultSummary += "Total of "+failedTestCount+" focus test(s) failed."; … … 111 111 elemThatShouldFocus = null; 112 112 113 // AREA elements with tabindex = -1 should not be focusable. 114 if (elem.tabIndex == -1 && elem.tagName == "AREA") 115 elemThatShouldFocus = null; 116 113 117 if (tagNamesTransferFocused.find(elem.tagName)) { 114 118 elemThatShouldFocus = null; -
trunk/LayoutTests/fast/events/tabindex-focus-blur-all-expected.txt
r64712 r69237 1 33 3 focus / 333 blur events dispatched, and should be 337 / 337PASSED1 331 focus / 331 blur events dispatched, and should be 331 / 331 PASSED 2 2 Total of 0 focus test(s) failed. PASSED -
trunk/WebCore/ChangeLog
r69235 r69237 1 2010-10-06 Chris Fleizach <cfleizach@apple.com> 2 3 Reviewed by Beth Dakin. 4 5 REGRESSION (r53857): AREA tag with tabindex="-1" displays focus ring after multiple mouse clicks. 6 https://bugs.webkit.org/show_bug.cgi?id=45832 7 8 Test: fast/events/mouse-focus-imagemap.html 9 10 * html/HTMLAreaElement.cpp: 11 (WebCore::HTMLAreaElement::isKeyboardFocusable): 12 (WebCore::HTMLAreaElement::isMouseFocusable): 13 (WebCore::HTMLAreaElement::isFocusable): 14 (WebCore::HTMLAreaElement::updateFocusAppearance): 15 * html/HTMLAreaElement.h: 16 1 17 2010-10-06 David Hyatt <hyatt@apple.com> 2 18 -
trunk/WebCore/html/HTMLAreaElement.cpp
r65916 r69237 175 175 bool HTMLAreaElement::isKeyboardFocusable(KeyboardEvent*) const 176 176 { 177 return supportsFocus(); 177 return isFocusable(); 178 } 179 180 bool HTMLAreaElement::isMouseFocusable() const 181 { 182 return isFocusable(); 178 183 } 179 184 180 185 bool HTMLAreaElement::isFocusable() const 181 186 { 182 return supportsFocus() ;187 return supportsFocus() && Element::tabIndex() >= 0; 183 188 } 184 189 … … 193 198 void HTMLAreaElement::updateFocusAppearance(bool restorePreviousSelection) 194 199 { 200 if (!isFocusable()) 201 return; 202 195 203 Node* parent = parentNode(); 196 204 if (!parent || !parent->hasTagName(mapTag)) -
trunk/WebCore/html/HTMLAreaElement.h
r66057 r69237 55 55 virtual String target() const; 56 56 virtual bool isKeyboardFocusable(KeyboardEvent*) const; 57 virtual bool isMouseFocusable() const; 57 58 virtual bool isFocusable() const; 58 59 virtual void updateFocusAppearance(bool /*restorePreviousSelection*/);
Note: See TracChangeset
for help on using the changeset viewer.