Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 3862 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3873 unsigned inactiveBackgroundColor, | 3873 unsigned inactiveBackgroundColor, |
| 3874 unsigned inactiveForegroundColor) { | 3874 unsigned inactiveForegroundColor) { |
| 3875 #if USE(DEFAULT_RENDER_THEME) | 3875 #if USE(DEFAULT_RENDER_THEME) |
| 3876 LayoutThemeDefault::setSelectionColors(activeBackgroundColor, activeForegrou ndColor, inactiveBackgroundColor, inactiveForegroundColor); | 3876 LayoutThemeDefault::setSelectionColors(activeBackgroundColor, activeForegrou ndColor, inactiveBackgroundColor, inactiveForegroundColor); |
| 3877 LayoutTheme::theme().platformColorsDidChange(); | 3877 LayoutTheme::theme().platformColorsDidChange(); |
| 3878 #endif | 3878 #endif |
| 3879 } | 3879 } |
| 3880 | 3880 |
| 3881 void WebViewImpl::didCommitLoad(bool isNewNavigation, bool isNavigationWithinPag e) | 3881 void WebViewImpl::didCommitLoad(bool isNewNavigation, bool isNavigationWithinPag e) |
| 3882 { | 3882 { |
| 3883 if (isNewNavigation && !isNavigationWithinPage) { | 3883 if (!isNavigationWithinPage) { |
| 3884 pageScaleConstraintsSet().setNeedsReset(true); | 3884 m_shouldDispatchFirstVisuallyNonEmptyLayout = true; |
| 3885 m_pageImportanceSignals.onCommitLoad(); | 3885 m_shouldDispatchFirstLayoutAfterFinishedParsing = true; |
| 3886 | |
| 3887 if (isNewNavigation) { | |
| 3888 pageScaleConstraintsSet().setNeedsReset(true); | |
| 3889 m_pageImportanceSignals.onCommitLoad(); | |
|
Alexander Semashko
2015/10/05 13:11:11
As a side question, do these two lines need to be
bokan
2015/10/05 18:03:30
I can only speak to the setNeedsReset on pageScale
| |
| 3890 } | |
| 3886 } | 3891 } |
| 3887 | 3892 |
| 3888 // Give the visual viewport's scroll layer its initial size. | 3893 // Give the visual viewport's scroll layer its initial size. |
| 3889 page()->frameHost().visualViewport().mainFrameDidChangeSize(); | 3894 page()->frameHost().visualViewport().mainFrameDidChangeSize(); |
| 3890 | 3895 |
| 3891 // Make sure link highlight from previous page is cleared. | 3896 // Make sure link highlight from previous page is cleared. |
| 3892 m_linkHighlights.clear(); | 3897 m_linkHighlights.clear(); |
| 3893 endActiveFlingAnimation(); | 3898 endActiveFlingAnimation(); |
| 3894 m_userGestureObserved = false; | 3899 m_userGestureObserved = false; |
| 3895 } | 3900 } |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4156 m_layerTreeView->setVisible(visible); | 4161 m_layerTreeView->setVisible(visible); |
| 4157 } else { | 4162 } else { |
| 4158 m_rootGraphicsLayer = nullptr; | 4163 m_rootGraphicsLayer = nullptr; |
| 4159 m_rootLayer = nullptr; | 4164 m_rootLayer = nullptr; |
| 4160 m_rootTransformLayer = nullptr; | 4165 m_rootTransformLayer = nullptr; |
| 4161 // This means that we're transitioning to a new page. Suppress | 4166 // This means that we're transitioning to a new page. Suppress |
| 4162 // commits until Blink generates invalidations so we don't | 4167 // commits until Blink generates invalidations so we don't |
| 4163 // attempt to paint too early in the next page load. | 4168 // attempt to paint too early in the next page load. |
| 4164 m_layerTreeView->setDeferCommits(true); | 4169 m_layerTreeView->setDeferCommits(true); |
| 4165 m_layerTreeView->clearRootLayer(); | 4170 m_layerTreeView->clearRootLayer(); |
| 4166 m_shouldDispatchFirstVisuallyNonEmptyLayout = true; | |
| 4167 m_shouldDispatchFirstLayoutAfterFinishedParsing = true; | |
| 4168 page()->frameHost().visualViewport().clearLayersForTreeView(m_layerTreeV iew); | 4171 page()->frameHost().visualViewport().clearLayersForTreeView(m_layerTreeV iew); |
| 4169 } | 4172 } |
| 4170 } | 4173 } |
| 4171 | 4174 |
| 4172 void WebViewImpl::invalidateRect(const IntRect& rect) | 4175 void WebViewImpl::invalidateRect(const IntRect& rect) |
| 4173 { | 4176 { |
| 4174 if (m_layerTreeView) | 4177 if (m_layerTreeView) |
| 4175 updateLayerTreeViewport(); | 4178 updateLayerTreeViewport(); |
| 4176 else if (m_client) | 4179 else if (m_client) |
| 4177 m_client->didInvalidateRect(rect); | 4180 m_client->didInvalidateRect(rect); |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4453 if (m_pageColorOverlay) | 4456 if (m_pageColorOverlay) |
| 4454 m_pageColorOverlay->update(); | 4457 m_pageColorOverlay->update(); |
| 4455 if (InspectorOverlay* overlay = inspectorOverlay()) { | 4458 if (InspectorOverlay* overlay = inspectorOverlay()) { |
| 4456 PageOverlay* inspectorPageOverlay = overlay->pageOverlay(); | 4459 PageOverlay* inspectorPageOverlay = overlay->pageOverlay(); |
| 4457 if (inspectorPageOverlay) | 4460 if (inspectorPageOverlay) |
| 4458 inspectorPageOverlay->update(); | 4461 inspectorPageOverlay->update(); |
| 4459 } | 4462 } |
| 4460 } | 4463 } |
| 4461 | 4464 |
| 4462 } // namespace blink | 4465 } // namespace blink |
| OLD | NEW |