| 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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 scrollbars_suppressed_(false), | 199 scrollbars_suppressed_(false), |
| 200 in_update_scrollbars_(false), | 200 in_update_scrollbars_(false), |
| 201 frame_timing_requests_dirty_(true), | 201 frame_timing_requests_dirty_(true), |
| 202 hidden_for_throttling_(false), | 202 hidden_for_throttling_(false), |
| 203 subtree_throttled_(false), | 203 subtree_throttled_(false), |
| 204 lifecycle_updates_throttled_(false), | 204 lifecycle_updates_throttled_(false), |
| 205 needs_paint_property_update_(true), | 205 needs_paint_property_update_(true), |
| 206 current_update_lifecycle_phases_target_state_( | 206 current_update_lifecycle_phases_target_state_( |
| 207 DocumentLifecycle::kUninitialized), | 207 DocumentLifecycle::kUninitialized), |
| 208 scroll_anchor_(this), | 208 scroll_anchor_(this), |
| 209 scrollbar_manager_(*this), | |
| 210 needs_scrollbars_update_(false), | 209 needs_scrollbars_update_(false), |
| 211 suppress_adjust_view_size_(false), | 210 suppress_adjust_view_size_(false), |
| 212 allows_layout_invalidation_after_layout_clean_(true), | 211 allows_layout_invalidation_after_layout_clean_(true), |
| 213 main_thread_scrolling_reasons_(0) { | 212 main_thread_scrolling_reasons_(0) { |
| 214 Init(); | 213 Init(); |
| 215 } | 214 } |
| 216 | 215 |
| 217 FrameView* FrameView::Create(LocalFrame& frame) { | 216 FrameView* FrameView::Create(LocalFrame& frame) { |
| 218 FrameView* view = new FrameView(frame); | 217 FrameView* view = new FrameView(frame); |
| 219 view->Show(); | 218 view->Show(); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 239 visitor->Trace(scrollable_areas_); | 238 visitor->Trace(scrollable_areas_); |
| 240 visitor->Trace(animating_scrollable_areas_); | 239 visitor->Trace(animating_scrollable_areas_); |
| 241 visitor->Trace(auto_size_info_); | 240 visitor->Trace(auto_size_info_); |
| 242 visitor->Trace(children_); | 241 visitor->Trace(children_); |
| 243 visitor->Trace(plugins_); | 242 visitor->Trace(plugins_); |
| 244 visitor->Trace(scrollbars_); | 243 visitor->Trace(scrollbars_); |
| 245 visitor->Trace(viewport_scrollable_area_); | 244 visitor->Trace(viewport_scrollable_area_); |
| 246 visitor->Trace(visibility_observer_); | 245 visitor->Trace(visibility_observer_); |
| 247 visitor->Trace(scroll_anchor_); | 246 visitor->Trace(scroll_anchor_); |
| 248 visitor->Trace(anchoring_adjustment_queue_); | 247 visitor->Trace(anchoring_adjustment_queue_); |
| 249 visitor->Trace(scrollbar_manager_); | |
| 250 visitor->Trace(print_context_); | 248 visitor->Trace(print_context_); |
| 251 FrameViewBase::Trace(visitor); | 249 FrameViewBase::Trace(visitor); |
| 252 ScrollableArea::Trace(visitor); | 250 ScrollableArea::Trace(visitor); |
| 253 } | 251 } |
| 254 | 252 |
| 255 void FrameView::Reset() { | 253 void FrameView::Reset() { |
| 256 // The compositor throttles the main frame using deferred commits, we can't | 254 // The compositor throttles the main frame using deferred commits, we can't |
| 257 // throttle it here or it seems the root compositor doesn't get setup | 255 // throttle it here or it seems the root compositor doesn't get setup |
| 258 // properly. | 256 // properly. |
| 259 if (RuntimeEnabledFeatures:: | 257 if (RuntimeEnabledFeatures:: |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 | 392 |
| 395 void FrameView::DetachScrollbars() { | 393 void FrameView::DetachScrollbars() { |
| 396 // Previously, we detached custom scrollbars as early as possible to prevent | 394 // Previously, we detached custom scrollbars as early as possible to prevent |
| 397 // Document::detachLayoutTree() from messing with the view such that its | 395 // Document::detachLayoutTree() from messing with the view such that its |
| 398 // scroll bars won't be torn down. However, scripting in | 396 // scroll bars won't be torn down. However, scripting in |
| 399 // Document::detachLayoutTree() is forbidden | 397 // Document::detachLayoutTree() is forbidden |
| 400 // now, so it's not clear if these edge cases can still happen. | 398 // now, so it's not clear if these edge cases can still happen. |
| 401 // However, for Oilpan, we still need to remove the native scrollbars before | 399 // However, for Oilpan, we still need to remove the native scrollbars before |
| 402 // we lose the connection to the ChromeClient, so we just unconditionally | 400 // we lose the connection to the ChromeClient, so we just unconditionally |
| 403 // detach any scrollbars now. | 401 // detach any scrollbars now. |
| 404 scrollbar_manager_.Dispose(); | 402 ScrollbarManager::Dispose(); |
| 405 | 403 |
| 406 if (scroll_corner_) { | 404 if (scroll_corner_) { |
| 407 scroll_corner_->Destroy(); | 405 scroll_corner_->Destroy(); |
| 408 scroll_corner_ = nullptr; | 406 scroll_corner_ = nullptr; |
| 409 } | 407 } |
| 410 } | 408 } |
| 411 | 409 |
| 412 void FrameView::ScrollbarManager::SetHasHorizontalScrollbar( | 410 void FrameView::SetHasHorizontalScrollbar(bool has_scrollbar) { |
| 413 bool has_scrollbar) { | |
| 414 if (has_scrollbar == HasHorizontalScrollbar()) | 411 if (has_scrollbar == HasHorizontalScrollbar()) |
| 415 return; | 412 return; |
| 416 | 413 |
| 417 if (has_scrollbar) { | 414 if (has_scrollbar) { |
| 418 h_bar_ = CreateScrollbar(kHorizontalScrollbar); | 415 h_bar_ = CreateScrollbar(kHorizontalScrollbar); |
| 419 scrollable_area_->GetLayoutBox()->GetDocument().View()->AddScrollbar( | 416 scrollable_area_->GetLayoutBox()->GetDocument().View()->AddScrollbar( |
| 420 h_bar_); | 417 h_bar_); |
| 421 h_bar_is_attached_ = 1; | 418 h_bar_is_attached_ = 1; |
| 422 scrollable_area_->DidAddScrollbar(*h_bar_, kHorizontalScrollbar); | 419 scrollable_area_->DidAddScrollbar(*h_bar_, kHorizontalScrollbar); |
| 423 h_bar_->StyleChanged(); | 420 h_bar_->StyleChanged(); |
| 424 } else { | 421 } else { |
| 425 h_bar_is_attached_ = 0; | 422 h_bar_is_attached_ = 0; |
| 426 DestroyScrollbar(kHorizontalScrollbar); | 423 DestroyScrollbar(kHorizontalScrollbar); |
| 427 } | 424 } |
| 428 | 425 |
| 429 scrollable_area_->SetScrollCornerNeedsPaintInvalidation(); | 426 scrollable_area_->SetScrollCornerNeedsPaintInvalidation(); |
| 430 } | 427 } |
| 431 | 428 |
| 432 void FrameView::ScrollbarManager::SetHasVerticalScrollbar(bool has_scrollbar) { | 429 void FrameView::SetHasVerticalScrollbar(bool has_scrollbar) { |
| 433 if (has_scrollbar == HasVerticalScrollbar()) | 430 if (has_scrollbar == HasVerticalScrollbar()) |
| 434 return; | 431 return; |
| 435 | 432 |
| 436 if (has_scrollbar) { | 433 if (has_scrollbar) { |
| 437 v_bar_ = CreateScrollbar(kVerticalScrollbar); | 434 v_bar_ = CreateScrollbar(kVerticalScrollbar); |
| 438 scrollable_area_->GetLayoutBox()->GetDocument().View()->AddScrollbar( | 435 scrollable_area_->GetLayoutBox()->GetDocument().View()->AddScrollbar( |
| 439 v_bar_); | 436 v_bar_); |
| 440 v_bar_is_attached_ = 1; | 437 v_bar_is_attached_ = 1; |
| 441 scrollable_area_->DidAddScrollbar(*v_bar_, kVerticalScrollbar); | 438 scrollable_area_->DidAddScrollbar(*v_bar_, kVerticalScrollbar); |
| 442 v_bar_->StyleChanged(); | 439 v_bar_->StyleChanged(); |
| 443 } else { | 440 } else { |
| 444 v_bar_is_attached_ = 0; | 441 v_bar_is_attached_ = 0; |
| 445 DestroyScrollbar(kVerticalScrollbar); | 442 DestroyScrollbar(kVerticalScrollbar); |
| 446 } | 443 } |
| 447 | 444 |
| 448 scrollable_area_->SetScrollCornerNeedsPaintInvalidation(); | 445 scrollable_area_->SetScrollCornerNeedsPaintInvalidation(); |
| 449 } | 446 } |
| 450 | 447 |
| 451 Scrollbar* FrameView::ScrollbarManager::CreateScrollbar( | 448 Scrollbar* FrameView::CreateScrollbar(ScrollbarOrientation orientation) { |
| 452 ScrollbarOrientation orientation) { | |
| 453 Element* custom_scrollbar_element = nullptr; | 449 Element* custom_scrollbar_element = nullptr; |
| 454 LayoutBox* box = scrollable_area_->GetLayoutBox(); | 450 LayoutBox* box = scrollable_area_->GetLayoutBox(); |
| 455 if (box->GetDocument().View()->ShouldUseCustomScrollbars( | 451 if (box->GetDocument().View()->ShouldUseCustomScrollbars( |
| 456 custom_scrollbar_element)) { | 452 custom_scrollbar_element)) { |
| 457 return LayoutScrollbar::CreateCustomScrollbar( | 453 return LayoutScrollbar::CreateCustomScrollbar( |
| 458 scrollable_area_.Get(), orientation, custom_scrollbar_element); | 454 scrollable_area_.Get(), orientation, custom_scrollbar_element); |
| 459 } | 455 } |
| 460 | 456 |
| 461 // Nobody set a custom style, so we just use a native scrollbar. | 457 // Nobody set a custom style, so we just use a native scrollbar. |
| 462 return Scrollbar::Create(scrollable_area_.Get(), orientation, | 458 return Scrollbar::Create(scrollable_area_.Get(), orientation, |
| 463 kRegularScrollbar, | 459 kRegularScrollbar, |
| 464 &box->GetFrame()->GetPage()->GetChromeClient()); | 460 &box->GetFrame()->GetPage()->GetChromeClient()); |
| 465 } | 461 } |
| 466 | 462 |
| 467 void FrameView::ScrollbarManager::DestroyScrollbar( | 463 void FrameView::DestroyScrollbar(ScrollbarOrientation orientation) { |
| 468 ScrollbarOrientation orientation) { | |
| 469 Member<Scrollbar>& scrollbar = | 464 Member<Scrollbar>& scrollbar = |
| 470 orientation == kHorizontalScrollbar ? h_bar_ : v_bar_; | 465 orientation == kHorizontalScrollbar ? h_bar_ : v_bar_; |
| 471 DCHECK(orientation == kHorizontalScrollbar ? !h_bar_is_attached_ | 466 DCHECK(orientation == kHorizontalScrollbar ? !h_bar_is_attached_ |
| 472 : !v_bar_is_attached_); | 467 : !v_bar_is_attached_); |
| 473 if (!scrollbar) | 468 if (!scrollbar) |
| 474 return; | 469 return; |
| 475 | 470 |
| 476 scrollable_area_->WillRemoveScrollbar(*scrollbar, orientation); | 471 scrollable_area_->WillRemoveScrollbar(*scrollbar, orientation); |
| 477 scrollable_area_->GetLayoutBox()->GetDocument().View()->RemoveScrollbar( | 472 scrollable_area_->GetLayoutBox()->GetDocument().View()->RemoveScrollbar( |
| 478 scrollbar); | 473 scrollbar); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 491 did_style_change = true; | 486 did_style_change = true; |
| 492 } | 487 } |
| 493 if (did_style_change) { | 488 if (did_style_change) { |
| 494 UpdateScrollbarGeometry(); | 489 UpdateScrollbarGeometry(); |
| 495 UpdateScrollCorner(); | 490 UpdateScrollCorner(); |
| 496 PositionScrollbarLayers(); | 491 PositionScrollbarLayers(); |
| 497 } | 492 } |
| 498 } | 493 } |
| 499 | 494 |
| 500 void FrameView::InvalidateAllCustomScrollbarsOnActiveChanged() { | 495 void FrameView::InvalidateAllCustomScrollbarsOnActiveChanged() { |
| 501 bool uses_window_inactive_selector = | 496 if (!frame_->GetDocument()->GetStyleEngine().UsesWindowInactiveSelector()) |
| 502 frame_->GetDocument()->GetStyleEngine().UsesWindowInactiveSelector(); | 497 return; |
| 503 | 498 |
| 504 const ChildrenSet* view_children = Children(); | 499 const ChildrenSet* view_children = Children(); |
| 505 for (const Member<FrameViewBase>& child : *view_children) { | 500 for (const Member<FrameViewBase>& child : *view_children) { |
| 506 FrameViewBase* frame_view_base = child.Get(); | 501 FrameViewBase* frame_view_base = child.Get(); |
| 507 if (frame_view_base->IsFrameView()) { | 502 if (frame_view_base->IsFrameView()) { |
| 508 ToFrameView(frame_view_base) | 503 ToFrameView(frame_view_base) |
| 509 ->InvalidateAllCustomScrollbarsOnActiveChanged(); | 504 ->InvalidateAllCustomScrollbarsOnActiveChanged(); |
| 510 } | 505 } |
| 511 } | 506 } |
| 512 | 507 |
| 513 for (const Member<Scrollbar>& scrollbar : *Scrollbars()) { | 508 for (const Member<Scrollbar>& scrollbar : *Scrollbars()) { |
| 514 if (uses_window_inactive_selector && scrollbar->IsCustomScrollbar()) | 509 scrollbar->StyleChanged(); |
| 515 scrollbar->StyleChanged(); | |
| 516 } | 510 } |
| 517 | 511 |
| 518 if (uses_window_inactive_selector) | 512 RecalculateCustomScrollbarStyle(); |
| 519 RecalculateCustomScrollbarStyle(); | |
| 520 } | 513 } |
| 521 | 514 |
| 522 void FrameView::Clear() { | 515 void FrameView::Clear() { |
| 523 Reset(); | 516 Reset(); |
| 524 SetScrollbarsSuppressed(true); | 517 SetScrollbarsSuppressed(true); |
| 525 } | 518 } |
| 526 | 519 |
| 527 bool FrameView::DidFirstLayout() const { | 520 bool FrameView::DidFirstLayout() const { |
| 528 return !first_layout_; | 521 return !first_layout_; |
| 529 } | 522 } |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 693 if (doc_element && doc_element->GetLayoutObject() && | 686 if (doc_element && doc_element->GetLayoutObject() && |
| 694 doc_element->GetLayoutObject()->Style()->HasPseudoStyle( | 687 doc_element->GetLayoutObject()->Style()->HasPseudoStyle( |
| 695 kPseudoIdScrollbar)) { | 688 kPseudoIdScrollbar)) { |
| 696 custom_scrollbar_element = doc_element; | 689 custom_scrollbar_element = doc_element; |
| 697 return true; | 690 return true; |
| 698 } | 691 } |
| 699 | 692 |
| 700 return false; | 693 return false; |
| 701 } | 694 } |
| 702 | 695 |
| 703 Scrollbar* FrameView::CreateScrollbar(ScrollbarOrientation orientation) { | |
| 704 return scrollbar_manager_.CreateScrollbar(orientation); | |
| 705 } | |
| 706 | |
| 707 void FrameView::SetContentsSize(const IntSize& size) { | 696 void FrameView::SetContentsSize(const IntSize& size) { |
| 708 if (size == ContentsSize()) | 697 if (size == ContentsSize()) |
| 709 return; | 698 return; |
| 710 | 699 |
| 711 contents_size_ = size; | 700 contents_size_ = size; |
| 712 UpdateScrollbars(); | 701 UpdateScrollbars(); |
| 713 ScrollableArea::ContentsResized(); | 702 ScrollableArea::ContentsResized(); |
| 714 | 703 |
| 715 Page* page = GetFrame().GetPage(); | 704 Page* page = GetFrame().GetPage(); |
| 716 if (!page) | 705 if (!page) |
| (...skipping 2176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2893 | 2882 |
| 2894 // TODO(pdr): This logic is similar to adjustScrollbarExistence and the common | 2883 // TODO(pdr): This logic is similar to adjustScrollbarExistence and the common |
| 2895 // logic should be factored into a helper. | 2884 // logic should be factored into a helper. |
| 2896 void FrameView::VisualViewportScrollbarsChanged() { | 2885 void FrameView::VisualViewportScrollbarsChanged() { |
| 2897 bool has_horizontal_scrollbar = HorizontalScrollbar(); | 2886 bool has_horizontal_scrollbar = HorizontalScrollbar(); |
| 2898 bool has_vertical_scrollbar = VerticalScrollbar(); | 2887 bool has_vertical_scrollbar = VerticalScrollbar(); |
| 2899 bool should_have_horizontal_scrollbar = false; | 2888 bool should_have_horizontal_scrollbar = false; |
| 2900 bool should_have_vertical_scrollbar = false; | 2889 bool should_have_vertical_scrollbar = false; |
| 2901 ComputeScrollbarExistence(should_have_horizontal_scrollbar, | 2890 ComputeScrollbarExistence(should_have_horizontal_scrollbar, |
| 2902 should_have_vertical_scrollbar, ContentsSize()); | 2891 should_have_vertical_scrollbar, ContentsSize()); |
| 2903 scrollbar_manager_.SetHasHorizontalScrollbar( | 2892 SetHasHorizontalScrollbar(should_have_horizontal_scrollbar); |
| 2904 should_have_horizontal_scrollbar); | 2893 SetHasVerticalScrollbar(should_have_vertical_scrollbar); |
| 2905 scrollbar_manager_.SetHasVerticalScrollbar(should_have_vertical_scrollbar); | |
| 2906 | 2894 |
| 2907 if (has_horizontal_scrollbar != should_have_horizontal_scrollbar || | 2895 if (has_horizontal_scrollbar != should_have_horizontal_scrollbar || |
| 2908 has_vertical_scrollbar != should_have_vertical_scrollbar) { | 2896 has_vertical_scrollbar != should_have_vertical_scrollbar) { |
| 2909 ScrollbarExistenceDidChange(); | 2897 ScrollbarExistenceDidChange(); |
| 2910 | 2898 |
| 2911 if (!VisualViewportSuppliesScrollbars()) | 2899 if (!VisualViewportSuppliesScrollbars()) |
| 2912 UpdateScrollbarGeometry(); | 2900 UpdateScrollbarGeometry(); |
| 2913 } | 2901 } |
| 2914 } | 2902 } |
| 2915 | 2903 |
| (...skipping 1355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4271 bool new_has_vertical_scrollbar = false; | 4259 bool new_has_vertical_scrollbar = false; |
| 4272 ComputeScrollbarExistence(new_has_horizontal_scrollbar, | 4260 ComputeScrollbarExistence(new_has_horizontal_scrollbar, |
| 4273 new_has_vertical_scrollbar, ContentsSize(), option); | 4261 new_has_vertical_scrollbar, ContentsSize(), option); |
| 4274 | 4262 |
| 4275 bool scrollbar_existence_changed = | 4263 bool scrollbar_existence_changed = |
| 4276 has_horizontal_scrollbar != new_has_horizontal_scrollbar || | 4264 has_horizontal_scrollbar != new_has_horizontal_scrollbar || |
| 4277 has_vertical_scrollbar != new_has_vertical_scrollbar; | 4265 has_vertical_scrollbar != new_has_vertical_scrollbar; |
| 4278 if (!scrollbar_existence_changed) | 4266 if (!scrollbar_existence_changed) |
| 4279 return false; | 4267 return false; |
| 4280 | 4268 |
| 4281 scrollbar_manager_.SetHasHorizontalScrollbar(new_has_horizontal_scrollbar); | 4269 SetHasHorizontalScrollbar(new_has_horizontal_scrollbar); |
| 4282 scrollbar_manager_.SetHasVerticalScrollbar(new_has_vertical_scrollbar); | 4270 SetHasVerticalScrollbar(new_has_vertical_scrollbar); |
| 4283 | 4271 |
| 4284 if (scrollbars_suppressed_) | 4272 if (scrollbars_suppressed_) |
| 4285 return true; | 4273 return true; |
| 4286 | 4274 |
| 4287 if (!HasOverlayScrollbars()) | 4275 if (!HasOverlayScrollbars()) |
| 4288 ContentsResized(); | 4276 ContentsResized(); |
| 4289 ScrollbarExistenceDidChange(); | 4277 ScrollbarExistenceDidChange(); |
| 4290 return true; | 4278 return true; |
| 4291 } | 4279 } |
| 4292 | 4280 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4334 needs_scrollbars_update_ = false; | 4322 needs_scrollbars_update_ = false; |
| 4335 | 4323 |
| 4336 if (RuntimeEnabledFeatures::rootLayerScrollingEnabled()) | 4324 if (RuntimeEnabledFeatures::rootLayerScrollingEnabled()) |
| 4337 return; | 4325 return; |
| 4338 | 4326 |
| 4339 if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) | 4327 if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) |
| 4340 SetNeedsPaintPropertyUpdate(); | 4328 SetNeedsPaintPropertyUpdate(); |
| 4341 | 4329 |
| 4342 // Avoid drawing two sets of scrollbars when visual viewport is enabled. | 4330 // Avoid drawing two sets of scrollbars when visual viewport is enabled. |
| 4343 if (VisualViewportSuppliesScrollbars()) { | 4331 if (VisualViewportSuppliesScrollbars()) { |
| 4344 scrollbar_manager_.SetHasHorizontalScrollbar(false); | 4332 SetHasHorizontalScrollbar(false); |
| 4345 scrollbar_manager_.SetHasVerticalScrollbar(false); | 4333 SetHasVerticalScrollbar(false); |
| 4346 AdjustScrollOffsetFromUpdateScrollbars(); | 4334 AdjustScrollOffsetFromUpdateScrollbars(); |
| 4347 return; | 4335 return; |
| 4348 } | 4336 } |
| 4349 | 4337 |
| 4350 if (in_update_scrollbars_) | 4338 if (in_update_scrollbars_) |
| 4351 return; | 4339 return; |
| 4352 InUpdateScrollbarsScope in_update_scrollbars_scope(this); | 4340 InUpdateScrollbarsScope in_update_scrollbars_scope(this); |
| 4353 | 4341 |
| 4354 bool scrollbar_existence_changed = false; | 4342 bool scrollbar_existence_changed = false; |
| 4355 | 4343 |
| 4356 if (NeedsScrollbarReconstruction()) { | 4344 if (NeedsScrollbarReconstruction()) { |
| 4357 scrollbar_manager_.SetHasHorizontalScrollbar(false); | 4345 SetHasHorizontalScrollbar(false); |
| 4358 scrollbar_manager_.SetHasVerticalScrollbar(false); | 4346 SetHasVerticalScrollbar(false); |
| 4359 scrollbar_existence_changed = true; | 4347 scrollbar_existence_changed = true; |
| 4360 } | 4348 } |
| 4361 | 4349 |
| 4362 int max_update_scrollbars_pass = | 4350 int max_update_scrollbars_pass = |
| 4363 HasOverlayScrollbars() || scrollbars_suppressed_ ? 1 : 3; | 4351 HasOverlayScrollbars() || scrollbars_suppressed_ ? 1 : 3; |
| 4364 for (int update_scrollbars_pass = 0; | 4352 for (int update_scrollbars_pass = 0; |
| 4365 update_scrollbars_pass < max_update_scrollbars_pass; | 4353 update_scrollbars_pass < max_update_scrollbars_pass; |
| 4366 update_scrollbars_pass++) { | 4354 update_scrollbars_pass++) { |
| 4367 if (!AdjustScrollbarExistence(update_scrollbars_pass ? kIncremental | 4355 if (!AdjustScrollbarExistence(update_scrollbars_pass ? kIncremental |
| 4368 : kFirstPass)) | 4356 : kFirstPass)) |
| (...skipping 985 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5354 void FrameView::SetAnimationHost( | 5342 void FrameView::SetAnimationHost( |
| 5355 std::unique_ptr<CompositorAnimationHost> host) { | 5343 std::unique_ptr<CompositorAnimationHost> host) { |
| 5356 animation_host_ = std::move(host); | 5344 animation_host_ = std::move(host); |
| 5357 } | 5345 } |
| 5358 | 5346 |
| 5359 LayoutUnit FrameView::CaretWidth() const { | 5347 LayoutUnit FrameView::CaretWidth() const { |
| 5360 return LayoutUnit(GetChromeClient()->WindowToViewportScalar(1)); | 5348 return LayoutUnit(GetChromeClient()->WindowToViewportScalar(1)); |
| 5361 } | 5349 } |
| 5362 | 5350 |
| 5363 } // namespace blink | 5351 } // namespace blink |
| OLD | NEW |