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

Side by Side Diff: third_party/WebKit/Source/modules/accessibility/AXInlineTextBox.cpp

Issue 2907133002: Move WebAXObject.cpp to core/ (WIP) (Closed)
Patch Set: Created 3 years, 6 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013, Google Inc. All rights reserved. 2 * Copyright (C) 2013, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 Vector<AbstractInlineTextBox::WordBoundaries> word_boundaries; 119 Vector<AbstractInlineTextBox::WordBoundaries> word_boundaries;
120 inline_text_box_->GetWordBoundaries(word_boundaries); 120 inline_text_box_->GetWordBoundaries(word_boundaries);
121 words.resize(word_boundaries.size()); 121 words.resize(word_boundaries.size());
122 for (unsigned i = 0; i < word_boundaries.size(); i++) 122 for (unsigned i = 0; i < word_boundaries.size(); i++)
123 words[i] = 123 words[i] =
124 AXRange(word_boundaries[i].start_index, word_boundaries[i].end_index); 124 AXRange(word_boundaries[i].start_index, word_boundaries[i].end_index);
125 } 125 }
126 126
127 String AXInlineTextBox::GetName( 127 String AXInlineTextBox::GetName(
128 AXNameFrom& name_from, 128 AXNameFrom& name_from,
129 AXObjectImpl::AXObjectVector* name_objects) const { 129 AXObjectImpl::AXObjectImplVector* name_objects) const {
130 if (!inline_text_box_) 130 if (!inline_text_box_)
131 return String(); 131 return String();
132 132
133 name_from = kAXNameFromContents; 133 name_from = kAXNameFromContents;
134 return inline_text_box_->GetText(); 134 return inline_text_box_->GetText();
135 } 135 }
136 136
137 AXObjectImpl* AXInlineTextBox::ComputeParent() const { 137 AXObjectImpl* AXInlineTextBox::ComputeParent() const {
138 DCHECK(!IsDetached()); 138 DCHECK(!IsDetached());
139 if (!inline_text_box_ || !ax_object_cache_) 139 if (!inline_text_box_ || !ax_object_cache_)
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 if (previous_on_line) 181 if (previous_on_line)
182 return ax_object_cache_->GetOrCreate(previous_on_line.Get()); 182 return ax_object_cache_->GetOrCreate(previous_on_line.Get());
183 183
184 if (!inline_text_box_->IsFirst()) 184 if (!inline_text_box_->IsFirst())
185 return 0; 185 return 0;
186 186
187 return ParentObject()->PreviousOnLine(); 187 return ParentObject()->PreviousOnLine();
188 } 188 }
189 189
190 } // namespace blink 190 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698