Chromium Code Reviews| 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 054aaffdaf89e1223c51cbe97b0bc4d8f44091b4..68874b4e570b77f7b1a2fe6d49d2ad3e0a265b65 100644 |
| --- a/content/browser/web_contents/web_contents_android.cc |
| +++ b/content/browser/web_contents/web_contents_android.cc |
| @@ -108,6 +108,13 @@ ScopedJavaLocalRef<jobject> WalkAXTreeDepthFirst( |
| bgcolor = node->GetIntAttribute(ui::AX_ATTR_BACKGROUND_COLOR); |
| size = node->GetFloatAttribute(ui::AX_ATTR_FONT_SIZE); |
|
sgurun-gerrit only
2016/10/24 22:47:35
I prefer this line to move right above line 114 be
dmazzoni
2016/10/25 17:05:26
Done.
|
| text_style = node->GetIntAttribute(ui::AX_ATTR_TEXT_STYLE); |
| + |
| + // The font size is just the computed style for that element; apply |
| + // transformations to get the actual pixel size. |
| + gfx::RectF text_size_rect(0, 0, 1, size); |
| + gfx::Rect scaled_text_size_rect = node->RelativeToAbsoluteBounds( |
| + text_size_rect, false); |
| + size = scaled_text_size_rect.height(); |
| } |
| const gfx::Rect& absolute_rect = node->GetPageBoundsRect(); |