| 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) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
| 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) | 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) |
| 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. |
| 7 * All rights reserved. | 7 * All rights reserved. |
| 8 * Copyright (C) 2009 Google Inc. All rights reserved. | 8 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. | 9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. |
| 10 * (http://www.torchmobile.com/) | 10 * (http://www.torchmobile.com/) |
| (...skipping 987 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 998 | 998 |
| 999 IntRect LayoutObject::absoluteElementBoundingBoxRect() const { | 999 IntRect LayoutObject::absoluteElementBoundingBoxRect() const { |
| 1000 Vector<LayoutRect> rects; | 1000 Vector<LayoutRect> rects; |
| 1001 const LayoutBoxModelObject& container = enclosingLayer()->layoutObject(); | 1001 const LayoutBoxModelObject& container = enclosingLayer()->layoutObject(); |
| 1002 addElementVisualOverflowRects( | 1002 addElementVisualOverflowRects( |
| 1003 rects, LayoutPoint(localToAncestorPoint(FloatPoint(), &container))); | 1003 rects, LayoutPoint(localToAncestorPoint(FloatPoint(), &container))); |
| 1004 return container.localToAbsoluteQuad(FloatQuad(FloatRect(unionRect(rects)))) | 1004 return container.localToAbsoluteQuad(FloatQuad(FloatRect(unionRect(rects)))) |
| 1005 .enclosingBoundingBox(); | 1005 .enclosingBoundingBox(); |
| 1006 } | 1006 } |
| 1007 | 1007 |
| 1008 FloatRect LayoutObject::absoluteBoundingBoxRectForRange(const Range* range) { | 1008 FloatRect LayoutObject::absoluteBoundingBoxRectForRange( |
| 1009 if (!range || !range->startContainer()) | 1009 const EphemeralRange& range) { |
| 1010 if (range.isNull() || !range.startPosition().computeContainerNode()) |
| 1010 return FloatRect(); | 1011 return FloatRect(); |
| 1011 | 1012 |
| 1012 range->ownerDocument().updateStyleAndLayout(); | 1013 range.document().updateStyleAndLayout(); |
| 1013 | 1014 |
| 1014 Vector<FloatQuad> quads; | 1015 Vector<FloatQuad> quads; |
| 1015 range->textQuads(quads); | 1016 textQuads(quads, range); |
| 1016 | 1017 |
| 1017 FloatRect result; | 1018 FloatRect result; |
| 1018 for (size_t i = 0; i < quads.size(); ++i) | 1019 for (size_t i = 0; i < quads.size(); ++i) |
| 1019 result.unite(quads[i].boundingBox()); | 1020 result.unite(quads[i].boundingBox()); |
| 1020 | 1021 |
| 1021 return result; | 1022 return result; |
| 1022 } | 1023 } |
| 1023 | 1024 |
| 1024 void LayoutObject::addAbsoluteRectForLayer(IntRect& result) { | 1025 void LayoutObject::addAbsoluteRectForLayer(IntRect& result) { |
| 1025 if (hasLayer()) | 1026 if (hasLayer()) |
| (...skipping 2604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3630 const blink::LayoutObject* root = object1; | 3631 const blink::LayoutObject* root = object1; |
| 3631 while (root->parent()) | 3632 while (root->parent()) |
| 3632 root = root->parent(); | 3633 root = root->parent(); |
| 3633 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3634 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
| 3634 } else { | 3635 } else { |
| 3635 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); | 3636 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); |
| 3636 } | 3637 } |
| 3637 } | 3638 } |
| 3638 | 3639 |
| 3639 #endif | 3640 #endif |
| OLD | NEW |