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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 // Early exit if the element touches the edges. | 184 // Early exit if the element touches the edges. |
185 LayoutUnit top = adjustedPaintOffset.y() + visualOverflowRect().y(); | 185 LayoutUnit top = adjustedPaintOffset.y() + visualOverflowRect().y(); |
186 LayoutUnit bottom = adjustedPaintOffset.y() + visualOverflowRect().maxY(); | 186 LayoutUnit bottom = adjustedPaintOffset.y() + visualOverflowRect().maxY(); |
187 if (isSelected() && m_inlineBoxWrapper) { | 187 if (isSelected() && m_inlineBoxWrapper) { |
188 LayoutUnit selTop = paintOffset.y() + m_inlineBoxWrapper->root()->select
ionTop(); | 188 LayoutUnit selTop = paintOffset.y() + m_inlineBoxWrapper->root()->select
ionTop(); |
189 LayoutUnit selBottom = paintOffset.y() + selTop + m_inlineBoxWrapper->ro
ot()->selectionHeight(); | 189 LayoutUnit selBottom = paintOffset.y() + selTop + m_inlineBoxWrapper->ro
ot()->selectionHeight(); |
190 top = min(selTop, top); | 190 top = min(selTop, top); |
191 bottom = max(selBottom, bottom); | 191 bottom = max(selBottom, bottom); |
192 } | 192 } |
193 | 193 |
194 LayoutRect localRepaintRect = paintInfo.rect(); | 194 LayoutRect localRepaintRect = paintInfo.rect; |
195 localRepaintRect.inflate(maximalOutlineSize(paintInfo.phase)); | 195 localRepaintRect.inflate(maximalOutlineSize(paintInfo.phase)); |
196 if (adjustedPaintOffset.x() + visualOverflowRect().x() >= localRepaintRect.m
axX() || adjustedPaintOffset.x() + visualOverflowRect().maxX() <= localRepaintRe
ct.x()) | 196 if (adjustedPaintOffset.x() + visualOverflowRect().x() >= localRepaintRect.m
axX() || adjustedPaintOffset.x() + visualOverflowRect().maxX() <= localRepaintRe
ct.x()) |
197 return false; | 197 return false; |
198 | 198 |
199 if (top >= localRepaintRect.maxY() || bottom <= localRepaintRect.y()) | 199 if (top >= localRepaintRect.maxY() || bottom <= localRepaintRect.y()) |
200 return false; | 200 return false; |
201 | 201 |
202 return true; | 202 return true; |
203 } | 203 } |
204 | 204 |
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
609 | 609 |
610 if (style()) { | 610 if (style()) { |
611 if (v) | 611 if (v) |
612 r.inflate(style()->outlineSize()); | 612 r.inflate(style()->outlineSize()); |
613 } | 613 } |
614 computeRectForRepaint(repaintContainer, r); | 614 computeRectForRepaint(repaintContainer, r); |
615 return r; | 615 return r; |
616 } | 616 } |
617 | 617 |
618 } | 618 } |
OLD | NEW |