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 1010 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1021 size_t n = rects.size(); | 1021 size_t n = rects.size(); |
1022 if (!n) | 1022 if (!n) |
1023 return IntRect(); | 1023 return IntRect(); |
1024 | 1024 |
1025 LayoutRect result = rects[0]; | 1025 LayoutRect result = rects[0]; |
1026 for (size_t i = 1; i < n; ++i) | 1026 for (size_t i = 1; i < n; ++i) |
1027 result.unite(rects[i]); | 1027 result.unite(rects[i]); |
1028 return pixelSnappedIntRect(result); | 1028 return pixelSnappedIntRect(result); |
1029 } | 1029 } |
1030 | 1030 |
1031 void RenderObject::absoluteFocusRingQuads(Vector<FloatQuad>& quads) | 1031 IntRect RenderObject::absoluteFocusRingBoundingBoxRect() const |
1032 { | 1032 { |
1033 Vector<LayoutRect> rects; | 1033 Vector<LayoutRect> rects; |
1034 const RenderLayerModelObject* container = containerForPaintInvalidation(); | 1034 const RenderLayerModelObject* container = containerForPaintInvalidation(); |
1035 addFocusRingRects(rects, LayoutPoint(localToContainerPoint(FloatPoint(), con
tainer)), container); | 1035 addFocusRingRects(rects, LayoutPoint(localToContainerPoint(FloatPoint(), con
tainer)), container); |
1036 size_t count = rects.size(); | 1036 return container->localToAbsoluteQuad(FloatQuad(unionRect(rects))).enclosing
BoundingBox(); |
1037 for (size_t i = 0; i < count; ++i) | |
1038 quads.append(container->localToAbsoluteQuad(FloatQuad(rects[i]))); | |
1039 } | 1037 } |
1040 | 1038 |
1041 FloatRect RenderObject::absoluteBoundingBoxRectForRange(const Range* range) | 1039 FloatRect RenderObject::absoluteBoundingBoxRectForRange(const Range* range) |
1042 { | 1040 { |
1043 if (!range || !range->startContainer()) | 1041 if (!range || !range->startContainer()) |
1044 return FloatRect(); | 1042 return FloatRect(); |
1045 | 1043 |
1046 range->ownerDocument().updateLayout(); | 1044 range->ownerDocument().updateLayout(); |
1047 | 1045 |
1048 Vector<FloatQuad> quads; | 1046 Vector<FloatQuad> quads; |
(...skipping 2138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3187 { | 3185 { |
3188 if (object1) { | 3186 if (object1) { |
3189 const blink::RenderObject* root = object1; | 3187 const blink::RenderObject* root = object1; |
3190 while (root->parent()) | 3188 while (root->parent()) |
3191 root = root->parent(); | 3189 root = root->parent(); |
3192 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); | 3190 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); |
3193 } | 3191 } |
3194 } | 3192 } |
3195 | 3193 |
3196 #endif | 3194 #endif |
OLD | NEW |