Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Side by Side Diff: Source/core/rendering/RenderBox.cpp

Issue 711493004: Remove unnecessary paintContainer parameter from addFocusRingRects (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 rect.move(absPos.x(), absPos.y()); 559 rect.move(absPos.x(), absPos.y());
560 return rect; 560 return rect;
561 } 561 }
562 562
563 FloatQuad RenderBox::absoluteContentQuad() const 563 FloatQuad RenderBox::absoluteContentQuad() const
564 { 564 {
565 LayoutRect rect = contentBoxRect(); 565 LayoutRect rect = contentBoxRect();
566 return localToAbsoluteQuad(FloatRect(rect)); 566 return localToAbsoluteQuad(FloatRect(rect));
567 } 567 }
568 568
569 void RenderBox::addFocusRingRects(Vector<LayoutRect>& rects, const LayoutPoint& additionalOffset, const RenderLayerModelObject*) const 569 void RenderBox::addFocusRingRects(Vector<LayoutRect>& rects, const LayoutPoint& additionalOffset) const
570 { 570 {
571 if (!size().isEmpty()) 571 if (!size().isEmpty())
572 rects.append(LayoutRect(additionalOffset, size())); 572 rects.append(LayoutRect(additionalOffset, size()));
573 } 573 }
574 574
575 bool RenderBox::canResize() const 575 bool RenderBox::canResize() const
576 { 576 {
577 // We need a special case for <iframe> because they never have 577 // We need a special case for <iframe> because they never have
578 // hasOverflowClip(). However, they do "implicitly" clip their contents, so 578 // hasOverflowClip(). However, they do "implicitly" clip their contents, so
579 // we want to allow resizing them also. 579 // we want to allow resizing them also.
(...skipping 3342 matching lines...) Expand 10 before | Expand all | Expand 10 after
3922 top = std::max(top, borderOutsets.top()); 3922 top = std::max(top, borderOutsets.top());
3923 right = std::max(right, borderOutsets.right()); 3923 right = std::max(right, borderOutsets.right());
3924 bottom = std::max(bottom, borderOutsets.bottom()); 3924 bottom = std::max(bottom, borderOutsets.bottom());
3925 left = std::max(left, borderOutsets.left()); 3925 left = std::max(left, borderOutsets.left());
3926 } 3926 }
3927 3927
3928 if (style()->hasOutline()) { 3928 if (style()->hasOutline()) {
3929 if (style()->outlineStyleIsAuto()) { 3929 if (style()->outlineStyleIsAuto()) {
3930 // The result focus ring rects are in coordinates of this object's b order box. 3930 // The result focus ring rects are in coordinates of this object's b order box.
3931 Vector<LayoutRect> focusRingRects; 3931 Vector<LayoutRect> focusRingRects;
3932 addFocusRingRects(focusRingRects, LayoutPoint(), this); 3932 addFocusRingRects(focusRingRects, LayoutPoint());
3933 LayoutRect rect = unionRect(focusRingRects); 3933 LayoutRect rect = unionRect(focusRingRects);
3934 3934
3935 int outlineSize = GraphicsContext::focusRingOutsetExtent(style()->ou tlineOffset(), style()->outlineWidth()); 3935 int outlineSize = GraphicsContext::focusRingOutsetExtent(style()->ou tlineOffset(), style()->outlineWidth());
3936 top = std::max(top, -rect.y() + outlineSize); 3936 top = std::max(top, -rect.y() + outlineSize);
3937 right = std::max(right, rect.maxX() - width() + outlineSize); 3937 right = std::max(right, rect.maxX() - width() + outlineSize);
3938 bottom = std::max(bottom, rect.maxY() - height() + outlineSize); 3938 bottom = std::max(bottom, rect.maxY() - height() + outlineSize);
3939 left = std::max(left, -rect.x() + outlineSize); 3939 left = std::max(left, -rect.x() + outlineSize);
3940 } else { 3940 } else {
3941 LayoutUnit outlineSize = style()->outlineSize(); 3941 LayoutUnit outlineSize = style()->outlineSize();
3942 top = std::max(top, outlineSize); 3942 top = std::max(top, outlineSize);
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
4438 4438
4439 setLogicalTop(oldLogicalTop); 4439 setLogicalTop(oldLogicalTop);
4440 setLogicalWidth(oldLogicalWidth); 4440 setLogicalWidth(oldLogicalWidth);
4441 setMarginLeft(oldMarginLeft); 4441 setMarginLeft(oldMarginLeft);
4442 setMarginRight(oldMarginRight); 4442 setMarginRight(oldMarginRight);
4443 4443
4444 return borderBox; 4444 return borderBox;
4445 } 4445 }
4446 4446
4447 } // namespace blink 4447 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698