| 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 1355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1366 | 1366 |
| 1367 void RenderInline::imageChanged(WrappedImagePtr, const IntRect*) | 1367 void RenderInline::imageChanged(WrappedImagePtr, const IntRect*) |
| 1368 { | 1368 { |
| 1369 if (!parent()) | 1369 if (!parent()) |
| 1370 return; | 1370 return; |
| 1371 | 1371 |
| 1372 // FIXME: We can do better. | 1372 // FIXME: We can do better. |
| 1373 setShouldDoFullPaintInvalidation(true); | 1373 setShouldDoFullPaintInvalidation(true); |
| 1374 } | 1374 } |
| 1375 | 1375 |
| 1376 namespace { |
| 1377 |
| 1378 class AbsoluteRectsIgnoringEmptyRectsGeneratorContext : public AbsoluteRectsGene
ratorContext { |
| 1379 public: |
| 1380 AbsoluteRectsIgnoringEmptyRectsGeneratorContext(Vector<IntRect>& rects, cons
t LayoutPoint& accumulatedOffset) |
| 1381 : AbsoluteRectsGeneratorContext(rects, accumulatedOffset) { } |
| 1382 |
| 1383 void operator()(const FloatRect& rect) |
| 1384 { |
| 1385 if (!rect.isEmpty()) |
| 1386 AbsoluteRectsGeneratorContext::operator()(rect); |
| 1387 } |
| 1388 }; |
| 1389 |
| 1390 } // unnamed namespace |
| 1391 |
| 1376 void RenderInline::addFocusRingRects(Vector<IntRect>& rects, const LayoutPoint&
additionalOffset, const RenderLayerModelObject* paintContainer) const | 1392 void RenderInline::addFocusRingRects(Vector<IntRect>& rects, const LayoutPoint&
additionalOffset, const RenderLayerModelObject* paintContainer) const |
| 1377 { | 1393 { |
| 1378 AbsoluteRectsGeneratorContext context(rects, additionalOffset); | 1394 AbsoluteRectsIgnoringEmptyRectsGeneratorContext context(rects, additionalOff
set); |
| 1379 generateLineBoxRects(context); | 1395 generateLineBoxRects(context); |
| 1380 | 1396 |
| 1381 addChildFocusRingRects(rects, additionalOffset, paintContainer); | 1397 addChildFocusRingRects(rects, additionalOffset, paintContainer); |
| 1382 | 1398 |
| 1383 if (continuation()) { | 1399 if (continuation()) { |
| 1384 // If the continuation doesn't paint into the same container, let its pa
int invalidation container handle it. | 1400 // If the continuation doesn't paint into the same container, let its pa
int invalidation container handle it. |
| 1385 if (paintContainer != continuation()->containerForPaintInvalidation()) | 1401 if (paintContainer != continuation()->containerForPaintInvalidation()) |
| 1386 return; | 1402 return; |
| 1387 if (continuation()->isInline()) | 1403 if (continuation()->isInline()) |
| 1388 continuation()->addFocusRingRects(rects, flooredLayoutPoint(addition
alOffset + continuation()->containingBlock()->location() - containingBlock()->lo
cation()), paintContainer); | 1404 continuation()->addFocusRingRects(rects, flooredLayoutPoint(addition
alOffset + continuation()->containingBlock()->location() - containingBlock()->lo
cation()), paintContainer); |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1590 container = this; | 1606 container = this; |
| 1591 | 1607 |
| 1592 FloatPoint absPos = container->localToAbsolute(); | 1608 FloatPoint absPos = container->localToAbsolute(); |
| 1593 region.bounds.setX(absPos.x() + region.bounds.x()); | 1609 region.bounds.setX(absPos.x() + region.bounds.x()); |
| 1594 region.bounds.setY(absPos.y() + region.bounds.y()); | 1610 region.bounds.setY(absPos.y() + region.bounds.y()); |
| 1595 | 1611 |
| 1596 regions.append(region); | 1612 regions.append(region); |
| 1597 } | 1613 } |
| 1598 | 1614 |
| 1599 } // namespace blink | 1615 } // namespace blink |
| OLD | NEW |