| OLD | NEW |
| 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 #include "platform/RuntimeEnabledFeatures.h" | 132 #include "platform/RuntimeEnabledFeatures.h" |
| 133 #include "platform/UserGestureIndicator.h" | 133 #include "platform/UserGestureIndicator.h" |
| 134 #include "platform/graphics/CompositorMutableProperties.h" | 134 #include "platform/graphics/CompositorMutableProperties.h" |
| 135 #include "platform/graphics/CompositorMutation.h" | 135 #include "platform/graphics/CompositorMutation.h" |
| 136 #include "platform/scroll/ScrollableArea.h" | 136 #include "platform/scroll/ScrollableArea.h" |
| 137 #include "wtf/BitVector.h" | 137 #include "wtf/BitVector.h" |
| 138 #include "wtf/HashFunctions.h" | 138 #include "wtf/HashFunctions.h" |
| 139 #include "wtf/text/CString.h" | 139 #include "wtf/text/CString.h" |
| 140 #include "wtf/text/StringBuilder.h" | 140 #include "wtf/text/StringBuilder.h" |
| 141 #include "wtf/text/TextPosition.h" | 141 #include "wtf/text/TextPosition.h" |
| 142 #include <memory> | |
| 143 | 142 |
| 144 namespace blink { | 143 namespace blink { |
| 145 | 144 |
| 146 namespace { | 145 namespace { |
| 147 | 146 |
| 148 // We need to retain the scroll customization callbacks until the element | 147 // We need to retain the scroll customization callbacks until the element |
| 149 // they're associated with is destroyed. It would be simplest if the callbacks | 148 // they're associated with is destroyed. It would be simplest if the callbacks |
| 150 // could be stored in ElementRareData, but we can't afford the space | 149 // could be stored in ElementRareData, but we can't afford the space |
| 151 // increase. Instead, keep the scroll customization callbacks here. The other | 150 // increase. Instead, keep the scroll customization callbacks here. The other |
| 152 // option would be to store these callbacks on the FrameHost or document, but | 151 // option would be to store these callbacks on the FrameHost or document, but |
| (...skipping 891 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1044 result.unite(quads[i].boundingBox()); | 1043 result.unite(quads[i].boundingBox()); |
| 1045 | 1044 |
| 1046 DCHECK(elementLayoutObject); | 1045 DCHECK(elementLayoutObject); |
| 1047 document().adjustFloatRectForScrollAndAbsoluteZoom(result, *elementLayoutObj
ect); | 1046 document().adjustFloatRectForScrollAndAbsoluteZoom(result, *elementLayoutObj
ect); |
| 1048 return ClientRect::create(result); | 1047 return ClientRect::create(result); |
| 1049 } | 1048 } |
| 1050 | 1049 |
| 1051 const AtomicString& Element::computedRole() | 1050 const AtomicString& Element::computedRole() |
| 1052 { | 1051 { |
| 1053 document().updateStyleAndLayoutIgnorePendingStylesheetsForNode(this); | 1052 document().updateStyleAndLayoutIgnorePendingStylesheetsForNode(this); |
| 1054 std::unique_ptr<ScopedAXObjectCache> cache = ScopedAXObjectCache::create(doc
ument()); | 1053 OwnPtr<ScopedAXObjectCache> cache = ScopedAXObjectCache::create(document()); |
| 1055 return cache->get()->computedRoleForNode(this); | 1054 return cache->get()->computedRoleForNode(this); |
| 1056 } | 1055 } |
| 1057 | 1056 |
| 1058 String Element::computedName() | 1057 String Element::computedName() |
| 1059 { | 1058 { |
| 1060 document().updateStyleAndLayoutIgnorePendingStylesheetsForNode(this); | 1059 document().updateStyleAndLayoutIgnorePendingStylesheetsForNode(this); |
| 1061 std::unique_ptr<ScopedAXObjectCache> cache = ScopedAXObjectCache::create(doc
ument()); | 1060 OwnPtr<ScopedAXObjectCache> cache = ScopedAXObjectCache::create(document()); |
| 1062 return cache->get()->computedNameForNode(this); | 1061 return cache->get()->computedNameForNode(this); |
| 1063 } | 1062 } |
| 1064 | 1063 |
| 1065 const AtomicString& Element::getAttribute(const AtomicString& localName) const | 1064 const AtomicString& Element::getAttribute(const AtomicString& localName) const |
| 1066 { | 1065 { |
| 1067 if (!elementData()) | 1066 if (!elementData()) |
| 1068 return nullAtom; | 1067 return nullAtom; |
| 1069 synchronizeAttribute(localName); | 1068 synchronizeAttribute(localName); |
| 1070 if (const Attribute* attribute = elementData()->attributes().find(localName,
shouldIgnoreAttributeCase())) | 1069 if (const Attribute* attribute = elementData()->attributes().find(localName,
shouldIgnoreAttributeCase())) |
| 1071 return attribute->value(); | 1070 return attribute->value(); |
| (...skipping 2650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3722 | 3721 |
| 3723 DEFINE_TRACE_WRAPPERS(Element) | 3722 DEFINE_TRACE_WRAPPERS(Element) |
| 3724 { | 3723 { |
| 3725 if (hasRareData()) { | 3724 if (hasRareData()) { |
| 3726 visitor->traceWrappers(elementRareData()); | 3725 visitor->traceWrappers(elementRareData()); |
| 3727 } | 3726 } |
| 3728 ContainerNode::traceWrappers(visitor); | 3727 ContainerNode::traceWrappers(visitor); |
| 3729 } | 3728 } |
| 3730 | 3729 |
| 3731 } // namespace blink | 3730 } // namespace blink |
| OLD | NEW |