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

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

Issue 2524733005: Ensure paint properties are rebuilt on window resizes (Closed)
Patch Set: Rebase Created 4 years 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 | third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp » ('j') | 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 633 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 ScrollableArea::contentsResized(); 644 ScrollableArea::contentsResized();
645 645
646 Page* page = frame().page(); 646 Page* page = frame().page();
647 if (!page) 647 if (!page)
648 return; 648 return;
649 649
650 updateParentScrollableAreaSet(); 650 updateParentScrollableAreaSet();
651 651
652 page->chromeClient().contentsSizeChanged(m_frame.get(), size); 652 page->chromeClient().contentsSizeChanged(m_frame.get(), size);
653 frame().loader().restoreScrollPositionAndViewState(); 653 frame().loader().restoreScrollPositionAndViewState();
654
655 if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled()) {
656 // The presence of overflow depends on the contents size. The scroll
657 // properties can change depending on whether overflow scrolling occurs.
658 setNeedsPaintPropertyUpdate();
659 }
660 } 654 }
661 655
662 void FrameView::adjustViewSize() { 656 void FrameView::adjustViewSize() {
663 if (m_suppressAdjustViewSize) 657 if (m_suppressAdjustViewSize)
664 return; 658 return;
665 659
666 LayoutViewItem layoutViewItem = this->layoutViewItem(); 660 LayoutViewItem layoutViewItem = this->layoutViewItem();
667 if (layoutViewItem.isNull()) 661 if (layoutViewItem.isNull())
668 return; 662 return;
669 663
(...skipping 2891 matching lines...) Expand 10 before | Expand all | Expand 10 after
3561 return; 3555 return;
3562 page->chromeClient().setCursor(cursor, m_frame); 3556 page->chromeClient().setCursor(cursor, m_frame);
3563 } 3557 }
3564 3558
3565 void FrameView::frameRectsChanged() { 3559 void FrameView::frameRectsChanged() {
3566 TRACE_EVENT0("blink", "FrameView::frameRectsChanged"); 3560 TRACE_EVENT0("blink", "FrameView::frameRectsChanged");
3567 if (layoutSizeFixedToFrameSize()) 3561 if (layoutSizeFixedToFrameSize())
3568 setLayoutSizeInternal(frameRect().size()); 3562 setLayoutSizeInternal(frameRect().size());
3569 3563
3570 setNeedsUpdateViewportIntersection(); 3564 setNeedsUpdateViewportIntersection();
3565 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
Xianzhu 2016/11/27 18:00:04 slimmingPaintInvalidationEnabled?
pdr. 2016/11/28 03:15:05 I've been using RuntimeEnabledFeatures::slimmingPa
Xianzhu 2016/11/28 17:56:00 Oh, I didn't notice this before. We should use sli
3566 // The overflow clip property depends on the frame rect.
3567 setNeedsPaintPropertyUpdate();
3568 }
3569
3571 for (const auto& child : m_children) 3570 for (const auto& child : m_children)
3572 child->frameRectsChanged(); 3571 child->frameRectsChanged();
3573 } 3572 }
3574 3573
3575 void FrameView::setLayoutSizeInternal(const IntSize& size) { 3574 void FrameView::setLayoutSizeInternal(const IntSize& size) {
3576 if (m_layoutSize == size) 3575 if (m_layoutSize == size)
3577 return; 3576 return;
3578 3577
3579 m_layoutSize = size; 3578 m_layoutSize = size;
3580 contentsResized(); 3579 contentsResized();
(...skipping 1066 matching lines...) Expand 10 before | Expand all | Expand 10 after
4647 DCHECK(m_frame->isMainFrame()); 4646 DCHECK(m_frame->isMainFrame());
4648 return m_initialViewportSize.width(); 4647 return m_initialViewportSize.width();
4649 } 4648 }
4650 4649
4651 int FrameView::initialViewportHeight() const { 4650 int FrameView::initialViewportHeight() const {
4652 DCHECK(m_frame->isMainFrame()); 4651 DCHECK(m_frame->isMainFrame());
4653 return m_initialViewportSize.height(); 4652 return m_initialViewportSize.height();
4654 } 4653 }
4655 4654
4656 } // namespace blink 4655 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698