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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(LayoutInvalidation
Reason::SizeChanged); | 109 setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(LayoutInvalidation
Reason::SizeChanged); |
110 } | 110 } |
111 | 111 |
112 void LayoutReplaced::paint(const PaintInfo& paintInfo, const LayoutPoint& paintO
ffset) const | 112 void LayoutReplaced::paint(const PaintInfo& paintInfo, const LayoutPoint& paintO
ffset) const |
113 { | 113 { |
114 ReplacedPainter(*this).paint(paintInfo, paintOffset); | 114 ReplacedPainter(*this).paint(paintInfo, paintOffset); |
115 } | 115 } |
116 | 116 |
117 bool LayoutReplaced::shouldPaint(const PaintInfo& paintInfo, const LayoutPoint&
paintOffset) const | 117 bool LayoutReplaced::shouldPaint(const PaintInfo& paintInfo, const LayoutPoint&
paintOffset) const |
118 { | 118 { |
119 if (paintInfo.phase != PaintPhaseForeground && paintInfo.phase != PaintPhase
Outline && paintInfo.phase != PaintPhaseSelfOutline | 119 if (paintInfo.phase != PaintPhaseForeground && !shouldPaintSelfOutline(paint
Info.phase) |
120 && paintInfo.phase != PaintPhaseSelection && paintInfo.phase != PaintPha
seMask && paintInfo.phase != PaintPhaseClippingMask) | 120 && paintInfo.phase != PaintPhaseSelection && paintInfo.phase != PaintPha
seMask && paintInfo.phase != PaintPhaseClippingMask) |
121 return false; | 121 return false; |
122 | 122 |
123 if (!paintInfo.shouldPaintWithinRoot(this)) | 123 if (!paintInfo.shouldPaintWithinRoot(this)) |
124 return false; | 124 return false; |
125 | 125 |
126 // if we're invisible or haven't received a layout yet, then just bail. | 126 // if we're invisible or haven't received a layout yet, then just bail. |
127 if (style()->visibility() != VISIBLE) | 127 if (style()->visibility() != VISIBLE) |
128 return false; | 128 return false; |
129 | 129 |
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
469 // We only include the space below the baseline in our layer's cached paint
invalidation rect if the | 469 // We only include the space below the baseline in our layer's cached paint
invalidation rect if the |
470 // image is selected. Since the selection state has changed update the rect. | 470 // image is selected. Since the selection state has changed update the rect. |
471 if (hasLayer()) | 471 if (hasLayer()) |
472 setPreviousPaintInvalidationRect(boundsRectForPaintInvalidation(containe
rForPaintInvalidation())); | 472 setPreviousPaintInvalidationRect(boundsRectForPaintInvalidation(containe
rForPaintInvalidation())); |
473 | 473 |
474 if (canUpdateSelectionOnRootLineBoxes()) | 474 if (canUpdateSelectionOnRootLineBoxes()) |
475 inlineBoxWrapper()->root().setHasSelectedChildren(state != SelectionNone
); | 475 inlineBoxWrapper()->root().setHasSelectedChildren(state != SelectionNone
); |
476 } | 476 } |
477 | 477 |
478 } | 478 } |
OLD | NEW |