Changeset 86526 in webkit
- Timestamp:
- May 15, 2011 10:59:46 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r86521 r86526 1 2011-05-15 Kenichi Ishibashi <bashi@chromium.org> 2 3 Reviewed by Kent Tamura. 4 5 <output>, <meter> and <progress> elements with display:block can be focused if you try to tab to it 6 https://bugs.webkit.org/show_bug.cgi?id=60602 7 8 Add a test that ensures <output>, <meter> and <progress> are not focused. 9 Add tabindex attributes to <progress> elements in progressbar.html so that these elements can be focused. 10 11 * fast/forms/focus-with-display-block-expected.txt: Added. 12 * fast/forms/focus-with-display-block.html: Added. 13 * platform/mac/accessibility/progressbar.html: Added tabindex attributes to progress elements. 14 1 15 2011-05-12 MORITA Hajime <morrita@google.com> 2 16 -
trunk/LayoutTests/platform/mac/accessibility/progressbar.html
r57494 r86526 13 13 <span tabindex="0" role="progressbar" id="progressbar2" aria-valuemax=10>X</span> 14 14 15 <progress id="progressbar3" value=7 max=10></progress>16 <progress id="progressbar4"></progress>15 <progress tabindex="0" id="progressbar3" value=7 max=10></progress> 16 <progress tabindex="0" id="progressbar4"></progress> 17 17 18 18 <p id="description"></p> -
trunk/Source/WebCore/ChangeLog
r86525 r86526 1 2011-05-15 Kenichi Ishibashi <bashi@chromium.org> 2 3 Reviewed by Kent Tamura. 4 5 <output>, <meter> and <progress> elements with display:block can be focused if you try to tab to it 6 https://bugs.webkit.org/show_bug.cgi?id=60602 7 8 HTMLFormControlElement::isFocusable() returns true when the element is 9 visible as a block element. However, for output, meter, and progress 10 elements, the function should not return true unless they have 11 tabindex attributes. Override supportsFocus() of these elements to 12 apply the result of Node::supportsFocus() because it takes care of 13 whether the element has tabindex or not. 14 15 Test: fast/forms/focus-with-display-block.html 16 17 * html/HTMLFormControlElement.h: Made supportsFocus() protected. 18 * html/HTMLMeterElement.cpp: 19 (WebCore::HTMLMeterElement::supportsFocus): Added. 20 * html/HTMLMeterElement.h: 21 * html/HTMLOutputElement.cpp: 22 (WebCore::HTMLOutputElement::supportsFocus): Added. 23 * html/HTMLOutputElement.h: 24 * html/HTMLProgressElement.cpp: 25 (WebCore::HTMLProgressElement::supportsFocus): Added. 26 * html/HTMLProgressElement.h: 27 1 28 2011-05-15 Jon Lee <jonlee@apple.com> 2 29 -
trunk/Source/WebCore/html/HTMLFormControlElement.h
r86491 r86526 118 118 virtual void willMoveToNewOwnerDocument(); 119 119 120 virtual bool supportsFocus() const; 120 121 virtual bool isKeyboardFocusable(KeyboardEvent*) const; 121 122 virtual bool isMouseFocusable() const; … … 139 140 140 141 virtual bool isFormControlElement() const { return true; } 141 142 virtual bool supportsFocus() const;143 142 144 143 virtual short tabIndex() const; -
trunk/Source/WebCore/html/HTMLMeterElement.cpp
r83256 r86526 67 67 } 68 68 69 bool HTMLMeterElement::supportsFocus() const 70 { 71 return Node::supportsFocus() && !disabled(); 72 } 73 69 74 void HTMLMeterElement::parseMappedAttribute(Attribute* attribute) 70 75 { -
trunk/Source/WebCore/html/HTMLMeterElement.h
r86491 r86526 66 66 virtual ~HTMLMeterElement(); 67 67 68 virtual bool supportsFocus() const; 69 68 70 virtual bool recalcWillValidate() const { return false; } 69 71 virtual const AtomicString& formControlType() const; -
trunk/Source/WebCore/html/HTMLOutputElement.cpp
r77902 r86526 55 55 DEFINE_STATIC_LOCAL(const AtomicString, output, ("output")); 56 56 return output; 57 } 58 59 bool HTMLOutputElement::supportsFocus() const 60 { 61 return Node::supportsFocus() && !disabled(); 57 62 } 58 63 -
trunk/Source/WebCore/html/HTMLOutputElement.h
r86491 r86526 59 59 virtual const AtomicString& formControlType() const; 60 60 virtual bool isEnumeratable() const { return true; } 61 virtual bool supportsFocus() const; 61 62 virtual void childrenChanged(bool createdByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0); 62 63 virtual void reset(); -
trunk/Source/WebCore/html/HTMLProgressElement.cpp
r84156 r86526 63 63 { 64 64 return new (arena) RenderProgress(this); 65 } 66 67 bool HTMLProgressElement::supportsFocus() const 68 { 69 return Node::supportsFocus() && !disabled(); 65 70 } 66 71 -
trunk/Source/WebCore/html/HTMLProgressElement.h
r86491 r86526 50 50 virtual ~HTMLProgressElement(); 51 51 52 virtual bool supportsFocus() const; 53 52 54 virtual bool recalcWillValidate() const { return false; } 53 55
Note: See TracChangeset
for help on using the changeset viewer.