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

Unified Diff: content/browser/web_contents/web_contents_android.cc

Issue 1137393003: Add style information to the snapshot node (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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/web_contents/web_contents_android.cc
diff --git a/content/browser/web_contents/web_contents_android.cc b/content/browser/web_contents/web_contents_android.cc
index 760003589094a5774a563be77a0abd638598d546..3f95935576081466936d00093b4afb216afc0d4a 100644
--- a/content/browser/web_contents/web_contents_android.cc
+++ b/content/browser/web_contents/web_contents_android.cc
@@ -60,11 +60,16 @@ ScopedJavaLocalRef<jobject> WalkAXTreeDepthFirst(JNIEnv* env,
ScopedJavaLocalRef<jstring> j_class =
ConvertUTF8ToJavaString(env, node->GetClassName());
const gfx::Rect& location = node->GetLocation();
+ int color = node->GetIntAttribute(ui::AX_ATTR_COLOR_VALUE);
dmazzoni 2015/05/19 05:32:19 This is the wrong attribute for text color - COLOR
+ int bkgcolor = node->GetIntAttribute(ui::AX_ATTR_BACKGROUND_COLOR);
+ float size = node->GetFloatAttribute(ui::AX_ATTR_FONT_SIZE);
+ int text_style = node->GetIntAttribute(ui::AX_ATTR_TEXT_STYLE);
sgurun-gerrit only 2015/05/18 23:51:09 is this the right way of getting color, bkgcolor,
+
ScopedJavaLocalRef<jobject> j_node =
Java_WebContentsImpl_createAccessibilitySnapshotNode(env,
location.x(), location.y(), node->GetScrollX(),
node->GetScrollY(), location.width(), location.height(),
- j_text.obj(), j_class.obj());
+ j_text.obj(), color, bkgcolor, size, text_style, j_class.obj());
for(uint32 i = 0; i < node->PlatformChildCount(); i++) {
BrowserAccessibilityAndroid* child =

Powered by Google App Engine
This is Rietveld 408576698