Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(491)

Unified Diff: content/browser/accessibility/browser_accessibility_win.cc

Issue 2716183003: When text decoration is underline or lie-through, some related IA2 attributes need to deviate from … (Closed)
Patch Set: Added test expectations. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/accessibility/browser_accessibility_win.cc
diff --git a/content/browser/accessibility/browser_accessibility_win.cc b/content/browser/accessibility/browser_accessibility_win.cc
index 5ccbc393f5fde58570264115342cbb620ce3c132..0a9a98070d7f2c1ab4b5983b84b317f76127ff23 100644
--- a/content/browser/accessibility/browser_accessibility_win.cc
+++ b/content/browser/accessibility/browser_accessibility_win.cc
@@ -4392,17 +4392,33 @@ std::vector<base::string16> BrowserAccessibilityWin::ComputeTextAttributes()
// TODO(nektar): Add Blink support for the following attributes.
// Currently set to their default values as dictated by the IA2 Spec.
attributes.push_back(L"text-line-through-mode:continuous");
- attributes.push_back(L"text-line-through-style:none");
+ if (text_style & ui::AX_TEXT_STYLE_LINE_THROUGH) {
+ // TODO(nektar): Figure out a more specific value.
+ attributes.push_back(L"text-line-through-style:solid");
+ } else {
+ attributes.push_back(L"text-line-through-style:none");
+ }
// Default value must be the empty string.
attributes.push_back(L"text-line-through-text:");
- attributes.push_back(L"text-line-through-type:none");
+ if (text_style & ui::AX_TEXT_STYLE_LINE_THROUGH) {
+ // TODO(nektar): Figure out a more specific value.
+ attributes.push_back(L"text-line-through-type:single");
+ } else {
+ attributes.push_back(L"text-line-through-type:none");
+ }
attributes.push_back(L"text-line-through-width:auto");
attributes.push_back(L"text-outline:false");
attributes.push_back(L"text-position:baseline");
attributes.push_back(L"text-shadow:none");
attributes.push_back(L"text-underline-mode:continuous");
- attributes.push_back(L"text-underline-style:none");
- attributes.push_back(L"text-underline-type:none");
+ if (text_style & ui::AX_TEXT_STYLE_UNDERLINE) {
+ // TODO(nektar): Figure out a more specific value.
+ attributes.push_back(L"text-underline-style:solid");
+ attributes.push_back(L"text-underline-type:single");
+ } else {
+ attributes.push_back(L"text-underline-style:none");
+ attributes.push_back(L"text-underline-type:none");
+ }
attributes.push_back(L"text-underline-width:auto");
auto text_direction = static_cast<ui::AXTextDirection>(

Powered by Google App Engine
This is Rietveld 408576698