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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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(); |
887 UpdateScrollbarGeometry(); | 890 UpdateScrollbarGeometry(); |
| 891 SetNeedsPaintPropertyUpdate(); |
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; |
897 if (frame_->GetSettings() && | 901 if (frame_->GetSettings() && |
(...skipping 403 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 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1664 if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) | 1683 if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) |
1665 SetNeedsPaintPropertyUpdate(); | 1684 SetNeedsPaintPropertyUpdate(); |
1666 } else { | 1685 } else { |
1667 layout_view.Compositor()->FrameViewDidChangeSize(); | 1686 layout_view.Compositor()->FrameViewDidChangeSize(); |
1668 } | 1687 } |
1669 } | 1688 } |
1670 } | 1689 } |
1671 | 1690 |
1672 ShowOverlayScrollbars(); | 1691 ShowOverlayScrollbars(); |
1673 | 1692 |
1674 if (root_layer_scrolling_enabled) { | |
1675 // The background must be repainted when the FrameView is resized, even if | |
1676 // the initial containing block does not change (so we can't rely on layout | |
1677 // to issue the invalidation). This is because the background fills the | |
1678 // main GraphicsLayer, which takes the size of the layout viewport. | |
1679 // TODO(skobes): Paint non-fixed backgrounds into the scrolling contents | |
1680 // layer and avoid this invalidation (http://crbug.com/568847). | |
1681 LayoutViewItem lvi = GetLayoutViewItem(); | |
1682 if (!lvi.IsNull()) | |
1683 lvi.SetShouldDoFullPaintInvalidation(); | |
1684 } | |
1685 | |
1686 if (RuntimeEnabledFeatures::inertTopControlsEnabled() && GetLayoutView() && | 1693 if (RuntimeEnabledFeatures::inertTopControlsEnabled() && GetLayoutView() && |
1687 frame_->IsMainFrame() && | 1694 frame_->IsMainFrame() && |
1688 frame_->GetPage()->GetBrowserControls().Height()) { | 1695 frame_->GetPage()->GetBrowserControls().Height()) { |
1689 if (GetLayoutView()->Style()->HasFixedBackgroundImage()) { | 1696 if (GetLayoutView()->Style()->HasFixedBackgroundImage()) { |
1690 // In the case where we don't change layout size from top control resizes, | 1697 // In the case where we don't change layout size from top control resizes, |
1691 // we wont perform a layout. If we have a fixed background image however, | 1698 // we wont perform a layout. If we have a fixed background image however, |
1692 // the background layer needs to get resized so we should request a layout | 1699 // the background layer needs to get resized so we should request a layout |
1693 // explicitly. | 1700 // explicitly. |
1694 PaintLayer* layer = GetLayoutView()->Layer(); | 1701 PaintLayer* layer = GetLayoutView()->Layer(); |
1695 if (GetLayoutView()->Compositor()->NeedsFixedRootBackgroundLayer(layer)) { | 1702 if (GetLayoutView()->Compositor()->NeedsFixedRootBackgroundLayer(layer)) { |
1696 SetNeedsLayout(); | 1703 SetNeedsLayout(); |
1697 } else if (!root_layer_scrolling_enabled) { | 1704 } else { |
1698 // If root layer scrolls is on, we've already issued a full invalidation | 1705 // If root layer scrolls is on, we've already issued a full invalidation |
1699 // above. | 1706 // above. |
1700 GetLayoutView()->SetShouldDoFullPaintInvalidationOnResizeIfNeeded( | 1707 GetLayoutView()->SetShouldDoFullPaintInvalidationOnResizeIfNeeded( |
1701 width_changed, height_changed); | 1708 width_changed, height_changed); |
1702 } | 1709 } |
1703 } else if (height_changed && !root_layer_scrolling_enabled) { | 1710 } else if (height_changed) { |
1704 // If the document rect doesn't fill the full view height, hiding the | 1711 // If the document rect doesn't fill the full view height, hiding the |
1705 // URL bar will expose area outside the current LayoutView so we need to | 1712 // URL bar will expose area outside the current LayoutView so we need to |
1706 // paint additional background. If RLS is on, we've already invalidated | 1713 // paint additional background. If RLS is on, we've already invalidated |
1707 // above. | 1714 // above. |
1708 LayoutViewItem lvi = GetLayoutViewItem(); | 1715 LayoutViewItem lvi = GetLayoutViewItem(); |
1709 DCHECK(!lvi.IsNull()); | 1716 DCHECK(!lvi.IsNull()); |
1710 if (lvi.DocumentRect().Height() < lvi.ViewRect().Height()) | 1717 if (lvi.DocumentRect().Height() < lvi.ViewRect().Height()) |
1711 lvi.SetShouldDoFullPaintInvalidation(); | 1718 lvi.SetShouldDoFullPaintInvalidation(); |
1712 } | 1719 } |
1713 } | 1720 } |
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2164 // frame(). | 2171 // frame(). |
2165 if (!GetFrame().View()) | 2172 if (!GetFrame().View()) |
2166 return; | 2173 return; |
2167 | 2174 |
2168 Element* custom_scrollbar_element = nullptr; | 2175 Element* custom_scrollbar_element = nullptr; |
2169 | 2176 |
2170 bool uses_overlay_scrollbars = | 2177 bool uses_overlay_scrollbars = |
2171 ScrollbarTheme::GetTheme().UsesOverlayScrollbars() && | 2178 ScrollbarTheme::GetTheme().UsesOverlayScrollbars() && |
2172 !ShouldUseCustomScrollbars(custom_scrollbar_element); | 2179 !ShouldUseCustomScrollbars(custom_scrollbar_element); |
2173 | 2180 |
2174 // FIXME: this call to layout() could be called within FrameView::layout(), | |
2175 // but before performLayout(), causing double-layout. See also | |
2176 // crbug.com/429242. | |
2177 if (!uses_overlay_scrollbars && NeedsLayout()) | 2181 if (!uses_overlay_scrollbars && NeedsLayout()) |
2178 UpdateLayout(); | 2182 UpdateLayout(); |
2179 | 2183 |
2180 if (!GetLayoutViewItem().IsNull() && GetLayoutViewItem().UsesCompositing()) { | 2184 if (!GetLayoutViewItem().IsNull() && GetLayoutViewItem().UsesCompositing()) { |
2181 GetLayoutViewItem().Compositor()->FrameViewScrollbarsExistenceDidChange(); | 2185 GetLayoutViewItem().Compositor()->FrameViewScrollbarsExistenceDidChange(); |
2182 | 2186 |
2183 if (!uses_overlay_scrollbars) | 2187 if (!uses_overlay_scrollbars) |
2184 GetLayoutViewItem().Compositor()->FrameViewDidChangeSize(); | 2188 GetLayoutViewItem().Compositor()->FrameViewDidChangeSize(); |
2185 } | 2189 } |
2186 } | 2190 } |
(...skipping 1410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3597 if (!horizontal_writing_mode) | 3601 if (!horizontal_writing_mode) |
3598 overflow = overflow.TransposedRect(); | 3602 overflow = overflow.TransposedRect(); |
3599 AdjustViewSizeAndLayout(); | 3603 AdjustViewSizeAndLayout(); |
3600 // This is how we clip in case we overflow again. | 3604 // This is how we clip in case we overflow again. |
3601 layout_view->ClearLayoutOverflow(); | 3605 layout_view->ClearLayoutOverflow(); |
3602 layout_view->AddLayoutOverflow(overflow); | 3606 layout_view->AddLayoutOverflow(overflow); |
3603 return; | 3607 return; |
3604 } | 3608 } |
3605 } | 3609 } |
3606 | 3610 |
| 3611 if (TextAutosizer* text_autosizer = frame_->GetDocument()->GetTextAutosizer()) |
| 3612 text_autosizer->UpdatePageInfo(); |
3607 AdjustViewSizeAndLayout(); | 3613 AdjustViewSizeAndLayout(); |
3608 } | 3614 } |
3609 | 3615 |
3610 IntRect FrameView::ConvertFromLayoutItem( | 3616 IntRect FrameView::ConvertFromLayoutItem( |
3611 const LayoutItem& layout_item, | 3617 const LayoutItem& layout_item, |
3612 const IntRect& layout_object_rect) const { | 3618 const IntRect& layout_object_rect) const { |
3613 // Convert from page ("absolute") to FrameView coordinates. | 3619 // Convert from page ("absolute") to FrameView coordinates. |
3614 LayoutRect rect = EnclosingLayoutRect( | 3620 LayoutRect rect = EnclosingLayoutRect( |
3615 layout_item.LocalToAbsoluteQuad(FloatRect(layout_object_rect)) | 3621 layout_item.LocalToAbsoluteQuad(FloatRect(layout_object_rect)) |
3616 .BoundingBox()); | 3622 .BoundingBox()); |
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4317 if (!scrollbar_existence_changed) | 4323 if (!scrollbar_existence_changed) |
4318 return false; | 4324 return false; |
4319 | 4325 |
4320 scrollbar_manager_.SetHasHorizontalScrollbar(new_has_horizontal_scrollbar); | 4326 scrollbar_manager_.SetHasHorizontalScrollbar(new_has_horizontal_scrollbar); |
4321 scrollbar_manager_.SetHasVerticalScrollbar(new_has_vertical_scrollbar); | 4327 scrollbar_manager_.SetHasVerticalScrollbar(new_has_vertical_scrollbar); |
4322 | 4328 |
4323 if (scrollbars_suppressed_) | 4329 if (scrollbars_suppressed_) |
4324 return true; | 4330 return true; |
4325 | 4331 |
4326 if (!HasOverlayScrollbars()) | 4332 if (!HasOverlayScrollbars()) |
4327 ContentsResized(); | 4333 SetNeedsLayout(); |
4328 ScrollbarExistenceDidChange(); | 4334 ScrollbarExistenceDidChange(); |
4329 return true; | 4335 return true; |
4330 } | 4336 } |
4331 | 4337 |
4332 bool FrameView::NeedsScrollbarReconstruction() const { | 4338 bool FrameView::NeedsScrollbarReconstruction() const { |
4333 Scrollbar* scrollbar = HorizontalScrollbar(); | 4339 Scrollbar* scrollbar = HorizontalScrollbar(); |
4334 if (!scrollbar) | 4340 if (!scrollbar) |
4335 scrollbar = VerticalScrollbar(); | 4341 scrollbar = VerticalScrollbar(); |
4336 if (!scrollbar) { | 4342 if (!scrollbar) { |
4337 // We have no scrollbar to reconstruct. | 4343 // We have no scrollbar to reconstruct. |
(...skipping 1055 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5393 void FrameView::SetAnimationHost( | 5399 void FrameView::SetAnimationHost( |
5394 std::unique_ptr<CompositorAnimationHost> host) { | 5400 std::unique_ptr<CompositorAnimationHost> host) { |
5395 animation_host_ = std::move(host); | 5401 animation_host_ = std::move(host); |
5396 } | 5402 } |
5397 | 5403 |
5398 LayoutUnit FrameView::CaretWidth() const { | 5404 LayoutUnit FrameView::CaretWidth() const { |
5399 return LayoutUnit(GetChromeClient()->WindowToViewportScalar(1)); | 5405 return LayoutUnit(GetChromeClient()->WindowToViewportScalar(1)); |
5400 } | 5406 } |
5401 | 5407 |
5402 } // namespace blink | 5408 } // namespace blink |
OLD | NEW |