Changeset 173548 in webkit
- Timestamp:
- Sep 11, 2014, 5:32:05 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/platform/mac-wk2/accessibility/content-inset-scrollview-frame-expected.txt (modified) (1 diff)
-
LayoutTests/platform/mac-wk2/accessibility/content-inset-scrollview-frame.html (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/accessibility/AccessibilityScrollView.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r173537 r173548 1 2014-09-11 Chris Fleizach <cfleizach@apple.com> 2 3 AX: Size of web view in Safari as reported by AX changes when adding/removing bars is wrong 4 https://bugs.webkit.org/show_bug.cgi?id=136756 5 6 Reviewed by Beth Dakin. 7 8 * platform/mac-wk2/accessibility/content-inset-scrollview-frame-expected.txt: 9 * platform/mac-wk2/accessibility/content-inset-scrollview-frame.html: 10 1 11 2014-09-11 Commit Queue <commit-queue@webkit.org> 2 12 -
trunk/LayoutTests/platform/mac-wk2/accessibility/content-inset-scrollview-frame-expected.txt
r169093 r173548 6 6 The position of the web area and the scroll view should be the same when there's no content inset 7 7 PASS webX == scrollViewX && webY == scrollViewY is true 8 9 8 10 After setting the content inset, the new y position should be less than the initial 9 PASS scrollViewY - scrollView.y is 100 11 PASS newScrollViewY - scrollViewY is 100 12 13 14 The content inset also reduces the height of the scroll view, which should be reflected here. 15 PASS scrollViewHeight > newScrollViewHeight is true 16 17 10 18 PASS successfullyParsed is true 11 19 -
trunk/LayoutTests/platform/mac-wk2/accessibility/content-inset-scrollview-frame.html
r169093 r173548 16 16 var webArea = accessibilityController.rootElement.childAtIndex(0); 17 17 var webX = webArea.x; 18 var webY = webArea.y ;18 var webY = webArea.y - webArea.height; 19 19 20 20 var scrollView = webArea.parentElement(); 21 21 var scrollViewX = scrollView.x; 22 var scrollViewY = scrollView.y; 23 22 // to get what the y that we're expecting, we need to subtract the height, because Cocoa requires the bottom point to be consider the y origin. 23 var scrollViewY = scrollView.y - scrollView.height; 24 var scrollViewHeight = scrollView.height; 25 24 26 debug("The position of the web area and the scroll view should be the same when there's no content inset"); 25 27 shouldBeTrue("webX == scrollViewX && webY == scrollViewY"); 28 debug("\n"); 26 29 27 30 window.internals.setTopContentInset(100); 28 31 32 var newScrollViewHeight = scrollView.height; 33 var newScrollViewY = scrollView.y - scrollView.height; 29 34 debug("After setting the content inset, the new y position should be less than the initial"); 30 shouldBe("scrollViewY - scrollView.y", "100") 35 shouldBe("newScrollViewY - scrollViewY", "100") 36 debug("\n"); 37 38 debug("The content inset also reduces the height of the scroll view, which should be reflected here."); 39 shouldBeTrue("scrollViewHeight > newScrollViewHeight"); 40 debug("\n"); 31 41 } 32 42 </script> -
trunk/Source/WebCore/ChangeLog
r173546 r173548 1 2014-09-11 Chris Fleizach <cfleizach@apple.com> 2 3 AX: Size of web view in Safari as reported by AX changes when adding/removing bars is wrong 4 https://bugs.webkit.org/show_bug.cgi?id=136756 5 6 Reviewed by Beth Dakin. 7 8 topContentInset not only seems to push the scroll view's origin down, but it also shrinks its height as well, which 9 was not accounted for in the original fix. 10 11 Modified: platform/mac-wk2/accessibility/content-inset-scrollview-frame.html 12 13 * accessibility/AccessibilityScrollView.cpp: 14 (WebCore::AccessibilityScrollView::elementRect): 15 1 16 2014-09-11 Roger Fong <roger_fong@apple.com> 2 17 -
trunk/Source/WebCore/accessibility/AccessibilityScrollView.cpp
r171477 r173548 223 223 224 224 LayoutRect rect = m_scrollView->frameRect(); 225 rect.setY(rect.y() + m_scrollView->topContentInset()); 225 float topContentInset = m_scrollView->topContentInset(); 226 // Top content inset pushes the frame down and shrinks it. 227 rect.move(0, topContentInset); 228 rect.contract(0, topContentInset); 226 229 return rect; 227 230 }
Note:
See TracChangeset
for help on using the changeset viewer.