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 1365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1376 } | 1376 } |
1377 | 1377 |
1378 if (continuation()) { | 1378 if (continuation()) { |
1379 if (continuation()->isInline()) | 1379 if (continuation()->isInline()) |
1380 continuation()->addFocusRingRects(rects, flooredLayoutPoint(addition
alOffset + continuation()->containingBlock()->location() - containingBlock()->lo
cation()), paintContainer); | 1380 continuation()->addFocusRingRects(rects, flooredLayoutPoint(addition
alOffset + continuation()->containingBlock()->location() - containingBlock()->lo
cation()), paintContainer); |
1381 else | 1381 else |
1382 continuation()->addFocusRingRects(rects, flooredLayoutPoint(addition
alOffset + toRenderBox(continuation())->location() - containingBlock()->location
()), paintContainer); | 1382 continuation()->addFocusRingRects(rects, flooredLayoutPoint(addition
alOffset + toRenderBox(continuation())->location() - containingBlock()->location
()), paintContainer); |
1383 } | 1383 } |
1384 } | 1384 } |
1385 | 1385 |
| 1386 namespace { |
| 1387 |
| 1388 class AbsoluteLayoutRectsGeneratorContext { |
| 1389 public: |
| 1390 AbsoluteLayoutRectsGeneratorContext(Vector<LayoutRect>& rects, const LayoutP
oint& accumulatedOffset) |
| 1391 : m_rects(rects) |
| 1392 , m_accumulatedOffset(accumulatedOffset) { } |
| 1393 |
| 1394 void operator()(const FloatRect& rect) |
| 1395 { |
| 1396 LayoutRect layoutRect(rect); |
| 1397 layoutRect.move(m_accumulatedOffset.x(), m_accumulatedOffset.y()); |
| 1398 m_rects.append(layoutRect); |
| 1399 } |
| 1400 private: |
| 1401 Vector<LayoutRect>& m_rects; |
| 1402 const LayoutPoint& m_accumulatedOffset; |
| 1403 }; |
| 1404 |
| 1405 } |
| 1406 |
| 1407 void RenderInline::computeSelfHitTestRects(Vector<LayoutRect>& rects, const Layo
utPoint& layerOffset) const |
| 1408 { |
| 1409 AbsoluteLayoutRectsGeneratorContext context(rects, layerOffset); |
| 1410 generateLineBoxRects(context); |
| 1411 } |
| 1412 |
1386 void RenderInline::paintOutline(PaintInfo& paintInfo, const LayoutPoint& paintOf
fset) | 1413 void RenderInline::paintOutline(PaintInfo& paintInfo, const LayoutPoint& paintOf
fset) |
1387 { | 1414 { |
1388 if (!hasOutline()) | 1415 if (!hasOutline()) |
1389 return; | 1416 return; |
1390 | 1417 |
1391 RenderStyle* styleToUse = style(); | 1418 RenderStyle* styleToUse = style(); |
1392 if (styleToUse->outlineStyleIsAuto() || hasOutlineAnnotation()) { | 1419 if (styleToUse->outlineStyleIsAuto() || hasOutlineAnnotation()) { |
1393 if (theme()->shouldDrawDefaultFocusRing(this)) { | 1420 if (theme()->shouldDrawDefaultFocusRing(this)) { |
1394 // Only paint the focus ring by hand if the theme isn't able to draw
the focus ring. | 1421 // Only paint the focus ring by hand if the theme isn't able to draw
the focus ring. |
1395 paintFocusRing(paintInfo, paintOffset, styleToUse); | 1422 paintFocusRing(paintInfo, paintOffset, styleToUse); |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1555 container = this; | 1582 container = this; |
1556 | 1583 |
1557 FloatPoint absPos = container->localToAbsolute(); | 1584 FloatPoint absPos = container->localToAbsolute(); |
1558 region.bounds.setX(absPos.x() + region.bounds.x()); | 1585 region.bounds.setX(absPos.x() + region.bounds.x()); |
1559 region.bounds.setY(absPos.y() + region.bounds.y()); | 1586 region.bounds.setY(absPos.y() + region.bounds.y()); |
1560 | 1587 |
1561 regions.append(region); | 1588 regions.append(region); |
1562 } | 1589 } |
1563 | 1590 |
1564 } // namespace WebCore | 1591 } // namespace WebCore |
OLD | NEW |