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 871 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
882 layoutBoxModelObject()->absoluteQuads(quads); | 882 layoutBoxModelObject()->absoluteQuads(quads); |
883 } | 883 } |
884 | 884 |
885 if (quads.isEmpty()) | 885 if (quads.isEmpty()) |
886 return IntRect(); | 886 return IntRect(); |
887 | 887 |
888 IntRect result = quads[0].enclosingBoundingBox(); | 888 IntRect result = quads[0].enclosingBoundingBox(); |
889 for (size_t i = 1; i < quads.size(); ++i) | 889 for (size_t i = 1; i < quads.size(); ++i) |
890 result.unite(quads[i].enclosingBoundingBox()); | 890 result.unite(quads[i].enclosingBoundingBox()); |
891 | 891 |
892 result = view->contentsToWindow(result); | 892 return view->soonToBeRemovedContentsToUnscaledViewport(result); |
893 | |
894 // FIXME: Cleanup pinch viewport coordinate translations. crbug.com/371902. | |
895 PinchViewport& pinchViewport = document().page()->frameHost().pinchViewport(
); | |
896 result = enclosingIntRect(pinchViewport.mainViewToViewportCSSPixels(result))
; | |
897 | |
898 return result; | |
899 } | 893 } |
900 | 894 |
901 PassRefPtrWillBeRawPtr<ClientRectList> Element::getClientRects() | 895 PassRefPtrWillBeRawPtr<ClientRectList> Element::getClientRects() |
902 { | 896 { |
903 document().updateLayoutIgnorePendingStylesheets(); | 897 document().updateLayoutIgnorePendingStylesheets(); |
904 | 898 |
905 LayoutObject* elementRenderer = renderer(); | 899 LayoutObject* elementRenderer = renderer(); |
906 if (!elementRenderer || (!elementRenderer->isBoxModelObject() && !elementRen
derer->isBR())) | 900 if (!elementRenderer || (!elementRenderer->isBoxModelObject() && !elementRen
derer->isBR())) |
907 return ClientRectList::create(); | 901 return ClientRectList::create(); |
908 | 902 |
(...skipping 2456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3365 { | 3359 { |
3366 #if ENABLE(OILPAN) | 3360 #if ENABLE(OILPAN) |
3367 if (hasRareData()) | 3361 if (hasRareData()) |
3368 visitor->trace(elementRareData()); | 3362 visitor->trace(elementRareData()); |
3369 visitor->trace(m_elementData); | 3363 visitor->trace(m_elementData); |
3370 #endif | 3364 #endif |
3371 ContainerNode::trace(visitor); | 3365 ContainerNode::trace(visitor); |
3372 } | 3366 } |
3373 | 3367 |
3374 } // namespace blink | 3368 } // namespace blink |
OLD | NEW |