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

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

Issue 190973007: Reland "Avoid layout/full-repaint on view height change if possible" (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: New CL Created 6 years, 9 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
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 3162 matching lines...) Expand 10 before | Expand all | Expand 10 after
3173 3173
3174 ScrollView::frameRectsChanged(); 3174 ScrollView::frameRectsChanged();
3175 } 3175 }
3176 3176
3177 void FrameView::setLayoutSizeInternal(const IntSize& size) 3177 void FrameView::setLayoutSizeInternal(const IntSize& size)
3178 { 3178 {
3179 if (m_layoutSize == size) 3179 if (m_layoutSize == size)
3180 return; 3180 return;
3181 3181
3182 m_layoutSize = size; 3182 m_layoutSize = size;
3183 contentsResized(); 3183
3184 // Update scrollbars. Not calling this->contentsResized() to avoid setNeedsL ayout.
3185 ScrollView::contentsResized();
3186
3187 if (RenderView* renderView = this->renderView()) {
3188 renderView->viewResized();
3189 // If selfNeedsLayout, the next layout will do all the things required o n layoutSize change.
3190 // Otherwise we need to perform the post-layout tasks now.
3191 if (!renderView->selfNeedsLayout()) {
3192 // Call scheduleOrPerformPostLayoutTasks() instead of synchronized s endResizeEventIfNeeded()
3193 // to avoid hang with resize events in seamless frames.
esprehn 2014/03/10 21:32:30 We don't even have seamless anymore. This code see
Xianzhu 2014/03/11 00:55:13 Good news. Removed the comment. Changed the code
3194 scheduleOrPerformPostLayoutTasks();
3195 if (frame().page())
3196 frame().page()->chrome().client().layoutUpdated(m_frame.get());
3197 }
3198 }
3184 } 3199 }
3185 3200
3186 void FrameView::didAddScrollbar(Scrollbar* scrollbar, ScrollbarOrientation orien tation) 3201 void FrameView::didAddScrollbar(Scrollbar* scrollbar, ScrollbarOrientation orien tation)
3187 { 3202 {
3188 ScrollableArea::didAddScrollbar(scrollbar, orientation); 3203 ScrollableArea::didAddScrollbar(scrollbar, orientation);
3189 if (AXObjectCache* cache = axObjectCache()) 3204 if (AXObjectCache* cache = axObjectCache())
3190 cache->handleScrollbarUpdate(this); 3205 cache->handleScrollbarUpdate(this);
3191 } 3206 }
3192 3207
3193 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o rientation) 3208 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o rientation)
3194 { 3209 {
3195 ScrollableArea::willRemoveScrollbar(scrollbar, orientation); 3210 ScrollableArea::willRemoveScrollbar(scrollbar, orientation);
3196 if (AXObjectCache* cache = axObjectCache()) { 3211 if (AXObjectCache* cache = axObjectCache()) {
3197 cache->remove(scrollbar); 3212 cache->remove(scrollbar);
3198 cache->handleScrollbarUpdate(this); 3213 cache->handleScrollbarUpdate(this);
3199 } 3214 }
3200 } 3215 }
3201 3216
3202 } // namespace WebCore 3217 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698