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 728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
739 LocalToAbsoluteQuad(FloatRect(0, 0, frame_rect_.Width().ToFloat(), | 739 LocalToAbsoluteQuad(FloatRect(0, 0, frame_rect_.Width().ToFloat(), |
740 frame_rect_.Height().ToFloat()), | 740 frame_rect_.Height().ToFloat()), |
741 mode)); | 741 mode)); |
742 } | 742 } |
743 | 743 |
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::UpdateLayerTransformAfterLayout() { | 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()->UpdateSizeAndScrollingAfterLayout(); |
| 755 } |
754 } | 756 } |
755 | 757 |
756 LayoutUnit LayoutBox::LogicalHeightWithVisibleOverflow() const { | 758 LayoutUnit LayoutBox::LogicalHeightWithVisibleOverflow() const { |
757 if (!overflow_ || HasOverflowClip()) | 759 if (!overflow_ || HasOverflowClip()) |
758 return LogicalHeight(); | 760 return LogicalHeight(); |
759 LayoutRect overflow = LayoutOverflowRect(); | 761 LayoutRect overflow = LayoutOverflowRect(); |
760 if (Style()->IsHorizontalWritingMode()) | 762 if (Style()->IsHorizontalWritingMode()) |
761 return overflow.MaxY(); | 763 return overflow.MaxY(); |
762 return overflow.MaxX(); | 764 return overflow.MaxX(); |
763 } | 765 } |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
831 return logical_height; | 833 return logical_height; |
832 } | 834 } |
833 | 835 |
834 void LayoutBox::SetLocationAndUpdateOverflowControlsIfNeeded( | 836 void LayoutBox::SetLocationAndUpdateOverflowControlsIfNeeded( |
835 const LayoutPoint& location) { | 837 const LayoutPoint& location) { |
836 if (HasOverflowClip()) { | 838 if (HasOverflowClip()) { |
837 IntSize old_pixel_snapped_border_rect_size = | 839 IntSize old_pixel_snapped_border_rect_size = |
838 PixelSnappedBorderBoxRect().Size(); | 840 PixelSnappedBorderBoxRect().Size(); |
839 SetLocation(location); | 841 SetLocation(location); |
840 if (PixelSnappedBorderBoxRect().Size() != | 842 if (PixelSnappedBorderBoxRect().Size() != |
841 old_pixel_snapped_border_rect_size) | 843 old_pixel_snapped_border_rect_size) { |
842 GetScrollableArea()->UpdateAfterLayout(); | 844 Layer()->UpdateSizeAndScrollingAfterLayout(); |
| 845 } |
843 return; | 846 return; |
844 } | 847 } |
845 | 848 |
846 SetLocation(location); | 849 SetLocation(location); |
847 } | 850 } |
848 | 851 |
849 IntRect LayoutBox::AbsoluteContentBox() const { | 852 IntRect LayoutBox::AbsoluteContentBox() const { |
850 // This is wrong with transforms and flipped writing modes. | 853 // This is wrong with transforms and flipped writing modes. |
851 IntRect rect = PixelSnappedIntRect(ContentBoxRect()); | 854 IntRect rect = PixelSnappedIntRect(ContentBoxRect()); |
852 FloatPoint abs_pos = LocalToAbsolute(); | 855 FloatPoint abs_pos = LocalToAbsolute(); |
(...skipping 5047 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5900 void LayoutBox::MutableForPainting:: | 5903 void LayoutBox::MutableForPainting:: |
5901 SavePreviousContentBoxSizeAndLayoutOverflowRect() { | 5904 SavePreviousContentBoxSizeAndLayoutOverflowRect() { |
5902 auto& rare_data = GetLayoutBox().EnsureRareData(); | 5905 auto& rare_data = GetLayoutBox().EnsureRareData(); |
5903 rare_data.has_previous_content_box_size_and_layout_overflow_rect_ = true; | 5906 rare_data.has_previous_content_box_size_and_layout_overflow_rect_ = true; |
5904 rare_data.previous_content_box_size_ = GetLayoutBox().ContentBoxRect().Size(); | 5907 rare_data.previous_content_box_size_ = GetLayoutBox().ContentBoxRect().Size(); |
5905 rare_data.previous_layout_overflow_rect_ = | 5908 rare_data.previous_layout_overflow_rect_ = |
5906 GetLayoutBox().LayoutOverflowRect(); | 5909 GetLayoutBox().LayoutOverflowRect(); |
5907 } | 5910 } |
5908 | 5911 |
5909 } // namespace blink | 5912 } // namespace blink |
OLD | NEW |