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

Side by Side Diff: webkit/glue/webaccessibility.cc

Issue 8770021: Initial implementation of IAccessible2 scrollTo and setTextSelection and (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "webkit/glue/webaccessibility.h" 5 #include "webkit/glue/webaccessibility.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/string_number_conversions.h" 9 #include "base/string_number_conversions.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 906 matching lines...) Expand 10 before | Expand all | Expand 10 after
917 string_attributes[ATTR_DOC_MIMETYPE] = WebKit::WebString("text/html"); 917 string_attributes[ATTR_DOC_MIMETYPE] = WebKit::WebString("text/html");
918 bool_attributes[ATTR_DOC_LOADED] = src.isLoaded(); 918 bool_attributes[ATTR_DOC_LOADED] = src.isLoaded();
919 float_attributes[ATTR_DOC_LOADING_PROGRESS] = 919 float_attributes[ATTR_DOC_LOADING_PROGRESS] =
920 src.estimatedLoadingProgress(); 920 src.estimatedLoadingProgress();
921 921
922 const WebKit::WebDocumentType& doctype = document.doctype(); 922 const WebKit::WebDocumentType& doctype = document.doctype();
923 if (!doctype.isNull()) 923 if (!doctype.isNull())
924 string_attributes[ATTR_DOC_DOCTYPE] = doctype.name(); 924 string_attributes[ATTR_DOC_DOCTYPE] = doctype.name();
925 925
926 const gfx::Size& scroll_offset = document.frame()->scrollOffset(); 926 const gfx::Size& scroll_offset = document.frame()->scrollOffset();
927 int_attributes[ATTR_DOC_SCROLLX] = scroll_offset.width(); 927 int_attributes[ATTR_SCROLL_X] = scroll_offset.width();
928 int_attributes[ATTR_DOC_SCROLLY] = scroll_offset.height(); 928 int_attributes[ATTR_SCROLL_Y] = scroll_offset.height();
929
930 const gfx::Size& min_offset = document.frame()->minimumScrollOffset();
931 int_attributes[ATTR_SCROLL_X_MIN] = min_offset.width();
932 int_attributes[ATTR_SCROLL_Y_MIN] = min_offset.height();
933
934 const gfx::Size& max_offset = document.frame()->maximumScrollOffset();
935 int_attributes[ATTR_SCROLL_X_MAX] = max_offset.width();
936 int_attributes[ATTR_SCROLL_Y_MAX] = max_offset.height();
929 } 937 }
930 938
931 if (role == WebAccessibility::ROLE_TABLE) { 939 if (role == WebAccessibility::ROLE_TABLE) {
932 int column_count = src.columnCount(); 940 int column_count = src.columnCount();
933 int row_count = src.rowCount(); 941 int row_count = src.rowCount();
934 if (column_count > 0 && row_count > 0) { 942 if (column_count > 0 && row_count > 0) {
935 std::set<int> unique_cell_id_set; 943 std::set<int> unique_cell_id_set;
936 int_attributes[ATTR_TABLE_COLUMN_COUNT] = column_count; 944 int_attributes[ATTR_TABLE_COLUMN_COUNT] = column_count;
937 int_attributes[ATTR_TABLE_ROW_COUNT] = row_count; 945 int_attributes[ATTR_TABLE_ROW_COUNT] = row_count;
938 for (int i = 0; i < column_count * row_count; ++i) { 946 for (int i = 0; i < column_count * row_count; ++i) {
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
1002 bool WebAccessibility::IsParentUnignoredOf( 1010 bool WebAccessibility::IsParentUnignoredOf(
1003 const WebKit::WebAccessibilityObject& ancestor, 1011 const WebKit::WebAccessibilityObject& ancestor,
1004 const WebKit::WebAccessibilityObject& child) { 1012 const WebKit::WebAccessibilityObject& child) {
1005 WebKit::WebAccessibilityObject parent = child.parentObject(); 1013 WebKit::WebAccessibilityObject parent = child.parentObject();
1006 while (!parent.isNull() && parent.accessibilityIsIgnored()) 1014 while (!parent.isNull() && parent.accessibilityIsIgnored())
1007 parent = parent.parentObject(); 1015 parent = parent.parentObject();
1008 return parent.equals(ancestor); 1016 return parent.equals(ancestor);
1009 } 1017 }
1010 1018
1011 } // namespace webkit_glue 1019 } // namespace webkit_glue
OLDNEW
« content/browser/accessibility/browser_accessibility_win.cc ('K') | « webkit/glue/webaccessibility.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698