OLD | NEW |
---|---|
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 Loading... | |
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 Loading... | |
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 |
OLD | NEW |