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