| 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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 // Early exit if the element touches the edges. | 197 // Early exit if the element touches the edges. |
| 198 LayoutUnit top = adjustedPaintOffset.y() + visualOverflowRect().y(); | 198 LayoutUnit top = adjustedPaintOffset.y() + visualOverflowRect().y(); |
| 199 LayoutUnit bottom = adjustedPaintOffset.y() + visualOverflowRect().maxY(); | 199 LayoutUnit bottom = adjustedPaintOffset.y() + visualOverflowRect().maxY(); |
| 200 if (isSelected() && inlineBoxWrapper()) { | 200 if (isSelected() && inlineBoxWrapper()) { |
| 201 LayoutUnit selTop = paintOffset.y() + inlineBoxWrapper()->root()->select
ionTop(); | 201 LayoutUnit selTop = paintOffset.y() + inlineBoxWrapper()->root()->select
ionTop(); |
| 202 LayoutUnit selBottom = paintOffset.y() + selTop + inlineBoxWrapper()->ro
ot()->selectionHeight(); | 202 LayoutUnit selBottom = paintOffset.y() + selTop + inlineBoxWrapper()->ro
ot()->selectionHeight(); |
| 203 top = min(selTop, top); | 203 top = min(selTop, top); |
| 204 bottom = max(selBottom, bottom); | 204 bottom = max(selBottom, bottom); |
| 205 } | 205 } |
| 206 | 206 |
| 207 LayoutRect localRepaintRect = paintInfo.rect; | 207 if (adjustedPaintOffset.x() + visualOverflowRect().x() >= paintInfo.rect.max
X() || adjustedPaintOffset.x() + visualOverflowRect().maxX() <= paintInfo.rect.x
()) |
| 208 localRepaintRect.inflate(maximalOutlineSize(paintInfo.phase)); | |
| 209 if (adjustedPaintOffset.x() + visualOverflowRect().x() >= localRepaintRect.m
axX() || adjustedPaintOffset.x() + visualOverflowRect().maxX() <= localRepaintRe
ct.x()) | |
| 210 return false; | 208 return false; |
| 211 | 209 |
| 212 if (top >= localRepaintRect.maxY() || bottom <= localRepaintRect.y()) | 210 if (top >= paintInfo.rect.maxY() || bottom <= paintInfo.rect.y()) |
| 213 return false; | 211 return false; |
| 214 | 212 |
| 215 return true; | 213 return true; |
| 216 } | 214 } |
| 217 | 215 |
| 218 static inline RenderBlock* firstContainingBlockWithLogicalWidth(const RenderRepl
aced* replaced) | 216 static inline RenderBlock* firstContainingBlockWithLogicalWidth(const RenderRepl
aced* replaced) |
| 219 { | 217 { |
| 220 // We have to lookup the containing block, which has an explicit width, whic
h must not be equal to our direct containing block. | 218 // We have to lookup the containing block, which has an explicit width, whic
h must not be equal to our direct containing block. |
| 221 // If the embedded document appears _after_ we performed the initial layout,
our intrinsic size is 300x150. If our containing | 219 // If the embedded document appears _after_ we performed the initial layout,
our intrinsic size is 300x150. If our containing |
| 222 // block doesn't provide an explicit width, it's set to the 300 default, com
ing from the initial layout run. | 220 // block doesn't provide an explicit width, it's set to the 300 default, com
ing from the initial layout run. |
| (...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 620 // for repainting to avoid selection painting glitches. | 618 // for repainting to avoid selection painting glitches. |
| 621 LayoutRect r = unionRect(localSelectionRect(false), visualOverflowRect()); | 619 LayoutRect r = unionRect(localSelectionRect(false), visualOverflowRect()); |
| 622 | 620 |
| 623 RenderView* v = view(); | 621 RenderView* v = view(); |
| 624 if (!RuntimeEnabledFeatures::repaintAfterLayoutEnabled() && v) { | 622 if (!RuntimeEnabledFeatures::repaintAfterLayoutEnabled() && v) { |
| 625 // FIXME: layoutDelta needs to be applied in parts before/after transfor
ms and | 623 // FIXME: layoutDelta needs to be applied in parts before/after transfor
ms and |
| 626 // repaint containers. https://bugs.webkit.org/show_bug.cgi?id=23308 | 624 // repaint containers. https://bugs.webkit.org/show_bug.cgi?id=23308 |
| 627 r.move(v->layoutDelta()); | 625 r.move(v->layoutDelta()); |
| 628 } | 626 } |
| 629 | 627 |
| 630 if (style()) { | |
| 631 if (v) | |
| 632 r.inflate(style()->outlineSize()); | |
| 633 } | |
| 634 computeRectForRepaint(repaintContainer, r); | 628 computeRectForRepaint(repaintContainer, r); |
| 635 return r; | 629 return r; |
| 636 } | 630 } |
| 637 | 631 |
| 638 } | 632 } |
| OLD | NEW |