| 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. | 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 #include "core/css/PropertySetCSSStyleDeclaration.h" | 45 #include "core/css/PropertySetCSSStyleDeclaration.h" |
| 46 #include "core/css/StylePropertySet.h" | 46 #include "core/css/StylePropertySet.h" |
| 47 #include "core/css/parser/CSSParser.h" | 47 #include "core/css/parser/CSSParser.h" |
| 48 #include "core/css/resolver/SelectorFilterParentScope.h" | 48 #include "core/css/resolver/SelectorFilterParentScope.h" |
| 49 #include "core/css/resolver/StyleResolver.h" | 49 #include "core/css/resolver/StyleResolver.h" |
| 50 #include "core/css/resolver/StyleResolverStats.h" | 50 #include "core/css/resolver/StyleResolverStats.h" |
| 51 #include "core/css/resolver/StyleSharingDepthScope.h" | 51 #include "core/css/resolver/StyleSharingDepthScope.h" |
| 52 #include "core/dom/AXObjectCache.h" | 52 #include "core/dom/AXObjectCache.h" |
| 53 #include "core/dom/Attr.h" | 53 #include "core/dom/Attr.h" |
| 54 #include "core/dom/CSSSelectorWatch.h" | 54 #include "core/dom/CSSSelectorWatch.h" |
| 55 #include "core/dom/ClientRect.h" | |
| 56 #include "core/dom/ClientRectList.h" | 55 #include "core/dom/ClientRectList.h" |
| 57 #include "core/dom/DOMTokenList.h" | 56 #include "core/dom/DOMTokenList.h" |
| 58 #include "core/dom/DatasetDOMStringMap.h" | 57 #include "core/dom/DatasetDOMStringMap.h" |
| 59 #include "core/dom/ElementDataCache.h" | 58 #include "core/dom/ElementDataCache.h" |
| 60 #include "core/dom/ElementIntersectionObserverData.h" | 59 #include "core/dom/ElementIntersectionObserverData.h" |
| 61 #include "core/dom/ElementRareData.h" | 60 #include "core/dom/ElementRareData.h" |
| 62 #include "core/dom/ElementTraversal.h" | 61 #include "core/dom/ElementTraversal.h" |
| 63 #include "core/dom/ExceptionCode.h" | 62 #include "core/dom/ExceptionCode.h" |
| 64 #include "core/dom/FirstLetterPseudoElement.h" | 63 #include "core/dom/FirstLetterPseudoElement.h" |
| 65 #include "core/dom/Fullscreen.h" | 64 #include "core/dom/Fullscreen.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 95 #include "core/frame/HostsUsingFeatures.h" | 94 #include "core/frame/HostsUsingFeatures.h" |
| 96 #include "core/frame/LocalDOMWindow.h" | 95 #include "core/frame/LocalDOMWindow.h" |
| 97 #include "core/frame/LocalFrame.h" | 96 #include "core/frame/LocalFrame.h" |
| 98 #include "core/frame/LocalFrameView.h" | 97 #include "core/frame/LocalFrameView.h" |
| 99 #include "core/frame/ScrollIntoViewOptions.h" | 98 #include "core/frame/ScrollIntoViewOptions.h" |
| 100 #include "core/frame/ScrollToOptions.h" | 99 #include "core/frame/ScrollToOptions.h" |
| 101 #include "core/frame/Settings.h" | 100 #include "core/frame/Settings.h" |
| 102 #include "core/frame/UseCounter.h" | 101 #include "core/frame/UseCounter.h" |
| 103 #include "core/frame/VisualViewport.h" | 102 #include "core/frame/VisualViewport.h" |
| 104 #include "core/frame/csp/ContentSecurityPolicy.h" | 103 #include "core/frame/csp/ContentSecurityPolicy.h" |
| 104 #include "core/geometry/DOMRect.h" |
| 105 #include "core/html/HTMLCanvasElement.h" | 105 #include "core/html/HTMLCanvasElement.h" |
| 106 #include "core/html/HTMLCollection.h" | 106 #include "core/html/HTMLCollection.h" |
| 107 #include "core/html/HTMLDocument.h" | 107 #include "core/html/HTMLDocument.h" |
| 108 #include "core/html/HTMLElement.h" | 108 #include "core/html/HTMLElement.h" |
| 109 #include "core/html/HTMLFormControlsCollection.h" | 109 #include "core/html/HTMLFormControlsCollection.h" |
| 110 #include "core/html/HTMLFrameElementBase.h" | 110 #include "core/html/HTMLFrameElementBase.h" |
| 111 #include "core/html/HTMLFrameOwnerElement.h" | 111 #include "core/html/HTMLFrameOwnerElement.h" |
| 112 #include "core/html/HTMLOptionsCollection.h" | 112 #include "core/html/HTMLOptionsCollection.h" |
| 113 #include "core/html/HTMLPlugInElement.h" | 113 #include "core/html/HTMLPlugInElement.h" |
| 114 #include "core/html/HTMLSlotElement.h" | 114 #include "core/html/HTMLSlotElement.h" |
| (...skipping 1131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1246 if (quads.IsEmpty()) | 1246 if (quads.IsEmpty()) |
| 1247 return ClientRectList::Create(); | 1247 return ClientRectList::Create(); |
| 1248 | 1248 |
| 1249 LayoutObject* element_layout_object = GetLayoutObject(); | 1249 LayoutObject* element_layout_object = GetLayoutObject(); |
| 1250 DCHECK(element_layout_object); | 1250 DCHECK(element_layout_object); |
| 1251 GetDocument().AdjustFloatQuadsForScrollAndAbsoluteZoom( | 1251 GetDocument().AdjustFloatQuadsForScrollAndAbsoluteZoom( |
| 1252 quads, *element_layout_object); | 1252 quads, *element_layout_object); |
| 1253 return ClientRectList::Create(quads); | 1253 return ClientRectList::Create(quads); |
| 1254 } | 1254 } |
| 1255 | 1255 |
| 1256 ClientRect* Element::getBoundingClientRect() { | 1256 DOMRect* Element::getBoundingClientRect() { |
| 1257 Vector<FloatQuad> quads; | 1257 Vector<FloatQuad> quads; |
| 1258 ClientQuads(quads); | 1258 ClientQuads(quads); |
| 1259 if (quads.IsEmpty()) | 1259 if (quads.IsEmpty()) |
| 1260 return ClientRect::Create(); | 1260 return DOMRect::Create(); |
| 1261 | 1261 |
| 1262 FloatRect result = quads[0].BoundingBox(); | 1262 FloatRect result = quads[0].BoundingBox(); |
| 1263 for (size_t i = 1; i < quads.size(); ++i) | 1263 for (size_t i = 1; i < quads.size(); ++i) |
| 1264 result.Unite(quads[i].BoundingBox()); | 1264 result.Unite(quads[i].BoundingBox()); |
| 1265 | 1265 |
| 1266 LayoutObject* element_layout_object = GetLayoutObject(); | 1266 LayoutObject* element_layout_object = GetLayoutObject(); |
| 1267 DCHECK(element_layout_object); | 1267 DCHECK(element_layout_object); |
| 1268 GetDocument().AdjustFloatRectForScrollAndAbsoluteZoom(result, | 1268 GetDocument().AdjustFloatRectForScrollAndAbsoluteZoom(result, |
| 1269 *element_layout_object); | 1269 *element_layout_object); |
| 1270 return ClientRect::Create(result); | 1270 return DOMRect::Create(result); |
| 1271 } | 1271 } |
| 1272 | 1272 |
| 1273 const AtomicString& Element::computedRole() { | 1273 const AtomicString& Element::computedRole() { |
| 1274 GetDocument().UpdateStyleAndLayoutIgnorePendingStylesheetsForNode(this); | 1274 GetDocument().UpdateStyleAndLayoutIgnorePendingStylesheetsForNode(this); |
| 1275 std::unique_ptr<ScopedAXObjectCache> cache = | 1275 std::unique_ptr<ScopedAXObjectCache> cache = |
| 1276 ScopedAXObjectCache::Create(GetDocument()); | 1276 ScopedAXObjectCache::Create(GetDocument()); |
| 1277 return cache->Get()->ComputedRoleForNode(this); | 1277 return cache->Get()->ComputedRoleForNode(this); |
| 1278 } | 1278 } |
| 1279 | 1279 |
| 1280 String Element::computedName() { | 1280 String Element::computedName() { |
| (...skipping 3164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4445 } | 4445 } |
| 4446 | 4446 |
| 4447 DEFINE_TRACE_WRAPPERS(Element) { | 4447 DEFINE_TRACE_WRAPPERS(Element) { |
| 4448 if (HasRareData()) { | 4448 if (HasRareData()) { |
| 4449 visitor->TraceWrappers(GetElementRareData()); | 4449 visitor->TraceWrappers(GetElementRareData()); |
| 4450 } | 4450 } |
| 4451 ContainerNode::TraceWrappers(visitor); | 4451 ContainerNode::TraceWrappers(visitor); |
| 4452 } | 4452 } |
| 4453 | 4453 |
| 4454 } // namespace blink | 4454 } // namespace blink |
| OLD | NEW |