WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
proposed fix - part 2 (addressed feedback from review)
72811-b.patch (text/plain), 11.32 KB, created by
Joanmarie Diggs
on 2012-08-27 02:21:28 PDT
(
hide
)
Description:
proposed fix - part 2 (addressed feedback from review)
Filename:
MIME Type:
Creator:
Joanmarie Diggs
Created:
2012-08-27 02:21:28 PDT
Size:
11.32 KB
patch
obsolete
>From 0af1be3cae69cfbdd0550463708772863e5ac1f8 Mon Sep 17 00:00:00 2001 >From: Joanmarie Diggs <jdiggs@igalia.com> >Date: Fri, 24 Aug 2012 23:02:42 -0400 >Subject: [PATCH] Fix for bug 72811 - part 2 > >--- > LayoutTests/ChangeLog | 19 ++++++ > .../aria-roles-unignored-expected.txt | 2 +- > .../gtk/accessibility/aria-roles-unignored.html | 4 +- > .../gtk/accessibility/media-element-expected.txt | 4 -- > .../platform/gtk/accessibility/spans-expected.txt | 36 ++++++++++ > LayoutTests/platform/gtk/accessibility/spans.html | 78 ++++++++++++++++++++++ > Source/WebCore/ChangeLog | 19 ++++++ > .../accessibility/AccessibilityRenderObject.cpp | 4 ++ > .../accessibility/gtk/AccessibilityObjectAtk.cpp | 5 ++ > .../gtk/WebKitAccessibleWrapperAtk.cpp | 2 +- > 10 files changed, 165 insertions(+), 8 deletions(-) > create mode 100644 LayoutTests/platform/gtk/accessibility/spans-expected.txt > create mode 100644 LayoutTests/platform/gtk/accessibility/spans.html > >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index d258f5c..d6a940b 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,22 @@ >+2012-08-27 Joanmarie Diggs <jdiggs@igalia.com> >+ >+ [Gtk] No accessible caret-moved events found in certain content >+ https://bugs.webkit.org/show_bug.cgi?id=72811 >+ >+ Part of the bug was due to extraneous accessible objects resulting >+ from unignored inline and block spans. >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Added new test, updated the results of one test to reflect the fix, >+ corrected a test with a mismatched element tag. >+ >+ * platform/gtk/accessibility/aria-roles-unignored-expected.txt: Corrected results having fixed tag. >+ * platform/gtk/accessibility/aria-roles-unignored.html: Fixed mismatched element tag. >+ * platform/gtk/accessibility/media-element-expected.txt: Updated to reflect removal of extraneous object. >+ * platform/gtk/accessibility/spans-expected.txt: Added. >+ * platform/gtk/accessibility/spans.html: Added. >+ > 2012-08-24 Florin Malita <fmalita@chromium.org> > > ASSERTION FAILED: !attached() in WebCore::Node::attach() >diff --git a/LayoutTests/platform/gtk/accessibility/aria-roles-unignored-expected.txt b/LayoutTests/platform/gtk/accessibility/aria-roles-unignored-expected.txt >index 3255164..f051c08 100644 >--- a/LayoutTests/platform/gtk/accessibility/aria-roles-unignored-expected.txt >+++ b/LayoutTests/platform/gtk/accessibility/aria-roles-unignored-expected.txt >@@ -18,7 +18,7 @@ PASS element.role is 'AXRole: label' > PASS element.role is 'AXRole: heading' > PASS element.role is 'AXRole: form' > PASS element.role is 'AXRole: push button' >-PASS element.role is 'AXRole: panel' >+PASS element.role is 'AXRole: section' > PASS element.role is 'AXRole: entry' > PASS successfullyParsed is true > >diff --git a/LayoutTests/platform/gtk/accessibility/aria-roles-unignored.html b/LayoutTests/platform/gtk/accessibility/aria-roles-unignored.html >index 96b35c9..6aff032 100644 >--- a/LayoutTests/platform/gtk/accessibility/aria-roles-unignored.html >+++ b/LayoutTests/platform/gtk/accessibility/aria-roles-unignored.html >@@ -14,7 +14,7 @@ > <form>A form with a button <button name="button" value="Button">Click me!</button></form> > <form role="button">Just a button <button name="button" value="Button">Click me!</button></form> > >-<div>Just some text inside a div</form> >+<div>Just some text inside a div</div> > <div role="textbox">This div is contains a textbox (an entry)</div> > > <p id="description"></p> >@@ -51,7 +51,7 @@ if (window.accessibilityController) { > > // Divs > element = webArea.childAtIndex(5); >- shouldBe("element.role", "'AXRole: panel'"); >+ shouldBe("element.role", "'AXRole: section'"); > element = webArea.childAtIndex(6); > shouldBe("element.role", "'AXRole: entry'"); > } >diff --git a/LayoutTests/platform/gtk/accessibility/media-element-expected.txt b/LayoutTests/platform/gtk/accessibility/media-element-expected.txt >index 81ecf17..0ab0277 100644 >--- a/LayoutTests/platform/gtk/accessibility/media-element-expected.txt >+++ b/LayoutTests/platform/gtk/accessibility/media-element-expected.txt >@@ -13,10 +13,6 @@ State at 'canplaythrough' event: > > > description: AXDescription: >- role: AXRole: panel >- >- >- description: AXDescription: > role: AXRole: slider > > >diff --git a/LayoutTests/platform/gtk/accessibility/spans-expected.txt b/LayoutTests/platform/gtk/accessibility/spans-expected.txt >new file mode 100644 >index 0000000..9294492 >--- /dev/null >+++ b/LayoutTests/platform/gtk/accessibility/spans-expected.txt >@@ -0,0 +1,36 @@ >+first block span >+inline span >+second block span >+first block span >+inline span >+second block span >+ >+first block span >+inline span >+second block span >+first block span >+inline span >+second block span >+This tests that both block spans and inline spans get folded into the parent object >+ >+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". >+ >+ >+PASS element.role is 'AXRole: heading' >+PASS element.childrenCount is 0 >+PASS element.role is 'AXRole: heading' >+PASS element.childrenCount is 1 >+PASS link.role is 'AXRole: link' >+PASS link.childrenCount is 0 >+PASS element.role is 'AXRole: list' >+PASS element.childrenCount is 2 >+PASS item.role is 'AXRole: list item' >+PASS item.childrenCount is 0 >+PASS item.role is 'AXRole: list item' >+PASS item.childrenCount is 1 >+PASS link.role is 'AXRole: link' >+PASS link.childrenCount is 0 >+PASS successfullyParsed is true >+ >+TEST COMPLETE >+ >diff --git a/LayoutTests/platform/gtk/accessibility/spans.html b/LayoutTests/platform/gtk/accessibility/spans.html >new file mode 100644 >index 0000000..2e72a0b >--- /dev/null >+++ b/LayoutTests/platform/gtk/accessibility/spans.html >@@ -0,0 +1,78 @@ >+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> >+<html> >+<head> >+<script src="../../../fast/js/resources/js-test-pre.js"></script> >+</head> >+<body id="body"> >+<h4> >+ <span style="display:block;">first block span</span> >+ <span>inline span</span> >+ <span style="display:block;">second block span</span> >+</h4> >+<h4> >+ <a href="foo"> >+ <span style="display:block;">first block span</span> >+ <span>inline span</span> >+ <span style="display:block;">second block span</span> >+ </a> >+</h4> >+<ol> >+ <li> >+ <span style="display:block;">first block span</span> >+ <span>inline span</span> >+ <span style="display:block;">second block span</span> >+ </li> >+ <li> >+ <a href="foo"> >+ <span style="display:block;">first block span</span> >+ <span>inline span</span> >+ <span style="display:block;">second block span</span> >+ </a> >+ </li> >+</ol> >+<p id="description"></p> >+<div id="console"></div> >+<script> >+description("This tests that both block spans and inline spans get folded into the parent object"); >+ >+if (window.layoutController) { >+ testRunner.dumpAsText(); >+} >+ >+if (window.accessibilityController) { >+ document.getElementById("body").focus(); >+ var webArea = accessibilityController.focusedElement; >+ >+ var element = webArea.childAtIndex(0); >+ shouldBe("element.role", "'AXRole: heading'"); >+ shouldBe("element.childrenCount", "0"); >+ >+ element = webArea.childAtIndex(1); >+ shouldBe("element.role", "'AXRole: heading'"); >+ shouldBe("element.childrenCount", "1"); >+ >+ var link = element.childAtIndex(0); >+ shouldBe("link.role", "'AXRole: link'"); >+ shouldBe("link.childrenCount", "0"); >+ >+ element = webArea.childAtIndex(2); >+ shouldBe("element.role", "'AXRole: list'"); >+ shouldBe("element.childrenCount", "2"); >+ >+ var item = element.childAtIndex(0); >+ shouldBe("item.role", "'AXRole: list item'"); >+ shouldBe("item.childrenCount", "0"); >+ >+ item = element.childAtIndex(1); >+ shouldBe("item.role", "'AXRole: list item'"); >+ shouldBe("item.childrenCount", "1"); >+ >+ link = item.childAtIndex(0); >+ shouldBe("link.role", "'AXRole: link'"); >+ shouldBe("link.childrenCount", "0"); >+} >+ >+</script> >+<script src="../../../fast/js/resources/js-test-post.js"></script> >+</body> >+</html> >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 60660f3..d56526f 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,22 @@ >+2012-08-27 Joanmarie Diggs <jdiggs@igalia.com> >+ >+ [Gtk] No accessible caret-moved events found in certain content >+ https://bugs.webkit.org/show_bug.cgi?id=72811 >+ >+ Part of the bug was due to extraneous accessible objects resulting >+ from unignored inline and block spans. >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Test: platform/gtk/accessibility/spans.html >+ >+ * accessibility/AccessibilityRenderObject.cpp: >+ (WebCore::AccessibilityRenderObject::accessibilityIsIgnored): Ignore objects that have spanTag tag name. >+ * accessibility/gtk/AccessibilityObjectAtk.cpp: >+ (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject): Ignore most anonymous blocks. >+ * accessibility/gtk/WebKitAccessibleWrapperAtk.cpp: >+ (roleIsTextType): Add ListItem to the roles which should implement AtkText. >+ > 2012-08-24 Helder Correia <helder.correia@nokia.com> > > [Texmap] Move TextureMapperGL to use GraphicsContext3D >diff --git a/Source/WebCore/accessibility/AccessibilityRenderObject.cpp b/Source/WebCore/accessibility/AccessibilityRenderObject.cpp >index 7fa5d3b..3475a67 100644 >--- a/Source/WebCore/accessibility/AccessibilityRenderObject.cpp >+++ b/Source/WebCore/accessibility/AccessibilityRenderObject.cpp >@@ -1953,6 +1953,10 @@ bool AccessibilityRenderObject::accessibilityIsIgnored() const > if (supportsARIAAttributes()) > return false; > >+ // Content inside span tags gets included in the parent text object. >+ if (node && node->hasTagName(spanTag)) >+ return true; >+ > if (m_renderer->isBlockFlow() && m_renderer->childrenInline()) > return !toRenderBlock(m_renderer)->firstLineBox() && !mouseButtonListener(); > >diff --git a/Source/WebCore/accessibility/gtk/AccessibilityObjectAtk.cpp b/Source/WebCore/accessibility/gtk/AccessibilityObjectAtk.cpp >index 39f4888..aaada00 100644 >--- a/Source/WebCore/accessibility/gtk/AccessibilityObjectAtk.cpp >+++ b/Source/WebCore/accessibility/gtk/AccessibilityObjectAtk.cpp >@@ -78,6 +78,11 @@ AccessibilityObjectInclusion AccessibilityObject::accessibilityPlatformIncludesO > if (role == UnknownRole) > return IgnoreObject; > >+ // Block spans result in extraneous objects of ATK_ROLE_PANEL. >+ if (renderer()->isAnonymousBlock() && !parent->renderer()->isBody() >+ && parent->ariaRoleAttribute() == UnknownRole) >+ return IgnoreObject; >+ > return DefaultBehavior; > } > >diff --git a/Source/WebCore/accessibility/gtk/WebKitAccessibleWrapperAtk.cpp b/Source/WebCore/accessibility/gtk/WebKitAccessibleWrapperAtk.cpp >index f7f9f6e..df16874 100644 >--- a/Source/WebCore/accessibility/gtk/WebKitAccessibleWrapperAtk.cpp >+++ b/Source/WebCore/accessibility/gtk/WebKitAccessibleWrapperAtk.cpp >@@ -819,7 +819,7 @@ static GType GetAtkInterfaceTypeFromWAIType(WAIType type) > > static bool roleIsTextType(AccessibilityRole role) > { >- return role == ParagraphRole || role == HeadingRole || role == DivRole || role == CellRole; >+ return role == ParagraphRole || role == HeadingRole || role == DivRole || role == CellRole || role == ListItemRole; > } > > static guint16 getInterfaceMaskFromObject(AccessibilityObject* coreObject) >-- >1.7.11.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 72811
:
115961
|
158641
|
158885
|
158937
|
159321
|
159342
|
159777
|
159791
|
159799
|
160086
|
160543
|
160549
|
160550
|
160678
|
160878
|
161630
|
161820
|
161821