| 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" | |
| 42 #include "core/dom/NodeRenderingTraversal.h" | 41 #include "core/dom/NodeRenderingTraversal.h" |
| 43 #include "core/dom/Text.h" | 42 #include "core/dom/Text.h" |
| 44 #include "core/editing/Editor.h" | 43 #include "core/editing/Editor.h" |
| 45 #include "core/editing/FrameSelection.h" | 44 #include "core/editing/FrameSelection.h" |
| 46 #include "core/editing/HTMLInterchange.h" | 45 #include "core/editing/HTMLInterchange.h" |
| 47 #include "core/editing/InputMethodController.h" | 46 #include "core/editing/InputMethodController.h" |
| 48 #include "core/editing/TextIterator.h" | 47 #include "core/editing/TextIterator.h" |
| 49 #include "core/editing/markup.h" | 48 #include "core/editing/markup.h" |
| 50 #include "core/events/KeyboardEvent.h" | 49 #include "core/events/KeyboardEvent.h" |
| 51 #include "core/events/WheelEvent.h" | 50 #include "core/events/WheelEvent.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 74 #include "core/page/DragSession.h" | 73 #include "core/page/DragSession.h" |
| 75 #include "core/page/EventHandler.h" | 74 #include "core/page/EventHandler.h" |
| 76 #include "core/page/FocusController.h" | 75 #include "core/page/FocusController.h" |
| 77 #include "core/page/FrameTree.h" | 76 #include "core/page/FrameTree.h" |
| 78 #include "core/page/InjectedStyleSheets.h" | 77 #include "core/page/InjectedStyleSheets.h" |
| 79 #include "core/page/Page.h" | 78 #include "core/page/Page.h" |
| 80 #include "core/page/PagePopupClient.h" | 79 #include "core/page/PagePopupClient.h" |
| 81 #include "core/page/PointerLockController.h" | 80 #include "core/page/PointerLockController.h" |
| 82 #include "core/page/ScopedPageLoadDeferrer.h" | 81 #include "core/page/ScopedPageLoadDeferrer.h" |
| 83 #include "core/page/TouchDisambiguation.h" | 82 #include "core/page/TouchDisambiguation.h" |
| 84 #include "core/rendering/RenderFullScreen.h" | |
| 85 #include "core/rendering/RenderPart.h" | 83 #include "core/rendering/RenderPart.h" |
| 86 #include "core/rendering/RenderView.h" | 84 #include "core/rendering/RenderView.h" |
| 87 #include "core/rendering/TextAutosizer.h" | 85 #include "core/rendering/TextAutosizer.h" |
| 88 #include "core/rendering/compositing/RenderLayerCompositor.h" | 86 #include "core/rendering/compositing/RenderLayerCompositor.h" |
| 89 #include "modules/credentialmanager/CredentialManagerClient.h" | 87 #include "modules/credentialmanager/CredentialManagerClient.h" |
| 90 #include "modules/device_orientation/DeviceOrientationInspectorAgent.h" | 88 #include "modules/device_orientation/DeviceOrientationInspectorAgent.h" |
| 91 #include "modules/encryptedmedia/MediaKeysController.h" | 89 #include "modules/encryptedmedia/MediaKeysController.h" |
| 92 #include "modules/filesystem/InspectorFileSystemAgent.h" | 90 #include "modules/filesystem/InspectorFileSystemAgent.h" |
| 93 #include "modules/indexeddb/InspectorIndexedDBAgent.h" | 91 #include "modules/indexeddb/InspectorIndexedDBAgent.h" |
| 94 #include "modules/push_messaging/PushController.h" | 92 #include "modules/push_messaging/PushController.h" |
| (...skipping 1676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1771 // FIXME: TextAutosizer does not yet support out-of-process frames. | 1769 // FIXME: TextAutosizer does not yet support out-of-process frames. |
| 1772 if (mainFrameImpl() && mainFrameImpl()->frame()->isLocalFrame()) | 1770 if (mainFrameImpl() && mainFrameImpl()->frame()->isLocalFrame()) |
| 1773 { | 1771 { |
| 1774 // Avoids unnecessary invalidations while various bits of state in TextA
utosizer are updated. | 1772 // Avoids unnecessary invalidations while various bits of state in TextA
utosizer are updated. |
| 1775 TextAutosizer::DeferUpdatePageInfo deferUpdatePageInfo(page()); | 1773 TextAutosizer::DeferUpdatePageInfo deferUpdatePageInfo(page()); |
| 1776 performResize(); | 1774 performResize(); |
| 1777 } else { | 1775 } else { |
| 1778 performResize(); | 1776 performResize(); |
| 1779 } | 1777 } |
| 1780 | 1778 |
| 1781 if (m_fullscreenController->isFullscreen()) | |
| 1782 Fullscreen::from(*view->frame().document()).fullScreenRenderer()->update
Style(); | |
| 1783 | |
| 1784 if (settings()->viewportEnabled()) { | 1779 if (settings()->viewportEnabled()) { |
| 1785 // Relayout immediately to recalculate the minimum scale limit. | 1780 // Relayout immediately to recalculate the minimum scale limit. |
| 1786 if (view->needsLayout()) | 1781 if (view->needsLayout()) |
| 1787 view->layout(); | 1782 view->layout(); |
| 1788 | 1783 |
| 1789 if (shouldAnchorAndRescaleViewport) { | 1784 if (shouldAnchorAndRescaleViewport) { |
| 1790 float newPageScaleFactor = oldPageScaleFactor / oldMinimumPageScaleF
actor * minimumPageScaleFactor(); | 1785 float newPageScaleFactor = oldPageScaleFactor / oldMinimumPageScaleF
actor * minimumPageScaleFactor(); |
| 1791 newPageScaleFactor = clampPageScaleFactorToLimits(newPageScaleFactor
); | 1786 newPageScaleFactor = clampPageScaleFactorToLimits(newPageScaleFactor
); |
| 1792 | 1787 |
| 1793 FloatSize pinchViewportSize = FloatSize(newSize); | 1788 FloatSize pinchViewportSize = FloatSize(newSize); |
| (...skipping 2674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4468 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); | 4463 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); |
| 4469 | 4464 |
| 4470 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) | 4465 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) |
| 4471 return false; | 4466 return false; |
| 4472 | 4467 |
| 4473 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4468 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
| 4474 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); | 4469 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); |
| 4475 } | 4470 } |
| 4476 | 4471 |
| 4477 } // namespace blink | 4472 } // namespace blink |
| OLD | NEW |