| 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 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 LayoutRect paintInvalidationRect = r; | 204 LayoutRect paintInvalidationRect = r; |
| 205 if (GraphicsLayer* squashingLayer = layer()->groupedMapping()->squashing
Layer()) { | 205 if (GraphicsLayer* squashingLayer = layer()->groupedMapping()->squashing
Layer()) { |
| 206 // Note: the subpixel accumulation of layer() does not need to be ad
ded here. It is already taken into account. | 206 // Note: the subpixel accumulation of layer() does not need to be ad
ded here. It is already taken into account. |
| 207 squashingLayer->setNeedsDisplayInRect(pixelSnappedIntRect(paintInval
idationRect), invalidationReason); | 207 squashingLayer->setNeedsDisplayInRect(pixelSnappedIntRect(paintInval
idationRect), invalidationReason); |
| 208 } | 208 } |
| 209 } else { | 209 } else { |
| 210 layer()->compositedLayerMapping()->setContentsNeedDisplayInRect(r, inval
idationReason); | 210 layer()->compositedLayerMapping()->setContentsNeedDisplayInRect(r, inval
idationReason); |
| 211 } | 211 } |
| 212 } | 212 } |
| 213 | 213 |
| 214 void RenderLayerModelObject::addChildFocusRingRects(Vector<LayoutRect>& rects, c
onst LayoutPoint& additionalOffset) const |
| 215 { |
| 216 for (RenderObject* current = slowFirstChild(); current; current = current->n
extSibling()) { |
| 217 if (current->isText() || current->isListMarker()) |
| 218 continue; |
| 219 |
| 220 if (!current->isBox()) { |
| 221 current->addFocusRingRects(rects, additionalOffset); |
| 222 continue; |
| 223 } |
| 224 |
| 225 RenderBox* box = toRenderBox(current); |
| 226 if (!box->hasLayer()) { |
| 227 box->addFocusRingRects(rects, additionalOffset + box->locationOffset
()); |
| 228 continue; |
| 229 } |
| 230 |
| 231 Vector<LayoutRect> layerFocusRingRects; |
| 232 box->addFocusRingRects(layerFocusRingRects, LayoutPoint()); |
| 233 for (size_t i = 0; i < layerFocusRingRects.size(); ++i) { |
| 234 FloatQuad quadInBox = box->localToContainerQuad(FloatQuad(layerFocus
RingRects[i]), this); |
| 235 LayoutRect rect = LayoutRect(quadInBox.boundingBox()); |
| 236 if (!rect.isEmpty()) { |
| 237 rect.moveBy(additionalOffset); |
| 238 rects.append(rect); |
| 239 } |
| 240 } |
| 241 } |
| 242 } |
| 243 |
| 214 } // namespace blink | 244 } // namespace blink |
| 215 | 245 |
| OLD | NEW |