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 815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
826 return IntRect(); | 826 return IntRect(); |
827 | 827 |
828 IntRect result = quads[0].enclosingBoundingBox(); | 828 IntRect result = quads[0].enclosingBoundingBox(); |
829 for (size_t i = 1; i < quads.size(); ++i) | 829 for (size_t i = 1; i < quads.size(); ++i) |
830 result.unite(quads[i].enclosingBoundingBox()); | 830 result.unite(quads[i].enclosingBoundingBox()); |
831 | 831 |
832 result = view->contentsToRootView(result); | 832 result = view->contentsToRootView(result); |
833 return result; | 833 return result; |
834 } | 834 } |
835 | 835 |
836 PassRefPtr<ClientRectList> Element::getClientRects() | 836 PassRefPtrWillBeRawPtr<ClientRectList> Element::getClientRects() |
837 { | 837 { |
838 document().updateLayoutIgnorePendingStylesheets(); | 838 document().updateLayoutIgnorePendingStylesheets(); |
839 | 839 |
840 RenderBoxModelObject* renderBoxModelObject = this->renderBoxModelObject(); | 840 RenderBoxModelObject* renderBoxModelObject = this->renderBoxModelObject(); |
841 if (!renderBoxModelObject) | 841 if (!renderBoxModelObject) |
842 return ClientRectList::create(); | 842 return ClientRectList::create(); |
843 | 843 |
844 // FIXME: Handle SVG elements. | 844 // FIXME: Handle SVG elements. |
845 // FIXME: Handle table/inline-table with a caption. | 845 // FIXME: Handle table/inline-table with a caption. |
846 | 846 |
847 Vector<FloatQuad> quads; | 847 Vector<FloatQuad> quads; |
848 renderBoxModelObject->absoluteQuads(quads); | 848 renderBoxModelObject->absoluteQuads(quads); |
849 document().adjustFloatQuadsForScrollAndAbsoluteZoom(quads, *renderBoxModelOb
ject); | 849 document().adjustFloatQuadsForScrollAndAbsoluteZoom(quads, *renderBoxModelOb
ject); |
850 return ClientRectList::create(quads); | 850 return ClientRectList::create(quads); |
851 } | 851 } |
852 | 852 |
853 PassRefPtr<ClientRect> Element::getBoundingClientRect() | 853 PassRefPtrWillBeRawPtr<ClientRect> Element::getBoundingClientRect() |
854 { | 854 { |
855 document().updateLayoutIgnorePendingStylesheets(); | 855 document().updateLayoutIgnorePendingStylesheets(); |
856 | 856 |
857 Vector<FloatQuad> quads; | 857 Vector<FloatQuad> quads; |
858 if (isSVGElement() && renderer() && !renderer()->isSVGRoot()) { | 858 if (isSVGElement() && renderer() && !renderer()->isSVGRoot()) { |
859 // Get the bounding rectangle from the SVG model. | 859 // Get the bounding rectangle from the SVG model. |
860 SVGElement* svgElement = toSVGElement(this); | 860 SVGElement* svgElement = toSVGElement(this); |
861 FloatRect localRect; | 861 FloatRect localRect; |
862 if (svgElement->getBoundingBox(localRect)) | 862 if (svgElement->getBoundingBox(localRect)) |
863 quads.append(renderer()->localToAbsoluteQuad(localRect)); | 863 quads.append(renderer()->localToAbsoluteQuad(localRect)); |
(...skipping 2487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3351 || isHTMLObjectElement(*this) | 3351 || isHTMLObjectElement(*this) |
3352 || isHTMLAppletElement(*this) | 3352 || isHTMLAppletElement(*this) |
3353 || isHTMLCanvasElement(*this)) | 3353 || isHTMLCanvasElement(*this)) |
3354 return false; | 3354 return false; |
3355 if (FullscreenElementStack::isActiveFullScreenElement(this)) | 3355 if (FullscreenElementStack::isActiveFullScreenElement(this)) |
3356 return false; | 3356 return false; |
3357 return true; | 3357 return true; |
3358 } | 3358 } |
3359 | 3359 |
3360 } // namespace WebCore | 3360 } // namespace WebCore |
OLD | NEW |