Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(126)

Side by Side Diff: third_party/WebKit/Source/core/frame/FrameView.cpp

Issue 2671323004: Set attached flag before we call didAddScrollbar (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 } 388 }
389 } 389 }
390 390
391 void FrameView::ScrollbarManager::setHasHorizontalScrollbar(bool hasScrollbar) { 391 void FrameView::ScrollbarManager::setHasHorizontalScrollbar(bool hasScrollbar) {
392 if (hasScrollbar == hasHorizontalScrollbar()) 392 if (hasScrollbar == hasHorizontalScrollbar())
393 return; 393 return;
394 394
395 if (hasScrollbar) { 395 if (hasScrollbar) {
396 m_hBar = createScrollbar(HorizontalScrollbar); 396 m_hBar = createScrollbar(HorizontalScrollbar);
397 m_scrollableArea->layoutBox()->document().view()->addChild(m_hBar.get()); 397 m_scrollableArea->layoutBox()->document().view()->addChild(m_hBar.get());
398 m_hBarIsAttached = 1;
398 m_scrollableArea->didAddScrollbar(*m_hBar, HorizontalScrollbar); 399 m_scrollableArea->didAddScrollbar(*m_hBar, HorizontalScrollbar);
399 m_hBar->styleChanged(); 400 m_hBar->styleChanged();
400 m_hBarIsAttached = 1;
401 } else { 401 } else {
402 m_hBarIsAttached = 0; 402 m_hBarIsAttached = 0;
403 destroyScrollbar(HorizontalScrollbar); 403 destroyScrollbar(HorizontalScrollbar);
404 } 404 }
405 405
406 m_scrollableArea->setScrollCornerNeedsPaintInvalidation(); 406 m_scrollableArea->setScrollCornerNeedsPaintInvalidation();
407 } 407 }
408 408
409 void FrameView::ScrollbarManager::setHasVerticalScrollbar(bool hasScrollbar) { 409 void FrameView::ScrollbarManager::setHasVerticalScrollbar(bool hasScrollbar) {
410 if (hasScrollbar == hasVerticalScrollbar()) 410 if (hasScrollbar == hasVerticalScrollbar())
411 return; 411 return;
412 412
413 if (hasScrollbar) { 413 if (hasScrollbar) {
414 m_vBar = createScrollbar(VerticalScrollbar); 414 m_vBar = createScrollbar(VerticalScrollbar);
415 m_scrollableArea->layoutBox()->document().view()->addChild(m_vBar.get()); 415 m_scrollableArea->layoutBox()->document().view()->addChild(m_vBar.get());
416 m_vBarIsAttached = 1;
416 m_scrollableArea->didAddScrollbar(*m_vBar, VerticalScrollbar); 417 m_scrollableArea->didAddScrollbar(*m_vBar, VerticalScrollbar);
417 m_vBar->styleChanged(); 418 m_vBar->styleChanged();
418 m_vBarIsAttached = 1;
419 } else { 419 } else {
420 m_vBarIsAttached = 0; 420 m_vBarIsAttached = 0;
421 destroyScrollbar(VerticalScrollbar); 421 destroyScrollbar(VerticalScrollbar);
422 } 422 }
423 423
424 m_scrollableArea->setScrollCornerNeedsPaintInvalidation(); 424 m_scrollableArea->setScrollCornerNeedsPaintInvalidation();
425 } 425 }
426 426
427 Scrollbar* FrameView::ScrollbarManager::createScrollbar( 427 Scrollbar* FrameView::ScrollbarManager::createScrollbar(
428 ScrollbarOrientation orientation) { 428 ScrollbarOrientation orientation) {
(...skipping 4670 matching lines...) Expand 10 before | Expand all | Expand 10 after
5099 std::unique_ptr<CompositorAnimationTimeline> timeline) { 5099 std::unique_ptr<CompositorAnimationTimeline> timeline) {
5100 m_animationTimeline = std::move(timeline); 5100 m_animationTimeline = std::move(timeline);
5101 } 5101 }
5102 5102
5103 void FrameView::setAnimationHost( 5103 void FrameView::setAnimationHost(
5104 std::unique_ptr<CompositorAnimationHost> host) { 5104 std::unique_ptr<CompositorAnimationHost> host) {
5105 m_animationHost = std::move(host); 5105 m_animationHost = std::move(host);
5106 } 5106 }
5107 5107
5108 } // namespace blink 5108 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698