[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.18-1-697-g2f78b87
cfleizach at apple.com
cfleizach at apple.com
Wed Jan 20 22:17:40 UTC 2010
The following commit has been merged in the debian/unstable branch:
commit 02f75ec77e94cd241333b67bf1b81dbee571230b
Author: cfleizach at apple.com <cfleizach at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Jan 8 20:31:19 2010 +0000
AX: CSS content not returned correctly in AX
https://bugs.webkit.org/show_bug.cgi?id=33308
Reviewed by Beth Dakin.
WebCore:
Test: platform/mac/accessibility/css-content-attribute.html
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::textUnderElement):
LayoutTests:
* platform/mac/accessibility/css-content-attribute-expected.txt: Added.
* platform/mac/accessibility/css-content-attribute.html: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53000 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index e576c39..1581904 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+2010-01-08 Chris Fleizach <cfleizach at apple.com>
+
+ Reviewed by Beth Dakin.
+
+ AX: CSS content not returned correctly in AX
+ https://bugs.webkit.org/show_bug.cgi?id=33308
+
+ * platform/mac/accessibility/css-content-attribute-expected.txt: Added.
+ * platform/mac/accessibility/css-content-attribute.html: Added.
+
2010-01-06 Ojan Vafai <ojan at chromium.org>
Reviewed by Eric Seidel.
diff --git a/LayoutTests/platform/mac/accessibility/css-content-attribute-expected.txt b/LayoutTests/platform/mac/accessibility/css-content-attribute-expected.txt
new file mode 100644
index 0000000..1508415
--- /dev/null
+++ b/LayoutTests/platform/mac/accessibility/css-content-attribute-expected.txt
@@ -0,0 +1,17 @@
+SAMPLE
+
+This tests that when the content attribute in CSS is used, the correct values are returned.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS body.childAtIndex(0).childAtIndex(0).role is 'AXRole: AXStaticText'
+PASS body.childAtIndex(0).childAtIndex(1).role is 'AXRole: AXStaticText'
+PASS body.childAtIndex(0).childAtIndex(2).role is 'AXRole: AXStaticText'
+PASS body.childAtIndex(0).childAtIndex(0).stringValue is 'AXValue: This is a'
+PASS body.childAtIndex(0).childAtIndex(1).stringValue is 'AXValue: SAMPLE'
+PASS body.childAtIndex(0).childAtIndex(2).stringValue is 'AXValue: Headline'
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/platform/mac/accessibility/css-content-attribute.html b/LayoutTests/platform/mac/accessibility/css-content-attribute.html
new file mode 100644
index 0000000..d0e2c47
--- /dev/null
+++ b/LayoutTests/platform/mac/accessibility/css-content-attribute.html
@@ -0,0 +1,53 @@
+<!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>
+
+ <style type="text/css">
+
+ h1:before {
+ content: 'This is a';
+ }
+
+ h1:after {
+ content: 'Headline';
+ }
+
+ </style>
+
+</head>
+<body id="body">
+<h1>SAMPLE</h1>
+
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+
+ description("This tests that when the content attribute in CSS is used, the correct values are returned.");
+
+ if (window.accessibilityController) {
+
+ document.getElementById("body").focus();
+ var body = accessibilityController.focusedElement;
+
+ // Test that all three children in the header appear with the correct values.
+ shouldBe("body.childAtIndex(0).childAtIndex(0).role", "'AXRole: AXStaticText'");
+ shouldBe("body.childAtIndex(0).childAtIndex(1).role", "'AXRole: AXStaticText'");
+ shouldBe("body.childAtIndex(0).childAtIndex(2).role", "'AXRole: AXStaticText'");
+
+ shouldBe("body.childAtIndex(0).childAtIndex(0).stringValue", "'AXValue: This is a'");
+ shouldBe("body.childAtIndex(0).childAtIndex(1).stringValue", "'AXValue: SAMPLE'");
+ shouldBe("body.childAtIndex(0).childAtIndex(2).stringValue", "'AXValue: Headline'");
+ }
+
+ successfullyParsed = true;
+</script>
+
+<script src="../../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index effa7fb..62d1bbe 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,15 @@
+2010-01-08 Chris Fleizach <cfleizach at apple.com>
+
+ Reviewed by Beth Dakin.
+
+ AX: CSS content not returned correctly in AX
+ https://bugs.webkit.org/show_bug.cgi?id=33308
+
+ Test: platform/mac/accessibility/css-content-attribute.html
+
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::textUnderElement):
+
2010-01-08 Chris Marrin <cmarrin at apple.com>
Reviewed by Adam Roben.
diff --git a/WebCore/accessibility/AccessibilityRenderObject.cpp b/WebCore/accessibility/AccessibilityRenderObject.cpp
index 3f00dd7..b60fe9c 100644
--- a/WebCore/accessibility/AccessibilityRenderObject.cpp
+++ b/WebCore/accessibility/AccessibilityRenderObject.cpp
@@ -65,6 +65,7 @@
#include "RenderMenuList.h"
#include "RenderText.h"
#include "RenderTextControl.h"
+#include "RenderTextFragment.h"
#include "RenderTheme.h"
#include "RenderView.h"
#include "RenderWidget.h"
@@ -802,6 +803,14 @@ String AccessibilityRenderObject::textUnderElement() const
}
}
+ // Sometimes text fragments don't have Node's associated with them (like when
+ // CSS content is used to insert text).
+ if (m_renderer->isText()) {
+ RenderText* renderTextObject = toRenderText(m_renderer);
+ if (renderTextObject->isTextFragment())
+ return String(static_cast<RenderTextFragment*>(m_renderer)->contentString());
+ }
+
// return the null string for anonymous text because it is non-trivial to get
// the actual text and, so far, that is not needed
return String();
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list