OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * Copyright (C) 2000 Dirk Mueller (mueller@kde.org) | 3 * Copyright (C) 2000 Dirk Mueller (mueller@kde.org) |
4 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. | 4 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. |
5 * Copyright (C) Research In Motion Limited 2011-2012. All rights reserved. | 5 * Copyright (C) Research In Motion Limited 2011-2012. All rights reserved. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 // Early exit if the element touches the edges. | 185 // Early exit if the element touches the edges. |
186 LayoutUnit top = adjustedPaintOffset.y() + visualOverflowRect().y(); | 186 LayoutUnit top = adjustedPaintOffset.y() + visualOverflowRect().y(); |
187 LayoutUnit bottom = adjustedPaintOffset.y() + visualOverflowRect().maxY(); | 187 LayoutUnit bottom = adjustedPaintOffset.y() + visualOverflowRect().maxY(); |
188 if (isSelected() && m_inlineBoxWrapper) { | 188 if (isSelected() && m_inlineBoxWrapper) { |
189 LayoutUnit selTop = paintOffset.y() + m_inlineBoxWrapper->root()->select
ionTop(); | 189 LayoutUnit selTop = paintOffset.y() + m_inlineBoxWrapper->root()->select
ionTop(); |
190 LayoutUnit selBottom = paintOffset.y() + selTop + m_inlineBoxWrapper->ro
ot()->selectionHeight(); | 190 LayoutUnit selBottom = paintOffset.y() + selTop + m_inlineBoxWrapper->ro
ot()->selectionHeight(); |
191 top = min(selTop, top); | 191 top = min(selTop, top); |
192 bottom = max(selBottom, bottom); | 192 bottom = max(selBottom, bottom); |
193 } | 193 } |
194 | 194 |
195 LayoutRect localRepaintRect = paintInfo.rect; | 195 LayoutRect localRepaintRect = paintInfo.rect(); |
196 localRepaintRect.inflate(maximalOutlineSize(paintInfo.phase)); | 196 localRepaintRect.inflate(maximalOutlineSize(paintInfo.phase)); |
197 if (adjustedPaintOffset.x() + visualOverflowRect().x() >= localRepaintRect.m
axX() || adjustedPaintOffset.x() + visualOverflowRect().maxX() <= localRepaintRe
ct.x()) | 197 if (adjustedPaintOffset.x() + visualOverflowRect().x() >= localRepaintRect.m
axX() || adjustedPaintOffset.x() + visualOverflowRect().maxX() <= localRepaintRe
ct.x()) |
198 return false; | 198 return false; |
199 | 199 |
200 if (top >= localRepaintRect.maxY() || bottom <= localRepaintRect.y()) | 200 if (top >= localRepaintRect.maxY() || bottom <= localRepaintRect.y()) |
201 return false; | 201 return false; |
202 | 202 |
203 return true; | 203 return true; |
204 } | 204 } |
205 | 205 |
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
610 | 610 |
611 if (style()) { | 611 if (style()) { |
612 if (v) | 612 if (v) |
613 r.inflate(style()->outlineSize()); | 613 r.inflate(style()->outlineSize()); |
614 } | 614 } |
615 computeRectForRepaint(repaintContainer, r); | 615 computeRectForRepaint(repaintContainer, r); |
616 return r; | 616 return r; |
617 } | 617 } |
618 | 618 |
619 } | 619 } |
OLD | NEW |