http://trac.webkit.org/changeset/132514
https://bugs.webkit.org/show_bug.cgi?id=100440
"Broke chromium content_browsertests AccessibilityAriaMenu
AccessibilityInputRange AccessibilityListMarkers" (Requested
by scheib on #webkit).
Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-10-25
Source/WebCore:
* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::getOrCreate):
(WebCore::AXObjectCache::contentChanged):
(WebCore::AXObjectCache::childrenChanged):
(WebCore::AXObjectCache::handleAriaRoleChanged):
* accessibility/AXObjectCache.h:
(AXObjectCache):
(WebCore::AXObjectCache::contentChanged):
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::AccessibilityObject):
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::contentChanged):
(AccessibilityObject):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
(WebCore::AccessibilityRenderObject::correspondingControlForLabelElement):
(WebCore::AccessibilityRenderObject::contentChanged):
* accessibility/AccessibilityRenderObject.h:
(AccessibilityRenderObject):
* accessibility/AccessibilityScrollView.cpp:
(WebCore::AccessibilityScrollView::isAttachment):
(WebCore::AccessibilityScrollView::widgetForAttachmentView):
(WebCore::AccessibilityScrollView::updateScrollbars):
(WebCore::AccessibilityScrollView::webAreaObject):
(WebCore::AccessibilityScrollView::elementRect):
(WebCore::AccessibilityScrollView::documentFrameView):
(WebCore::AccessibilityScrollView::parentObject):
(WebCore::AccessibilityScrollView::parentObjectIfExists):
(WebCore::AccessibilityScrollView::getScrollableAreaIfScrollable):
(WebCore::AccessibilityScrollView::scrollTo):
* accessibility/AccessibilityScrollView.h:
(WebCore::AccessibilityScrollView::scrollView):
(AccessibilityScrollView):
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::isDataTable):
* accessibility/chromium/AXObjectCacheChromium.cpp:
(WebCore::AXObjectCache::postPlatformNotification):
* dom/Element.cpp:
(WebCore::Element::attributeChanged):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::deleteLineBoxTree):
(WebCore::RenderBlock::createAndAppendRootInlineBox):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::styleWillChange):
* rendering/RenderText.cpp:
(WebCore::RenderText::setText):
Source/WebKit/chromium:
* public/WebAccessibilityNotification.h:
* src/AssertMatchingEnums.cpp:
Tools:
* DumpRenderTree/chromium/WebViewHost.cpp:
(WebViewHost::postAccessibilityNotification):
LayoutTests:
* accessibility/aria-checkbox-sends-notification.html:
* accessibility/notification-listeners.html:
* fast/forms/date-multiple-fields/date-multiple-fields-ax-value-changed-notification-expected.txt:
* fast/forms/time-multiple-fields/time-multiple-fields-ax-value-changed-notification-expected.txt:
* platform/chromium/accessibility/add-to-menu-list-crashes-expected.txt:
* platform/chromium/accessibility/add-to-menu-list-crashes.html:
* platform/chromium/accessibility/is-ignored-change-sends-notification-expected.txt: Removed.
* platform/chromium/accessibility/is-ignored-change-sends-notification.html: Removed.
* platform/chromium/accessibility/other-aria-attribute-change-sends-notification-expected.txt: Removed.
* platform/chromium/accessibility/other-aria-attribute-change-sends-notification.html: Removed.
* platform/chromium/accessibility/text-change-notification-expected.txt: Removed.
* platform/chromium/accessibility/text-change-notification.html: Removed.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@132549
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-10-25 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r132514.
+ http://trac.webkit.org/changeset/132514
+ https://bugs.webkit.org/show_bug.cgi?id=100440
+
+ "Broke chromium content_browsertests AccessibilityAriaMenu
+ AccessibilityInputRange AccessibilityListMarkers" (Requested
+ by scheib on #webkit).
+
+ * accessibility/aria-checkbox-sends-notification.html:
+ * accessibility/notification-listeners.html:
+ * fast/forms/date-multiple-fields/date-multiple-fields-ax-value-changed-notification-expected.txt:
+ * fast/forms/time-multiple-fields/time-multiple-fields-ax-value-changed-notification-expected.txt:
+ * platform/chromium/accessibility/add-to-menu-list-crashes-expected.txt:
+ * platform/chromium/accessibility/add-to-menu-list-crashes.html:
+ * platform/chromium/accessibility/is-ignored-change-sends-notification-expected.txt: Removed.
+ * platform/chromium/accessibility/is-ignored-change-sends-notification.html: Removed.
+ * platform/chromium/accessibility/other-aria-attribute-change-sends-notification-expected.txt: Removed.
+ * platform/chromium/accessibility/other-aria-attribute-change-sends-notification.html: Removed.
+ * platform/chromium/accessibility/text-change-notification-expected.txt: Removed.
+ * platform/chromium/accessibility/text-change-notification.html: Removed.
+
2012-10-25 Vincent Scheib <scheib@chromium.org>
Unreviewed rebaseline of tests failing after 132529 rolled out 132269.
testRunner.waitUntilDone();
description("This tests that checking of an aria checkbox sends a notification.");
+ window.root = accessibilityController.rootElement;
+ window.body = root.childAtIndex(0);
- var accessibleCheckbox = accessibilityController.accessibleElementById("checkbox1");
+ var accessibleCheckbox = body.childAtIndex(0);
var notificationCount = 0;
function listener(notification) {
- if (notification == "CheckedStateChanged")
- notificationCount++;
+ if (notification == "CheckedStateChanged")
+ notificationCount++;
document.getElementById("console").innerText += "Got notification: " + notification + "\n";
<p id="description"></p>
-<select id="select" value="Select"></select>
+<select id="select" value="Select"><option>A<option>B</select>
<div id="slider" tabindex="0" role="slider" aria-valuenow="5">Slider</div>
FocusedUIElementChanged AXHelp: Day=AXValueDescription: 09
FocusedUIElementChanged AXHelp: Year=AXValueDescription: 2012
ValueChanged AXHelp: Day=AXValueDescription: 04
-ValueChanged AXHelp: Day=AXValueDescription: 04
-ValueChanged AXHelp: Year=AXValueDescription: 2013
ValueChanged AXHelp: Year=AXValueDescription: 2013
PASS successfullyParsed is true
FocusedUIElementChanged AXHelp: Minutes=AXValueDescription: 34
ValueChanged AXHelp: Minutes=AXValueDescription: 05
ValueChanged AXHelp: Minutes=AXValueDescription: 05
-ValueChanged AXHelp: Minutes=AXValueDescription: 05
-ValueChanged AXHelp: Minutes=AXValueDescription: 05
PASS successfullyParsed is true
This test makes sure that adding a selected option to a menu list via an unusual route (document.write from an external script) doesn't trigger a crash when didUpdateActiveOption is called before the children are updated.
-PASS accessibleMenulist.childAtIndex(0).childrenCount is 1
-PASS accessibleMenulist.childAtIndex(0).childrenCount is 2
-PASS accessibleMenulist.childAtIndex(0).childrenCount is 1
+PASS accessiblePopup.childrenCount is 1
+PASS accessiblePopup.childrenCount is 2
+PASS accessiblePopup.childrenCount is 1
PASS successfullyParsed is true
TEST COMPLETE
menulist.focus();
if (window.testRunner && window.accessibilityController) {
window.accessibleMenulist = accessibilityController.focusedElement;
- shouldBe("accessibleMenulist.childAtIndex(0).childrenCount", "1");
+ window.accessiblePopup = accessibleMenulist.childAtIndex(0);
+ shouldBe("accessiblePopup.childrenCount", "1");
}
</script>
<script src="data:text/javascript,document.write('<option selected>2');"></script>
<script>
if (window.testRunner && window.accessibilityController)
- shouldBe("accessibleMenulist.childAtIndex(0).childrenCount", "2");
+ shouldBe("accessiblePopup.childrenCount", "2");
</script>
<script>
menulist.removeChild(menulist.selectedOptions[0]);
if (window.testRunner && window.accessibilityController)
- shouldBe("accessibleMenulist.childAtIndex(0).childrenCount", "1");
+ shouldBe("accessiblePopup.childrenCount", "1");
</script>
</select>
+++ /dev/null
-This test ensures that a change to accessibilityIsIgnored fires a children changed notification on the parent.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS accessibleElementById('hiddenDivContainer') != null is true
-PASS accessibleElementById('hiddenDiv') != null is false
-PASS accessibleElementById('invisibleDivContainer') != null is true
-PASS accessibleElementById('invisibleDiv') != null is false
-PASS accessibleElementById('emptyDivContainer') != null is true
-PASS accessibleElementById('emptyDiv') != null is false
-PASS accessibleElementById('divWithoutRoleContainer') != null is true
-PASS accessibleElementById('divWithoutRole') != null is false
-PASS accessibleElementById('divWithoutLabelContainer') != null is true
-PASS accessibleElementById('divWithoutLabel') != null is false
-
-PASS successfullyParsed is true
-
-TEST COMPLETE
-Got ChildrenChanged notification on hiddenDivContainer
-PASS accessibleElementById('hiddenDivContainer').childrenCount is 1
-Got ChildrenChanged notification on invisibleDivContainer
-PASS accessibleElementById('invisibleDivContainer').childrenCount is 1
-Got ChildrenChanged notification on emptyDivContainer
-PASS accessibleElementById('emptyDivContainer').childrenCount is 1
-Got ChildrenChanged notification on divWithoutRoleContainer
-PASS accessibleElementById('divWithoutRoleContainer').childrenCount is 1
-Got ChildrenChanged notification on divWithoutLabelContainer
-PASS accessibleElementById('divWithoutLabelContainer').childrenCount is 1
-All notifications received successfully.
-
+++ /dev/null
-<!DOCTYPE HTML>
-<html>
-<head>
-<script src="../../../fast/js/resources/js-test-pre.js"></script>
-</head>
-<body>
-
-<div id="container">
-
- <div id="hiddenDivContainer" aria-label="hiddenDivContainer">
- <div id="hiddenDiv" hidden>
- <div>
- <button>Button</button>
- </div>
- </div>
- </div>
-
- <div id="invisibleDivContainer" aria-label="invisibleDivContainer">
- <div id="invisibleDiv" style="visibility: hidden">
- <div>
- <button>Button</button>
- </div>
- </div>
- </div>
-
- <div id="emptyDivContainer" aria-label="emptyDivContainer">
- <div id="emptyDiv"></div>
- </div>
-
- <div id="divWithoutRoleContainer" aria-label="divWithoutRoleContainer">
- <div id="divWithoutRole">
- <div>
- <button>Button</button>
- </div>
- </div>
- </div>
-
- <div id="divWithoutLabelContainer" aria-label="divWithoutLabelContainer">
- <div id="divWithoutLabel">
- <div>
- <button>Button</button>
- </div>
- </div>
- </div>
-
-</div>
-
-<div id="console"></div>
-<script>
-description("This test ensures that a change to accessibilityIsIgnored fires a children changed notification on the parent.");
-
-if (window.testRunner && window.accessibilityController) {
- testRunner.dumpAsText();
- testRunner.waitUntilDone();
-
- function accessibleElementById(id) {
- return accessibilityController.accessibleElementById(id);
- }
-
- window.successCount = 0;
- function gotSuccessfulNotification() {
- successCount++;
- if (successCount != 5)
- return;
-
- debug('All notifications received successfully.');
- accessibleElementById('hiddenDivContainer').removeNotificationListener();
- accessibleElementById('invisibleDivContainer').removeNotificationListener();
- accessibleElementById('emptyDivContainer').removeNotificationListener();
- accessibleElementById('divWithoutRoleContainer').removeNotificationListener();
- accessibleElementById('divWithoutLabelContainer').removeNotificationListener();
- document.getElementById('container').hidden = true;
- if (window.testRunner)
- testRunner.notifyDone();
- }
-
- shouldBeTrue("accessibleElementById('hiddenDivContainer') != null");
- shouldBeFalse("accessibleElementById('hiddenDiv') != null");
- accessibleElementById('hiddenDivContainer').addNotificationListener(function(notification) {
- debug('Got ' + notification + ' notification on hiddenDivContainer');
- shouldBe("accessibleElementById('hiddenDivContainer').childrenCount", "1");
- gotSuccessfulNotification();
- });
- document.getElementById('hiddenDiv').hidden = false;
-
- shouldBeTrue("accessibleElementById('invisibleDivContainer') != null");
- shouldBeFalse("accessibleElementById('invisibleDiv') != null");
- accessibleElementById('invisibleDivContainer').addNotificationListener(function(notification) {
- debug('Got ' + notification + ' notification on invisibleDivContainer');
- shouldBe("accessibleElementById('invisibleDivContainer').childrenCount", "1");
- gotSuccessfulNotification();
- });
- document.getElementById('invisibleDiv').style.visibility = 'visible';
-
- shouldBeTrue("accessibleElementById('emptyDivContainer') != null");
- shouldBeFalse("accessibleElementById('emptyDiv') != null");
- accessibleElementById('emptyDivContainer').addNotificationListener(function(notification) {
- debug('Got ' + notification + ' notification on emptyDivContainer');
- shouldBe("accessibleElementById('emptyDivContainer').childrenCount", "1");
- gotSuccessfulNotification();
- });
-
- document.getElementById('emptyDiv').innerText = 'Not empty anymore.';
- document.getElementById('emptyDiv').offsetLeft;
-
- shouldBeTrue("accessibleElementById('divWithoutRoleContainer') != null");
- shouldBeFalse("accessibleElementById('divWithoutRole') != null");
- accessibleElementById('divWithoutRoleContainer').addNotificationListener(function(notification) {
- debug('Got ' + notification + ' notification on divWithoutRoleContainer');
- shouldBe("accessibleElementById('divWithoutRoleContainer').childrenCount", "1");
- gotSuccessfulNotification();
- });
- document.getElementById('divWithoutRole').setAttribute('role', 'heading');
-
- shouldBeTrue("accessibleElementById('divWithoutLabelContainer') != null");
- shouldBeFalse("accessibleElementById('divWithoutLabel') != null");
- accessibleElementById('divWithoutLabelContainer').addNotificationListener(function(notification) {
- debug('Got ' + notification + ' notification on divWithoutLabelContainer');
- shouldBe("accessibleElementById('divWithoutLabelContainer').childrenCount", "1");
- gotSuccessfulNotification();
- });
- document.getElementById('divWithoutLabel').setAttribute('aria-label', 'Label');
-
- debug('');
-}
-
-</script>
-
-<script src="../../../fast/js/resources/js-test-post.js"></script>
-</body>
-</html>
+++ /dev/null
-This test ensures that a change to any ARIA attribute, not just a state, sends a notification.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-
-PASS successfullyParsed is true
-
-TEST COMPLETE
-Got AriaAttributeChanged notification on aria-busy
-Got AriaAttributeChanged notification on aria-disabled
-Got AriaAttributeChanged notification on aria-readonly
-Got AriaAttributeChanged notification on aria-required
-All notifications received successfully.
-
+++ /dev/null
-<!DOCTYPE HTML>
-<html>
-<head>
-<script src="../../../fast/js/resources/js-test-pre.js"></script>
-</head>
-<body>
-
-<div id="container">
- <button id="aria-busy" aria-busy="false">Busy</button>
- <button id="aria-disabled" aria-disabled="false">Disabled</button>
- <button id="aria-readonly" aria-readonly="false">Readonly</button>
- <button id="aria-required" aria-required="false">Required</button>
-</div>
-
-<div id="console"></div>
-<script>
-description("This test ensures that a change to any ARIA attribute, not just a state, sends a notification.");
-
-if (window.testRunner && window.accessibilityController) {
- testRunner.dumpAsText();
- testRunner.waitUntilDone();
-
- function accessibleElementById(id) {
- return accessibilityController.accessibleElementById(id);
- }
-
- window.successCount = 0;
- function gotSuccessfulNotification() {
- successCount++;
- if (successCount != 4)
- return;
-
- debug('All notifications received successfully.');
- accessibleElementById('aria-busy').removeNotificationListener();
- accessibleElementById('aria-disabled').removeNotificationListener();
- accessibleElementById('aria-readonly').removeNotificationListener();
- accessibleElementById('aria-required').removeNotificationListener();
-
- document.getElementById('container').hidden = true;
- if (window.testRunner)
- testRunner.notifyDone();
- }
-
- accessibleElementById('aria-busy').addNotificationListener(function(notification) {
- debug('Got ' + notification + ' notification on aria-busy');
- gotSuccessfulNotification();
- });
- document.getElementById('aria-busy').setAttribute('aria-busy', 'true');
-
- accessibleElementById('aria-disabled').addNotificationListener(function(notification) {
- debug('Got ' + notification + ' notification on aria-disabled');
- gotSuccessfulNotification();
- });
- document.getElementById('aria-disabled').setAttribute('aria-disabled', 'true');
-
- accessibleElementById('aria-readonly').addNotificationListener(function(notification) {
- debug('Got ' + notification + ' notification on aria-readonly');
- gotSuccessfulNotification();
- });
- document.getElementById('aria-readonly').setAttribute('aria-readonly', 'true');
-
- accessibleElementById('aria-required').addNotificationListener(function(notification) {
- debug('Got ' + notification + ' notification on aria-required');
- gotSuccessfulNotification();
- });
- document.getElementById('aria-required').setAttribute('aria-required', 'true');
-
- debug('');
-}
-
-</script>
-
-<script src="../../../fast/js/resources/js-test-post.js"></script>
-</body>
-</html>
+++ /dev/null
-This test ensures that a change to an element's accessible text, even if indirect, sends a notification.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-
-PASS successfullyParsed is true
-
-TEST COMPLETE
-Got TextChanged notification on aria-label
-Got TextChanged notification on title
-Got TextChanged notification on labelledby
-Got TextChanged notification on labeled
-All notifications received successfully.
-
+++ /dev/null
-<!DOCTYPE HTML>
-<html>
-<head>
-<script src="../../../fast/js/resources/js-test-pre.js"></script>
-</head>
-<body>
-
-<div id="container">
- <button id="aria-label" aria-label="Aria Label">Content</button>
- <button id="title" title="Title">Content</button>
- <button id="labelledby" aria-labelledby="label1">Content</button>
- <button id="labeled">Content</button>
-
- <label id="label1">Label1</label>
- <label id="label2">Label2</label>
-</div>
-
-<div id="console"></div>
-<script>
-description("This test ensures that a change to an element's accessible text, even if indirect, sends a notification.");
-
-if (window.testRunner && window.accessibilityController) {
- testRunner.dumpAsText();
- testRunner.waitUntilDone();
-
- function accessibleElementById(id) {
- return accessibilityController.accessibleElementById(id);
- }
-
- window.successCount = 0;
- function gotSuccessfulNotification() {
- successCount++;
- if (successCount != 4)
- return;
-
- debug('All notifications received successfully.');
- accessibleElementById('aria-label').removeNotificationListener();
- accessibleElementById('title').removeNotificationListener();
- accessibleElementById('labelledby').removeNotificationListener();
- accessibleElementById('labeled').removeNotificationListener();
-
- document.getElementById('container').hidden = true;
- if (window.testRunner)
- testRunner.notifyDone();
- }
-
- accessibleElementById('aria-label').addNotificationListener(function(notification) {
- debug('Got ' + notification + ' notification on aria-label');
- gotSuccessfulNotification();
- });
- document.getElementById('aria-label').setAttribute('aria-label', 'New aria-label');
-
- accessibleElementById('title').addNotificationListener(function(notification) {
- debug('Got ' + notification + ' notification on title');
- gotSuccessfulNotification();
- });
- document.getElementById('title').title = 'New title';
-
- accessibleElementById('labelledby').addNotificationListener(function(notification) {
- debug('Got ' + notification + ' notification on labelledby');
- gotSuccessfulNotification();
- });
- document.getElementById('labelledby').setAttribute('aria-labelledby', 'label2');
-
- accessibleElementById('labeled').addNotificationListener(function(notification) {
- debug('Got ' + notification + ' notification on labeled');
- gotSuccessfulNotification();
- });
- document.getElementById('label1').setAttribute('for', 'labeled');
-
- debug('');
-}
-
-</script>
-
-<script src="../../../fast/js/resources/js-test-post.js"></script>
-</body>
-</html>
+2012-10-25 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r132514.
+ http://trac.webkit.org/changeset/132514
+ https://bugs.webkit.org/show_bug.cgi?id=100440
+
+ "Broke chromium content_browsertests AccessibilityAriaMenu
+ AccessibilityInputRange AccessibilityListMarkers" (Requested
+ by scheib on #webkit).
+
+ * accessibility/AXObjectCache.cpp:
+ (WebCore::AXObjectCache::getOrCreate):
+ (WebCore::AXObjectCache::contentChanged):
+ (WebCore::AXObjectCache::childrenChanged):
+ (WebCore::AXObjectCache::handleAriaRoleChanged):
+ * accessibility/AXObjectCache.h:
+ (AXObjectCache):
+ (WebCore::AXObjectCache::contentChanged):
+ * accessibility/AccessibilityObject.cpp:
+ (WebCore::AccessibilityObject::AccessibilityObject):
+ * accessibility/AccessibilityObject.h:
+ (WebCore::AccessibilityObject::contentChanged):
+ (AccessibilityObject):
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
+ (WebCore::AccessibilityRenderObject::correspondingControlForLabelElement):
+ (WebCore::AccessibilityRenderObject::contentChanged):
+ * accessibility/AccessibilityRenderObject.h:
+ (AccessibilityRenderObject):
+ * accessibility/AccessibilityScrollView.cpp:
+ (WebCore::AccessibilityScrollView::isAttachment):
+ (WebCore::AccessibilityScrollView::widgetForAttachmentView):
+ (WebCore::AccessibilityScrollView::updateScrollbars):
+ (WebCore::AccessibilityScrollView::webAreaObject):
+ (WebCore::AccessibilityScrollView::elementRect):
+ (WebCore::AccessibilityScrollView::documentFrameView):
+ (WebCore::AccessibilityScrollView::parentObject):
+ (WebCore::AccessibilityScrollView::parentObjectIfExists):
+ (WebCore::AccessibilityScrollView::getScrollableAreaIfScrollable):
+ (WebCore::AccessibilityScrollView::scrollTo):
+ * accessibility/AccessibilityScrollView.h:
+ (WebCore::AccessibilityScrollView::scrollView):
+ (AccessibilityScrollView):
+ * accessibility/AccessibilityTable.cpp:
+ (WebCore::AccessibilityTable::isDataTable):
+ * accessibility/chromium/AXObjectCacheChromium.cpp:
+ (WebCore::AXObjectCache::postPlatformNotification):
+ * dom/Element.cpp:
+ (WebCore::Element::attributeChanged):
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::deleteLineBoxTree):
+ (WebCore::RenderBlock::createAndAppendRootInlineBox):
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::styleWillChange):
+ * rendering/RenderText.cpp:
+ (WebCore::RenderText::setText):
+
2012-10-25 Dan Bernstein <mitz@apple.com>
<rdar://problem/12544626> [cg] RenderBlock::selectionGaps() is extremely slow when there are many floats
#include "HTMLAreaElement.h"
#include "HTMLImageElement.h"
#include "HTMLInputElement.h"
-#include "HTMLLabelElement.h"
#include "HTMLNames.h"
#if ENABLE(VIDEO)
#include "MediaControlElements.h"
m_nodeObjectMapping.set(node, newObj->axObjectID());
m_objects.set(newObj->axObjectID(), newObj);
attachWrapper(newObj.get());
-
- newObj->setCachedIsIgnoredValue(newObj->accessibilityIsIgnored());
-
return newObj.get();
}
m_renderObjectMapping.set(renderer, newObj->axObjectID());
m_objects.set(newObj->axObjectID(), newObj);
attachWrapper(newObj.get());
-
- newObj->setCachedIsIgnoredValue(newObj->accessibilityIsIgnored());
-
return newObj.get();
}
m_idsInUse.remove(objID);
}
-void AXObjectCache::textChanged(Node* node)
+void AXObjectCache::contentChanged(Node* node)
{
- textChanged(getOrCreate(node));
+ if (AccessibilityObject* object = getOrCreate(node))
+ object->contentChanged();
}
-void AXObjectCache::textChanged(RenderObject* renderer)
+void AXObjectCache::contentChanged(RenderObject* renderer)
{
- textChanged(getOrCreate(renderer));
-}
-
-void AXObjectCache::textChanged(AccessibilityObject* obj)
-{
- if (!obj)
- return;
-
- bool parentAlreadyExists = obj->parentObjectIfExists();
- obj->textChanged();
- postNotification(obj, obj->document(), AXObjectCache::AXTextChanged, true);
- if (parentAlreadyExists)
- obj->notifyIfIgnoredValueChanged();
+ if (AccessibilityObject* object = getOrCreate(renderer))
+ object->contentChanged();
}
void AXObjectCache::updateCacheAfterNodeIsAttached(Node* node)
void AXObjectCache::childrenChanged(Node* node)
{
- childrenChanged(get(node));
+ if (AccessibilityObject* obj = get(node))
+ obj->childrenChanged();
}
void AXObjectCache::childrenChanged(RenderObject* renderer)
{
- childrenChanged(get(renderer));
-}
-
-void AXObjectCache::childrenChanged(AccessibilityObject* obj)
-{
- if (!obj)
- return;
-
- obj->childrenChanged();
-
- if (obj->parentObjectIfExists() && obj->cachedIsIgnoredValue() != obj->accessibilityIsIgnored())
- childrenChanged(obj->parentObject());
+ if (AccessibilityObject* obj = get(renderer))
+ obj->childrenChanged();
}
void AXObjectCache::notificationPostTimerFired(Timer<AXObjectCache>*)
void AXObjectCache::handleAriaRoleChanged(Node* node)
{
- if (AccessibilityObject* obj = getOrCreate(node)) {
+ if (AccessibilityObject* obj = getOrCreate(node))
obj->updateAccessibilityRole();
- obj->notifyIfIgnoredValueChanged();
- }
-}
-
-void AXObjectCache::handleAttributeChanged(const QualifiedName& attrName, Element* element)
-{
- if (attrName == roleAttr)
- handleAriaRoleChanged(element);
- else if (attrName == altAttr || attrName == titleAttr)
- textChanged(element);
- else if (attrName == forAttr && element->hasTagName(labelTag))
- labelChanged(element);
-
- if (!attrName.localName().string().startsWith("aria-"))
- return;
-
- if (attrName == aria_activedescendantAttr)
- handleActiveDescendantChanged(element);
- else if (attrName == aria_valuenowAttr || attrName == aria_valuetextAttr)
- postNotification(element, AXObjectCache::AXValueChanged, true);
- else if (attrName == aria_labelAttr || attrName == aria_labeledbyAttr || attrName == aria_labelledbyAttr)
- textChanged(element);
- else if (attrName == aria_checkedAttr)
- checkedStateChanged(element);
- else if (attrName == aria_selectedAttr)
- selectedChildrenChanged(element);
- else if (attrName == aria_expandedAttr)
- handleAriaExpandedChange(element);
- else if (attrName == aria_hiddenAttr)
- childrenChanged(element->parentNode());
- else if (attrName == aria_invalidAttr)
- postNotification(element, AXObjectCache::AXInvalidStatusChanged, true);
- else
- postNotification(element, AXObjectCache::AXAriaAttributeChanged, true);
-}
-
-void AXObjectCache::labelChanged(Element* element)
-{
- ASSERT(element->hasTagName(labelTag));
- HTMLElement* correspondingControl = static_cast<HTMLLabelElement*>(element)->control();
- textChanged(correspondingControl);
-}
-
-void AXObjectCache::recomputeIsIgnored(RenderObject* renderer)
-{
- if (AccessibilityObject* obj = get(renderer))
- obj->notifyIfIgnoredValueChanged();
}
VisiblePosition AXObjectCache::visiblePositionForTextMarkerData(TextMarkerData& textMarkerData)
void attachWrapper(AccessibilityObject*);
void childrenChanged(Node*);
void childrenChanged(RenderObject*);
- void childrenChanged(AccessibilityObject*);
void checkedStateChanged(Node*);
void selectedChildrenChanged(Node*);
void selectedChildrenChanged(RenderObject*);
// Called by a node when text or a text equivalent (e.g. alt) attribute is changed.
- void textChanged(Node*);
- void textChanged(RenderObject*);
+ void contentChanged(Node*);
+ void contentChanged(RenderObject*);
// Called when a node has just been attached, so we can make sure we have the right subclass of AccessibilityObject.
void updateCacheAfterNodeIsAttached(Node*);
void handleAriaExpandedChange(Node*);
void handleScrollbarUpdate(ScrollView*);
- void handleAttributeChanged(const QualifiedName& attrName, Element*);
- void recomputeIsIgnored(RenderObject* renderer);
-
#if HAVE(ACCESSIBILITY)
static void enableAccessibility() { gAccessibilityEnabled = true; }
// Enhanced user interface accessibility can be toggled by the assistive technology.
AXRowCollapsed,
AXRowExpanded,
AXInvalidStatusChanged,
- AXTextChanged,
- AXAriaAttributeChanged
};
void postNotification(RenderObject*, AXNotification, bool postToElement, PostType = PostAsynchronously);
void postPlatformNotification(AccessibilityObject*, AXNotification);
void nodeTextChangePlatformNotification(AccessibilityObject*, AXTextChange, unsigned offset, const String&);
void frameLoadingEventPlatformNotification(AccessibilityObject*, AXLoadingEvent);
- void textChanged(AccessibilityObject*);
- void labelChanged(Element*);
// This is a weak reference cache for knowing if Nodes used by TextMarkers are valid.
void setNodeInUse(Node* n) { m_textMarkerNodes.add(n); }
inline void AXObjectCache::checkedStateChanged(Node*) { }
inline void AXObjectCache::childrenChanged(RenderObject*) { }
inline void AXObjectCache::childrenChanged(Node*) { }
-inline void AXObjectCache::childrenChanged(AccessibilityObject*) { }
-inline void AXObjectCache::textChanged(RenderObject*) { }
-inline void AXObjectCache::textChanged(Node*) { }
-inline void AXObjectCache::textChanged(AccessibilityObject*) { }
+inline void AXObjectCache::contentChanged(RenderObject*) { }
+inline void AXObjectCache::contentChanged(Node*) { }
inline void AXObjectCache::updateCacheAfterNodeIsAttached(Node*) { }
inline void AXObjectCache::detachWrapper(AccessibilityObject*) { }
inline void AXObjectCache::frameLoadingEventNotification(Frame*, AXLoadingEvent) { }
inline void AXObjectCache::handleAriaRoleChanged(Node*) { }
inline void AXObjectCache::handleFocusedUIElementChanged(Node*, Node*) { }
inline void AXObjectCache::handleScrollbarUpdate(ScrollView*) { }
-inline void AXObjectCache::handleAttributeChanged(const QualifiedName&, Element*) { }
-inline void AXObjectCache::recomputeIsIgnored(RenderObject*) { }
inline void AXObjectCache::handleScrolledToAnchor(const Node*) { }
inline void AXObjectCache::nodeTextChangeNotification(Node*, AXTextChange, unsigned, const String&) { }
inline void AXObjectCache::nodeTextChangePlatformNotification(AccessibilityObject*, AXTextChange, unsigned, const String&) { }
: m_id(0)
, m_haveChildren(false)
, m_role(UnknownRole)
- , m_cachedIsIgnoredValue(DefaultBehavior)
#if PLATFORM(GTK)
, m_wrapper(0)
#elif PLATFORM(CHROMIUM)
}
}
-bool AccessibilityObject::cachedIsIgnoredValue()
-{
- if (m_cachedIsIgnoredValue == DefaultBehavior)
- m_cachedIsIgnoredValue = accessibilityIsIgnored() ? IgnoreObject : IncludeObject;
-
- return m_cachedIsIgnoredValue == IgnoreObject;
-}
-
-void AccessibilityObject::setCachedIsIgnoredValue(bool isIgnored)
-{
- m_cachedIsIgnoredValue = isIgnored ? IgnoreObject : IncludeObject;
-}
-
-void AccessibilityObject::notifyIfIgnoredValueChanged()
-{
- bool isIgnored = accessibilityIsIgnored();
- if (cachedIsIgnoredValue() != isIgnored) {
- axObjectCache()->childrenChanged(parentObject());
- setCachedIsIgnoredValue(isIgnored);
- }
-}
-
bool AccessibilityObject::ariaPressedIsPresent() const
{
return !getAttribute(aria_pressedAttr).isEmpty();
virtual void decrement() { }
virtual void childrenChanged() { }
- virtual void textChanged() { }
+ virtual void contentChanged() { }
virtual void updateAccessibilityRole() { }
const AccessibilityChildrenVector& children();
virtual void addChildren() { }
// Scroll this object to a given point in global coordinates of the top-level window.
virtual void scrollToGlobalPoint(const IntPoint&) const;
- bool cachedIsIgnoredValue();
- void setCachedIsIgnoredValue(bool);
-
- // Fires a children changed notification on the parent if the isIgnored value changed.
- void notifyIfIgnoredValueChanged();
-
#if HAVE(ACCESSIBILITY)
#if PLATFORM(GTK)
AccessibilityObjectWrapper* wrapper() const;
AccessibilityChildrenVector m_children;
mutable bool m_haveChildren;
AccessibilityRole m_role;
- AccessibilityObjectInclusion m_cachedIsIgnoredValue;
// If this object itself scrolls, return its ScrollableArea.
virtual ScrollableArea* getScrollableAreaIfScrollable() const { return 0; }
// NOTE: BRs always have text boxes now, so the text box check here can be removed
if (m_renderer->isText()) {
// static text beneath MenuItems and MenuButtons are just reported along with the menu item, so it's ignored on an individual level
- AccessibilityObject* parent = parentObjectUnignored();
- if (parent && (parent->ariaRoleAttribute() == MenuItemRole || parent->ariaRoleAttribute() == MenuButtonRole))
+ if (parentObjectUnignored()->ariaRoleAttribute() == MenuItemRole
+ || parentObjectUnignored()->ariaRoleAttribute() == MenuButtonRole)
return true;
RenderText* renderText = toRenderText(m_renderer);
if (m_renderer->isBR() || !renderText->firstTextBox())
HTMLElement* correspondingControl = labelElement->control();
if (!correspondingControl)
return 0;
-
- // Make sure the corresponding control isn't a descendant of this label that's in the middle of being destroyed.
- if (correspondingControl->renderer() && !correspondingControl->renderer()->parent())
- return 0;
return axObjectCache()->getOrCreate(correspondingControl);
}
return isTextControl();
}
-void AccessibilityRenderObject::textChanged()
+void AccessibilityRenderObject::contentChanged()
{
// If this element supports ARIA live regions, or is part of a region with an ARIA editable role,
// then notify the AT of changes.
virtual AccessibilityOrientation orientation() const;
virtual void detach();
- virtual void textChanged();
+ virtual void contentChanged();
virtual void addChildren();
virtual bool canHaveChildren() const;
virtual void selectedChildren(AccessibilityChildrenVector&);
{
}
-AccessibilityScrollView::~AccessibilityScrollView()
-{
- ASSERT(isDetached());
-}
-
-void AccessibilityScrollView::detach()
-{
- AccessibilityObject::detach();
- m_scrollView = 0;
-}
-
PassRefPtr<AccessibilityScrollView> AccessibilityScrollView::create(ScrollView* view)
{
return adoptRef(new AccessibilityScrollView(view));
// In WebKit2, the ScrollView object will return the AX information (because there are no platform widgets).
bool AccessibilityScrollView::isAttachment() const
{
- return m_scrollView && m_scrollView->platformWidget();
+ return m_scrollView->platformWidget();
}
Widget* AccessibilityScrollView::widgetForAttachmentView() const
{
- return m_scrollView;
+ return m_scrollView.get();
}
void AccessibilityScrollView::updateChildrenIfNecessary()
void AccessibilityScrollView::updateScrollbars()
{
- if (!m_scrollView)
- return;
-
if (m_scrollView->horizontalScrollbar() && !m_horizontalScrollbar)
m_horizontalScrollbar = addChildScrollbar(m_scrollView->horizontalScrollbar());
else if (!m_scrollView->horizontalScrollbar() && m_horizontalScrollbar) {
AccessibilityObject* AccessibilityScrollView::webAreaObject() const
{
- if (!m_scrollView || !m_scrollView->isFrameView())
+ if (!m_scrollView->isFrameView())
return 0;
- Document* doc = static_cast<FrameView*>(m_scrollView)->frame()->document();
+ Document* doc = static_cast<FrameView*>(m_scrollView.get())->frame()->document();
if (!doc || !doc->renderer())
return 0;
LayoutRect AccessibilityScrollView::elementRect() const
{
- if (!m_scrollView)
- return LayoutRect();
-
return m_scrollView->frameRect();
}
FrameView* AccessibilityScrollView::documentFrameView() const
{
- if (!m_scrollView || !m_scrollView->isFrameView())
+ if (!m_scrollView->isFrameView())
return 0;
- return static_cast<FrameView*>(m_scrollView);
+ return static_cast<FrameView*>(m_scrollView.get());
}
AccessibilityObject* AccessibilityScrollView::parentObject() const
{
- if (!m_scrollView || !m_scrollView->isFrameView())
+ if (!m_scrollView->isFrameView())
return 0;
- HTMLFrameOwnerElement* owner = static_cast<FrameView*>(m_scrollView)->frame()->ownerElement();
+ HTMLFrameOwnerElement* owner = static_cast<FrameView*>(m_scrollView.get())->frame()->ownerElement();
if (owner && owner->renderer())
return axObjectCache()->getOrCreate(owner);
AccessibilityObject* AccessibilityScrollView::parentObjectIfExists() const
{
- if (!m_scrollView || !m_scrollView->isFrameView())
+ if (!m_scrollView->isFrameView())
return 0;
- HTMLFrameOwnerElement* owner = static_cast<FrameView*>(m_scrollView)->frame()->ownerElement();
+ HTMLFrameOwnerElement* owner = static_cast<FrameView*>(m_scrollView.get())->frame()->ownerElement();
if (owner && owner->renderer())
return axObjectCache()->get(owner);
ScrollableArea* AccessibilityScrollView::getScrollableAreaIfScrollable() const
{
- return m_scrollView;
+ return m_scrollView.get();
}
void AccessibilityScrollView::scrollTo(const IntPoint& point) const
{
- if (m_scrollView)
- m_scrollView->setScrollPosition(point);
+ m_scrollView->setScrollPosition(point);
}
} // namespace WebCore
public:
static PassRefPtr<AccessibilityScrollView> create(ScrollView*);
virtual AccessibilityRole roleValue() const { return ScrollAreaRole; }
- ScrollView* scrollView() const { return m_scrollView; }
-
- virtual ~AccessibilityScrollView();
- virtual void detach();
+ ScrollView* scrollView() const { return m_scrollView.get(); }
protected:
virtual ScrollableArea* getScrollableAreaIfScrollable() const;
AccessibilityScrollbar* addChildScrollbar(Scrollbar*);
void removeChildScrollbar(AccessibilityObject*);
- ScrollView* m_scrollView;
+ RefPtr<ScrollView> m_scrollView;
RefPtr<AccessibilityObject> m_horizontalScrollbar;
RefPtr<AccessibilityObject> m_verticalScrollbar;
bool m_childrenDirty;
// go through the cell's and check for tell-tale signs of "data" table status
// cells have borders, or use attributes like headers, abbr, scope or axis
- table->recalcSectionsIfNeeded();
RenderTableSection* firstBody = table->firstBody();
if (!firstBody)
return false;
// descendant and send the AXFocusedUIElementChanged notification.
handleFocusedUIElementChanged(0, obj->document()->focusedNode());
break;
- case AXAriaAttributeChanged:
case AXAutocorrectionOccured:
case AXCheckedStateChanged:
case AXChildrenChanged:
case AXFocusedUIElementChanged:
- case AXInvalidStatusChanged:
case AXLayoutComplete:
case AXLiveRegionChanged:
case AXLoadComplete:
case AXScrolledToAnchor:
case AXSelectedChildrenChanged:
case AXSelectedTextChanged:
- case AXTextChanged:
case AXValueChanged:
+ case AXInvalidStatusChanged:
break;
}
invalidateNodeListCachesInAncestors(&name, this);
- if (AXObjectCache::accessibilityEnabled())
- document()->axObjectCache()->handleAttributeChanged(name, this);
+ if (!AXObjectCache::accessibilityEnabled())
+ return;
+
+ if (name == aria_activedescendantAttr) {
+ // any change to aria-activedescendant attribute triggers accessibility focus change, but document focus remains intact
+ document()->axObjectCache()->handleActiveDescendantChanged(this);
+ } else if (name == roleAttr) {
+ // the role attribute can change at any time, and the AccessibilityObject must pick up these changes
+ document()->axObjectCache()->handleAriaRoleChanged(this);
+ } else if (name == aria_valuenowAttr) {
+ // If the valuenow attribute changes, AX clients need to be notified.
+ document()->axObjectCache()->postNotification(this, AXObjectCache::AXValueChanged, true);
+ } else if (name == aria_labelAttr || name == aria_labeledbyAttr || name == altAttr || name == titleAttr) {
+ // If the content of an element changes due to an attribute change, notify accessibility.
+ document()->axObjectCache()->contentChanged(this);
+ } else if (name == aria_checkedAttr)
+ document()->axObjectCache()->checkedStateChanged(this);
+ else if (name == aria_selectedAttr)
+ document()->axObjectCache()->selectedChildrenChanged(this);
+ else if (name == aria_expandedAttr)
+ document()->axObjectCache()->handleAriaExpandedChange(this);
+ else if (name == aria_hiddenAttr)
+ document()->axObjectCache()->childrenChanged(this);
+ else if (name == aria_invalidAttr)
+ document()->axObjectCache()->postNotification(this, AXObjectCache::AXInvalidStatusChanged, true);
}
void Element::parseAttribute(const Attribute& attribute)
#include "config.h"
#include "RenderBlock.h"
-#include "AXObjectCache.h"
#include "ColumnInfo.h"
#include "Document.h"
#include "Element.h"
}
}
m_lineBoxes.deleteLineBoxTree(renderArena());
- if (UNLIKELY(AXObjectCache::accessibilityEnabled()))
- document()->axObjectCache()->recomputeIsIgnored(this);
}
RootInlineBox* RenderBlock::createRootInlineBox()
{
RootInlineBox* rootBox = createRootInlineBox();
m_lineBoxes.appendLineBox(rootBox);
-
- if (UNLIKELY(AXObjectCache::accessibilityEnabled()) && m_lineBoxes.firstLineBox() == rootBox)
- document()->axObjectCache()->recomputeIsIgnored(this);
-
return rootBox;
}
document()->setAnnotatedRegionsDirty(true);
#endif
if (visibilityChanged && AXObjectCache::accessibilityEnabled())
- document()->axObjectCache()->childrenChanged(parent());
+ document()->axObjectCache()->childrenChanged(this);
// Keep layer hierarchy visibility bits up to date if visibility changes.
if (m_style->visibility() != newStyle->visibility()) {
AXObjectCache* axObjectCache = document()->axObjectCache();
if (axObjectCache->accessibilityEnabled())
- axObjectCache->textChanged(this);
+ axObjectCache->contentChanged(this);
}
String RenderText::textWithoutTranscoding() const
+2012-10-25 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r132514.
+ http://trac.webkit.org/changeset/132514
+ https://bugs.webkit.org/show_bug.cgi?id=100440
+
+ "Broke chromium content_browsertests AccessibilityAriaMenu
+ AccessibilityInputRange AccessibilityListMarkers" (Requested
+ by scheib on #webkit).
+
+ * public/WebAccessibilityNotification.h:
+ * src/AssertMatchingEnums.cpp:
+
2012-10-25 James Robinson <jamesr@chromium.org>
[chromium] Regression: navigating between composited pages doesn't cause redraw until scrolled
WebAccessibilityNotificationRowCollapsed,
WebAccessibilityNotificationRowExpanded,
WebAccessibilityNotificationInvalidStatusChanged,
- WebAccessibilityNotificationTextChanged,
- WebAccessibilityNotificationAriaAttributeChanged
+
+ // FIXME: now that we're using AssertMatchingEnums, we don't need a
+ // catch-all "invalid" notification enum. Remove this once it's been
+ // removed from Chromium.
+ WebAccessibilityNotificationInvalid,
};
} // namespace WebKit
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityNotificationRowCollapsed, AXObjectCache::AXRowCollapsed);
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityNotificationRowExpanded, AXObjectCache::AXRowExpanded);
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityNotificationInvalidStatusChanged, AXObjectCache::AXInvalidStatusChanged);
-COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityNotificationTextChanged, AXObjectCache::AXTextChanged);
-COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityNotificationAriaAttributeChanged, AXObjectCache::AXAriaAttributeChanged);
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleUnknown, UnknownRole);
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleButton, ButtonRole);
+2012-10-25 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r132514.
+ http://trac.webkit.org/changeset/132514
+ https://bugs.webkit.org/show_bug.cgi?id=100440
+
+ "Broke chromium content_browsertests AccessibilityAriaMenu
+ AccessibilityInputRange AccessibilityListMarkers" (Requested
+ by scheib on #webkit).
+
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::postAccessibilityNotification):
+
2012-10-25 Dirk Pranke <dpranke@chromium.org>
rwt --lint-test-files doesn't handle the cascade properly
case WebAccessibilityNotificationInvalidStatusChanged:
notificationName = "InvalidStatusChanged";
break;
- case WebAccessibilityNotificationTextChanged:
- notificationName = "TextChanged";
- break;
- case WebAccessibilityNotificationAriaAttributeChanged:
- notificationName = "AriaAttributeChanged";
- break;
default:
notificationName = "UnknownNotification";
break;