| Index: Source/core/accessibility/AccessibilityRenderObject.cpp
|
| diff --git a/Source/core/accessibility/AccessibilityRenderObject.cpp b/Source/core/accessibility/AccessibilityRenderObject.cpp
|
| index 579d3b994f211d7aab6acc431995376b88963c65..42812a7979a2d2e3806dea832774e1738912388f 100644
|
| --- a/Source/core/accessibility/AccessibilityRenderObject.cpp
|
| +++ b/Source/core/accessibility/AccessibilityRenderObject.cpp
|
| @@ -32,6 +32,7 @@
|
| #include "bindings/v8/ExceptionStatePlaceholder.h"
|
| #include "core/accessibility/AXObjectCache.h"
|
| #include "core/accessibility/AccessibilityImageMapLink.h"
|
| +#include "core/accessibility/AccessibilityInlineTextBox.h"
|
| #include "core/accessibility/AccessibilitySVGRoot.h"
|
| #include "core/accessibility/AccessibilitySpinButton.h"
|
| #include "core/accessibility/AccessibilityTable.h"
|
| @@ -52,6 +53,8 @@
|
| #include "core/page/Page.h"
|
| #include "core/platform/LocalizedStrings.h"
|
| #include "core/rendering/HitTestResult.h"
|
| +#include "core/rendering/InlineTextBox.h"
|
| +#include "core/rendering/RenderFieldset.h"
|
| #include "core/rendering/RenderFileUploadControl.h"
|
| #include "core/rendering/RenderHTMLCanvas.h"
|
| #include "core/rendering/RenderImage.h"
|
| @@ -1466,6 +1469,7 @@ void AccessibilityRenderObject::addChildren()
|
| addTextFieldChildren();
|
| addCanvasChildren();
|
| addRemoteSVGChildren();
|
| + addInlineTextBoxChildren();
|
| }
|
|
|
| bool AccessibilityRenderObject::canHaveChildren() const
|
| @@ -1732,6 +1736,17 @@ void AccessibilityRenderObject::handleAriaExpandedChanged()
|
| axObjectCache()->postNotification(this, document(), isExpanded() ? AXObjectCache::AXRowExpanded : AXObjectCache::AXRowCollapsed, true);
|
| }
|
|
|
| +void AccessibilityRenderObject::textChanged()
|
| +{
|
| + if (!m_renderer)
|
| + return;
|
| +
|
| + if (AXObjectCache::inlineTextBoxAccessibility() && roleValue() == StaticTextRole)
|
| + childrenChanged();
|
| +
|
| + AccessibilityNodeObject::textChanged();
|
| +}
|
| +
|
| //
|
| // Text metrics. Most of these should be deprecated, needs major cleanup.
|
| //
|
| @@ -1799,6 +1814,25 @@ int AccessibilityRenderObject::indexForVisiblePosition(const VisiblePosition& po
|
| return TextIterator::rangeLength(range.get());
|
| }
|
|
|
| +void AccessibilityRenderObject::addInlineTextBoxChildren()
|
| +{
|
| + if (!axObjectCache()->inlineTextBoxAccessibility())
|
| + return;
|
| +
|
| + if (!renderer() || !renderer()->isText())
|
| + return;
|
| +
|
| + RenderText* renderText = toRenderText(renderer());
|
| + if (renderText->needsLayout())
|
| + renderText->document().updateLayoutIgnorePendingStylesheets();
|
| +
|
| + for (InlineTextBox* box = renderText->firstTextBox(); box; box = box->nextTextBox()) {
|
| + AccessibilityObject* axObject = axObjectCache()->getOrCreate(box);
|
| + if (!axObject->accessibilityIsIgnored())
|
| + m_children.append(axObject);
|
| + }
|
| +}
|
| +
|
| void AccessibilityRenderObject::lineBreaks(Vector<int>& lineBreaks) const
|
| {
|
| if (!isTextControl())
|
|
|