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

Side by Side Diff: Source/web/WebAXObject.cpp

Issue 1301993003: Last few steps of text alternative computation algorithm (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Testing all the special cases Created 5 years, 4 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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 1087 matching lines...) Expand 10 before | Expand all | Expand 10 after
1098 return deprecatedTitleUIElement(); 1098 return deprecatedTitleUIElement();
1099 } 1099 }
1100 1100
1101 WebString WebAXObject::name(WebAXNameFrom& outNameFrom, WebVector<WebAXObject>& outNameObjects) const 1101 WebString WebAXObject::name(WebAXNameFrom& outNameFrom, WebVector<WebAXObject>& outNameObjects) const
1102 { 1102 {
1103 if (isDetached()) 1103 if (isDetached())
1104 return WebString(); 1104 return WebString();
1105 1105
1106 AXNameFrom nameFrom = AXNameFromAttribute; 1106 AXNameFrom nameFrom = AXNameFromAttribute;
1107 WillBeHeapVector<RawPtrWillBeMember<AXObject>> nameObjects; 1107 WillBeHeapVector<RawPtrWillBeMember<AXObject>> nameObjects;
1108 WebString result = m_private->name(nameFrom, nameObjects); 1108 WebString result = m_private->name(nameFrom, &nameObjects);
1109 outNameFrom = static_cast<WebAXNameFrom>(nameFrom); 1109 outNameFrom = static_cast<WebAXNameFrom>(nameFrom);
1110 1110
1111 WebVector<WebAXObject> webNameObjects(nameObjects.size()); 1111 WebVector<WebAXObject> webNameObjects(nameObjects.size());
1112 for (size_t i = 0; i < nameObjects.size(); i++) 1112 for (size_t i = 0; i < nameObjects.size(); i++)
1113 webNameObjects[i] = WebAXObject(nameObjects[i]); 1113 webNameObjects[i] = WebAXObject(nameObjects[i]);
1114 outNameObjects.swap(webNameObjects); 1114 outNameObjects.swap(webNameObjects);
1115 1115
1116 return result; 1116 return result;
1117 } 1117 }
1118 1118
1119 WebString WebAXObject::description(WebAXNameFrom nameFrom, WebAXDescriptionFrom& outDescriptionFrom, WebVector<WebAXObject>& outDescriptionObjects) const 1119 WebString WebAXObject::description(WebAXNameFrom nameFrom, WebAXDescriptionFrom& outDescriptionFrom, WebVector<WebAXObject>& outDescriptionObjects) const
1120 { 1120 {
1121 if (isDetached()) 1121 if (isDetached())
1122 return WebString(); 1122 return WebString();
1123 1123
1124 AXDescriptionFrom descriptionFrom; 1124 AXDescriptionFrom descriptionFrom;
1125 WillBeHeapVector<RawPtrWillBeMember<AXObject>> descriptionObjects; 1125 WillBeHeapVector<RawPtrWillBeMember<AXObject>> descriptionObjects;
1126 String result = m_private->description(static_cast<AXNameFrom>(nameFrom), de scriptionFrom, descriptionObjects); 1126 String result = m_private->description(static_cast<AXNameFrom>(nameFrom), de scriptionFrom, &descriptionObjects);
1127 outDescriptionFrom = static_cast<WebAXDescriptionFrom>(descriptionFrom); 1127 outDescriptionFrom = static_cast<WebAXDescriptionFrom>(descriptionFrom);
1128 1128
1129 WebVector<WebAXObject> webDescriptionObjects(descriptionObjects.size()); 1129 WebVector<WebAXObject> webDescriptionObjects(descriptionObjects.size());
1130 for (size_t i = 0; i < descriptionObjects.size(); i++) 1130 for (size_t i = 0; i < descriptionObjects.size(); i++)
1131 webDescriptionObjects[i] = WebAXObject(descriptionObjects[i]); 1131 webDescriptionObjects[i] = WebAXObject(descriptionObjects[i]);
1132 outDescriptionObjects.swap(webDescriptionObjects); 1132 outDescriptionObjects.swap(webDescriptionObjects);
1133 1133
1134 return result; 1134 return result;
1135 } 1135 }
1136 1136
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
1613 m_private = object; 1613 m_private = object;
1614 return *this; 1614 return *this;
1615 } 1615 }
1616 1616
1617 WebAXObject::operator PassRefPtrWillBeRawPtr<AXObject>() const 1617 WebAXObject::operator PassRefPtrWillBeRawPtr<AXObject>() const
1618 { 1618 {
1619 return m_private.get(); 1619 return m_private.get();
1620 } 1620 }
1621 1621
1622 } // namespace blink 1622 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698