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 20 matching lines...) Expand all Loading... |
31 #include "config.h" | 31 #include "config.h" |
32 #include "web/WebViewImpl.h" | 32 #include "web/WebViewImpl.h" |
33 | 33 |
34 #include "core/CSSValueKeywords.h" | 34 #include "core/CSSValueKeywords.h" |
35 #include "core/HTMLNames.h" | 35 #include "core/HTMLNames.h" |
36 #include "core/InputTypeNames.h" | 36 #include "core/InputTypeNames.h" |
37 #include "core/accessibility/AXObjectCache.h" | 37 #include "core/accessibility/AXObjectCache.h" |
38 #include "core/clipboard/DataObject.h" | 38 #include "core/clipboard/DataObject.h" |
39 #include "core/dom/Document.h" | 39 #include "core/dom/Document.h" |
40 #include "core/dom/DocumentMarkerController.h" | 40 #include "core/dom/DocumentMarkerController.h" |
| 41 #include "core/dom/Fullscreen.h" |
41 #include "core/dom/NodeRenderingTraversal.h" | 42 #include "core/dom/NodeRenderingTraversal.h" |
42 #include "core/dom/Text.h" | 43 #include "core/dom/Text.h" |
43 #include "core/editing/Editor.h" | 44 #include "core/editing/Editor.h" |
44 #include "core/editing/FrameSelection.h" | 45 #include "core/editing/FrameSelection.h" |
45 #include "core/editing/HTMLInterchange.h" | 46 #include "core/editing/HTMLInterchange.h" |
46 #include "core/editing/InputMethodController.h" | 47 #include "core/editing/InputMethodController.h" |
47 #include "core/editing/TextIterator.h" | 48 #include "core/editing/TextIterator.h" |
48 #include "core/editing/markup.h" | 49 #include "core/editing/markup.h" |
49 #include "core/events/KeyboardEvent.h" | 50 #include "core/events/KeyboardEvent.h" |
50 #include "core/events/WheelEvent.h" | 51 #include "core/events/WheelEvent.h" |
(...skipping 22 matching lines...) Expand all Loading... |
73 #include "core/page/DragSession.h" | 74 #include "core/page/DragSession.h" |
74 #include "core/page/EventHandler.h" | 75 #include "core/page/EventHandler.h" |
75 #include "core/page/FocusController.h" | 76 #include "core/page/FocusController.h" |
76 #include "core/page/FrameTree.h" | 77 #include "core/page/FrameTree.h" |
77 #include "core/page/InjectedStyleSheets.h" | 78 #include "core/page/InjectedStyleSheets.h" |
78 #include "core/page/Page.h" | 79 #include "core/page/Page.h" |
79 #include "core/page/PagePopupClient.h" | 80 #include "core/page/PagePopupClient.h" |
80 #include "core/page/PointerLockController.h" | 81 #include "core/page/PointerLockController.h" |
81 #include "core/page/ScopedPageLoadDeferrer.h" | 82 #include "core/page/ScopedPageLoadDeferrer.h" |
82 #include "core/page/TouchDisambiguation.h" | 83 #include "core/page/TouchDisambiguation.h" |
| 84 #include "core/rendering/RenderFullScreen.h" |
83 #include "core/rendering/RenderView.h" | 85 #include "core/rendering/RenderView.h" |
84 #include "core/rendering/RenderWidget.h" | 86 #include "core/rendering/RenderWidget.h" |
85 #include "core/rendering/TextAutosizer.h" | 87 #include "core/rendering/TextAutosizer.h" |
86 #include "core/rendering/compositing/RenderLayerCompositor.h" | 88 #include "core/rendering/compositing/RenderLayerCompositor.h" |
87 #include "modules/credentialmanager/CredentialManagerClient.h" | 89 #include "modules/credentialmanager/CredentialManagerClient.h" |
88 #include "modules/device_orientation/DeviceOrientationInspectorAgent.h" | 90 #include "modules/device_orientation/DeviceOrientationInspectorAgent.h" |
89 #include "modules/encryptedmedia/MediaKeysController.h" | 91 #include "modules/encryptedmedia/MediaKeysController.h" |
90 #include "modules/filesystem/InspectorFileSystemAgent.h" | 92 #include "modules/filesystem/InspectorFileSystemAgent.h" |
91 #include "modules/indexeddb/InspectorIndexedDBAgent.h" | 93 #include "modules/indexeddb/InspectorIndexedDBAgent.h" |
92 #include "modules/push_messaging/PushController.h" | 94 #include "modules/push_messaging/PushController.h" |
(...skipping 1657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1750 // FIXME: TextAutosizer does not yet support out-of-process frames. | 1752 // FIXME: TextAutosizer does not yet support out-of-process frames. |
1751 if (mainFrameImpl() && mainFrameImpl()->frame()->isLocalFrame()) | 1753 if (mainFrameImpl() && mainFrameImpl()->frame()->isLocalFrame()) |
1752 { | 1754 { |
1753 // Avoids unnecessary invalidations while various bits of state in TextA
utosizer are updated. | 1755 // Avoids unnecessary invalidations while various bits of state in TextA
utosizer are updated. |
1754 TextAutosizer::DeferUpdatePageInfo deferUpdatePageInfo(page()); | 1756 TextAutosizer::DeferUpdatePageInfo deferUpdatePageInfo(page()); |
1755 performResize(); | 1757 performResize(); |
1756 } else { | 1758 } else { |
1757 performResize(); | 1759 performResize(); |
1758 } | 1760 } |
1759 | 1761 |
| 1762 if (m_fullscreenController->isFullscreen()) |
| 1763 Fullscreen::from(*view->frame().document()).fullScreenRenderer()->update
Style(); |
| 1764 |
1760 if (settings()->viewportEnabled()) { | 1765 if (settings()->viewportEnabled()) { |
1761 // Relayout immediately to recalculate the minimum scale limit. | 1766 // Relayout immediately to recalculate the minimum scale limit. |
1762 if (view->needsLayout()) | 1767 if (view->needsLayout()) |
1763 view->layout(); | 1768 view->layout(); |
1764 | 1769 |
1765 if (shouldAnchorAndRescaleViewport) { | 1770 if (shouldAnchorAndRescaleViewport) { |
1766 float newPageScaleFactor = oldPageScaleFactor / oldMinimumPageScaleF
actor * minimumPageScaleFactor(); | 1771 float newPageScaleFactor = oldPageScaleFactor / oldMinimumPageScaleF
actor * minimumPageScaleFactor(); |
1767 newPageScaleFactor = clampPageScaleFactorToLimits(newPageScaleFactor
); | 1772 newPageScaleFactor = clampPageScaleFactorToLimits(newPageScaleFactor
); |
1768 | 1773 |
1769 FloatSize pinchViewportSize = FloatSize(newSize); | 1774 FloatSize pinchViewportSize = FloatSize(newSize); |
(...skipping 2673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4443 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); | 4448 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); |
4444 | 4449 |
4445 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) | 4450 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) |
4446 return false; | 4451 return false; |
4447 | 4452 |
4448 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4453 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
4449 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); | 4454 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); |
4450 } | 4455 } |
4451 | 4456 |
4452 } // namespace blink | 4457 } // namespace blink |
OLD | NEW |