OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) | 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) |
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) |
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. |
7 * All rights reserved. | 7 * All rights reserved. |
8 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 8 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. |
9 * | 9 * |
10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
(...skipping 1867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1878 // PaintInvalidationDelayedFull is onscreen. | 1878 // PaintInvalidationDelayedFull is onscreen. |
1879 if (IntersectsVisibleViewport()) { | 1879 if (IntersectsVisibleViewport()) { |
1880 // Conservatively assume the delayed paint invalidation was caused by | 1880 // Conservatively assume the delayed paint invalidation was caused by |
1881 // background image change. | 1881 // background image change. |
1882 SetBackgroundChangedSinceLastPaintInvalidation(); | 1882 SetBackgroundChangedSinceLastPaintInvalidation(); |
1883 SetShouldDoFullPaintInvalidationWithoutGeometryChange( | 1883 SetShouldDoFullPaintInvalidationWithoutGeometryChange( |
1884 kPaintInvalidationFull); | 1884 kPaintInvalidationFull); |
1885 } | 1885 } |
1886 } | 1886 } |
1887 | 1887 |
1888 PaintInvalidationReason LayoutBox::InvalidatePaintIfNeeded( | 1888 PaintInvalidationReason LayoutBox::InvalidatePaint( |
1889 const PaintInvalidationState& paint_invalidation_state) { | 1889 const PaintInvalidationState& paint_invalidation_state) { |
1890 if (HasBoxDecorationBackground() | 1890 if (HasBoxDecorationBackground() |
1891 // We also paint overflow controls in background phase. | 1891 // We also paint overflow controls in background phase. |
1892 || (HasOverflowClip() && GetScrollableArea()->HasOverflowControls())) { | 1892 || (HasOverflowClip() && GetScrollableArea()->HasOverflowControls())) { |
1893 PaintLayer& layer = paint_invalidation_state.PaintingLayer(); | 1893 PaintLayer& layer = paint_invalidation_state.PaintingLayer(); |
1894 if (&layer.GetLayoutObject() != this) | 1894 if (&layer.GetLayoutObject() != this) |
1895 layer.SetNeedsPaintPhaseDescendantBlockBackgrounds(); | 1895 layer.SetNeedsPaintPhaseDescendantBlockBackgrounds(); |
1896 } | 1896 } |
1897 | 1897 |
1898 return LayoutBoxModelObject::InvalidatePaintIfNeeded( | 1898 return LayoutBoxModelObject::InvalidatePaint(paint_invalidation_state); |
1899 paint_invalidation_state); | |
1900 } | 1899 } |
1901 | 1900 |
1902 PaintInvalidationReason LayoutBox::InvalidatePaintIfNeeded( | 1901 PaintInvalidationReason LayoutBox::InvalidatePaint( |
1903 const PaintInvalidatorContext& context) const { | 1902 const PaintInvalidatorContext& context) const { |
1904 return BoxPaintInvalidator(*this, context).InvalidatePaintIfNeeded(); | 1903 return BoxPaintInvalidator(*this, context).InvalidatePaint(); |
1905 } | 1904 } |
1906 | 1905 |
1907 LayoutRect LayoutBox::OverflowClipRect( | 1906 LayoutRect LayoutBox::OverflowClipRect( |
1908 const LayoutPoint& location, | 1907 const LayoutPoint& location, |
1909 OverlayScrollbarClipBehavior overlay_scrollbar_clip_behavior) const { | 1908 OverlayScrollbarClipBehavior overlay_scrollbar_clip_behavior) const { |
1910 // FIXME: When overflow-clip (CSS3) is implemented, we'll obtain the property | 1909 // FIXME: When overflow-clip (CSS3) is implemented, we'll obtain the property |
1911 // here. | 1910 // here. |
1912 LayoutRect clip_rect = BorderBoxRect(); | 1911 LayoutRect clip_rect = BorderBoxRect(); |
1913 clip_rect.SetLocation(location + clip_rect.Location() + | 1912 clip_rect.SetLocation(location + clip_rect.Location() + |
1914 LayoutSize(BorderLeft(), BorderTop())); | 1913 LayoutSize(BorderLeft(), BorderTop())); |
(...skipping 3985 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5900 void LayoutBox::MutableForPainting:: | 5899 void LayoutBox::MutableForPainting:: |
5901 SavePreviousContentBoxSizeAndLayoutOverflowRect() { | 5900 SavePreviousContentBoxSizeAndLayoutOverflowRect() { |
5902 auto& rare_data = GetLayoutBox().EnsureRareData(); | 5901 auto& rare_data = GetLayoutBox().EnsureRareData(); |
5903 rare_data.has_previous_content_box_size_and_layout_overflow_rect_ = true; | 5902 rare_data.has_previous_content_box_size_and_layout_overflow_rect_ = true; |
5904 rare_data.previous_content_box_size_ = GetLayoutBox().ContentBoxRect().Size(); | 5903 rare_data.previous_content_box_size_ = GetLayoutBox().ContentBoxRect().Size(); |
5905 rare_data.previous_layout_overflow_rect_ = | 5904 rare_data.previous_layout_overflow_rect_ = |
5906 GetLayoutBox().LayoutOverflowRect(); | 5905 GetLayoutBox().LayoutOverflowRect(); |
5907 } | 5906 } |
5908 | 5907 |
5909 } // namespace blink | 5908 } // namespace blink |
OLD | NEW |