<!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" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { 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 #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#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>
<title>[20656] trunk/WebCore</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/20656">20656</a></dd>
<dt>Author</dt> <dd>harrison</dd>
<dt>Date</dt> <dd>2007-04-02 10:36:20 -0700 (Mon, 02 Apr 2007)</dd>
</dl>

<h3>Log Message</h3>
<pre> 2007-04-02  David Harrison  &lt;harrison@apple.com&gt;

        Reviewed by Darin.

        &lt;rdar://problem/4906488&gt; text attributes are not working for frame based web page

        Attribute handling now treats each WebArea as its own world, rather than sometimes
        referring back up to the top WebArea. e.g. getting/setting the selection now
        operates on the WebArea containing the WebCoreAXObject that is being messaged (self).
        The methods that sit above this and are able to go into arbitrary WebAreas
        are accessibilityFocusedUIElement and doAXTextMarkerForPosition, allowing VoiceOver
        to navigate between frames.
        
        * bridge/mac/WebCoreAXObject.mm:
        (-[WebCoreAXObject topRenderer]):
        (-[WebCoreAXObject frameView]):
        (-[WebCoreAXObject topFrameView]):
        Removed topDocument, renamed topView to topFrameView, added frameView.
        
        (-[WebCoreAXObject accessibilityAttributeValue:]):
        AXSelectedTextMarkerRange, AXStartTextMarker, and AXEndTextMarker now use
        self's WebArea, rather than the top WebArea.
        
        (-[WebCoreAXObject doAXTextMarkerRangeForLine:]):
        Use self's WebArea, rather than the top WebArea.

        (-[WebCoreAXObject doAXTextMarkerForPosition:]):
        Use renamed methods for accessing top WebArea.
         
        (-[WebCoreAXObject doAXBoundsForTextMarkerRange:]):
        Use renamed methods for accessing self's WebArea.

        (AXAttributeStringSetColor):
        (AXAttributeStringSetNumber):
        (AXAttributeStringSetFont):
        (AXAttributeStringSetStyle):
        (AXAttributeStringSetElement):
        (-[WebCoreAXObject rendererForView:]):
        Clean up uses of nil and NULL.
        
        (-[WebCoreAXObject accessibilityFocusedUIElement]):
        Find the focused node on the whole page. If there is no focused node,
        return the WebArea for the focused document.
        
        (-[WebCoreAXObject doSetAXSelectedTextMarkerRange:]):
        Use self's WebArea, rather than the top WebArea.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkWebCoreChangeLog">trunk/WebCore/ChangeLog</a></li>
