<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[160469] branches/safari-537.74-branch</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/160469">160469</a></dd>
<dt>Author</dt> <dd>matthew_hanson@apple.com</dd>
<dt>Date</dt> <dd>2013-12-11 17:59:00 -0800 (Wed, 11 Dec 2013)</dd>
</dl>
<h3>Log Message</h3>
<pre>Merged <a href="http://trac.webkit.org/projects/webkit/changeset/157821">r157821</a>. <rdar://problem/15474133></pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari53774branchLayoutTestsChangeLog">branches/safari-537.74-branch/LayoutTests/ChangeLog</a></li>
<li><a href="#branchessafari53774branchLayoutTestsplatformmacaccessibilityboundsforrangeexpectedtxt">branches/safari-537.74-branch/LayoutTests/platform/mac/accessibility/bounds-for-range-expected.txt</a></li>
<li><a href="#branchessafari53774branchSourceWebCoreChangeLog">branches/safari-537.74-branch/Source/WebCore/ChangeLog</a></li>
<li><a href="#branchessafari53774branchSourceWebCoreaccessibilityAccessibilityObjectcpp">branches/safari-537.74-branch/Source/WebCore/accessibility/AccessibilityObject.cpp</a></li>
<li><a href="#branchessafari53774branchSourceWebCoreaccessibilityAccessibilityObjecth">branches/safari-537.74-branch/Source/WebCore/accessibility/AccessibilityObject.h</a></li>
<li><a href="#branchessafari53774branchSourceWebCoreaccessibilitymacWebAccessibilityObjectWrapperMacmm">branches/safari-537.74-branch/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm</a></li>
<li><a href="#branchessafari53774branchToolsChangeLog">branches/safari-537.74-branch/Tools/ChangeLog</a></li>
<li><a href="#branchessafari53774branchToolsDumpRenderTreeAccessibilityUIElementcpp">branches/safari-537.74-branch/Tools/DumpRenderTree/AccessibilityUIElement.cpp</a></li>
<li><a href="#branchessafari53774branchToolsDumpRenderTreeAccessibilityUIElementh">branches/safari-537.74-branch/Tools/DumpRenderTree/AccessibilityUIElement.h</a></li>
<li><a href="#branchessafari53774branchToolsDumpRenderTreemacAccessibilityUIElementMacmm">branches/safari-537.74-branch/Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm</a></li>
<li><a href="#branchessafari53774branchToolsWebKitTestRunnerInjectedBundleAccessibilityUIElementcpp">branches/safari-537.74-branch/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp</a></li>
<li><a href="#branchessafari53774branchToolsWebKitTestRunnerInjectedBundleAccessibilityUIElementh">branches/safari-537.74-branch/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h</a></li>
<li><a href="#branchessafari53774branchToolsWebKitTestRunnerInjectedBundleBindingsAccessibilityUIElementidl">branches/safari-537.74-branch/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl</a></li>
<li><a href="#branchessafari53774branchToolsWebKitTestRunnerInjectedBundleatkAccessibilityUIElementAtkcpp">branches/safari-537.74-branch/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp</a></li>
<li><a href="#branchessafari53774branchToolsWebKitTestRunnerInjectedBundlemacAccessibilityUIElementMacmm">branches/safari-537.74-branch/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#branchessafari53774branchLayoutTestsplatformmacaccessibilitytextmarkerforboundsexpectedtxt">branches/safari-537.74-branch/LayoutTests/platform/mac/accessibility/text-marker-for-bounds-expected.txt</a></li>
<li><a href="#branchessafari53774branchLayoutTestsplatformmacaccessibilitytextmarkerforboundshtml">branches/safari-537.74-branch/LayoutTests/platform/mac/accessibility/text-marker-for-bounds.html</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari53774branchLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-537.74-branch/LayoutTests/ChangeLog (160468 => 160469)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.74-branch/LayoutTests/ChangeLog        2013-12-12 01:57:43 UTC (rev 160468)
+++ branches/safari-537.74-branch/LayoutTests/ChangeLog        2013-12-12 01:59:00 UTC (rev 160469)
</span><span class="lines">@@ -1,3 +1,21 @@
</span><ins>+2013-12-11 Matthew Hanson <matthew_hanson@apple.com>
+
+ Merge r157821
+
+ 2013-10-22 Samuel White <samuel_white@apple.com>
+
+ AX: Add paramAttrs to fetch start and end text markers in a given rect.
+ https://bugs.webkit.org/show_bug.cgi?id=122164
+
+ Reviewed by Chris Fleizach.
+
+ Added test to ensure end/start text marker for bounds works as
+ expected. Updated bounds for range test to include new API.
+
+ * platform/mac/accessibility/bounds-for-range-expected.txt:
+ * platform/mac/accessibility/text-marker-for-bounds-expected.txt: Added.
+ * platform/mac/accessibility/text-marker-for-bounds.html: Added.
+
</ins><span class="cx"> 2013-12-11 Lucas Forschler <lforschler@apple.com>
</span><span class="cx">
</span><span class="cx"> Merge r159460
</span></span></pre></div>
<a id="branchessafari53774branchLayoutTestsplatformmacaccessibilityboundsforrangeexpectedtxt"></a>
<div class="modfile"><h4>Modified: branches/safari-537.74-branch/LayoutTests/platform/mac/accessibility/bounds-for-range-expected.txt (160468 => 160469)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.74-branch/LayoutTests/platform/mac/accessibility/bounds-for-range-expected.txt        2013-12-12 01:57:43 UTC (rev 160468)
+++ branches/safari-537.74-branch/LayoutTests/platform/mac/accessibility/bounds-for-range-expected.txt        2013-12-12 01:59:00 UTC (rev 160469)
</span><span class="lines">@@ -53,6 +53,8 @@
</span><span class="cx"> AXBoundsForRange
</span><span class="cx"> AXStringForRange
</span><span class="cx"> AXUIElementsForSearchPredicate
</span><ins>+AXEndTextMarkerForBounds
+AXStartTextMarkerForBounds
</ins><span class="cx">
</span><span class="cx"> ----------------------
</span><span class="cx"> {{-1.000000, -1.000000}, {59.000000, 18.000000}}
</span></span></pre></div>
<a id="branchessafari53774branchLayoutTestsplatformmacaccessibilitytextmarkerforboundsexpectedtxt"></a>
<div class="addfile"><h4>Added: branches/safari-537.74-branch/LayoutTests/platform/mac/accessibility/text-marker-for-bounds-expected.txt (0 => 160469)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.74-branch/LayoutTests/platform/mac/accessibility/text-marker-for-bounds-expected.txt         (rev 0)
+++ branches/safari-537.74-branch/LayoutTests/platform/mac/accessibility/text-marker-for-bounds-expected.txt        2013-12-12 01:59:00 UTC (rev 160469)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+Text text text text text text text text text text.
+This tests that endTextMarkerForBounds and startTextMarkerForBounds work correctly.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS rangeFromBounds is rangeFromElement
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="branchessafari53774branchLayoutTestsplatformmacaccessibilitytextmarkerforboundshtml"></a>
<div class="addfile"><h4>Added: branches/safari-537.74-branch/LayoutTests/platform/mac/accessibility/text-marker-for-bounds.html (0 => 160469)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.74-branch/LayoutTests/platform/mac/accessibility/text-marker-for-bounds.html         (rev 0)
+++ branches/safari-537.74-branch/LayoutTests/platform/mac/accessibility/text-marker-for-bounds.html        2013-12-12 01:59:00 UTC (rev 160469)
</span><span class="lines">@@ -0,0 +1,33 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<script src="../../../resources/js-test-pre.js"></script>
+<title>Text Marker for Bounds</title>
+</head>
+<body>
+
+<div id="text">Text text text text text text text text text text.</div>
+
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+ description("This tests that endTextMarkerForBounds and startTextMarkerForBounds work correctly.");
+
+ if (window.accessibilityController) {
+ var text = accessibilityController.accessibleElementById("text");
+
+ var startMarker = text.startTextMarkerForBounds(text.x, text.y, text.width, text.height);
+ var endMarker = text.endTextMarkerForBounds(text.x, text.y, text.width, text.height);
+ // Get text range from boundary markers.
+ var rangeFromBounds = text.textMarkerRangeLength(text.textMarkerRangeForMarkers(startMarker, endMarker));
+ // Get text range from element.
+ var rangeFromElement = text.textMarkerRangeLength(text.textMarkerRangeForElement(text));
+
+ shouldBe("rangeFromBounds", "rangeFromElement");
+ }
+</script>
+
+<script src="../../../resources/js-test-post.js"></script>
+</body>
+</html>
</ins></span></pre></div>
<a id="branchessafari53774branchSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-537.74-branch/Source/WebCore/ChangeLog (160468 => 160469)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.74-branch/Source/WebCore/ChangeLog        2013-12-12 01:57:43 UTC (rev 160468)
+++ branches/safari-537.74-branch/Source/WebCore/ChangeLog        2013-12-12 01:59:00 UTC (rev 160469)
</span><span class="lines">@@ -1,3 +1,31 @@
</span><ins>+2013-12-11 Matthew Hanson <matthew_hanson@apple.com>
+
+ Merge r157821
+
+ 2013-10-22 Samuel White <samuel_white@apple.com>
+
+ AX: Add paramAttrs to fetch start and end text markers in a given rect.
+ https://bugs.webkit.org/show_bug.cgi?id=122164
+
+ Reviewed by Chris Fleizach.
+
+ Added ability to fetch end and start text markers inside a given bounds. This gives ScreenReaders
+ like VoiceOver a way to retrieve the text markers for a specified column of page text.
+
+ Test: platform/mac/accessibility/text-marker-for-bounds.html
+
+ * accessibility/AccessibilityObject.cpp:
+ (WebCore::AccessibilityObject::mainFrame):
+ (WebCore::AccessibilityObject::topDocument):
+ (WebCore::AccessibilityObject::visiblePositionForBounds):
+ * accessibility/AccessibilityObject.h:
+ * accessibility/AccessibilityRenderObject.cpp:
+ * accessibility/AccessibilityRenderObject.h:
+ * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
+ (-[WebAccessibilityObjectWrapper screenToContents:]):
+ (-[WebAccessibilityObjectWrapper accessibilityParameterizedAttributeNames]):
+ (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
+
</ins><span class="cx"> 2013-12-11 Lucas Forschler <lforschler@apple.com>
</span><span class="cx">
</span><span class="cx"> Merge r159691
</span></span></pre></div>
<a id="branchessafari53774branchSourceWebCoreaccessibilityAccessibilityObjectcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-537.74-branch/Source/WebCore/accessibility/AccessibilityObject.cpp (160468 => 160469)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.74-branch/Source/WebCore/accessibility/AccessibilityObject.cpp        2013-12-12 01:57:43 UTC (rev 160468)
+++ branches/safari-537.74-branch/Source/WebCore/accessibility/AccessibilityObject.cpp        2013-12-12 01:59:00 UTC (rev 160469)
</span><span class="lines">@@ -584,6 +584,13 @@
</span><span class="cx"> actionElem->accessKeyAction(true);
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><ins>+
+Document* AccessibilityObject::topDocument() const
+{
+ if (!document())
+ return 0;
+ return document()->topDocument();
+}
</ins><span class="cx">
</span><span class="cx"> String AccessibilityObject::language() const
</span><span class="cx"> {
</span><span class="lines">@@ -914,6 +921,34 @@
</span><span class="cx"> return length;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+VisiblePosition AccessibilityObject::visiblePositionForBounds(const IntRect& rect, AccessibilityVisiblePositionForBounds visiblePositionForBounds) const
+{
+ if (rect.isEmpty())
+ return VisiblePosition();
+
+ // FIXME: Add support for right-to-left languages.
+ IntPoint corner = (visiblePositionForBounds == FirstVisiblePositionForBounds) ? rect.minXMinYCorner() : rect.maxXMaxYCorner();
+ VisiblePosition position = this->visiblePositionForPoint(corner);
+
+ if (rect.contains(position.absoluteCaretBounds().center()))
+ return position;
+
+ // If the initial position is located outside the bounds adjust it incrementally as needed.
+ VisiblePosition nextPosition = position.next();
+ VisiblePosition previousPosition = position.previous();
+ while (nextPosition.isNotNull() || previousPosition.isNotNull()) {
+ if (rect.contains(nextPosition.absoluteCaretBounds().center()))
+ return nextPosition;
+ if (rect.contains(previousPosition.absoluteCaretBounds().center()))
+ return previousPosition;
+
+ nextPosition = nextPosition.next();
+ previousPosition = previousPosition.previous();
+ }
+
+ return VisiblePosition();
+}
+
</ins><span class="cx"> VisiblePosition AccessibilityObject::nextWordEnd(const VisiblePosition& visiblePos) const
</span><span class="cx"> {
</span><span class="cx"> if (visiblePos.isNull())
</span></span></pre></div>
<a id="branchessafari53774branchSourceWebCoreaccessibilityAccessibilityObjecth"></a>
<div class="modfile"><h4>Modified: branches/safari-537.74-branch/Source/WebCore/accessibility/AccessibilityObject.h (160468 => 160469)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.74-branch/Source/WebCore/accessibility/AccessibilityObject.h        2013-12-12 01:57:43 UTC (rev 160468)
+++ branches/safari-537.74-branch/Source/WebCore/accessibility/AccessibilityObject.h        2013-12-12 01:59:00 UTC (rev 160469)
</span><span class="lines">@@ -311,6 +311,11 @@
</span><span class="cx"> VisitedLinkSearchKey
</span><span class="cx"> };
</span><span class="cx">
</span><ins>+enum AccessibilityVisiblePositionForBounds {
+ FirstVisiblePositionForBounds,
+ LastVisiblePositionForBounds
+};
+
</ins><span class="cx"> struct AccessibilitySearchCriteria {
</span><span class="cx"> AccessibilityObject* startObject;
</span><span class="cx"> AccessibilitySearchDirection searchDirection;
</span><span class="lines">@@ -633,8 +638,10 @@
</span><span class="cx"> virtual Document* document() const;
</span><span class="cx"> virtual FrameView* topDocumentFrameView() const { return 0; }
</span><span class="cx"> virtual FrameView* documentFrameView() const;
</span><ins>+ Document* topDocument() const;
</ins><span class="cx"> String language() const;
</span><span class="cx"> // 1-based, to match the aria-level spec.
</span><ins>+ // 1-based, to match the aria-level spec.
</ins><span class="cx"> virtual unsigned hierarchicalLevel() const { return 0; }
</span><span class="cx">
</span><span class="cx"> virtual void setFocused(bool) { }
</span><span class="lines">@@ -705,6 +712,7 @@
</span><span class="cx"> int lengthForVisiblePositionRange(const VisiblePositionRange&) const;
</span><span class="cx"> virtual void setSelectedVisiblePositionRange(const VisiblePositionRange&) const { }
</span><span class="cx">
</span><ins>+ VisiblePosition visiblePositionForBounds(const IntRect&, AccessibilityVisiblePositionForBounds) const;
</ins><span class="cx"> virtual VisiblePosition visiblePositionForPoint(const IntPoint&) const { return VisiblePosition(); }
</span><span class="cx"> VisiblePosition nextVisiblePosition(const VisiblePosition& visiblePos) const { return visiblePos.next(); }
</span><span class="cx"> VisiblePosition previousVisiblePosition(const VisiblePosition& visiblePos) const { return visiblePos.previous(); }
</span></span></pre></div>
<a id="branchessafari53774branchSourceWebCoreaccessibilitymacWebAccessibilityObjectWrapperMacmm"></a>
<div class="modfile"><h4>Modified: branches/safari-537.74-branch/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm (160468 => 160469)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.74-branch/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm        2013-12-12 01:57:43 UTC (rev 160468)
+++ branches/safari-537.74-branch/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm        2013-12-12 01:59:00 UTC (rev 160469)
</span><span class="lines">@@ -195,6 +195,15 @@
</span><span class="cx"> #define NSAccessibilityUIElementsForSearchPredicateParameterizedAttribute @"AXUIElementsForSearchPredicate"
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+// Text
+#ifndef NSAccessibilityEndTextMarkerForBoundsParameterizedAttribute
+#define NSAccessibilityEndTextMarkerForBoundsParameterizedAttribute @"AXEndTextMarkerForBounds"
+#endif
+
+#ifndef NSAccessibilityStartTextMarkerForBoundsParameterizedAttribute
+#define NSAccessibilityStartTextMarkerForBoundsParameterizedAttribute @"AXStartTextMarkerForBounds"
+#endif
+
</ins><span class="cx"> // Search Keys
</span><span class="cx"> #ifndef NSAccessibilityAnyTypeSearchKey
</span><span class="cx"> #define NSAccessibilityAnyTypeSearchKey @"AXAnyTypeSearchKey"
</span><span class="lines">@@ -437,6 +446,23 @@
</span><span class="cx"> return HardAutorelease(wkCopyAXTextMarkerRangeEnd(range));
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#pragma mark Other helpers
+
+- (IntRect)screenToContents:(const IntRect&)rect
+{
+ Document* document = m_object->document();
+ if (!document)
+ return IntRect();
+
+ FrameView* frameView = document->view();
+ if (!frameView)
+ return IntRect();
+
+ IntPoint startPoint = frameView->screenToContents(rect.minXMaxYCorner());
+ IntPoint endPoint = frameView->screenToContents(rect.maxXMinYCorner());
+ return IntRect(startPoint.x(), startPoint.y(), endPoint.x() - startPoint.x(), endPoint.y() - startPoint.y());
+}
+
</ins><span class="cx"> #pragma mark Search helpers
</span><span class="cx">
</span><span class="cx"> typedef HashMap<String, AccessibilitySearchKey> AccessibilitySearchKeyMap;
</span><span class="lines">@@ -2904,6 +2930,8 @@
</span><span class="cx"> NSAccessibilityBoundsForRangeParameterizedAttribute,
</span><span class="cx"> NSAccessibilityStringForRangeParameterizedAttribute,
</span><span class="cx"> NSAccessibilityUIElementsForSearchPredicateParameterizedAttribute,
</span><ins>+ NSAccessibilityEndTextMarkerForBoundsParameterizedAttribute,
+ NSAccessibilityStartTextMarkerForBoundsParameterizedAttribute,
</ins><span class="cx"> nil];
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -3243,6 +3271,8 @@
</span><span class="cx"> bool pointSet = false;
</span><span class="cx"> NSRange range = {0, 0};
</span><span class="cx"> bool rangeSet = false;
</span><ins>+ NSRect rect = NSZeroRect;
+ bool rectSet = false;
</ins><span class="cx">
</span><span class="cx"> // basic parameter validation
</span><span class="cx"> if (!m_object || !attribute || !parameter)
</span><span class="lines">@@ -3279,6 +3309,9 @@
</span><span class="cx"> } else if ([parameter isKindOfClass:[NSValue self]] && strcmp([(NSValue*)parameter objCType], @encode(NSRange)) == 0) {
</span><span class="cx"> rangeSet = true;
</span><span class="cx"> range = [(NSValue*)parameter rangeValue];
</span><ins>+ } else if ([parameter isKindOfClass:[NSValue self]] && strcmp([(NSValue*)parameter objCType], @encode(NSRect)) == 0) {
+ rectSet = true;
+ rect = [(NSValue*)parameter rectValue];
</ins><span class="cx"> } else {
</span><span class="cx"> // Attribute type is not supported. Allow super to handle.
</span><span class="cx"> return [super accessibilityAttributeValue:attribute forParameter:parameter];
</span><span class="lines">@@ -3327,6 +3360,15 @@
</span><span class="cx"> return convertToNSArray(results);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ if ([attribute isEqualToString:NSAccessibilityEndTextMarkerForBoundsParameterizedAttribute]) {
+ IntRect webCoreRect = [self screenToContents:enclosingIntRect(rect)];
+ return [self textMarkerForVisiblePosition:m_object->visiblePositionForBounds(webCoreRect, LastVisiblePositionForBounds)];
+ }
+ if ([attribute isEqualToString:NSAccessibilityStartTextMarkerForBoundsParameterizedAttribute]) {
+ IntRect webCoreRect = [self screenToContents:enclosingIntRect(rect)];
+ return [self textMarkerForVisiblePosition:m_object->visiblePositionForBounds(webCoreRect, FirstVisiblePositionForBounds)];
+ }
+
</ins><span class="cx"> if ([attribute isEqualToString:NSAccessibilityTextMarkerIsValidParameterizedAttribute]) {
</span><span class="cx"> VisiblePosition pos = [self visiblePositionForTextMarker:textMarker];
</span><span class="cx"> return [NSNumber numberWithBool:!pos.isNull()];
</span></span></pre></div>
<a id="branchessafari53774branchToolsChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-537.74-branch/Tools/ChangeLog (160468 => 160469)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.74-branch/Tools/ChangeLog        2013-12-12 01:57:43 UTC (rev 160468)
+++ branches/safari-537.74-branch/Tools/ChangeLog        2013-12-12 01:59:00 UTC (rev 160469)
</span><span class="lines">@@ -1,5 +1,53 @@
</span><span class="cx"> 2013-12-11 Matthew Hanson <matthew_hanson@apple.com>
</span><span class="cx">
</span><ins>+ Merge r157821
+
+ 2013-10-22 Samuel White <samuel_white@apple.com>
+
+ AX: Add paramAttrs to fetch start and end text markers in a given rect.
+ https://bugs.webkit.org/show_bug.cgi?id=122164
+
+ Reviewed by Chris Fleizach.
+
+ Added accessibility element hooks to test endTextMarkerForBounds and startTextMarkerForBounds.
+
+ * DumpRenderTree/AccessibilityUIElement.cpp:
+ (endTextMarkerForBoundsCallback):
+ (startTextMarkerForBoundsCallback):
+ (AccessibilityUIElement::endTextMarkerForBounds):
+ (AccessibilityUIElement::startTextMarkerForBounds):
+ (AccessibilityUIElement::getJSClass):
+ * DumpRenderTree/AccessibilityUIElement.h:
+ * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
+ (AccessibilityUIElement::endTextMarkerForBounds):
+ (AccessibilityUIElement::startTextMarkerForBounds):
+ * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
+ (WTR::AccessibilityUIElement::endTextMarkerForBounds):
+ (WTR::AccessibilityUIElement::startTextMarkerForBounds):
+ * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
+ * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
+ * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
+ (WTR::AccessibilityUIElement::endTextMarkerForBounds):
+ (WTR::AccessibilityUIElement::startTextMarkerForBounds):
+ * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
+ (WTR::AccessibilityUIElement::endTextMarkerForBounds):
+ (WTR::AccessibilityUIElement::startTextMarkerForBounds):
+
+2013-12-11 Matthew Hanson <matthew_hanson@apple.com>
+
+ Merge 157303
+
+ 2013-10-11 Brent Fulgham <bfulgham@apple.com>
+
+ Unreviewed build fix for --64-bit target.
+
+ * Scripts/webkitdirs.pm:
+ (argumentsForConfiguration): Use 'isWin64' test, since @ARGV value may have
+ been removed by this point.
+ (hasArgument): Remove unused temporary.
+
+2013-12-11 Matthew Hanson <matthew_hanson@apple.com>
+
</ins><span class="cx"> Merge 154368
</span><span class="cx">
</span><span class="cx"> 2013-08-20 Alex Christensen <achristensen@apple.com>
</span></span></pre></div>
<a id="branchessafari53774branchToolsDumpRenderTreeAccessibilityUIElementcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-537.74-branch/Tools/DumpRenderTree/AccessibilityUIElement.cpp (160468 => 160469)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.74-branch/Tools/DumpRenderTree/AccessibilityUIElement.cpp        2013-12-12 01:57:43 UTC (rev 160468)
+++ branches/safari-537.74-branch/Tools/DumpRenderTree/AccessibilityUIElement.cpp        2013-12-12 01:59:00 UTC (rev 160469)
</span><span class="lines">@@ -664,6 +664,38 @@
</span><span class="cx"> return JSValueMakeString(context, markerRangeString.get());
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+static JSValueRef endTextMarkerForBoundsCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ int x = 0;
+ int y = 0;
+ int width = 0;
+ int height = 0;
+ if (argumentCount == 4) {
+ x = JSValueToNumber(context, arguments[0], exception);
+ y = JSValueToNumber(context, arguments[1], exception);
+ width = JSValueToNumber(context, arguments[2], exception);
+ height = JSValueToNumber(context, arguments[3], exception);
+ }
+
+ return AccessibilityTextMarker::makeJSAccessibilityTextMarker(context, toAXElement(thisObject)->endTextMarkerForBounds(x, y, width, height));
+}
+
+static JSValueRef startTextMarkerForBoundsCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ int x = 0;
+ int y = 0;
+ int width = 0;
+ int height = 0;
+ if (argumentCount == 4) {
+ x = JSValueToNumber(context, arguments[0], exception);
+ y = JSValueToNumber(context, arguments[1], exception);
+ width = JSValueToNumber(context, arguments[2], exception);
+ height = JSValueToNumber(context, arguments[3], exception);
+ }
+
+ return AccessibilityTextMarker::makeJSAccessibilityTextMarker(context, toAXElement(thisObject)->startTextMarkerForBounds(x, y, width, height));
+}
+
</ins><span class="cx"> static JSValueRef textMarkerForPointCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
</span><span class="cx"> {
</span><span class="cx"> int x = 0;
</span><span class="lines">@@ -1164,6 +1196,16 @@
</span><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+AccessibilityTextMarker AccessibilityUIElement::endTextMarkerForBounds(int x, int y, int width, int height)
+{
+ return 0;
+}
+
+AccessibilityTextMarker AccessibilityUIElement::startTextMarkerForBounds(int x, int y, int width, int height)
+{
+ return 0;
+}
+
</ins><span class="cx"> AccessibilityTextMarker AccessibilityUIElement::textMarkerForPoint(int x, int y)
</span><span class="cx"> {
</span><span class="cx"> return 0;
</span><span class="lines">@@ -1373,6 +1415,8 @@
</span><span class="cx"> { "endTextMarkerForTextMarkerRange", endTextMarkerForTextMarkerRangeCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
</span><span class="cx"> { "accessibilityElementForTextMarker", accessibilityElementForTextMarkerCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
</span><span class="cx"> { "textMarkerRangeLength", textMarkerRangeLengthCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
</span><ins>+ { "endTextMarkerForBounds", endTextMarkerForBoundsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "startTextMarkerForBounds", startTextMarkerForBoundsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
</ins><span class="cx"> { "textMarkerForPoint", textMarkerForPointCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
</span><span class="cx"> { "nextTextMarker", nextTextMarkerCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
</span><span class="cx"> { "previousTextMarker", previousTextMarkerCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
</span></span></pre></div>
<a id="branchessafari53774branchToolsDumpRenderTreeAccessibilityUIElementh"></a>
<div class="modfile"><h4>Modified: branches/safari-537.74-branch/Tools/DumpRenderTree/AccessibilityUIElement.h (160468 => 160469)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.74-branch/Tools/DumpRenderTree/AccessibilityUIElement.h        2013-12-12 01:57:43 UTC (rev 160468)
+++ branches/safari-537.74-branch/Tools/DumpRenderTree/AccessibilityUIElement.h        2013-12-12 01:59:00 UTC (rev 160469)
</span><span class="lines">@@ -221,6 +221,8 @@
</span><span class="cx"> AccessibilityTextMarkerRange textMarkerRangeForMarkers(AccessibilityTextMarker* startMarker, AccessibilityTextMarker* endMarker);
</span><span class="cx"> AccessibilityTextMarker startTextMarkerForTextMarkerRange(AccessibilityTextMarkerRange*);
</span><span class="cx"> AccessibilityTextMarker endTextMarkerForTextMarkerRange(AccessibilityTextMarkerRange*);
</span><ins>+ AccessibilityTextMarker endTextMarkerForBounds(int x, int y, int width, int height);
+ AccessibilityTextMarker startTextMarkerForBounds(int x, int y, int width, int height);
</ins><span class="cx"> AccessibilityTextMarker textMarkerForPoint(int x, int y);
</span><span class="cx"> AccessibilityTextMarker previousTextMarker(AccessibilityTextMarker*);
</span><span class="cx"> AccessibilityTextMarker nextTextMarker(AccessibilityTextMarker*);
</span></span></pre></div>
<a id="branchessafari53774branchToolsDumpRenderTreemacAccessibilityUIElementMacmm"></a>
<div class="modfile"><h4>Modified: branches/safari-537.74-branch/Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm (160468 => 160469)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.74-branch/Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm        2013-12-12 01:57:43 UTC (rev 160468)
+++ branches/safari-537.74-branch/Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm        2013-12-12 01:59:00 UTC (rev 160469)
</span><span class="lines">@@ -56,6 +56,15 @@
</span><span class="cx"> #define NSAccessibilityPathAttribute @"AXPath"
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+// Text
+#ifndef NSAccessibilityEndTextMarkerForBoundsParameterizedAttribute
+#define NSAccessibilityEndTextMarkerForBoundsParameterizedAttribute @"AXEndTextMarkerForBounds"
+#endif
+
+#ifndef NSAccessibilityStartTextMarkerForBoundsParameterizedAttribute
+#define NSAccessibilityStartTextMarkerForBoundsParameterizedAttribute @"AXStartTextMarkerForBounds"
+#endif
+
</ins><span class="cx"> typedef void (*AXPostedNotificationCallback)(id element, NSString* notification, void* context);
</span><span class="cx">
</span><span class="cx"> @interface NSObject (WebKitAccessibilityAdditions)
</span><span class="lines">@@ -1495,6 +1504,26 @@
</span><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+AccessibilityTextMarker AccessibilityUIElement::endTextMarkerForBounds(int x, int y, int width, int height)
+{
+ BEGIN_AX_OBJC_EXCEPTIONS
+ id textMarker = [m_element accessibilityAttributeValue:NSAccessibilityEndTextMarkerForBoundsParameterizedAttribute forParameter:[NSValue valueWithRect:NSMakeRect(x, y, width, height)]];
+ return AccessibilityTextMarker(textMarker);
+ END_AX_OBJC_EXCEPTIONS
+
+ return 0;
+}
+
+AccessibilityTextMarker AccessibilityUIElement::startTextMarkerForBounds(int x, int y, int width, int height)
+{
+ BEGIN_AX_OBJC_EXCEPTIONS
+ id textMarker = [m_element accessibilityAttributeValue:NSAccessibilityStartTextMarkerForBoundsParameterizedAttribute forParameter:[NSValue valueWithRect:NSMakeRect(x, y, width, height)]];
+ return AccessibilityTextMarker(textMarker);
+ END_AX_OBJC_EXCEPTIONS
+
+ return 0;
+}
+
</ins><span class="cx"> AccessibilityTextMarker AccessibilityUIElement::textMarkerForPoint(int x, int y)
</span><span class="cx"> {
</span><span class="cx"> BEGIN_AX_OBJC_EXCEPTIONS
</span></span></pre></div>
<a id="branchessafari53774branchToolsWebKitTestRunnerInjectedBundleAccessibilityUIElementcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-537.74-branch/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp (160468 => 160469)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.74-branch/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp        2013-12-12 01:57:43 UTC (rev 160468)
+++ branches/safari-537.74-branch/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp        2013-12-12 01:59:00 UTC (rev 160469)
</span><span class="lines">@@ -171,6 +171,8 @@
</span><span class="cx"> PassRefPtr<AccessibilityTextMarker> AccessibilityUIElement::startTextMarkerForTextMarkerRange(AccessibilityTextMarkerRange*) { return 0; }
</span><span class="cx"> PassRefPtr<AccessibilityTextMarker> AccessibilityUIElement::endTextMarkerForTextMarkerRange(AccessibilityTextMarkerRange*) { return 0; }
</span><span class="cx"> PassRefPtr<AccessibilityUIElement> AccessibilityUIElement::accessibilityElementForTextMarker(AccessibilityTextMarker*) { return 0; }
</span><ins>+PassRefPtr<AccessibilityTextMarker> AccessibilityUIElement::endTextMarkerForBounds(int x, int y, int width, int height) { return 0; }
+PassRefPtr<AccessibilityTextMarker> AccessibilityUIElement::startTextMarkerForBounds(int x, int y, int width, int height) { return 0; }
</ins><span class="cx"> PassRefPtr<AccessibilityTextMarker> AccessibilityUIElement::textMarkerForPoint(int, int) { return 0; }
</span><span class="cx"> PassRefPtr<AccessibilityTextMarker> AccessibilityUIElement::previousTextMarker(AccessibilityTextMarker*) { return 0; }
</span><span class="cx"> PassRefPtr<AccessibilityTextMarker> AccessibilityUIElement::nextTextMarker(AccessibilityTextMarker*) { return 0; }
</span></span></pre></div>
<a id="branchessafari53774branchToolsWebKitTestRunnerInjectedBundleAccessibilityUIElementh"></a>
<div class="modfile"><h4>Modified: branches/safari-537.74-branch/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h (160468 => 160469)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.74-branch/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h        2013-12-12 01:57:43 UTC (rev 160468)
+++ branches/safari-537.74-branch/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h        2013-12-12 01:59:00 UTC (rev 160469)
</span><span class="lines">@@ -219,6 +219,8 @@
</span><span class="cx"> PassRefPtr<AccessibilityTextMarkerRange> textMarkerRangeForMarkers(AccessibilityTextMarker* startMarker, AccessibilityTextMarker* endMarker);
</span><span class="cx"> PassRefPtr<AccessibilityTextMarker> startTextMarkerForTextMarkerRange(AccessibilityTextMarkerRange*);
</span><span class="cx"> PassRefPtr<AccessibilityTextMarker> endTextMarkerForTextMarkerRange(AccessibilityTextMarkerRange*);
</span><ins>+ PassRefPtr<AccessibilityTextMarker> endTextMarkerForBounds(int x, int y, int width, int height);
+ PassRefPtr<AccessibilityTextMarker> startTextMarkerForBounds(int x, int y, int width, int height);
</ins><span class="cx"> PassRefPtr<AccessibilityTextMarker> textMarkerForPoint(int x, int y);
</span><span class="cx"> PassRefPtr<AccessibilityTextMarker> previousTextMarker(AccessibilityTextMarker*);
</span><span class="cx"> PassRefPtr<AccessibilityTextMarker> nextTextMarker(AccessibilityTextMarker*);
</span></span></pre></div>
<a id="branchessafari53774branchToolsWebKitTestRunnerInjectedBundleBindingsAccessibilityUIElementidl"></a>
<div class="modfile"><h4>Modified: branches/safari-537.74-branch/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl (160468 => 160469)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.74-branch/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl        2013-12-12 01:57:43 UTC (rev 160468)
+++ branches/safari-537.74-branch/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl        2013-12-12 01:59:00 UTC (rev 160469)
</span><span class="lines">@@ -155,6 +155,8 @@
</span><span class="cx"> AccessibilityTextMarkerRange textMarkerRangeForMarkers(AccessibilityTextMarker startMarker, AccessibilityTextMarker endMarker);
</span><span class="cx"> AccessibilityTextMarker startTextMarkerForTextMarkerRange(AccessibilityTextMarkerRange range);
</span><span class="cx"> AccessibilityTextMarker endTextMarkerForTextMarkerRange(AccessibilityTextMarkerRange range);
</span><ins>+ AccessibilityTextMarker endTextMarkerForBounds(int x, int y, int width, int height);
+ AccessibilityTextMarker startTextMarkerForBounds(int x, int y, int width, int height);
</ins><span class="cx"> AccessibilityTextMarker textMarkerForPoint(int x, int y);
</span><span class="cx"> AccessibilityTextMarker previousTextMarker(AccessibilityTextMarker marker);
</span><span class="cx"> AccessibilityTextMarker nextTextMarker(AccessibilityTextMarker marker);
</span></span></pre></div>
<a id="branchessafari53774branchToolsWebKitTestRunnerInjectedBundleatkAccessibilityUIElementAtkcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-537.74-branch/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp (160468 => 160469)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.74-branch/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp        2013-12-12 01:57:43 UTC (rev 160468)
+++ branches/safari-537.74-branch/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp        2013-12-12 01:59:00 UTC (rev 160469)
</span><span class="lines">@@ -1155,6 +1155,18 @@
</span><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+PassRefPtr<AccessibilityTextMarker> AccessibilityUIElement::endTextMarkerForBounds(int x, int y, int width, int height)
+{
+ // FIXME: implement
+ return 0;
+}
+
+PassRefPtr<AccessibilityTextMarker> AccessibilityUIElement::startTextMarkerForBounds(int x, int y, int width, int height)
+{
+ // FIXME: implement
+ return 0;
+}
+
</ins><span class="cx"> PassRefPtr<AccessibilityTextMarker> AccessibilityUIElement::textMarkerForPoint(int x, int y)
</span><span class="cx"> {
</span><span class="cx"> // FIXME: implement
</span></span></pre></div>
<a id="branchessafari53774branchToolsWebKitTestRunnerInjectedBundlemacAccessibilityUIElementMacmm"></a>
<div class="modfile"><h4>Modified: branches/safari-537.74-branch/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm (160468 => 160469)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.74-branch/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm        2013-12-12 01:57:43 UTC (rev 160468)
+++ branches/safari-537.74-branch/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm        2013-12-12 01:59:00 UTC (rev 160469)
</span><span class="lines">@@ -57,6 +57,15 @@
</span><span class="cx"> #define NSAccessibilityPathAttribute @"AXPath"
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+// Text
+#ifndef NSAccessibilityEndTextMarkerForBoundsParameterizedAttribute
+#define NSAccessibilityEndTextMarkerForBoundsParameterizedAttribute @"AXEndTextMarkerForBounds"
+#endif
+
+#ifndef NSAccessibilityStartTextMarkerForBoundsParameterizedAttribute
+#define NSAccessibilityStartTextMarkerForBoundsParameterizedAttribute @"AXStartTextMarkerForBounds"
+#endif
+
</ins><span class="cx"> typedef void (*AXPostedNotificationCallback)(id element, NSString* notification, void* context);
</span><span class="cx">
</span><span class="cx"> @interface NSObject (WebKitAccessibilityAdditions)
</span><span class="lines">@@ -1428,6 +1437,26 @@
</span><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+PassRefPtr<AccessibilityTextMarker> AccessibilityUIElement::endTextMarkerForBounds(int x, int y, int width, int height)
+{
+ BEGIN_AX_OBJC_EXCEPTIONS
+ id textMarker = [m_element accessibilityAttributeValue:NSAccessibilityEndTextMarkerForBoundsParameterizedAttribute forParameter:[NSValue valueWithRect:NSMakeRect(x, y, width, height)]];
+ return AccessibilityTextMarker::create(textMarker);
+ END_AX_OBJC_EXCEPTIONS
+
+ return 0;
+}
+
+PassRefPtr<AccessibilityTextMarker> AccessibilityUIElement::startTextMarkerForBounds(int x, int y, int width, int height)
+{
+ BEGIN_AX_OBJC_EXCEPTIONS
+ id textMarker = [m_element accessibilityAttributeValue:NSAccessibilityStartTextMarkerForBoundsParameterizedAttribute forParameter:[NSValue valueWithRect:NSMakeRect(x, y, width, height)]];
+ return AccessibilityTextMarker::create(textMarker);
+ END_AX_OBJC_EXCEPTIONS
+
+ return 0;
+}
+
</ins><span class="cx"> PassRefPtr<AccessibilityTextMarker> AccessibilityUIElement::textMarkerForPoint(int x, int y)
</span><span class="cx"> {
</span><span class="cx"> BEGIN_AX_OBJC_EXCEPTIONS
</span></span></pre>
</div>
</div>
</body>
</html>