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

Unified Diff: third_party/WebKit/Source/web/WebAXObject.cpp

Issue 2907133002: Move WebAXObject.cpp to core/ (WIP) (Closed)
Patch Set: Created 3 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: third_party/WebKit/Source/web/WebAXObject.cpp
diff --git a/third_party/WebKit/Source/web/WebAXObject.cpp b/third_party/WebKit/Source/web/WebAXObject.cpp
index de6fcdde2f09775dea30c3e9102bccfd33510ddb..6e725184c5d23b20bdf6bfda204b371564833266 100644
--- a/third_party/WebKit/Source/web/WebAXObject.cpp
+++ b/third_party/WebKit/Source/web/WebAXObject.cpp
@@ -82,14 +82,13 @@ class WebAXSparseAttributeClientAdapter : public AXSparseAttributeClient {
}
void AddObjectAttribute(AXObjectAttribute attribute,
- AXObjectImpl& value) override {
+ AXObject& value) override {
attribute_map_.AddObjectAttribute(
static_cast<WebAXObjectAttribute>(attribute), WebAXObject(&value));
}
- void AddObjectVectorAttribute(
- AXObjectVectorAttribute attribute,
- HeapVector<Member<AXObjectImpl>>& value) override {
+ void AddObjectVectorAttribute(AXObjectVectorAttribute attribute,
+ HeapVector<Member<AXObject>>& value) override {
WebVector<WebAXObject> result(value.size());
for (size_t i = 0; i < value.size(); i++)
result[i] = WebAXObject(value[i]);
@@ -567,7 +566,7 @@ WebAXObject WebAXObject::LiveRegionRoot() const {
if (IsDetached())
return WebAXObject();
- AXObjectImpl* live_region_root = private_->LiveRegionRoot();
+ AXObject* live_region_root = private_->LiveRegionRoot();
if (live_region_root)
return WebAXObject(live_region_root);
return WebAXObject();
@@ -686,7 +685,7 @@ WebAXObject WebAXObject::HitTest(const WebPoint& point) const {
IntPoint contents_point =
private_->DocumentFrameView()->SoonToBeRemovedUnscaledViewportToContents(
point);
- AXObjectImpl* hit = private_->AccessibilityHitTest(contents_point);
+ AXObject* hit = private_->AccessibilityHitTest(contents_point);
if (hit)
return WebAXObject(hit);
@@ -765,7 +764,7 @@ bool WebAXObject::Decrement() const {
WebAXObject WebAXObject::InPageLinkTarget() const {
if (IsDetached())
return WebAXObject();
- AXObjectImpl* target = private_->InPageLinkTarget();
+ AXObject* target = private_->InPageLinkTarget();
if (!target)
return WebAXObject();
return WebAXObject(target);
@@ -789,7 +788,7 @@ WebVector<WebAXObject> WebAXObject::RadioButtonsInGroup() const {
if (IsDetached())
return WebVector<WebAXObject>();
- AXObjectImpl::AXObjectVector radio_buttons = private_->RadioButtonsInGroup();
+ AXObject::AXObjectVector radio_buttons = private_->RadioButtonsInGroup();
WebVector<WebAXObject> web_radio_buttons(radio_buttons.size());
for (size_t i = 0; i < radio_buttons.size(); ++i)
web_radio_buttons[i] = WebAXObject(radio_buttons[i]);
@@ -819,7 +818,7 @@ void WebAXObject::Selection(WebAXObject& anchor_object,
return;
}
- AXObjectImpl::AXRange ax_selection = private_->Selection();
+ AXObject::AXRange ax_selection = private_->Selection();
anchor_object = WebAXObject(ax_selection.anchor_object);
anchor_offset = ax_selection.anchor_offset;
anchor_affinity =
@@ -837,9 +836,9 @@ void WebAXObject::SetSelection(const WebAXObject& anchor_object,
if (IsDetached())
return;
- AXObjectImpl::AXRange ax_selection(anchor_object, anchor_offset,
- TextAffinity::kUpstream, focus_object,
- focus_offset, TextAffinity::kDownstream);
+ AXObject::AXRange ax_selection(anchor_object, anchor_offset,
+ TextAffinity::kUpstream, focus_object,
+ focus_offset, TextAffinity::kDownstream);
private_->SetSelection(ax_selection);
return;
}
@@ -848,7 +847,7 @@ unsigned WebAXObject::SelectionEnd() const {
if (IsDetached())
return 0;
- AXObjectImpl::AXRange ax_selection = private_->SelectionUnderObject();
+ AXObject::AXRange ax_selection = private_->SelectionUnderObject();
if (ax_selection.focus_offset < 0)
return 0;
@@ -859,7 +858,7 @@ unsigned WebAXObject::SelectionStart() const {
if (IsDetached())
return 0;
- AXObjectImpl::AXRange ax_selection = private_->SelectionUnderObject();
+ AXObject::AXRange ax_selection = private_->SelectionUnderObject();
if (ax_selection.anchor_offset < 0)
return 0;
@@ -901,7 +900,7 @@ void WebAXObject::SetSelectedTextRange(int selection_start,
if (IsDetached())
return;
- private_->SetSelection(AXObjectImpl::AXRange(selection_start, selection_end));
+ private_->SetSelection(AXObject::AXRange(selection_start, selection_end));
}
void WebAXObject::SetSequentialFocusNavigationStartingPoint() const {
@@ -988,7 +987,7 @@ WebString WebAXObject::GetName(WebAXNameFrom& out_name_from,
return WebString();
AXNameFrom name_from = kAXNameFromUninitialized;
- HeapVector<Member<AXObjectImpl>> name_objects;
+ HeapVector<Member<AXObject>> name_objects;
WebString result = private_->GetName(name_from, &name_objects);
out_name_from = static_cast<WebAXNameFrom>(name_from);
@@ -1005,7 +1004,7 @@ WebString WebAXObject::GetName() const {
return WebString();
AXNameFrom name_from;
- HeapVector<Member<AXObjectImpl>> name_objects;
+ HeapVector<Member<AXObject>> name_objects;
return private_->GetName(name_from, &name_objects);
}
@@ -1017,7 +1016,7 @@ WebString WebAXObject::Description(
return WebString();
AXDescriptionFrom description_from = kAXDescriptionFromUninitialized;
- HeapVector<Member<AXObjectImpl>> description_objects;
+ HeapVector<Member<AXObject>> description_objects;
String result = private_->Description(static_cast<AXNameFrom>(name_from),
description_from, &description_objects);
out_description_from = static_cast<WebAXDescriptionFrom>(description_from);
@@ -1245,7 +1244,7 @@ WebAXObject WebAXObject::RowAtIndex(unsigned row_index) const {
if (!private_->IsAXTable())
return WebAXObject();
- const AXObjectImpl::AXObjectVector& rows = ToAXTable(private_.Get())->Rows();
+ const AXObject::AXObjectVector& rows = ToAXTable(private_.Get())->Rows();
if (row_index < rows.size())
return WebAXObject(rows[row_index]);
@@ -1259,7 +1258,7 @@ WebAXObject WebAXObject::ColumnAtIndex(unsigned column_index) const {
if (!private_->IsAXTable())
return WebAXObject();
- const AXObjectImpl::AXObjectVector& columns =
+ const AXObject::AXObjectVector& columns =
ToAXTable(private_.Get())->Columns();
if (column_index < columns.size())
return WebAXObject(columns[column_index]);
@@ -1295,7 +1294,7 @@ void WebAXObject::RowHeaders(
if (!private_->IsAXTable())
return;
- AXObjectImpl::AXObjectVector headers;
+ AXObject::AXObjectVector headers;
ToAXTable(private_.Get())->RowHeaders(headers);
size_t header_count = headers.size();
@@ -1335,7 +1334,7 @@ void WebAXObject::ColumnHeaders(
if (!private_->IsAXTable())
return;
- AXObjectImpl::AXObjectVector headers;
+ AXObject::AXObjectVector headers;
ToAXTable(private_.Get())->ColumnHeaders(headers);
size_t header_count = headers.size();
@@ -1430,7 +1429,7 @@ void WebAXObject::Markers(WebVector<WebAXMarkerType>& types,
return;
Vector<DocumentMarker::MarkerType> marker_types;
- Vector<AXObjectImpl::AXRange> marker_ranges;
+ Vector<AXObject::AXRange> marker_ranges;
private_->Markers(marker_types, marker_ranges);
DCHECK_EQ(marker_types.size(), marker_ranges.size());
@@ -1468,7 +1467,7 @@ void WebAXObject::GetWordBoundaries(WebVector<int>& starts,
if (IsDetached())
return;
- Vector<AXObjectImpl::AXRange> word_boundaries;
+ Vector<AXObject::AXRange> word_boundaries;
private_->GetWordBoundaries(word_boundaries);
WebVector<int> word_start_offsets(word_boundaries.size());
@@ -1551,14 +1550,14 @@ void WebAXObject::ScrollToGlobalPoint(const WebPoint& point) const {
private_->ScrollToGlobalPoint(point);
}
-WebAXObject::WebAXObject(AXObjectImpl* object) : private_(object) {}
+WebAXObject::WebAXObject(AXObject* object) : private_(object) {}
-WebAXObject& WebAXObject::operator=(AXObjectImpl* object) {
+WebAXObject& WebAXObject::operator=(AXObject* object) {
private_ = object;
return *this;
}
-WebAXObject::operator AXObjectImpl*() const {
+WebAXObject::operator AXObject*() const {
return private_.Get();
}

Powered by Google App Engine
This is Rietveld 408576698