[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198
cfleizach at apple.com
cfleizach at apple.com
Mon Feb 21 00:34:12 UTC 2011
The following commit has been merged in the webkit-1.3 branch:
commit a0d34a3c53914b9be2c163f582c10fc6a26de46f
Author: cfleizach at apple.com <cfleizach at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Feb 1 22:37:29 2011 +0000
AX: AXPosition of AXScrollArea is wrong
https://bugs.webkit.org/show_bug.cgi?id=53511
Reviewed by Darin Adler.
Source/WebCore:
AccessibilityScrollView needed to return a valid documentFrameView() object.
At the same time, the code from document() should be consolidated in
AccessibilityObject, so all objects can use it.
Test: platform/mac/accessibility/webkit-scrollarea-position.html
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::document):
* accessibility/AccessibilityObject.h:
* accessibility/AccessibilityScrollView.cpp:
(WebCore::AccessibilityScrollView::accessibilityHitTest):
(WebCore::AccessibilityScrollView::documentFrameView):
* accessibility/AccessibilityScrollView.h:
LayoutTests:
* platform/mac/accessibility/webkit-scrollarea-position-expected.txt: Added.
* platform/mac/accessibility/webkit-scrollarea-position.html: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77308 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 8f29128..c7884de 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+2011-02-01 Chris Fleizach <cfleizach at apple.com>
+
+ Reviewed by Darin Adler.
+
+ AX: AXPosition of AXScrollArea is wrong
+ https://bugs.webkit.org/show_bug.cgi?id=53511
+
+ * platform/mac/accessibility/webkit-scrollarea-position-expected.txt: Added.
+ * platform/mac/accessibility/webkit-scrollarea-position.html: Added.
+
2011-02-01 Dimitri Glazkov <dglazkov at chromium.org>
Added yet another expectations of flakiness.
diff --git a/LayoutTests/platform/mac/accessibility/webkit-scrollarea-position-expected.txt b/LayoutTests/platform/mac/accessibility/webkit-scrollarea-position-expected.txt
new file mode 100644
index 0000000..3c49a7c
--- /dev/null
+++ b/LayoutTests/platform/mac/accessibility/webkit-scrollarea-position-expected.txt
@@ -0,0 +1,16 @@
+text
+
+text
+This tests that the WebKit generated scroll areas are correct.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS scroll.role is 'AXRole: AXScrollArea'
+PASS web.role is 'AXRole: AXWebArea'
+PASS scroll.y > web.y is true
+PASS scroll.y > initialScrollY is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/platform/mac/accessibility/webkit-scrollarea-position.html b/LayoutTests/platform/mac/accessibility/webkit-scrollarea-position.html
new file mode 100644
index 0000000..5a1a3f4
--- /dev/null
+++ b/LayoutTests/platform/mac/accessibility/webkit-scrollarea-position.html
@@ -0,0 +1,50 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../../fast/js/resources/js-test-style.css">
+<script>
+var successfullyParsed = false;
+</script>
+<script src="../../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body id="body">
+
+<div tabindex="0" id="text1">text</div>
+<img src='resources/cake.png' width=5000 height=5000>
+<br>
+<div tabindex="0" id="text2">text</div>
+
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+
+ description("This tests that the WebKit generated scroll areas are correct.");
+
+ if (window.accessibilityController) {
+
+ // Cause scroll position to be at the top.
+ document.getElementById("text1").focus();
+
+ var scroll = accessibilityController.rootElement;
+ var web = scroll.childAtIndex(0);
+ shouldBe("scroll.role", "'AXRole: AXScrollArea'");
+ shouldBe("web.role", "'AXRole: AXWebArea'");
+
+ var initialScrollY = scroll.y;
+
+ // Cause focus to scroll down.
+ document.getElementById("text2").focus();
+
+ // Since focus() should have scrolled down, the scroll.y should be greater than web.x
+ // and it should be greater than the initial scroll.y position.
+ shouldBeTrue("scroll.y > web.y");
+ shouldBeTrue("scroll.y > initialScrollY");
+ }
+
+ successfullyParsed = true;
+</script>
+
+<script src="../../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 37a5a25..ad106bb 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,24 @@
+2011-02-01 Chris Fleizach <cfleizach at apple.com>
+
+ Reviewed by Darin Adler.
+
+ AX: AXPosition of AXScrollArea is wrong
+ https://bugs.webkit.org/show_bug.cgi?id=53511
+
+ AccessibilityScrollView needed to return a valid documentFrameView() object.
+ At the same time, the code from document() should be consolidated in
+ AccessibilityObject, so all objects can use it.
+
+ Test: platform/mac/accessibility/webkit-scrollarea-position.html
+
+ * accessibility/AccessibilityObject.cpp:
+ (WebCore::AccessibilityObject::document):
+ * accessibility/AccessibilityObject.h:
+ * accessibility/AccessibilityScrollView.cpp:
+ (WebCore::AccessibilityScrollView::accessibilityHitTest):
+ (WebCore::AccessibilityScrollView::documentFrameView):
+ * accessibility/AccessibilityScrollView.h:
+
2011-02-01 Zhenyao Mo <zmo at google.com>
Reviewed by Darin Adler.
diff --git a/Source/WebCore/accessibility/AccessibilityObject.cpp b/Source/WebCore/accessibility/AccessibilityObject.cpp
index 1ceadd8..79ee405 100644
--- a/Source/WebCore/accessibility/AccessibilityObject.cpp
+++ b/Source/WebCore/accessibility/AccessibilityObject.cpp
@@ -718,6 +718,15 @@ unsigned AccessibilityObject::doAXLineForIndex(unsigned index)
{
return lineForPosition(visiblePositionForIndex(index, false));
}
+
+Document* AccessibilityObject::document() const
+{
+ FrameView* frameView = documentFrameView();
+ if (!frameView)
+ return 0;
+
+ return frameView->frame()->document();
+}
FrameView* AccessibilityObject::documentFrameView() const
{
diff --git a/Source/WebCore/accessibility/AccessibilityObject.h b/Source/WebCore/accessibility/AccessibilityObject.h
index c8d887b..4d3f7ca 100644
--- a/Source/WebCore/accessibility/AccessibilityObject.h
+++ b/Source/WebCore/accessibility/AccessibilityObject.h
@@ -436,7 +436,7 @@ public:
const String& actionVerb() const;
virtual Widget* widget() const { return 0; }
virtual Widget* widgetForAttachmentView() const { return 0; }
- virtual Document* document() const { return 0; }
+ virtual Document* document() const;
virtual FrameView* topDocumentFrameView() const { return 0; }
virtual FrameView* documentFrameView() const;
String language() const;
diff --git a/Source/WebCore/accessibility/AccessibilityScrollView.cpp b/Source/WebCore/accessibility/AccessibilityScrollView.cpp
index c9dcbb6..5b94fe3 100644
--- a/Source/WebCore/accessibility/AccessibilityScrollView.cpp
+++ b/Source/WebCore/accessibility/AccessibilityScrollView.cpp
@@ -136,20 +136,20 @@ AccessibilityObject* AccessibilityScrollView::accessibilityHitTest(const IntPoin
return webArea->accessibilityHitTest(point);
}
-
-Document* AccessibilityScrollView::document() const
-{
- if (!m_scrollView->isFrameView())
- return 0;
-
- return static_cast<FrameView*>(m_scrollView.get())->frame()->document();
-}
IntRect AccessibilityScrollView::elementRect() const
{
return m_scrollView->frameRect();
}
+FrameView* AccessibilityScrollView::documentFrameView() const
+{
+ if (!m_scrollView->isFrameView())
+ return 0;
+
+ return static_cast<FrameView*>(m_scrollView.get());
+}
+
AccessibilityObject* AccessibilityScrollView::parentObject() const
{
if (!m_scrollView->isFrameView())
diff --git a/Source/WebCore/accessibility/AccessibilityScrollView.h b/Source/WebCore/accessibility/AccessibilityScrollView.h
index e32cd1c..f19bde8 100644
--- a/Source/WebCore/accessibility/AccessibilityScrollView.h
+++ b/Source/WebCore/accessibility/AccessibilityScrollView.h
@@ -47,11 +47,11 @@ private:
virtual bool isAccessibilityScrollView() const { return true; }
virtual AccessibilityObject* scrollBar(AccessibilityOrientation) const;
virtual void addChildren();
- virtual Document* document() const;
virtual AccessibilityObject* accessibilityHitTest(const IntPoint&) const;
virtual const AccessibilityChildrenVector& children();
virtual void updateChildrenIfNecessary();
+ virtual FrameView* documentFrameView() const;
virtual IntRect elementRect() const;
virtual AccessibilityObject* parentObject() const;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list