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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 | 95 |
96 if (replacedContentRect() != oldContentRect) | 96 if (replacedContentRect() != oldContentRect) |
97 setShouldDoFullPaintInvalidation(); | 97 setShouldDoFullPaintInvalidation(); |
98 } | 98 } |
99 | 99 |
100 void LayoutReplaced::intrinsicSizeChanged() | 100 void LayoutReplaced::intrinsicSizeChanged() |
101 { | 101 { |
102 int scaledWidth = static_cast<int>(defaultWidth * style()->effectiveZoom()); | 102 int scaledWidth = static_cast<int>(defaultWidth * style()->effectiveZoom()); |
103 int scaledHeight = static_cast<int>(defaultHeight * style()->effectiveZoom()
); | 103 int scaledHeight = static_cast<int>(defaultHeight * style()->effectiveZoom()
); |
104 m_intrinsicSize = LayoutSize(scaledWidth, scaledHeight); | 104 m_intrinsicSize = LayoutSize(scaledWidth, scaledHeight); |
105 setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(); | 105 setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(LayoutInvalidation
Reason::SizeChanged); |
106 } | 106 } |
107 | 107 |
108 void LayoutReplaced::paint(const PaintInfo& paintInfo, const LayoutPoint& paintO
ffset) | 108 void LayoutReplaced::paint(const PaintInfo& paintInfo, const LayoutPoint& paintO
ffset) |
109 { | 109 { |
110 ReplacedPainter(*this).paint(paintInfo, paintOffset); | 110 ReplacedPainter(*this).paint(paintInfo, paintOffset); |
111 } | 111 } |
112 | 112 |
113 bool LayoutReplaced::shouldPaint(const PaintInfo& paintInfo, const LayoutPoint&
paintOffset) const | 113 bool LayoutReplaced::shouldPaint(const PaintInfo& paintInfo, const LayoutPoint&
paintOffset) const |
114 { | 114 { |
115 if (paintInfo.phase != PaintPhaseForeground && paintInfo.phase != PaintPhase
Outline && paintInfo.phase != PaintPhaseSelfOutline | 115 if (paintInfo.phase != PaintPhaseForeground && paintInfo.phase != PaintPhase
Outline && paintInfo.phase != PaintPhaseSelfOutline |
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 return LayoutRect(); | 505 return LayoutRect(); |
506 | 506 |
507 // The selectionRect can project outside of the overflowRect, so take their
union | 507 // The selectionRect can project outside of the overflowRect, so take their
union |
508 // for paint invalidation to avoid selection painting glitches. | 508 // for paint invalidation to avoid selection painting glitches. |
509 LayoutRect r = isSelected() ? localSelectionRect() : visualOverflowRect(); | 509 LayoutRect r = isSelected() ? localSelectionRect() : visualOverflowRect(); |
510 mapRectToPaintInvalidationBacking(paintInvalidationContainer, r, paintInvali
dationState); | 510 mapRectToPaintInvalidationBacking(paintInvalidationContainer, r, paintInvali
dationState); |
511 return r; | 511 return r; |
512 } | 512 } |
513 | 513 |
514 } | 514 } |
OLD | NEW |