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

Side by Side Diff: third_party/WebKit/Source/core/dom/Element.cpp

Issue 2796553002: Revert of Initial skeleton of Accessibility Object Model Phase 1 (Closed)
Patch Set: Created 3 years, 8 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Peter Kelly (pmk@post.com) 4 * (C) 2001 Peter Kelly (pmk@post.com)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * (C) 2007 David Smith (catfish.man@gmail.com) 6 * (C) 2007 David Smith (catfish.man@gmail.com)
7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc.
8 * All rights reserved. 8 * All rights reserved.
9 * (C) 2007 Eric Seidel (eric@webkit.org) 9 * (C) 2007 Eric Seidel (eric@webkit.org)
10 * 10 *
(...skipping 1169 matching lines...) Expand 10 before | Expand all | Expand 10 after
1180 return cache->get()->computedRoleForNode(this); 1180 return cache->get()->computedRoleForNode(this);
1181 } 1181 }
1182 1182
1183 String Element::computedName() { 1183 String Element::computedName() {
1184 document().updateStyleAndLayoutIgnorePendingStylesheetsForNode(this); 1184 document().updateStyleAndLayoutIgnorePendingStylesheetsForNode(this);
1185 std::unique_ptr<ScopedAXObjectCache> cache = 1185 std::unique_ptr<ScopedAXObjectCache> cache =
1186 ScopedAXObjectCache::create(document()); 1186 ScopedAXObjectCache::create(document());
1187 return cache->get()->computedNameForNode(this); 1187 return cache->get()->computedNameForNode(this);
1188 } 1188 }
1189 1189
1190 AccessibleNode* Element::existingAccessibleNode() const {
1191 if (!RuntimeEnabledFeatures::accessibilityObjectModelEnabled())
1192 return nullptr;
1193
1194 if (!hasRareData())
1195 return nullptr;
1196
1197 return elementRareData()->accessibleNode();
1198 }
1199
1200 AccessibleNode* Element::accessibleNode() {
1201 if (!RuntimeEnabledFeatures::accessibilityObjectModelEnabled())
1202 return nullptr;
1203
1204 ElementRareData& rareData = ensureElementRareData();
1205 return rareData.ensureAccessibleNode(this);
1206 }
1207
1208 const AtomicString& Element::getAttribute(const AtomicString& localName) const { 1190 const AtomicString& Element::getAttribute(const AtomicString& localName) const {
1209 if (!elementData()) 1191 if (!elementData())
1210 return nullAtom; 1192 return nullAtom;
1211 synchronizeAttribute(localName); 1193 synchronizeAttribute(localName);
1212 if (const Attribute* attribute = elementData()->attributes().find( 1194 if (const Attribute* attribute = elementData()->attributes().find(
1213 localName, shouldIgnoreAttributeCase())) 1195 localName, shouldIgnoreAttributeCase()))
1214 return attribute->value(); 1196 return attribute->value();
1215 return nullAtom; 1197 return nullAtom;
1216 } 1198 }
1217 1199
(...skipping 3028 matching lines...) Expand 10 before | Expand all | Expand 10 after
4246 } 4228 }
4247 4229
4248 DEFINE_TRACE_WRAPPERS(Element) { 4230 DEFINE_TRACE_WRAPPERS(Element) {
4249 if (hasRareData()) { 4231 if (hasRareData()) {
4250 visitor->traceWrappers(elementRareData()); 4232 visitor->traceWrappers(elementRareData());
4251 } 4233 }
4252 ContainerNode::traceWrappers(visitor); 4234 ContainerNode::traceWrappers(visitor);
4253 } 4235 }
4254 4236
4255 } // namespace blink 4237 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Element.h ('k') | third_party/WebKit/Source/core/dom/Element.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698