<li><a href="#trunkWebCorebridgemacWebCoreAXObjectmm">trunk/WebCore/bridge/mac/WebCoreAXObject.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/ChangeLog (20655 => 20656)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/ChangeLog        2007-04-02 17:36:11 UTC (rev 20655)
+++ trunk/WebCore/ChangeLog        2007-04-02 17:36:20 UTC (rev 20656)
</span><span class="lines">@@ -1,3 +1,50 @@
</span><ins>+ 2007-04-02  David Harrison  &lt;harrison@apple.com&gt;
+
+        Reviewed by Darin.
+
+        &lt;rdar://problem/4906488&gt; text attributes are not working for frame based web page
+
+        Attribute handling now treats each WebArea as its own world, rather than sometimes
+        referring back up to the top WebArea. e.g. getting/setting the selection now
+        operates on the WebArea containing the WebCoreAXObject that is being messaged (self).
+        The methods that sit above this and are able to go into arbitrary WebAreas
+        are accessibilityFocusedUIElement and doAXTextMarkerForPosition, allowing VoiceOver
+        to navigate between frames.
+        
+        * bridge/mac/WebCoreAXObject.mm:
+        (-[WebCoreAXObject topRenderer]):
+        (-[WebCoreAXObject frameView]):
+        (-[WebCoreAXObject topFrameView]):
+        Removed topDocument, renamed topView to topFrameView, added frameView.
+        
+        (-[WebCoreAXObject accessibilityAttributeValue:]):
+        AXSelectedTextMarkerRange, AXStartTextMarker, and AXEndTextMarker now use
+        self's WebArea, rather than the top WebArea.
+        
+        (-[WebCoreAXObject doAXTextMarkerRangeForLine:]):
+        Use self's WebArea, rather than the top WebArea.
+
+        (-[WebCoreAXObject doAXTextMarkerForPosition:]):
+        Use renamed methods for accessing top WebArea.
+         
+        (-[WebCoreAXObject doAXBoundsForTextMarkerRange:]):
+        Use renamed methods for accessing self's WebArea.
+
+        (AXAttributeStringSetColor):
+        (AXAttributeStringSetNumber):
+        (AXAttributeStringSetFont):
+        (AXAttributeStringSetStyle):
+        (AXAttributeStringSetElement):
+        (-[WebCoreAXObject rendererForView:]):
+        Clean up uses of nil and NULL.
+        
+        (-[WebCoreAXObject accessibilityFocusedUIElement]):
+        Find the focused node on the whole page. If there is no focused node,
+        return the WebArea for the focused document.
+        
+        (-[WebCoreAXObject doSetAXSelectedTextMarkerRange:]):
+        Use self's WebArea, rather than the top WebArea.
+
</ins><span class="cx"> 2007-04-02  Antti Koivisto  &lt;antti@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Fix build. This one was not supposed to be checked in.
</span></span></pre></div>
<a id="trunkWebCorebridgemacWebCoreAXObjectmm"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/bridge/mac/WebCoreAXObject.mm (20655 => 20656)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/bridge/mac/WebCoreAXObject.mm        2007-04-02 17:36:11 UTC (rev 20655)
+++ trunk/WebCore/bridge/mac/WebCoreAXObject.mm        2007-04-02 17:36:20 UTC (rev 20656)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx"> #import &quot;DOMInternal.h&quot;
</span><span class="cx"> #import &quot;Document.h&quot;
</span><span class="cx"> #import &quot;EventNames.h&quot;
</span><ins>+#import &quot;FocusController.h&quot;
</ins><span class="cx"> #import &quot;FontData.h&quot;
</span><span class="cx"> #import &quot;FrameLoader.h&quot;
</span><span class="cx"> #import &quot;Frame.h&quot;
</span><span class="lines">@@ -45,6 +46,7 @@
</span><span class="cx"> #import &quot;HitTestRequest.h&quot;
</span><span class="cx"> #import &quot;HitTestResult.h&quot;
</span><span class="cx"> #import &quot;LocalizedStrings.h&quot;
</span><ins>+#import &quot;Page.h&quot;
</ins><span class="cx"> #import &quot;RenderImage.h&quot;
</span><span class="cx"> #import &quot;RenderListMarker.h&quot;
</span><span class="cx"> #import &quot;RenderMenuList.h&quot;
</span><span class="lines">@@ -964,17 +966,17 @@
</span><span class="cx">     return [self textMarkerRangeFromMarkers: startTextMarker andEndMarker:endTextMarker];
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-- (Document*)topDocument
</del><ins>+- (RenderObject*)topRenderer
</ins><span class="cx"> {
</span><del>-    return m_renderer-&gt;document()-&gt;topDocument();
</del><ins>+    return m_renderer-&gt;document()-&gt;topDocument()-&gt;renderer();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-- (RenderObject*)topRenderer
</del><ins>+- (FrameView*)frameView
</ins><span class="cx"> {
</span><del>-    return m_renderer-&gt;document()-&gt;topDocument()-&gt;renderer();
</del><ins>+    return m_renderer-&gt;document()-&gt;view();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-- (FrameView*)topView
</del><ins>+- (FrameView*)topFrameView
</ins><span class="cx"> {
</span><span class="cx">     return m_renderer-&gt;document()-&gt;topDocument()-&gt;renderer()-&gt;view()-&gt;frameView();
</span><span class="cx"> }
</span><span class="lines">@@ -1095,32 +1097,24 @@
</span><span class="cx">     if ([attributeName isEqualToString: NSAccessibilityWindowAttribute]) {
</span><span class="cx">         if (m_renderer &amp;&amp; m_renderer-&gt;view() &amp;&amp; m_renderer-&gt;view()-&gt;frameView())
</span><span class="cx">             return [m_renderer-&gt;view()-&gt;frameView()-&gt;getView() window];
</span><ins>+
</ins><span class="cx">         return nil;
</span><span class="cx">     }
</span><span class="cx">     
</span><span class="cx">     if ([attributeName isEqualToString: @&quot;AXSelectedTextMarkerRange&quot;]) {
</span><del>-        // get the selection from the document part
-        // NOTE: BUG support nested WebAreas, like in &lt;http://webcourses.niu.edu/&gt;
-        // (there is a web archive of this page attached to &lt;rdar://problem/3888973&gt;)
-        // Trouble is we need to know which document view to ask.
-        Selection selection = [self topView]-&gt;frame()-&gt;selectionController()-&gt;selection();
-        if (selection.isNone()) {
-            FrameView* view = m_renderer-&gt;document()-&gt;renderer()-&gt;view()-&gt;frameView();
-            if (!view)
-                return nil;
-            selection = view-&gt;frame()-&gt;selectionController()-&gt;selection();
-            if (selection.isNone())
-                return nil;
-        }
-        
-        return (id) [self textMarkerRangeFromVisiblePositions:selection.visibleStart() andEndPos:selection.visibleEnd()];
</del><ins>+        // get the selection from the document
+        Selection selection = [self frameView]-&gt;frame()-&gt;selectionController()-&gt;selection();
+        if (selection.isNone())
+            return nil;
+
+        return (id) [self textMarkerRangeFromVisiblePositions:selection.visibleStart() andEndPos:selection.visibleEnd()];        
</ins><span class="cx">     }
</span><span class="cx">     
</span><span class="cx">     if ([attributeName isEqualToString: @&quot;AXStartTextMarker&quot;])
</span><del>-        return (id) [self textMarkerForVisiblePosition: startOfDocument(m_renderer-&gt;document()-&gt;topDocument())];
</del><ins>+        return (id) [self textMarkerForVisiblePosition: startOfDocument(m_renderer-&gt;document())];
</ins><span class="cx"> 
</span><span class="cx">     if ([attributeName isEqualToString: @&quot;AXEndTextMarker&quot;])
</span><del>-        return (id) [self textMarkerForVisiblePosition: endOfDocument(m_renderer-&gt;document()-&gt;topDocument())];
</del><ins>+        return (id) [self textMarkerForVisiblePosition: endOfDocument(m_renderer-&gt;document())];
</ins><span class="cx"> 
</span><span class="cx">     return nil;
</span><span class="cx"> }
</span><span class="lines">@@ -1235,7 +1229,7 @@
</span><span class="cx">     // iterate over the lines
</span><span class="cx">     // NOTE: BUG this is wrong when lineNumber is lineCount+1,  because nextLinePosition takes you to the
</span><span class="cx">     // last offset of the last line
</span><del>-    VisiblePosition visiblePos = [self topRenderer]-&gt;positionForCoordinates(0, 0);
</del><ins>+    VisiblePosition visiblePos = m_renderer-&gt;document()-&gt;renderer()-&gt;positionForCoordinates(0, 0);
</ins><span class="cx">     VisiblePosition savedVisiblePos;
</span><span class="cx">     while (--lineCount != 0) {
</span><span class="cx">         savedVisiblePos = visiblePos;
</span><span class="lines">@@ -1276,10 +1270,10 @@
</span><span class="cx"> - (id)doAXTextMarkerForPosition: (NSPoint) point
</span><span class="cx"> {
</span><span class="cx">     // convert absolute point to view coordinates
</span><del>-    FrameView* docView = [self topView];
-    NSView* view = docView-&gt;getDocumentView();
</del><ins>+    FrameView* frameView = [self topFrameView];
+    NSView* view = frameView-&gt;getDocumentView();
</ins><span class="cx">     RenderObject* renderer = [self topRenderer];
</span><del>-    Node* innerNode = NULL;
</del><ins>+    Node* innerNode = 0;
</ins><span class="cx">     
</span><span class="cx">     // locate the node containing the point
</span><span class="cx">     IntPoint pointResult;
</span><span class="lines">@@ -1313,8 +1307,8 @@
</span><span class="cx">         if (!document)
</span><span class="cx">             break;
</span><span class="cx">         renderer = document-&gt;renderer();
</span><del>-        docView = static_cast&lt;FrameView*&gt;(widget);
-        view = docView-&gt;getDocumentView();
</del><ins>+        frameView = static_cast&lt;FrameView*&gt;(widget);
+        view = frameView-&gt;getDocumentView();
</ins><span class="cx">     }
</span><span class="cx">     
</span><span class="cx">     // get position within the node
</span><span class="lines">@@ -1324,7 +1318,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (id)doAXBoundsForTextMarkerRange: (WebCoreTextMarkerRange*) textMarkerRange
</span><span class="cx"> {
</span><del>-
</del><span class="cx">     // extract the start and end VisiblePosition
</span><span class="cx">     VisiblePosition startVisiblePosition = [self visiblePositionForStartOfTextMarkerRange: textMarkerRange];
</span><span class="cx">     if (startVisiblePosition.isNull())
</span><span class="lines">@@ -1333,27 +1326,26 @@
</span><span class="cx">     VisiblePosition endVisiblePosition = [self visiblePositionForEndOfTextMarkerRange: textMarkerRange];
</span><span class="cx">     if (endVisiblePosition.isNull())
</span><span class="cx">         return nil;
</span><del>-    
</del><ins>+
</ins><span class="cx">     IntRect rect1 = startVisiblePosition.caretRect();
</span><span class="cx">     IntRect rect2 = endVisiblePosition.caretRect();
</span><span class="cx">     IntRect ourrect = rect1;
</span><span class="cx">     ourrect.unite(rect2);
</span><span class="cx"> 
</span><del>-    // try to use the document view from the selection, so that nested WebAreas work,
</del><ins>+    // try to use the document view from the first position, so that nested WebAreas work,
</ins><span class="cx">     // but fall back to the top level doc if we do not find it easily
</span><del>-    FrameView* docView = NULL;
</del><ins>+    FrameView* frameView = 0;
</ins><span class="cx">     RenderObject* renderer = startVisiblePosition.deepEquivalent().node()-&gt;renderer();
</span><span class="cx">     if (renderer) {
</span><span class="cx">         Document* doc = renderer-&gt;document();
</span><span class="cx">         if (doc)
</span><del>-            docView = doc-&gt;view();
</del><ins>+            frameView = doc-&gt;view();
</ins><span class="cx">     }
</span><del>-    if (!docView)
-        docView = [self topView];
-    NSView* view = docView-&gt;getView();
</del><ins>+    if (!frameView)
+        frameView = [self frameView];
+    NSView* view = frameView-&gt;getView();
</ins><span class="cx"> 
</span><del>-    // if the selection spans lines, the rectangle is to extend
-    // across the width of the view
</del><ins>+    // if the rectangle spans lines, it is to extend across the width of the view
</ins><span class="cx">     if (rect1.bottom() != rect2.bottom()) {
</span><span class="cx">         ourrect.setX(static_cast&lt;int&gt;([view frame].origin.x));
</span><span class="cx">         ourrect.setWidth(static_cast&lt;int&gt;([view frame].size.width));
</span><span class="lines">@@ -1361,10 +1353,10 @@
</span><span class="cx">  
</span><span class="cx">     // convert our rectangle to screen coordinates
</span><span class="cx">     NSRect rect = ourrect;
</span><del>-    rect = NSOffsetRect(rect, -docView-&gt;contentsX(), -docView-&gt;contentsY());
</del><ins>+    rect = NSOffsetRect(rect, -frameView-&gt;contentsX(), -frameView-&gt;contentsY());
</ins><span class="cx">     rect = [view convertRect:rect toView:nil];
</span><span class="cx">     rect.origin = [[view window] convertBaseToScreen:rect.origin];
</span><del>-   
</del><ins>+
</ins><span class="cx">     // return the converted rect
</span><span class="cx">     return [NSValue valueWithRect:rect];
</span><span class="cx"> }
</span><span class="lines">@@ -1393,10 +1385,10 @@
</span><span class="cx"> 
</span><span class="cx"> static void AXAttributeStringSetColor(NSMutableAttributedString* attrString, NSString* attribute, NSColor* color, NSRange range)
</span><span class="cx"> {
</span><del>-    if (color != nil) {
</del><ins>+    if (color) {
</ins><span class="cx">         CGColorRef existingColor = (CGColorRef) [attrString attribute:attribute atIndex:range.location effectiveRange:nil];
</span><span class="cx">         CGColorRef cgColor = CreateCGColorIfDifferent(color, existingColor);
</span><del>-        if (cgColor != NULL) {
</del><ins>+        if (cgColor) {
</ins><span class="cx">             [attrString addAttribute:attribute value:(id)cgColor range:range];
</span><span class="cx">             CGColorRelease(cgColor);
</span><span class="cx">         }
</span><span class="lines">@@ -1406,7 +1398,7 @@
</span><span class="cx"> 
</span><span class="cx"> static void AXAttributeStringSetNumber(NSMutableAttributedString* attrString, NSString* attribute, NSNumber* number, NSRange range)
</span><span class="cx"> {
</span><del>-    if (number != nil)
</del><ins>+    if (number)
</ins><span class="cx">         [attrString addAttribute:attribute value:number range:range];
</span><span class="cx">     else
</span><span class="cx">         [attrString removeAttribute:attribute range:range];
</span><span class="lines">@@ -1416,7 +1408,7 @@
</span><span class="cx"> {
</span><span class="cx">     NSDictionary* dict;
</span><span class="cx">     
</span><del>-    if (font != nil) {
</del><ins>+    if (font) {
</ins><span class="cx">         dict = [NSDictionary dictionaryWithObjectsAndKeys:
</span><span class="cx">             [font fontName]                             , NSAccessibilityFontNameKey,
</span><span class="cx">             [font familyName]                           , NSAccessibilityFontFamilyKey,
</span><span class="lines">@@ -1451,7 +1443,7 @@
</span><span class="cx">         [attrString removeAttribute:NSAccessibilitySuperscriptTextAttribute range:range];
</span><span class="cx">     
</span><span class="cx">     // set shadow
</span><del>-    if (style-&gt;textShadow() != nil)
</del><ins>+    if (style-&gt;textShadow())
</ins><span class="cx">         AXAttributeStringSetNumber(attrString, NSAccessibilityShadowTextAttribute, [NSNumber numberWithBool:YES], range);
</span><span class="cx">     else
</span><span class="cx">         [attrString removeAttribute:NSAccessibilityShadowTextAttribute range:range];
</span><span class="lines">@@ -1508,10 +1500,10 @@
</span><span class="cx"> 
</span><span class="cx"> static void AXAttributeStringSetElement(NSMutableAttributedString* attrString, NSString* attribute, id element, NSRange range)
</span><span class="cx"> {
</span><del>-    if (element != nil) {
</del><ins>+    if (element) {
</ins><span class="cx">         // make a serialiazable AX object
</span><span class="cx">         AXUIElementRef axElement = [[WebCoreViewFactory sharedFactory] AXUIElementForElement:element];
</span><del>-        if (axElement != NULL) {
</del><ins>+        if (axElement) {
</ins><span class="cx">             [attrString addAttribute:attribute value:(id)axElement range:range];
</span><span class="cx">             CFRelease(axElement);
</span><span class="cx">         }
</span><span class="lines">@@ -2358,15 +2350,15 @@
</span><span class="cx"> 
</span><span class="cx">     Frame* frame = [bridge _frame];
</span><span class="cx">     if (!frame)
</span><del>-        return NULL;
</del><ins>+        return nil;
</ins><span class="cx">         
</span><span class="cx">     Document* document = frame-&gt;document();
</span><span class="cx">     if (!document)
</span><del>-        return NULL;
</del><ins>+        return nil;
</ins><span class="cx">         
</span><span class="cx">     Node* node = document-&gt;ownerElement();
</span><span class="cx">     if (!node)
</span><del>-        return NULL;
</del><ins>+        return nil;
</ins><span class="cx"> 
</span><span class="cx">     return node-&gt;renderer();
</span><span class="cx"> }
</span><span class="lines">@@ -2385,11 +2377,16 @@
</span><span class="cx"> 
</span><span class="cx"> - (id)accessibilityFocusedUIElement
</span><span class="cx"> {
</span><del>-    // NOTE: BUG support nested WebAreas
-    Node* focusedNode = m_renderer-&gt;document()-&gt;focusedNode();
-    if (!focusedNode || !focusedNode-&gt;renderer())
</del><ins>+    // get the focused node in the page
+    Page* page = m_renderer-&gt;document()-&gt;page();
+    if (!page)
</ins><span class="cx">         return nil;
</span><span class="cx"> 
</span><ins>+    Document* focusedDocument = page-&gt;focusController()-&gt;focusedOrMainFrame()-&gt;document();
+    Node* focusedNode = focusedDocument-&gt;focusedNode();
+    if (!focusedNode || !focusedNode-&gt;renderer())
+        focusedNode = focusedDocument;
+
</ins><span class="cx">     WebCoreAXObject* obj = focusedNode-&gt;renderer()-&gt;document()-&gt;axObjectCache()-&gt;get(focusedNode-&gt;renderer());
</span><span class="cx">     
</span><span class="cx">     // the HTML element, for example, is focusable but has an AX object that is ignored
</span><span class="lines">@@ -2411,9 +2408,8 @@
</span><span class="cx">         return;
</span><span class="cx">     
</span><span class="cx">     // make selection and tell the document to use it
</span><del>-    // NOTE: BUG support nested WebAreas
</del><span class="cx">     Selection newSelection = Selection(startVisiblePosition, endVisiblePosition);
</span><del>-    [self topDocument]-&gt;frame()-&gt;selectionController()-&gt;setSelection(newSelection);
</del><ins>+    m_renderer-&gt;document()-&gt;frame()-&gt;selectionController()-&gt;setSelection(newSelection);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (BOOL)canSetFocusAttribute
</span></span></pre>
</div>
</div>

</body>
</html>