| 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. All rights reserv
ed. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv
ed. |
| 7 * Copyright (C) 2009 Google Inc. All rights reserved. | 7 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
| 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 1038 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1049 const LayoutBoxModelObject* container = enclosingLayer()->layoutObject(); | 1049 const LayoutBoxModelObject* container = enclosingLayer()->layoutObject(); |
| 1050 addElementVisualOverflowRects(rects, LayoutPoint(localToAncestorPoint(FloatP
oint(), container))); | 1050 addElementVisualOverflowRects(rects, LayoutPoint(localToAncestorPoint(FloatP
oint(), container))); |
| 1051 return container->localToAbsoluteQuad(FloatQuad(FloatRect(unionRect(rects)))
).enclosingBoundingBox(); | 1051 return container->localToAbsoluteQuad(FloatQuad(FloatRect(unionRect(rects)))
).enclosingBoundingBox(); |
| 1052 } | 1052 } |
| 1053 | 1053 |
| 1054 FloatRect LayoutObject::absoluteBoundingBoxRectForRange(const Range* range) | 1054 FloatRect LayoutObject::absoluteBoundingBoxRectForRange(const Range* range) |
| 1055 { | 1055 { |
| 1056 if (!range || !range->startContainer()) | 1056 if (!range || !range->startContainer()) |
| 1057 return FloatRect(); | 1057 return FloatRect(); |
| 1058 | 1058 |
| 1059 range->ownerDocument().updateLayout(); | 1059 range->ownerDocument().updateStyleAndLayout(); |
| 1060 | 1060 |
| 1061 Vector<FloatQuad> quads; | 1061 Vector<FloatQuad> quads; |
| 1062 range->textQuads(quads); | 1062 range->textQuads(quads); |
| 1063 | 1063 |
| 1064 FloatRect result; | 1064 FloatRect result; |
| 1065 for (size_t i = 0; i < quads.size(); ++i) | 1065 for (size_t i = 0; i < quads.size(); ++i) |
| 1066 result.unite(quads[i].boundingBox()); | 1066 result.unite(quads[i].boundingBox()); |
| 1067 | 1067 |
| 1068 return result; | 1068 return result; |
| 1069 } | 1069 } |
| (...skipping 2619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3689 const blink::LayoutObject* root = object1; | 3689 const blink::LayoutObject* root = object1; |
| 3690 while (root->parent()) | 3690 while (root->parent()) |
| 3691 root = root->parent(); | 3691 root = root->parent(); |
| 3692 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3692 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
| 3693 } else { | 3693 } else { |
| 3694 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); | 3694 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); |
| 3695 } | 3695 } |
| 3696 } | 3696 } |
| 3697 | 3697 |
| 3698 #endif | 3698 #endif |
| OLD | NEW |