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 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
631 | 631 |
632 void FrameView::recalcOverflowAfterStyleChange() | 632 void FrameView::recalcOverflowAfterStyleChange() |
633 { | 633 { |
634 RenderView* renderView = this->renderView(); | 634 RenderView* renderView = this->renderView(); |
635 ASSERT(renderView); | 635 ASSERT(renderView); |
636 if (!renderView->needsOverflowRecalcAfterStyleChange()) | 636 if (!renderView->needsOverflowRecalcAfterStyleChange()) |
637 return; | 637 return; |
638 | 638 |
639 renderView->recalcOverflowAfterStyleChange(); | 639 renderView->recalcOverflowAfterStyleChange(); |
640 | 640 |
641 // FIXME: We should adjust frame scrollbar here, but that will make many | 641 if (needsLayout()) |
642 // tests flake in debug build. | 642 return; |
643 | |
644 InUpdateScrollbarsScope inUpdateScrollbarsScope(this); | |
ojan
2014/06/11 03:04:53
Why do you need this here?
trchen
2014/06/11 05:04:13
Without this, adjustViewSize() on line #657 will c
ojan
2014/06/11 05:44:48
Ah. That makes sense. I tried tracing the code to
| |
645 | |
646 bool hasHorizontalScrollbar = horizontalScrollbar(); | |
647 bool hasVerticalScrollbar = verticalScrollbar(); | |
648 bool shouldHaveHorizontalScrollbar = false; | |
649 bool shouldHaveVerticalScrollbar = false; | |
650 computeScrollbarExistence(shouldHaveHorizontalScrollbar, shouldHaveVerticalS crollbar); | |
651 | |
652 if (hasHorizontalScrollbar != shouldHaveHorizontalScrollbar || hasVerticalSc rollbar != shouldHaveVerticalScrollbar) { | |
ojan
2014/06/11 03:04:53
Nit: Can you do the following?
if (horizontalScrol
trchen
2014/06/11 05:04:13
Can't compare between pointer and bool. Will do th
ojan
2014/06/11 05:44:48
Ugh. Actually, the local variable bools seems clea
trchen
2014/06/11 06:01:23
Ah, that sounds even better. Will do.
| |
653 setNeedsLayout(); | |
ojan
2014/06/11 03:07:24
Should this not also call the following?
setHa
trchen
2014/06/11 05:04:13
adjustViewSize() will be called in post-layout pha
| |
654 return; | |
655 } | |
656 | |
657 adjustViewSize(); | |
658 updateScrollbarGeometry(); | |
643 } | 659 } |
644 | 660 |
645 bool FrameView::usesCompositedScrolling() const | 661 bool FrameView::usesCompositedScrolling() const |
646 { | 662 { |
647 RenderView* renderView = this->renderView(); | 663 RenderView* renderView = this->renderView(); |
648 if (!renderView) | 664 if (!renderView) |
649 return false; | 665 return false; |
650 if (m_frame->settings() && m_frame->settings()->compositedScrollingForFrames Enabled()) | 666 if (m_frame->settings() && m_frame->settings()->compositedScrollingForFrames Enabled()) |
651 return renderView->compositor()->inCompositingMode(); | 667 return renderView->compositor()->inCompositingMode(); |
652 return false; | 668 return false; |
(...skipping 2620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3273 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o rientation) | 3289 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o rientation) |
3274 { | 3290 { |
3275 ScrollableArea::willRemoveScrollbar(scrollbar, orientation); | 3291 ScrollableArea::willRemoveScrollbar(scrollbar, orientation); |
3276 if (AXObjectCache* cache = axObjectCache()) { | 3292 if (AXObjectCache* cache = axObjectCache()) { |
3277 cache->remove(scrollbar); | 3293 cache->remove(scrollbar); |
3278 cache->handleScrollbarUpdate(this); | 3294 cache->handleScrollbarUpdate(this); |
3279 } | 3295 } |
3280 } | 3296 } |
3281 | 3297 |
3282 } // namespace WebCore | 3298 } // namespace WebCore |
OLD | NEW |