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 733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
744 FloatRect LayoutBox::LocalBoundingBoxRectForAccessibility() const { | 744 FloatRect LayoutBox::LocalBoundingBoxRectForAccessibility() const { |
745 return FloatRect(0, 0, frame_rect_.Width().ToFloat(), | 745 return FloatRect(0, 0, frame_rect_.Width().ToFloat(), |
746 frame_rect_.Height().ToFloat()); | 746 frame_rect_.Height().ToFloat()); |
747 } | 747 } |
748 | 748 |
749 void LayoutBox::UpdateAfterLayout() { | 749 void LayoutBox::UpdateAfterLayout() { |
750 // Transform-origin depends on box size, so we need to update the layer | 750 // Transform-origin depends on box size, so we need to update the layer |
751 // transform after layout. | 751 // transform after layout. |
752 if (HasLayer()) { | 752 if (HasLayer()) { |
753 Layer()->UpdateTransformationMatrix(); | 753 Layer()->UpdateTransformationMatrix(); |
754 Layer()->UpdateScrollingAfterLayout(); | 754 Layer()->UpdateSizeAndScrollingAfterLayout(); |
755 } | 755 } |
756 } | 756 } |
757 | 757 |
758 LayoutUnit LayoutBox::LogicalHeightWithVisibleOverflow() const { | 758 LayoutUnit LayoutBox::LogicalHeightWithVisibleOverflow() const { |
759 if (!overflow_ || HasOverflowClip()) | 759 if (!overflow_ || HasOverflowClip()) |
760 return LogicalHeight(); | 760 return LogicalHeight(); |
761 LayoutRect overflow = LayoutOverflowRect(); | 761 LayoutRect overflow = LayoutOverflowRect(); |
762 if (Style()->IsHorizontalWritingMode()) | 762 if (Style()->IsHorizontalWritingMode()) |
763 return overflow.MaxY(); | 763 return overflow.MaxY(); |
764 return overflow.MaxX(); | 764 return overflow.MaxX(); |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
834 } | 834 } |
835 | 835 |
836 void LayoutBox::SetLocationAndUpdateOverflowControlsIfNeeded( | 836 void LayoutBox::SetLocationAndUpdateOverflowControlsIfNeeded( |
837 const LayoutPoint& location) { | 837 const LayoutPoint& location) { |
838 if (HasOverflowClip()) { | 838 if (HasOverflowClip()) { |
839 IntSize old_pixel_snapped_border_rect_size = | 839 IntSize old_pixel_snapped_border_rect_size = |
840 PixelSnappedBorderBoxRect().Size(); | 840 PixelSnappedBorderBoxRect().Size(); |
841 SetLocation(location); | 841 SetLocation(location); |
842 if (PixelSnappedBorderBoxRect().Size() != | 842 if (PixelSnappedBorderBoxRect().Size() != |
843 old_pixel_snapped_border_rect_size) { | 843 old_pixel_snapped_border_rect_size) { |
844 Layer()->UpdateScrollingAfterLayout(); | 844 Layer()->UpdateSizeAndScrollingAfterLayout(); |
845 } | 845 } |
846 return; | 846 return; |
847 } | 847 } |
848 | 848 |
849 SetLocation(location); | 849 SetLocation(location); |
850 } | 850 } |
851 | 851 |
852 IntRect LayoutBox::AbsoluteContentBox() const { | 852 IntRect LayoutBox::AbsoluteContentBox() const { |
853 // This is wrong with transforms and flipped writing modes. | 853 // This is wrong with transforms and flipped writing modes. |
854 IntRect rect = PixelSnappedIntRect(ContentBoxRect()); | 854 IntRect rect = PixelSnappedIntRect(ContentBoxRect()); |
(...skipping 5052 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5907 void LayoutBox::MutableForPainting:: | 5907 void LayoutBox::MutableForPainting:: |
5908 SavePreviousContentBoxSizeAndLayoutOverflowRect() { | 5908 SavePreviousContentBoxSizeAndLayoutOverflowRect() { |
5909 auto& rare_data = GetLayoutBox().EnsureRareData(); | 5909 auto& rare_data = GetLayoutBox().EnsureRareData(); |
5910 rare_data.has_previous_content_box_size_and_layout_overflow_rect_ = true; | 5910 rare_data.has_previous_content_box_size_and_layout_overflow_rect_ = true; |
5911 rare_data.previous_content_box_size_ = GetLayoutBox().ContentBoxRect().Size(); | 5911 rare_data.previous_content_box_size_ = GetLayoutBox().ContentBoxRect().Size(); |
5912 rare_data.previous_layout_overflow_rect_ = | 5912 rare_data.previous_layout_overflow_rect_ = |
5913 GetLayoutBox().LayoutOverflowRect(); | 5913 GetLayoutBox().LayoutOverflowRect(); |
5914 } | 5914 } |
5915 | 5915 |
5916 } // namespace blink | 5916 } // namespace blink |
OLD | NEW |