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

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

Issue 647343003: Fix crash with fullscreen elements inside frames. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add assertion Created 6 years, 2 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
« no previous file with comments | « Source/web/FullscreenController.cpp ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 #include "core/page/DragSession.h" 74 #include "core/page/DragSession.h"
75 #include "core/page/EventHandler.h" 75 #include "core/page/EventHandler.h"
76 #include "core/page/FocusController.h" 76 #include "core/page/FocusController.h"
77 #include "core/page/FrameTree.h" 77 #include "core/page/FrameTree.h"
78 #include "core/page/InjectedStyleSheets.h" 78 #include "core/page/InjectedStyleSheets.h"
79 #include "core/page/Page.h" 79 #include "core/page/Page.h"
80 #include "core/page/PagePopupClient.h" 80 #include "core/page/PagePopupClient.h"
81 #include "core/page/PointerLockController.h" 81 #include "core/page/PointerLockController.h"
82 #include "core/page/ScopedPageLoadDeferrer.h" 82 #include "core/page/ScopedPageLoadDeferrer.h"
83 #include "core/page/TouchDisambiguation.h" 83 #include "core/page/TouchDisambiguation.h"
84 #include "core/rendering/RenderFullScreen.h"
85 #include "core/rendering/RenderPart.h" 84 #include "core/rendering/RenderPart.h"
86 #include "core/rendering/RenderView.h" 85 #include "core/rendering/RenderView.h"
87 #include "core/rendering/TextAutosizer.h" 86 #include "core/rendering/TextAutosizer.h"
88 #include "core/rendering/compositing/RenderLayerCompositor.h" 87 #include "core/rendering/compositing/RenderLayerCompositor.h"
89 #include "modules/credentialmanager/CredentialManagerClient.h" 88 #include "modules/credentialmanager/CredentialManagerClient.h"
90 #include "modules/device_orientation/DeviceOrientationInspectorAgent.h" 89 #include "modules/device_orientation/DeviceOrientationInspectorAgent.h"
91 #include "modules/encryptedmedia/MediaKeysController.h" 90 #include "modules/encryptedmedia/MediaKeysController.h"
92 #include "modules/filesystem/InspectorFileSystemAgent.h" 91 #include "modules/filesystem/InspectorFileSystemAgent.h"
93 #include "modules/indexeddb/InspectorIndexedDBAgent.h" 92 #include "modules/indexeddb/InspectorIndexedDBAgent.h"
94 #include "modules/push_messaging/PushController.h" 93 #include "modules/push_messaging/PushController.h"
(...skipping 1657 matching lines...) Expand 10 before | Expand all | Expand 10 after
1752 // FIXME: TextAutosizer does not yet support out-of-process frames. 1751 // FIXME: TextAutosizer does not yet support out-of-process frames.
1753 if (mainFrameImpl() && mainFrameImpl()->frame()->isLocalFrame()) 1752 if (mainFrameImpl() && mainFrameImpl()->frame()->isLocalFrame())
1754 { 1753 {
1755 // Avoids unnecessary invalidations while various bits of state in TextA utosizer are updated. 1754 // Avoids unnecessary invalidations while various bits of state in TextA utosizer are updated.
1756 TextAutosizer::DeferUpdatePageInfo deferUpdatePageInfo(page()); 1755 TextAutosizer::DeferUpdatePageInfo deferUpdatePageInfo(page());
1757 performResize(); 1756 performResize();
1758 } else { 1757 } else {
1759 performResize(); 1758 performResize();
1760 } 1759 }
1761 1760
1762 if (m_fullscreenController->isFullscreen()) 1761 m_fullscreenController->updateSize();
1763 Fullscreen::from(*view->frame().document()).fullScreenRenderer()->update Style();
1764 1762
1765 if (settings()->viewportEnabled()) { 1763 if (settings()->viewportEnabled()) {
1766 // Relayout immediately to recalculate the minimum scale limit. 1764 // Relayout immediately to recalculate the minimum scale limit.
1767 if (view->needsLayout()) 1765 if (view->needsLayout())
1768 view->layout(); 1766 view->layout();
1769 1767
1770 if (shouldAnchorAndRescaleViewport) { 1768 if (shouldAnchorAndRescaleViewport) {
1771 float newPageScaleFactor = oldPageScaleFactor / oldMinimumPageScaleF actor * minimumPageScaleFactor(); 1769 float newPageScaleFactor = oldPageScaleFactor / oldMinimumPageScaleF actor * minimumPageScaleFactor();
1772 newPageScaleFactor = clampPageScaleFactorToLimits(newPageScaleFactor ); 1770 newPageScaleFactor = clampPageScaleFactorToLimits(newPageScaleFactor );
1773 1771
(...skipping 2675 matching lines...) Expand 10 before | Expand all | Expand 10 after
4449 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints(); 4447 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints();
4450 4448
4451 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) 4449 if (!mainFrameImpl() || !mainFrameImpl()->frameView())
4452 return false; 4450 return false;
4453 4451
4454 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width 4452 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width
4455 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); 4453 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1);
4456 } 4454 }
4457 4455
4458 } // namespace blink 4456 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/FullscreenController.cpp ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698