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

Side by Side Diff: Source/core/page/scrolling/ScrollingCoordinator.cpp

Issue 699183004: Main-thread scroll if we have fixed-pos children and overflow:hidden. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month 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) 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2011 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 928 matching lines...) Expand 10 before | Expand all | Expand 10 after
939 reasons |= ThreadedScrollingDisabled; 939 reasons |= ThreadedScrollingDisabled;
940 940
941 if (!m_page->mainFrame()->isLocalFrame()) 941 if (!m_page->mainFrame()->isLocalFrame())
942 return reasons; 942 return reasons;
943 FrameView* frameView = m_page->deprecatedLocalMainFrame()->view(); 943 FrameView* frameView = m_page->deprecatedLocalMainFrame()->view();
944 if (!frameView) 944 if (!frameView)
945 return reasons; 945 return reasons;
946 946
947 if (frameView->hasSlowRepaintObjects()) 947 if (frameView->hasSlowRepaintObjects())
948 reasons |= HasSlowRepaintObjects; 948 reasons |= HasSlowRepaintObjects;
949 if (frameView->isScrollable() && hasVisibleSlowRepaintViewportConstrainedObj ects(frameView)) 949 FrameView::ScrollingReasons scrollingReasons = frameView->scrollingReasons() ;
950 if ((scrollingReasons == FrameView::NonScrollableFromLayout
951 || scrollingReasons == FrameView::Scrollable)
952 && hasVisibleSlowRepaintViewportConstrainedObjects(frameView)) {
Ian Vollick 2014/11/05 16:40:06 I think this could be made clearer with some well
awoloszyn 2014/11/05 19:25:11 Done.
950 reasons |= HasNonLayerViewportConstrainedObjects; 953 reasons |= HasNonLayerViewportConstrainedObjects;
954 }
951 955
952 return reasons; 956 return reasons;
953 } 957 }
954 958
955 String ScrollingCoordinator::mainThreadScrollingReasonsAsText(MainThreadScrollin gReasons reasons) 959 String ScrollingCoordinator::mainThreadScrollingReasonsAsText(MainThreadScrollin gReasons reasons)
956 { 960 {
957 StringBuilder stringBuilder; 961 StringBuilder stringBuilder;
958 962
959 if (reasons & ScrollingCoordinator::HasSlowRepaintObjects) 963 if (reasons & ScrollingCoordinator::HasSlowRepaintObjects)
960 stringBuilder.appendLiteral("Has slow repaint objects, "); 964 stringBuilder.appendLiteral("Has slow repaint objects, ");
(...skipping 21 matching lines...) Expand all
982 bool frameIsScrollable = frameView && frameView->isScrollable(); 986 bool frameIsScrollable = frameView && frameView->isScrollable();
983 if (frameIsScrollable != m_wasFrameScrollable) 987 if (frameIsScrollable != m_wasFrameScrollable)
984 return true; 988 return true;
985 989
986 if (WebLayer* scrollLayer = frameView ? toWebLayer(frameView->layerForScroll ing()) : nullptr) 990 if (WebLayer* scrollLayer = frameView ? toWebLayer(frameView->layerForScroll ing()) : nullptr)
987 return blink::WebSize(frameView->contentsSize()) != scrollLayer->bounds( ); 991 return blink::WebSize(frameView->contentsSize()) != scrollLayer->bounds( );
988 return false; 992 return false;
989 } 993 }
990 994
991 } // namespace blink 995 } // namespace blink
OLDNEW
« Source/core/frame/FrameView.cpp ('K') | « Source/core/frame/FrameView.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698