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) 2005 Allan Sandfeld Jensen (kde@carewolf.com) | 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) |
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) |
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. |
7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. |
8 * | 8 * |
9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
560 rect.move(absPos.x(), absPos.y()); | 560 rect.move(absPos.x(), absPos.y()); |
561 return rect; | 561 return rect; |
562 } | 562 } |
563 | 563 |
564 FloatQuad RenderBox::absoluteContentQuad() const | 564 FloatQuad RenderBox::absoluteContentQuad() const |
565 { | 565 { |
566 LayoutRect rect = contentBoxRect(); | 566 LayoutRect rect = contentBoxRect(); |
567 return localToAbsoluteQuad(FloatRect(rect)); | 567 return localToAbsoluteQuad(FloatRect(rect)); |
568 } | 568 } |
569 | 569 |
570 void RenderBox::addFocusRingRects(Vector<LayoutRect>& rects, const LayoutPoint&
additionalOffset, const RenderLayerModelObject*) const | 570 void RenderBox::addFocusRingRects(Vector<LayoutRect>& rects, const LayoutPoint&
additionalOffset) const |
571 { | 571 { |
572 if (!size().isEmpty()) | 572 if (!size().isEmpty()) |
573 rects.append(LayoutRect(additionalOffset, size())); | 573 rects.append(LayoutRect(additionalOffset, size())); |
574 } | 574 } |
575 | 575 |
576 bool RenderBox::canResize() const | 576 bool RenderBox::canResize() const |
577 { | 577 { |
578 // We need a special case for <iframe> because they never have | 578 // We need a special case for <iframe> because they never have |
579 // hasOverflowClip(). However, they do "implicitly" clip their contents, so | 579 // hasOverflowClip(). However, they do "implicitly" clip their contents, so |
580 // we want to allow resizing them also. | 580 // we want to allow resizing them also. |
(...skipping 3342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3923 top = std::max(top, borderOutsets.top()); | 3923 top = std::max(top, borderOutsets.top()); |
3924 right = std::max(right, borderOutsets.right()); | 3924 right = std::max(right, borderOutsets.right()); |
3925 bottom = std::max(bottom, borderOutsets.bottom()); | 3925 bottom = std::max(bottom, borderOutsets.bottom()); |
3926 left = std::max(left, borderOutsets.left()); | 3926 left = std::max(left, borderOutsets.left()); |
3927 } | 3927 } |
3928 | 3928 |
3929 if (style()->hasOutline()) { | 3929 if (style()->hasOutline()) { |
3930 if (style()->outlineStyleIsAuto()) { | 3930 if (style()->outlineStyleIsAuto()) { |
3931 // The result focus ring rects are in coordinates of this object's b
order box. | 3931 // The result focus ring rects are in coordinates of this object's b
order box. |
3932 Vector<LayoutRect> focusRingRects; | 3932 Vector<LayoutRect> focusRingRects; |
3933 addFocusRingRects(focusRingRects, LayoutPoint(), this); | 3933 addFocusRingRects(focusRingRects, LayoutPoint()); |
3934 LayoutRect rect = unionRect(focusRingRects); | 3934 LayoutRect rect = unionRect(focusRingRects); |
3935 | 3935 |
3936 int outlineSize = GraphicsContext::focusRingOutsetExtent(style()->ou
tlineOffset(), style()->outlineWidth()); | 3936 int outlineSize = GraphicsContext::focusRingOutsetExtent(style()->ou
tlineOffset(), style()->outlineWidth()); |
3937 top = std::max(top, -rect.y() + outlineSize); | 3937 top = std::max(top, -rect.y() + outlineSize); |
3938 right = std::max(right, rect.maxX() - width() + outlineSize); | 3938 right = std::max(right, rect.maxX() - width() + outlineSize); |
3939 bottom = std::max(bottom, rect.maxY() - height() + outlineSize); | 3939 bottom = std::max(bottom, rect.maxY() - height() + outlineSize); |
3940 left = std::max(left, -rect.x() + outlineSize); | 3940 left = std::max(left, -rect.x() + outlineSize); |
3941 } else { | 3941 } else { |
3942 LayoutUnit outlineSize = style()->outlineSize(); | 3942 LayoutUnit outlineSize = style()->outlineSize(); |
3943 top = std::max(top, outlineSize); | 3943 top = std::max(top, outlineSize); |
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4439 | 4439 |
4440 setLogicalTop(oldLogicalTop); | 4440 setLogicalTop(oldLogicalTop); |
4441 setLogicalWidth(oldLogicalWidth); | 4441 setLogicalWidth(oldLogicalWidth); |
4442 setMarginLeft(oldMarginLeft); | 4442 setMarginLeft(oldMarginLeft); |
4443 setMarginRight(oldMarginRight); | 4443 setMarginRight(oldMarginRight); |
4444 | 4444 |
4445 return borderBox; | 4445 return borderBox; |
4446 } | 4446 } |
4447 | 4447 |
4448 } // namespace blink | 4448 } // namespace blink |
OLD | NEW |