Changeset 15965 in webkit
- Timestamp:
- Aug 22, 2006, 5:47:26 AM (18 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r15964 r15965 1 2006-08-22 David Harrison <harrison@apple.com> 2 3 Reviewed by Maciej. 4 5 <rdar://problem/4407336> Some non-text elements return AXTextMarkerRangeForUIElement with equal start and end marker 6 7 * bridge/mac/WebCoreAXObject.mm: 8 (-[WebCoreAXObject textMarkerRange]): 9 Use 0 and maxDeepOffset(), instead of caretMinOffset() and caretMaxRenderedOffset(). 10 Check for VisiblePositions being equal. If so, adjust end one to its next(). 11 That happens with, e.g., buttons. 12 1 13 2006-08-22 Rob Buis <buis@kde.org> 2 14 -
trunk/WebCore/bridge/mac/WebCoreAXObject.mm
r15959 r15965 34 34 #import "HTMLAreaElement.h" 35 35 #import "HTMLCollection.h" 36 #import "htmlediting.h" 36 37 #import "HTMLFrameElement.h" 37 38 #import "HTMLInputElement.h" … … 787 788 if (!m_renderer) 788 789 return nil; 789 790 WebCoreTextMarker* startTextMarker = [self textMarkerForVisiblePosition: VisiblePosition(m_renderer->element(), m_renderer->caretMinOffset(), VP_DEFAULT_AFFINITY)]; 791 WebCoreTextMarker* endTextMarker = [self textMarkerForVisiblePosition: VisiblePosition(m_renderer->element(), m_renderer->caretMaxRenderedOffset(), VP_DEFAULT_AFFINITY)]; 790 791 // construct VisiblePositions for start and end 792 Node* node = m_renderer->element(); 793 VisiblePosition visiblePos1 = VisiblePosition(node, 0, VP_DEFAULT_AFFINITY); 794 VisiblePosition visiblePos2 = VisiblePosition(node, maxDeepOffset(node), VP_DEFAULT_AFFINITY); 795 796 // the VisiblePositions are equal for nodes like buttons, so adjust for that 797 if (visiblePos1 == visiblePos2) { 798 visiblePos2 = visiblePos2.next(); 799 if (visiblePos2.isNull()) 800 visiblePos2 = visiblePos1; 801 } 802 803 WebCoreTextMarker* startTextMarker = [self textMarkerForVisiblePosition: visiblePos1]; 804 WebCoreTextMarker* endTextMarker = [self textMarkerForVisiblePosition: visiblePos2]; 792 805 return [self textMarkerRangeFromMarkers: startTextMarker andEndMarker:endTextMarker]; 793 806 }
Note:
See TracChangeset
for help on using the changeset viewer.