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

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

Issue 1081673003: Oilpan: Prepare to move AXObjectCache to the heap (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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 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. All rights reserved. 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved.
8 * (C) 2007 Eric Seidel (eric@webkit.org) 8 * (C) 2007 Eric Seidel (eric@webkit.org)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 987 matching lines...) Expand 10 before | Expand all | Expand 10 after
998 { 998 {
999 if (!layoutObject()) 999 if (!layoutObject())
1000 return IntRect(); 1000 return IntRect();
1001 // FIXME: this should probably respect transforms 1001 // FIXME: this should probably respect transforms
1002 return document().view()->contentsToScreen(layoutObject()->absoluteBoundingB oxRectIgnoringTransforms()); 1002 return document().view()->contentsToScreen(layoutObject()->absoluteBoundingB oxRectIgnoringTransforms());
1003 } 1003 }
1004 1004
1005 const AtomicString& Element::computedRole() 1005 const AtomicString& Element::computedRole()
1006 { 1006 {
1007 document().updateLayoutIgnorePendingStylesheets(); 1007 document().updateLayoutIgnorePendingStylesheets();
1008 OwnPtr<ScopedAXObjectCache> cache = ScopedAXObjectCache::create(document()); 1008 OwnPtrWillBeRawPtr<ScopedAXObjectCache> cache = ScopedAXObjectCache::create( document());
1009 return cache->get()->computedRoleForNode(this); 1009 const AtomicString& role = cache->get()->computedRoleForNode(this);
1010 cache->dispose();
1011 return role;
1010 } 1012 }
1011 1013
1012 String Element::computedName() 1014 String Element::computedName()
1013 { 1015 {
1014 document().updateLayoutIgnorePendingStylesheets(); 1016 document().updateLayoutIgnorePendingStylesheets();
1015 OwnPtr<ScopedAXObjectCache> cache = ScopedAXObjectCache::create(document()); 1017 OwnPtrWillBeRawPtr<ScopedAXObjectCache> cache = ScopedAXObjectCache::create( document());
1016 return cache->get()->computedNameForNode(this); 1018 String name = cache->get()->computedNameForNode(this);
1019 cache->dispose();
1020 return name;
1017 } 1021 }
1018 1022
1019 const AtomicString& Element::getAttribute(const AtomicString& localName) const 1023 const AtomicString& Element::getAttribute(const AtomicString& localName) const
1020 { 1024 {
1021 if (!elementData()) 1025 if (!elementData())
1022 return nullAtom; 1026 return nullAtom;
1023 synchronizeAttribute(localName); 1027 synchronizeAttribute(localName);
1024 if (const Attribute* attribute = elementData()->attributes().find(localName, shouldIgnoreAttributeCase())) 1028 if (const Attribute* attribute = elementData()->attributes().find(localName, shouldIgnoreAttributeCase()))
1025 return attribute->value(); 1029 return attribute->value();
1026 return nullAtom; 1030 return nullAtom;
(...skipping 2443 matching lines...) Expand 10 before | Expand all | Expand 10 after
3470 { 3474 {
3471 #if ENABLE(OILPAN) 3475 #if ENABLE(OILPAN)
3472 if (hasRareData()) 3476 if (hasRareData())
3473 visitor->trace(elementRareData()); 3477 visitor->trace(elementRareData());
3474 visitor->trace(m_elementData); 3478 visitor->trace(m_elementData);
3475 #endif 3479 #endif
3476 ContainerNode::trace(visitor); 3480 ContainerNode::trace(visitor);
3477 } 3481 }
3478 3482
3479 } // namespace blink 3483 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698