Changeset 206854 in webkit
- Timestamp:
- Oct 6, 2016 1:03:43 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r206853 r206854 1 2016-10-06 Nan Wang <n_wang@apple.com> 2 3 AX:[Mac] Unable to edit text input, textarea fields in iframe using VO naivgation 4 https://bugs.webkit.org/show_bug.cgi?id=162999 5 6 Reviewed by Chris Fleizach. 7 8 * accessibility/mac/wk1-set-selected-text-marker-range-input-element-expected.txt: Added. 9 * accessibility/mac/wk1-set-selected-text-marker-range-input-element.html: Added. 10 1 11 2016-10-05 Yusuke Suzuki <utatane.tea@gmail.com> 2 12 -
trunk/Source/WebCore/ChangeLog
r206852 r206854 1 2016-10-06 Nan Wang <n_wang@apple.com> 2 3 AX:[Mac] Unable to edit text input, textarea fields in iframe using VO naivgation 4 https://bugs.webkit.org/show_bug.cgi?id=162999 5 6 Reviewed by Chris Fleizach. 7 8 In WebKit1, the top web area setting the selection to an input element inside an iframe 9 will make the input field not editable. The issue is that when the web area and the input element 10 have different documents, the setSelection function in FrameSelection will set the selection on 11 the input's frame and cause the caret to disappear. I fixed it by not setting the selection in such case. 12 13 Test: accessibility/mac/wk1-set-selected-text-marker-range-input-element.html 14 15 * accessibility/AccessibilityRenderObject.cpp: 16 (WebCore::AccessibilityRenderObject::setSelectedVisiblePositionRange): 17 1 18 2016-10-05 Commit Queue <commit-queue@webkit.org> 2 19 -
trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp
r206581 r206854 2035 2035 return boundsForRects(rect1, rect2, range); 2036 2036 } 2037 2038 bool AccessibilityRenderObject::isVisiblePositionRangeInDifferentDocument(const VisiblePositionRange& range) const 2039 { 2040 if (range.start.isNull() || range.end.isNull()) 2041 return false; 2042 2043 VisibleSelection newSelection = VisibleSelection(range.start, range.end); 2044 if (Document* newSelectionDocument = newSelection.base().document()) { 2045 if (RefPtr<Frame> newSelectionFrame = newSelectionDocument->frame()) { 2046 Frame* frame = this->frame(); 2047 if (!frame || (newSelectionFrame != frame && newSelectionDocument != frame->document())) 2048 return true; 2049 } 2050 } 2051 2052 return false; 2053 } 2037 2054 2038 2055 void AccessibilityRenderObject::setSelectedVisiblePositionRange(const VisiblePositionRange& range) const … … 2040 2057 if (range.start.isNull() || range.end.isNull()) 2041 2058 return; 2059 2060 // In WebKit1, when the top web area sets the selection to be an input element in an iframe, the caret will disappear. 2061 // FrameSelection::setSelectionWithoutUpdatingAppearance is setting the selection on the new frame in this case, and causing this behavior. 2062 if (isWebArea() && parentObject() && parentObject()->isAttachment()) { 2063 if (isVisiblePositionRangeInDifferentDocument(range)) 2064 return; 2065 } 2042 2066 2043 2067 // make selection and tell the document to use it. if it's zero length, then move to that position -
trunk/Source/WebCore/accessibility/AccessibilityRenderObject.h
r202961 r206854 174 174 IntRect boundsForRects(LayoutRect&, LayoutRect&, RefPtr<Range>) const; 175 175 void setSelectedVisiblePositionRange(const VisiblePositionRange&) const override; 176 bool isVisiblePositionRangeInDifferentDocument(const VisiblePositionRange&) const; 176 177 bool ariaHasPopup() const override; 177 178
Note: See TracChangeset
for help on using the changeset viewer.