| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 #include "core/page/FrameTree.h" | 76 #include "core/page/FrameTree.h" |
| 77 #include "core/page/InjectedStyleSheets.h" | 77 #include "core/page/InjectedStyleSheets.h" |
| 78 #include "core/page/Page.h" | 78 #include "core/page/Page.h" |
| 79 #include "core/page/PagePopupClient.h" | 79 #include "core/page/PagePopupClient.h" |
| 80 #include "core/page/PointerLockController.h" | 80 #include "core/page/PointerLockController.h" |
| 81 #include "core/page/ScopedPageLoadDeferrer.h" | 81 #include "core/page/ScopedPageLoadDeferrer.h" |
| 82 #include "core/page/TouchDisambiguation.h" | 82 #include "core/page/TouchDisambiguation.h" |
| 83 #include "core/rendering/FastTextAutosizer.h" | 83 #include "core/rendering/FastTextAutosizer.h" |
| 84 #include "core/rendering/RenderView.h" | 84 #include "core/rendering/RenderView.h" |
| 85 #include "core/rendering/RenderWidget.h" | 85 #include "core/rendering/RenderWidget.h" |
| 86 #include "core/rendering/TextAutosizer.h" | |
| 87 #include "core/rendering/compositing/RenderLayerCompositor.h" | 86 #include "core/rendering/compositing/RenderLayerCompositor.h" |
| 88 #include "modules/device_orientation/DeviceOrientationInspectorAgent.h" | 87 #include "modules/device_orientation/DeviceOrientationInspectorAgent.h" |
| 89 #include "modules/encryptedmedia/MediaKeysController.h" | 88 #include "modules/encryptedmedia/MediaKeysController.h" |
| 90 #include "modules/filesystem/InspectorFileSystemAgent.h" | 89 #include "modules/filesystem/InspectorFileSystemAgent.h" |
| 91 #include "modules/indexeddb/InspectorIndexedDBAgent.h" | 90 #include "modules/indexeddb/InspectorIndexedDBAgent.h" |
| 92 #include "modules/push_messaging/PushController.h" | 91 #include "modules/push_messaging/PushController.h" |
| 93 #include "platform/ContextMenu.h" | 92 #include "platform/ContextMenu.h" |
| 94 #include "platform/ContextMenuItem.h" | 93 #include "platform/ContextMenuItem.h" |
| 95 #include "platform/Cursor.h" | 94 #include "platform/Cursor.h" |
| 96 #include "platform/KeyboardCodes.h" | 95 #include "platform/KeyboardCodes.h" |
| (...skipping 2969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3066 { | 3065 { |
| 3067 if (m_fixedLayoutSizeLock || m_shouldAutoResize || !mainFrameImpl()) | 3066 if (m_fixedLayoutSizeLock || m_shouldAutoResize || !mainFrameImpl()) |
| 3068 return; | 3067 return; |
| 3069 | 3068 |
| 3070 RefPtr<FrameView> view = mainFrameImpl()->frameView(); | 3069 RefPtr<FrameView> view = mainFrameImpl()->frameView(); |
| 3071 if (!view) | 3070 if (!view) |
| 3072 return; | 3071 return; |
| 3073 | 3072 |
| 3074 WebSize layoutSize = m_size; | 3073 WebSize layoutSize = m_size; |
| 3075 | 3074 |
| 3076 if (settings()->viewportEnabled()) { | 3075 if (settings()->viewportEnabled()) |
| 3077 layoutSize = flooredIntSize(m_pageScaleConstraintsSet.pageDefinedConstra
ints().layoutSize); | 3076 layoutSize = flooredIntSize(m_pageScaleConstraintsSet.pageDefinedConstra
ints().layoutSize); |
| 3078 | 3077 |
| 3079 bool textAutosizingEnabled = page()->settings().textAutosizingEnabled(); | |
| 3080 if (textAutosizingEnabled && layoutSize.width != view->layoutSize().widt
h()) { | |
| 3081 if (TextAutosizer* textAutosizer = page()->deprecatedLocalMainFrame(
)->document()->textAutosizer()) | |
| 3082 textAutosizer->recalculateMultipliers(); | |
| 3083 } | |
| 3084 } | |
| 3085 | |
| 3086 view->setLayoutSize(layoutSize); | 3078 view->setLayoutSize(layoutSize); |
| 3087 } | 3079 } |
| 3088 | 3080 |
| 3089 IntSize WebViewImpl::contentsSize() const | 3081 IntSize WebViewImpl::contentsSize() const |
| 3090 { | 3082 { |
| 3091 if (!page()->mainFrame()->isLocalFrame()) | 3083 if (!page()->mainFrame()->isLocalFrame()) |
| 3092 return IntSize(); | 3084 return IntSize(); |
| 3093 RenderView* root = page()->deprecatedLocalMainFrame()->contentRenderer(); | 3085 RenderView* root = page()->deprecatedLocalMainFrame()->contentRenderer(); |
| 3094 if (!root) | 3086 if (!root) |
| 3095 return IntSize(); | 3087 return IntSize(); |
| (...skipping 1144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4240 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); | 4232 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); |
| 4241 | 4233 |
| 4242 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) | 4234 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) |
| 4243 return false; | 4235 return false; |
| 4244 | 4236 |
| 4245 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4237 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
| 4246 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); | 4238 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); |
| 4247 } | 4239 } |
| 4248 | 4240 |
| 4249 } // namespace blink | 4241 } // namespace blink |
| OLD | NEW |