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

Side by Side Diff: third_party/WebKit/Source/web/WebViewImpl.cpp

Issue 1380363005: Find a better place for setting Layout/Paint hook related flags. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 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
« no previous file with comments | « no previous file | no next file » | 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) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 3834 matching lines...) Expand 10 before | Expand all | Expand 10 after
3845 unsigned inactiveBackgroundColor, 3845 unsigned inactiveBackgroundColor,
3846 unsigned inactiveForegroundColor) { 3846 unsigned inactiveForegroundColor) {
3847 #if USE(DEFAULT_RENDER_THEME) 3847 #if USE(DEFAULT_RENDER_THEME)
3848 LayoutThemeDefault::setSelectionColors(activeBackgroundColor, activeForegrou ndColor, inactiveBackgroundColor, inactiveForegroundColor); 3848 LayoutThemeDefault::setSelectionColors(activeBackgroundColor, activeForegrou ndColor, inactiveBackgroundColor, inactiveForegroundColor);
3849 LayoutTheme::theme().platformColorsDidChange(); 3849 LayoutTheme::theme().platformColorsDidChange();
3850 #endif 3850 #endif
3851 } 3851 }
3852 3852
3853 void WebViewImpl::didCommitLoad(bool isNewNavigation, bool isNavigationWithinPag e) 3853 void WebViewImpl::didCommitLoad(bool isNewNavigation, bool isNavigationWithinPag e)
3854 { 3854 {
3855 if (isNewNavigation && !isNavigationWithinPage) { 3855 if (!isNavigationWithinPage) {
esprehn 2015/10/26 21:08:54 What does isNavigationWithinPage mean? Does that m
Alexander Semashko 2015/10/26 21:57:50 Both are in-page navigations, for sure. I'd say th
3856 pageScaleConstraintsSet().setNeedsReset(true); 3856 m_shouldDispatchFirstVisuallyNonEmptyLayout = true;
3857 m_pageImportanceSignals.onCommitLoad(); 3857 m_shouldDispatchFirstLayoutAfterFinishedParsing = true;
3858 m_shouldDispatchFirstLayoutAfterFinishedLoading = true;
3859
3860 if (isNewNavigation) {
3861 pageScaleConstraintsSet().setNeedsReset(true);
3862 m_pageImportanceSignals.onCommitLoad();
3863 }
3858 } 3864 }
3859 3865
3860 // Give the visual viewport's scroll layer its initial size. 3866 // Give the visual viewport's scroll layer its initial size.
3861 page()->frameHost().visualViewport().mainFrameDidChangeSize(); 3867 page()->frameHost().visualViewport().mainFrameDidChangeSize();
3862 3868
3863 // Make sure link highlight from previous page is cleared. 3869 // Make sure link highlight from previous page is cleared.
3864 m_linkHighlights.clear(); 3870 m_linkHighlights.clear();
3865 endActiveFlingAnimation(); 3871 endActiveFlingAnimation();
3866 m_userGestureObserved = false; 3872 m_userGestureObserved = false;
3867 } 3873 }
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
4131 m_layerTreeView->setVisible(visible); 4137 m_layerTreeView->setVisible(visible);
4132 } else { 4138 } else {
4133 m_rootGraphicsLayer = nullptr; 4139 m_rootGraphicsLayer = nullptr;
4134 m_rootLayer = nullptr; 4140 m_rootLayer = nullptr;
4135 m_rootTransformLayer = nullptr; 4141 m_rootTransformLayer = nullptr;
4136 // This means that we're transitioning to a new page. Suppress 4142 // This means that we're transitioning to a new page. Suppress
4137 // commits until Blink generates invalidations so we don't 4143 // commits until Blink generates invalidations so we don't
4138 // attempt to paint too early in the next page load. 4144 // attempt to paint too early in the next page load.
4139 m_layerTreeView->setDeferCommits(true); 4145 m_layerTreeView->setDeferCommits(true);
4140 m_layerTreeView->clearRootLayer(); 4146 m_layerTreeView->clearRootLayer();
4141 m_shouldDispatchFirstVisuallyNonEmptyLayout = true;
4142 m_shouldDispatchFirstLayoutAfterFinishedParsing = true;
4143 m_shouldDispatchFirstLayoutAfterFinishedLoading = true;
4144 visualViewport.clearLayersForTreeView(m_layerTreeView); 4147 visualViewport.clearLayersForTreeView(m_layerTreeView);
4145 } 4148 }
4146 } 4149 }
4147 4150
4148 void WebViewImpl::invalidateRect(const IntRect& rect) 4151 void WebViewImpl::invalidateRect(const IntRect& rect)
4149 { 4152 {
4150 if (m_layerTreeView) 4153 if (m_layerTreeView)
4151 updateLayerTreeViewport(); 4154 updateLayerTreeViewport();
4152 else if (m_client) 4155 else if (m_client)
4153 m_client->didInvalidateRect(rect); 4156 m_client->didInvalidateRect(rect);
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
4431 if (m_pageColorOverlay) 4434 if (m_pageColorOverlay)
4432 m_pageColorOverlay->update(); 4435 m_pageColorOverlay->update();
4433 if (InspectorOverlay* overlay = inspectorOverlay()) { 4436 if (InspectorOverlay* overlay = inspectorOverlay()) {
4434 PageOverlay* inspectorPageOverlay = overlay->pageOverlay(); 4437 PageOverlay* inspectorPageOverlay = overlay->pageOverlay();
4435 if (inspectorPageOverlay) 4438 if (inspectorPageOverlay)
4436 inspectorPageOverlay->update(); 4439 inspectorPageOverlay->update();
4437 } 4440 }
4438 } 4441 }
4439 4442
4440 } // namespace blink 4443 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698