| 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 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
reserved. | 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 1334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1345 | 1345 |
| 1346 // FIXME: We can do better. | 1346 // FIXME: We can do better. |
| 1347 repaint(); | 1347 repaint(); |
| 1348 } | 1348 } |
| 1349 | 1349 |
| 1350 void RenderInline::addFocusRingRects(Vector<IntRect>& rects, const LayoutPoint&
additionalOffset, const RenderLayerModelObject* paintContainer) | 1350 void RenderInline::addFocusRingRects(Vector<IntRect>& rects, const LayoutPoint&
additionalOffset, const RenderLayerModelObject* paintContainer) |
| 1351 { | 1351 { |
| 1352 AbsoluteRectsGeneratorContext context(rects, additionalOffset); | 1352 AbsoluteRectsGeneratorContext context(rects, additionalOffset); |
| 1353 generateLineBoxRects(context); | 1353 generateLineBoxRects(context); |
| 1354 | 1354 |
| 1355 for (RenderObject* curr = firstChild(); curr; curr = curr->nextSibling()) { | 1355 addChildrenFocusRingRects(rects, additionalOffset, paintContainer); |
| 1356 if (!curr->isText() && !curr->isListMarker()) { | |
| 1357 FloatPoint pos(additionalOffset); | |
| 1358 // FIXME: This doesn't work correctly with transforms. | |
| 1359 if (curr->hasLayer()) | |
| 1360 pos = curr->localToContainerPoint(FloatPoint(), paintContainer); | |
| 1361 else if (curr->isBox()) | |
| 1362 pos.move(toRenderBox(curr)->locationOffset()); | |
| 1363 curr->addFocusRingRects(rects, flooredIntPoint(pos), paintContainer)
; | |
| 1364 } | |
| 1365 } | |
| 1366 | 1356 |
| 1367 if (continuation()) { | 1357 if (continuation()) { |
| 1368 if (continuation()->isInline()) | 1358 if (continuation()->isInline()) |
| 1369 continuation()->addFocusRingRects(rects, flooredLayoutPoint(addition
alOffset + continuation()->containingBlock()->location() - containingBlock()->lo
cation()), paintContainer); | 1359 continuation()->addFocusRingRects(rects, flooredLayoutPoint(addition
alOffset + continuation()->containingBlock()->location() - containingBlock()->lo
cation()), paintContainer); |
| 1370 else | 1360 else |
| 1371 continuation()->addFocusRingRects(rects, flooredLayoutPoint(addition
alOffset + toRenderBox(continuation())->location() - containingBlock()->location
()), paintContainer); | 1361 continuation()->addFocusRingRects(rects, flooredLayoutPoint(addition
alOffset + toRenderBox(continuation())->location() - containingBlock()->location
()), paintContainer); |
| 1372 } | 1362 } |
| 1373 } | 1363 } |
| 1374 | 1364 |
| 1375 namespace { | 1365 namespace { |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1573 container = this; | 1563 container = this; |
| 1574 | 1564 |
| 1575 FloatPoint absPos = container->localToAbsolute(); | 1565 FloatPoint absPos = container->localToAbsolute(); |
| 1576 region.bounds.setX(absPos.x() + region.bounds.x()); | 1566 region.bounds.setX(absPos.x() + region.bounds.x()); |
| 1577 region.bounds.setY(absPos.y() + region.bounds.y()); | 1567 region.bounds.setY(absPos.y() + region.bounds.y()); |
| 1578 | 1568 |
| 1579 regions.append(region); | 1569 regions.append(region); |
| 1580 } | 1570 } |
| 1581 | 1571 |
| 1582 } // namespace WebCore | 1572 } // namespace WebCore |
| OLD | NEW |