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

Side by Side Diff: Source/core/rendering/RenderLayerModelObject.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
« no previous file with comments | « Source/core/rendering/RenderLayerModelObject.h ('k') | Source/core/rendering/RenderObject.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 Apple Inc. All rights reserved. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
7 * Copyright (C) 2010, 2012 Google Inc. All rights reserved. 7 * Copyright (C) 2010, 2012 Google Inc. 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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 LayoutRect paintInvalidationRect = r; 203 LayoutRect paintInvalidationRect = r;
204 if (GraphicsLayer* squashingLayer = layer()->groupedMapping()->squashing Layer()) { 204 if (GraphicsLayer* squashingLayer = layer()->groupedMapping()->squashing Layer()) {
205 // Note: the subpixel accumulation of layer() does not need to be ad ded here. It is already taken into account. 205 // Note: the subpixel accumulation of layer() does not need to be ad ded here. It is already taken into account.
206 squashingLayer->setNeedsDisplayInRect(pixelSnappedIntRect(paintInval idationRect), invalidationReason); 206 squashingLayer->setNeedsDisplayInRect(pixelSnappedIntRect(paintInval idationRect), invalidationReason);
207 } 207 }
208 } else { 208 } else {
209 layer()->compositedLayerMapping()->setContentsNeedDisplayInRect(r, inval idationReason); 209 layer()->compositedLayerMapping()->setContentsNeedDisplayInRect(r, inval idationReason);
210 } 210 }
211 } 211 }
212 212
213 void RenderLayerModelObject::addChildFocusRingRects(Vector<LayoutRect>& rects, c onst LayoutPoint& additionalOffset) const
214 {
215 for (RenderObject* current = slowFirstChild(); current; current = current->n extSibling()) {
216 if (current->isText() || current->isListMarker())
217 continue;
218
219 if (current->isBox()) {
dsinclair 2014/11/06 23:56:22 if (!current->isBox()) { current->addFocusRingRe
Xianzhu 2014/11/12 19:10:14 Done.
220 RenderBox* box = toRenderBox(current);
221 if (box->hasLayer()) {
222 Vector<LayoutRect> layerFocusRingRects;
223 box->addFocusRingRects(layerFocusRingRects, LayoutPoint());
224 for (size_t i = 0; i < layerFocusRingRects.size(); ++i) {
225 FloatQuad quadInBox = box->localToContainerQuad(FloatQuad(la yerFocusRingRects[i]), this);
226 LayoutRect rect = LayoutRect(quadInBox.boundingBox());
227 if (!rect.isEmpty()) {
228 rect.moveBy(additionalOffset);
229 rects.append(rect);
230 }
231 }
232 } else {
233 box->addFocusRingRects(rects, additionalOffset + box->locationOf fset());
234 }
235 } else {
236 current->addFocusRingRects(rects, additionalOffset);
237 }
238 }
239 }
240
213 } // namespace blink 241 } // namespace blink
214 242
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderLayerModelObject.h ('k') | Source/core/rendering/RenderObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698