OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> | 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> |
3 * 1999 Lars Knoll <knoll@kde.org> | 3 * 1999 Lars Knoll <knoll@kde.org> |
4 * 1999 Antti Koivisto <koivisto@kde.org> | 4 * 1999 Antti Koivisto <koivisto@kde.org> |
5 * 2000 Dirk Mueller <mueller@kde.org> | 5 * 2000 Dirk Mueller <mueller@kde.org> |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
9 * Copyright (C) 2009 Google Inc. All rights reserved. | 9 * Copyright (C) 2009 Google Inc. All rights reserved. |
10 * | 10 * |
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
540 paint_invalidation_rect.Move( | 540 paint_invalidation_rect.Move( |
541 (layout_item.BorderLeft() + layout_item.PaddingLeft()).ToInt(), | 541 (layout_item.BorderLeft() + layout_item.PaddingLeft()).ToInt(), |
542 (layout_item.BorderTop() + layout_item.PaddingTop()).ToInt()); | 542 (layout_item.BorderTop() + layout_item.PaddingTop()).ToInt()); |
543 // FIXME: We should not allow paint invalidation out of paint invalidation | 543 // FIXME: We should not allow paint invalidation out of paint invalidation |
544 // state. crbug.com/457415 | 544 // state. crbug.com/457415 |
545 DisablePaintInvalidationStateAsserts paint_invalidation_assert_disabler; | 545 DisablePaintInvalidationStateAsserts paint_invalidation_assert_disabler; |
546 layout_item.InvalidatePaintRectangle(LayoutRect(paint_invalidation_rect)); | 546 layout_item.InvalidatePaintRectangle(LayoutRect(paint_invalidation_rect)); |
547 } | 547 } |
548 | 548 |
549 void FrameView::SetFrameRect(const IntRect& frame_rect) { | 549 void FrameView::SetFrameRect(const IntRect& frame_rect) { |
550 if (frame_rect == frame_rect_) | 550 bool root_layer_scrolls = RuntimeEnabledFeatures::rootLayerScrollingEnabled(); |
| 551 IntRect old_rect = FrameRect(); |
| 552 if (frame_rect == old_rect) |
551 return; | 553 return; |
552 | 554 |
553 const bool width_changed = frame_rect_.Width() != frame_rect.Width(); | 555 const bool width_changed = frame_rect_.Width() != frame_rect.Width(); |
554 const bool height_changed = frame_rect_.Height() != frame_rect.Height(); | 556 const bool height_changed = frame_rect_.Height() != frame_rect.Height(); |
555 frame_rect_ = frame_rect; | 557 frame_rect_ = frame_rect; |
556 | 558 |
557 needs_scrollbars_update_ = width_changed || height_changed; | 559 needs_scrollbars_update_ |= old_rect.Size() != frame_rect.Size(); |
558 // TODO(wjmaclean): find out why scrollbars fail to resize for complex | 560 |
559 // subframes after changing the zoom level. For now always calling | 561 // If this is not the main frame, then we got here via |
560 // updateScrollbarsIfNeeded() here fixes the issue, but it would be good to | 562 // LayoutPart::UpdateGeometryInternal. In that case, we can't clamp the |
561 // discover the deeper cause of this. http://crbug.com/607987. | 563 // scroll offset yet, because we still need to run UpdateLayout(), so our |
562 UpdateScrollbarsIfNeeded(); | 564 // clamping boundaries may yet change. |
| 565 if (GetFrame().IsMainFrame()) { |
| 566 if (root_layer_scrolls) { |
| 567 if (LayoutView* lv = GetLayoutView()) |
| 568 lv->GetScrollableArea()->ClampScrollOffsetAfterOverflowChange(); |
| 569 } else { |
| 570 AdjustScrollOffsetFromUpdateScrollbars(); |
| 571 } |
| 572 } |
563 | 573 |
564 FrameRectsChanged(); | 574 FrameRectsChanged(); |
565 | 575 |
566 UpdateParentScrollableAreaSet(); | 576 UpdateParentScrollableAreaSet(); |
567 | 577 |
568 if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled() && | 578 if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled() && |
569 !RuntimeEnabledFeatures::rootLayerScrollingEnabled()) { | 579 !root_layer_scrolls) { |
570 // The overflow clip property depends on the frame size and the pre | 580 // The overflow clip property depends on the frame size and the pre |
571 // translation property depends on the frame location. | 581 // translation property depends on the frame location. |
572 SetNeedsPaintPropertyUpdate(); | 582 SetNeedsPaintPropertyUpdate(); |
573 } | 583 } |
574 | 584 |
575 if (auto layout_view_item = this->GetLayoutViewItem()) | 585 if (auto layout_view_item = this->GetLayoutViewItem()) |
576 layout_view_item.SetMayNeedPaintInvalidation(); | 586 layout_view_item.SetMayNeedPaintInvalidation(); |
577 | 587 |
578 if (width_changed || height_changed) { | 588 if (width_changed || height_changed) { |
579 ViewportSizeChanged(width_changed, height_changed); | 589 ViewportSizeChanged(width_changed, height_changed); |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
703 | 713 |
704 Scrollbar* FrameView::CreateScrollbar(ScrollbarOrientation orientation) { | 714 Scrollbar* FrameView::CreateScrollbar(ScrollbarOrientation orientation) { |
705 return scrollbar_manager_.CreateScrollbar(orientation); | 715 return scrollbar_manager_.CreateScrollbar(orientation); |
706 } | 716 } |
707 | 717 |
708 void FrameView::SetContentsSize(const IntSize& size) { | 718 void FrameView::SetContentsSize(const IntSize& size) { |
709 if (size == ContentsSize()) | 719 if (size == ContentsSize()) |
710 return; | 720 return; |
711 | 721 |
712 contents_size_ = size; | 722 contents_size_ = size; |
713 UpdateScrollbars(); | 723 needs_scrollbars_update_ = true; |
714 ScrollableArea::ContentsResized(); | 724 ScrollableArea::ContentsResized(); |
715 | 725 |
716 Page* page = GetFrame().GetPage(); | 726 Page* page = GetFrame().GetPage(); |
717 if (!page) | 727 if (!page) |
718 return; | 728 return; |
719 | 729 |
720 UpdateParentScrollableAreaSet(); | |
721 | |
722 page->GetChromeClient().ContentsSizeChanged(frame_.Get(), size); | 730 page->GetChromeClient().ContentsSizeChanged(frame_.Get(), size); |
723 | 731 |
724 // Ensure the scrollToFragmentAnchor is called before | 732 // Ensure the scrollToFragmentAnchor is called before |
725 // restoreScrollPositionAndViewState when reload | 733 // restoreScrollPositionAndViewState when reload |
726 ScrollToFragmentAnchor(); | 734 ScrollToFragmentAnchor(); |
727 GetFrame().Loader().RestoreScrollPositionAndViewState(); | 735 GetFrame().Loader().RestoreScrollPositionAndViewState(); |
728 } | 736 } |
729 | 737 |
730 void FrameView::AdjustViewSize() { | 738 void FrameView::AdjustViewSize() { |
731 if (suppress_adjust_view_size_) | 739 if (suppress_adjust_view_size_) |
732 return; | 740 return; |
733 | 741 |
734 LayoutViewItem layout_view_item = this->GetLayoutViewItem(); | 742 LayoutViewItem layout_view_item = this->GetLayoutViewItem(); |
735 if (layout_view_item.IsNull()) | 743 if (layout_view_item.IsNull()) |
736 return; | 744 return; |
737 | 745 |
738 ASSERT(frame_->View() == this); | 746 ASSERT(frame_->View() == this); |
739 | 747 |
740 const IntRect rect = layout_view_item.DocumentRect(); | 748 const IntRect rect = layout_view_item.DocumentRect(); |
741 const IntSize& size = rect.Size(); | 749 const IntSize& size = rect.Size(); |
742 | 750 |
743 const IntPoint origin(-rect.X(), -rect.Y()); | 751 const IntPoint origin(-rect.X(), -rect.Y()); |
744 if (ScrollOrigin() != origin) { | 752 if (ScrollOrigin() != origin) { |
745 SetScrollOrigin(origin); | 753 ScrollableArea::SetScrollOrigin(origin); |
746 // setContentSize (below) also calls updateScrollbars so we can avoid | |
747 // updating scrollbars twice by skipping the call here when the content | |
748 // size does not change. | |
749 if (!frame_->GetDocument()->Printing() && size == ContentsSize()) | |
750 UpdateScrollbars(); | |
751 } | 754 } |
752 | 755 |
753 SetContentsSize(size); | 756 SetContentsSize(size); |
754 } | 757 } |
755 | 758 |
756 void FrameView::AdjustViewSizeAndLayout() { | 759 void FrameView::AdjustViewSizeAndLayout() { |
757 AdjustViewSize(); | 760 AdjustViewSize(); |
758 if (NeedsLayout()) { | 761 if (NeedsLayout()) { |
759 AutoReset<bool> suppress_adjust_view_size(&suppress_adjust_view_size_, | 762 AutoReset<bool> suppress_adjust_view_size(&suppress_adjust_view_size_, |
760 true); | 763 true); |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
877 | 880 |
878 bool has_horizontal_scrollbar = HorizontalScrollbar(); | 881 bool has_horizontal_scrollbar = HorizontalScrollbar(); |
879 bool has_vertical_scrollbar = VerticalScrollbar(); | 882 bool has_vertical_scrollbar = VerticalScrollbar(); |
880 if (has_horizontal_scrollbar != should_have_horizontal_scrollbar || | 883 if (has_horizontal_scrollbar != should_have_horizontal_scrollbar || |
881 has_vertical_scrollbar != should_have_vertical_scrollbar) { | 884 has_vertical_scrollbar != should_have_vertical_scrollbar) { |
882 SetNeedsLayout(); | 885 SetNeedsLayout(); |
883 return; | 886 return; |
884 } | 887 } |
885 | 888 |
886 AdjustViewSize(); | 889 AdjustViewSize(); |
| 890 // UpdateScrollbars(); |
887 UpdateScrollbarGeometry(); | 891 UpdateScrollbarGeometry(); |
888 | 892 |
889 if (ScrollOriginChanged()) | 893 if (ScrollOriginChanged()) |
890 SetNeedsLayout(); | 894 SetNeedsLayout(); |
891 } | 895 } |
892 | 896 |
893 bool FrameView::UsesCompositedScrolling() const { | 897 bool FrameView::UsesCompositedScrolling() const { |
894 LayoutViewItem layout_view = this->GetLayoutViewItem(); | 898 LayoutViewItem layout_view = this->GetLayoutViewItem(); |
895 if (layout_view.IsNull()) | 899 if (layout_view.IsNull()) |
896 return false; | 900 return false; |
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1301 else if (root_layout_object && | 1305 else if (root_layout_object && |
1302 root_layout_object->StretchesToViewport()) | 1306 root_layout_object->StretchesToViewport()) |
1303 root_layout_object->SetChildNeedsLayout(); | 1307 root_layout_object->SetChildNeedsLayout(); |
1304 } | 1308 } |
1305 } | 1309 } |
1306 | 1310 |
1307 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID( | 1311 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID( |
1308 TRACE_DISABLED_BY_DEFAULT("blink.debug.layout.trees"), "LayoutTree", | 1312 TRACE_DISABLED_BY_DEFAULT("blink.debug.layout.trees"), "LayoutTree", |
1309 this, TracedLayoutObject::Create(*GetLayoutView(), false)); | 1313 this, TracedLayoutObject::Create(*GetLayoutView(), false)); |
1310 | 1314 |
| 1315 IntSize old_size(Size()); |
| 1316 |
1311 PerformLayout(in_subtree_layout); | 1317 PerformLayout(in_subtree_layout); |
| 1318 UpdateScrollbars(); |
| 1319 UpdateParentScrollableAreaSet(); |
1312 | 1320 |
1313 if (!in_subtree_layout && !document->Printing()) | 1321 IntSize new_size(Size()); |
1314 AdjustViewSizeAndLayout(); | 1322 if (old_size != new_size) { |
| 1323 needs_scrollbars_update_ = true; |
| 1324 SetNeedsLayout(); |
| 1325 MarkViewportConstrainedObjectsForLayout( |
| 1326 old_size.Width() != new_size.Width(), |
| 1327 old_size.Height() != new_size.Height()); |
| 1328 } |
| 1329 |
| 1330 if (NeedsLayout()) { |
| 1331 AutoReset<bool> suppress(&suppress_adjust_view_size_, true); |
| 1332 UpdateLayout(); |
| 1333 } |
1315 | 1334 |
1316 ASSERT(layout_subtree_root_list_.IsEmpty()); | 1335 ASSERT(layout_subtree_root_list_.IsEmpty()); |
1317 } // Reset m_layoutSchedulingEnabled to its previous value. | 1336 } // Reset m_layoutSchedulingEnabled to its previous value. |
1318 CheckDoesNotNeedLayout(); | 1337 CheckDoesNotNeedLayout(); |
1319 | 1338 |
1320 frame_timing_requests_dirty_ = true; | 1339 frame_timing_requests_dirty_ = true; |
1321 | 1340 |
1322 // FIXME: Could find the common ancestor layer of all dirty subtrees and mark | 1341 // FIXME: Could find the common ancestor layer of all dirty subtrees and mark |
1323 // from there. crbug.com/462719 | 1342 // from there. crbug.com/462719 |
1324 GetLayoutViewItem().EnclosingLayer()->UpdateLayerPositionsAfterLayout(); | 1343 GetLayoutViewItem().EnclosingLayer()->UpdateLayerPositionsAfterLayout(); |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1663 if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) | 1682 if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) |
1664 SetNeedsPaintPropertyUpdate(); | 1683 SetNeedsPaintPropertyUpdate(); |
1665 } else { | 1684 } else { |
1666 layout_view.Compositor()->FrameViewDidChangeSize(); | 1685 layout_view.Compositor()->FrameViewDidChangeSize(); |
1667 } | 1686 } |
1668 } | 1687 } |
1669 } | 1688 } |
1670 | 1689 |
1671 ShowOverlayScrollbars(); | 1690 ShowOverlayScrollbars(); |
1672 | 1691 |
1673 if (root_layer_scrolling_enabled) { | |
1674 // The background must be repainted when the FrameView is resized, even if | |
1675 // the initial containing block does not change (so we can't rely on layout | |
1676 // to issue the invalidation). This is because the background fills the | |
1677 // main GraphicsLayer, which takes the size of the layout viewport. | |
1678 // TODO(skobes): Paint non-fixed backgrounds into the scrolling contents | |
1679 // layer and avoid this invalidation (http://crbug.com/568847). | |
1680 LayoutViewItem lvi = GetLayoutViewItem(); | |
1681 if (!lvi.IsNull()) | |
1682 lvi.SetShouldDoFullPaintInvalidation(); | |
1683 } | |
1684 | |
1685 if (RuntimeEnabledFeatures::inertTopControlsEnabled() && GetLayoutView() && | 1692 if (RuntimeEnabledFeatures::inertTopControlsEnabled() && GetLayoutView() && |
1686 frame_->IsMainFrame() && | 1693 frame_->IsMainFrame() && |
1687 frame_->GetPage()->GetBrowserControls().Height()) { | 1694 frame_->GetPage()->GetBrowserControls().Height()) { |
1688 if (GetLayoutView()->Style()->HasFixedBackgroundImage()) { | 1695 if (GetLayoutView()->Style()->HasFixedBackgroundImage()) { |
1689 // In the case where we don't change layout size from top control resizes, | 1696 // In the case where we don't change layout size from top control resizes, |
1690 // we wont perform a layout. If we have a fixed background image however, | 1697 // we wont perform a layout. If we have a fixed background image however, |
1691 // the background layer needs to get resized so we should request a layout | 1698 // the background layer needs to get resized so we should request a layout |
1692 // explicitly. | 1699 // explicitly. |
1693 PaintLayer* layer = GetLayoutView()->Layer(); | 1700 PaintLayer* layer = GetLayoutView()->Layer(); |
1694 if (GetLayoutView()->Compositor()->NeedsFixedRootBackgroundLayer(layer)) { | 1701 if (GetLayoutView()->Compositor()->NeedsFixedRootBackgroundLayer(layer)) { |
1695 SetNeedsLayout(); | 1702 SetNeedsLayout(); |
1696 } else if (!root_layer_scrolling_enabled) { | 1703 } else { |
1697 // If root layer scrolls is on, we've already issued a full invalidation | 1704 // If root layer scrolls is on, we've already issued a full invalidation |
1698 // above. | 1705 // above. |
1699 GetLayoutView()->SetShouldDoFullPaintInvalidationOnResizeIfNeeded( | 1706 GetLayoutView()->SetShouldDoFullPaintInvalidationOnResizeIfNeeded( |
1700 width_changed, height_changed); | 1707 width_changed, height_changed); |
1701 } | 1708 } |
1702 } else if (height_changed && !root_layer_scrolling_enabled) { | 1709 } else if (height_changed) { |
1703 // If the document rect doesn't fill the full view height, hiding the | 1710 // If the document rect doesn't fill the full view height, hiding the |
1704 // URL bar will expose area outside the current LayoutView so we need to | 1711 // URL bar will expose area outside the current LayoutView so we need to |
1705 // paint additional background. If RLS is on, we've already invalidated | 1712 // paint additional background. If RLS is on, we've already invalidated |
1706 // above. | 1713 // above. |
1707 LayoutViewItem lvi = GetLayoutViewItem(); | 1714 LayoutViewItem lvi = GetLayoutViewItem(); |
1708 DCHECK(!lvi.IsNull()); | 1715 DCHECK(!lvi.IsNull()); |
1709 if (lvi.DocumentRect().Height() < lvi.ViewRect().Height()) | 1716 if (lvi.DocumentRect().Height() < lvi.ViewRect().Height()) |
1710 lvi.SetShouldDoFullPaintInvalidation(); | 1717 lvi.SetShouldDoFullPaintInvalidation(); |
1711 } | 1718 } |
1712 } | 1719 } |
1713 | 1720 |
1714 if (!HasViewportConstrainedObjects()) | 1721 if (GetFrame().GetDocument() && !IsInPerformLayout()) |
| 1722 MarkViewportConstrainedObjectsForLayout(width_changed, height_changed); |
| 1723 } |
| 1724 |
| 1725 void FrameView::MarkViewportConstrainedObjectsForLayout(bool width_changed, |
| 1726 bool height_changed) { |
| 1727 if (!HasViewportConstrainedObjects() || !(width_changed || height_changed)) |
1715 return; | 1728 return; |
1716 | 1729 |
1717 for (const auto& viewport_constrained_object : | 1730 for (const auto& viewport_constrained_object : |
1718 *viewport_constrained_objects_) { | 1731 *viewport_constrained_objects_) { |
1719 LayoutObject* layout_object = viewport_constrained_object; | 1732 LayoutObject* layout_object = viewport_constrained_object; |
1720 const ComputedStyle& style = layout_object->StyleRef(); | 1733 const ComputedStyle& style = layout_object->StyleRef(); |
1721 if (width_changed) { | 1734 if (width_changed) { |
1722 if (style.Width().IsFixed() && | 1735 if (style.Width().IsFixed() && |
1723 (style.Left().IsAuto() || style.Right().IsAuto())) | 1736 (style.Left().IsAuto() || style.Right().IsAuto())) |
1724 layout_object->SetNeedsPositionedMovementLayout(); | 1737 layout_object->SetNeedsPositionedMovementLayout(); |
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2155 // frame(). | 2168 // frame(). |
2156 if (!GetFrame().View()) | 2169 if (!GetFrame().View()) |
2157 return; | 2170 return; |
2158 | 2171 |
2159 Element* custom_scrollbar_element = nullptr; | 2172 Element* custom_scrollbar_element = nullptr; |
2160 | 2173 |
2161 bool uses_overlay_scrollbars = | 2174 bool uses_overlay_scrollbars = |
2162 ScrollbarTheme::GetTheme().UsesOverlayScrollbars() && | 2175 ScrollbarTheme::GetTheme().UsesOverlayScrollbars() && |
2163 !ShouldUseCustomScrollbars(custom_scrollbar_element); | 2176 !ShouldUseCustomScrollbars(custom_scrollbar_element); |
2164 | 2177 |
2165 // FIXME: this call to layout() could be called within FrameView::layout(), | |
2166 // but before performLayout(), causing double-layout. See also | |
2167 // crbug.com/429242. | |
2168 if (!uses_overlay_scrollbars && NeedsLayout()) | 2178 if (!uses_overlay_scrollbars && NeedsLayout()) |
2169 UpdateLayout(); | 2179 UpdateLayout(); |
2170 | 2180 |
2171 if (!GetLayoutViewItem().IsNull() && GetLayoutViewItem().UsesCompositing()) { | 2181 if (!GetLayoutViewItem().IsNull() && GetLayoutViewItem().UsesCompositing()) { |
2172 GetLayoutViewItem().Compositor()->FrameViewScrollbarsExistenceDidChange(); | 2182 GetLayoutViewItem().Compositor()->FrameViewScrollbarsExistenceDidChange(); |
2173 | 2183 |
2174 if (!uses_overlay_scrollbars) | 2184 if (!uses_overlay_scrollbars) |
2175 GetLayoutViewItem().Compositor()->FrameViewDidChangeSize(); | 2185 GetLayoutViewItem().Compositor()->FrameViewDidChangeSize(); |
2176 } | 2186 } |
2177 } | 2187 } |
(...skipping 1412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3590 if (!horizontal_writing_mode) | 3600 if (!horizontal_writing_mode) |
3591 overflow = overflow.TransposedRect(); | 3601 overflow = overflow.TransposedRect(); |
3592 AdjustViewSizeAndLayout(); | 3602 AdjustViewSizeAndLayout(); |
3593 // This is how we clip in case we overflow again. | 3603 // This is how we clip in case we overflow again. |
3594 layout_view->ClearLayoutOverflow(); | 3604 layout_view->ClearLayoutOverflow(); |
3595 layout_view->AddLayoutOverflow(overflow); | 3605 layout_view->AddLayoutOverflow(overflow); |
3596 return; | 3606 return; |
3597 } | 3607 } |
3598 } | 3608 } |
3599 | 3609 |
| 3610 if (TextAutosizer* text_autosizer = frame_->GetDocument()->GetTextAutosizer()) |
| 3611 text_autosizer->UpdatePageInfo(); |
3600 AdjustViewSizeAndLayout(); | 3612 AdjustViewSizeAndLayout(); |
3601 } | 3613 } |
3602 | 3614 |
3603 IntRect FrameView::ConvertFromLayoutItem( | 3615 IntRect FrameView::ConvertFromLayoutItem( |
3604 const LayoutItem& layout_item, | 3616 const LayoutItem& layout_item, |
3605 const IntRect& layout_object_rect) const { | 3617 const IntRect& layout_object_rect) const { |
3606 // Convert from page ("absolute") to FrameView coordinates. | 3618 // Convert from page ("absolute") to FrameView coordinates. |
3607 LayoutRect rect = EnclosingLayoutRect( | 3619 LayoutRect rect = EnclosingLayoutRect( |
3608 layout_item.LocalToAbsoluteQuad(FloatRect(layout_object_rect)) | 3620 layout_item.LocalToAbsoluteQuad(FloatRect(layout_object_rect)) |
3609 .BoundingBox()); | 3621 .BoundingBox()); |
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4310 if (!scrollbar_existence_changed) | 4322 if (!scrollbar_existence_changed) |
4311 return false; | 4323 return false; |
4312 | 4324 |
4313 scrollbar_manager_.SetHasHorizontalScrollbar(new_has_horizontal_scrollbar); | 4325 scrollbar_manager_.SetHasHorizontalScrollbar(new_has_horizontal_scrollbar); |
4314 scrollbar_manager_.SetHasVerticalScrollbar(new_has_vertical_scrollbar); | 4326 scrollbar_manager_.SetHasVerticalScrollbar(new_has_vertical_scrollbar); |
4315 | 4327 |
4316 if (scrollbars_suppressed_) | 4328 if (scrollbars_suppressed_) |
4317 return true; | 4329 return true; |
4318 | 4330 |
4319 if (!HasOverlayScrollbars()) | 4331 if (!HasOverlayScrollbars()) |
4320 ContentsResized(); | 4332 SetNeedsLayout(); |
4321 ScrollbarExistenceDidChange(); | 4333 ScrollbarExistenceDidChange(); |
4322 return true; | 4334 return true; |
4323 } | 4335 } |
4324 | 4336 |
4325 bool FrameView::NeedsScrollbarReconstruction() const { | 4337 bool FrameView::NeedsScrollbarReconstruction() const { |
4326 Scrollbar* scrollbar = HorizontalScrollbar(); | 4338 Scrollbar* scrollbar = HorizontalScrollbar(); |
4327 if (!scrollbar) | 4339 if (!scrollbar) |
4328 scrollbar = VerticalScrollbar(); | 4340 scrollbar = VerticalScrollbar(); |
4329 if (!scrollbar) { | 4341 if (!scrollbar) { |
4330 // We have no scrollbar to reconstruct. | 4342 // We have no scrollbar to reconstruct. |
(...skipping 1055 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5386 void FrameView::SetAnimationHost( | 5398 void FrameView::SetAnimationHost( |
5387 std::unique_ptr<CompositorAnimationHost> host) { | 5399 std::unique_ptr<CompositorAnimationHost> host) { |
5388 animation_host_ = std::move(host); | 5400 animation_host_ = std::move(host); |
5389 } | 5401 } |
5390 | 5402 |
5391 LayoutUnit FrameView::CaretWidth() const { | 5403 LayoutUnit FrameView::CaretWidth() const { |
5392 return LayoutUnit(GetChromeClient()->WindowToViewportScalar(1)); | 5404 return LayoutUnit(GetChromeClient()->WindowToViewportScalar(1)); |
5393 } | 5405 } |
5394 | 5406 |
5395 } // namespace blink | 5407 } // namespace blink |
OLD | NEW |