| 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 879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 890 layoutBoxModelObject()->absoluteQuads(quads); | 890 layoutBoxModelObject()->absoluteQuads(quads); |
| 891 } | 891 } |
| 892 | 892 |
| 893 if (quads.isEmpty()) | 893 if (quads.isEmpty()) |
| 894 return IntRect(); | 894 return IntRect(); |
| 895 | 895 |
| 896 IntRect result = quads[0].enclosingBoundingBox(); | 896 IntRect result = quads[0].enclosingBoundingBox(); |
| 897 for (size_t i = 1; i < quads.size(); ++i) | 897 for (size_t i = 1; i < quads.size(); ++i) |
| 898 result.unite(quads[i].enclosingBoundingBox()); | 898 result.unite(quads[i].enclosingBoundingBox()); |
| 899 | 899 |
| 900 result = view->contentsToWindow(result); | 900 return view->soonToBeRemovedContentsToUnscaledViewport(result); |
| 901 | |
| 902 // FIXME: Cleanup pinch viewport coordinate translations. crbug.com/371902. | |
| 903 PinchViewport& pinchViewport = document().page()->frameHost().pinchViewport(
); | |
| 904 result = enclosingIntRect(pinchViewport.mainViewToViewportCSSPixels(result))
; | |
| 905 | |
| 906 return result; | |
| 907 } | 901 } |
| 908 | 902 |
| 909 PassRefPtrWillBeRawPtr<ClientRectList> Element::getClientRects() | 903 PassRefPtrWillBeRawPtr<ClientRectList> Element::getClientRects() |
| 910 { | 904 { |
| 911 document().updateLayoutIgnorePendingStylesheets(); | 905 document().updateLayoutIgnorePendingStylesheets(); |
| 912 | 906 |
| 913 LayoutObject* elementRenderer = layoutObject(); | 907 LayoutObject* elementRenderer = layoutObject(); |
| 914 if (!elementRenderer || (!elementRenderer->isBoxModelObject() && !elementRen
derer->isBR())) | 908 if (!elementRenderer || (!elementRenderer->isBoxModelObject() && !elementRen
derer->isBR())) |
| 915 return ClientRectList::create(); | 909 return ClientRectList::create(); |
| 916 | 910 |
| (...skipping 2475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3392 { | 3386 { |
| 3393 #if ENABLE(OILPAN) | 3387 #if ENABLE(OILPAN) |
| 3394 if (hasRareData()) | 3388 if (hasRareData()) |
| 3395 visitor->trace(elementRareData()); | 3389 visitor->trace(elementRareData()); |
| 3396 visitor->trace(m_elementData); | 3390 visitor->trace(m_elementData); |
| 3397 #endif | 3391 #endif |
| 3398 ContainerNode::trace(visitor); | 3392 ContainerNode::trace(visitor); |
| 3399 } | 3393 } |
| 3400 | 3394 |
| 3401 } // namespace blink | 3395 } // namespace blink |
| OLD | NEW |