OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 #include "core/editing/PlainTextRange.h" | 113 #include "core/editing/PlainTextRange.h" |
114 #include "core/editing/TextAffinity.h" | 114 #include "core/editing/TextAffinity.h" |
115 #include "core/editing/iterators/TextIterator.h" | 115 #include "core/editing/iterators/TextIterator.h" |
116 #include "core/editing/serializers/Serialization.h" | 116 #include "core/editing/serializers/Serialization.h" |
117 #include "core/editing/spellcheck/SpellChecker.h" | 117 #include "core/editing/spellcheck/SpellChecker.h" |
118 #include "core/fetch/ResourceFetcher.h" | 118 #include "core/fetch/ResourceFetcher.h" |
119 #include "core/fetch/SubstituteData.h" | 119 #include "core/fetch/SubstituteData.h" |
120 #include "core/frame/FrameHost.h" | 120 #include "core/frame/FrameHost.h" |
121 #include "core/frame/FrameView.h" | 121 #include "core/frame/FrameView.h" |
122 #include "core/frame/LocalDOMWindow.h" | 122 #include "core/frame/LocalDOMWindow.h" |
| 123 #include "core/frame/PageScaleConstraintsSet.h" |
123 #include "core/frame/RemoteFrame.h" | 124 #include "core/frame/RemoteFrame.h" |
124 #include "core/frame/Settings.h" | 125 #include "core/frame/Settings.h" |
125 #include "core/frame/UseCounter.h" | 126 #include "core/frame/UseCounter.h" |
126 #include "core/frame/VisualViewport.h" | 127 #include "core/frame/VisualViewport.h" |
127 #include "core/html/HTMLAnchorElement.h" | 128 #include "core/html/HTMLAnchorElement.h" |
128 #include "core/html/HTMLCollection.h" | 129 #include "core/html/HTMLCollection.h" |
129 #include "core/html/HTMLFormElement.h" | 130 #include "core/html/HTMLFormElement.h" |
130 #include "core/html/HTMLFrameElementBase.h" | 131 #include "core/html/HTMLFrameElementBase.h" |
131 #include "core/html/HTMLFrameOwnerElement.h" | 132 #include "core/html/HTMLFrameOwnerElement.h" |
132 #include "core/html/HTMLHeadElement.h" | 133 #include "core/html/HTMLHeadElement.h" |
(...skipping 1571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1704 bool isMainFrame = !parent(); | 1705 bool isMainFrame = !parent(); |
1705 IntSize initialSize = (isMainFrame || !frameWidget()) | 1706 IntSize initialSize = (isMainFrame || !frameWidget()) |
1706 ? webView->mainFrameSize() | 1707 ? webView->mainFrameSize() |
1707 : (IntSize)frameWidget()->size(); | 1708 : (IntSize)frameWidget()->size(); |
1708 bool isTransparent = !isMainFrame && parent()->isWebRemoteFrame() | 1709 bool isTransparent = !isMainFrame && parent()->isWebRemoteFrame() |
1709 ? true | 1710 ? true |
1710 : webView->isTransparent(); | 1711 : webView->isTransparent(); |
1711 | 1712 |
1712 frame()->createView(initialSize, webView->baseBackgroundColor(), | 1713 frame()->createView(initialSize, webView->baseBackgroundColor(), |
1713 isTransparent); | 1714 isTransparent); |
| 1715 if (isMainFrame) { |
| 1716 frame()->view()->setInitialViewportSize( |
| 1717 webView->pageScaleConstraintsSet().initialViewportSize()); |
| 1718 } |
1714 if (webView->shouldAutoResize() && frame()->isLocalRoot()) | 1719 if (webView->shouldAutoResize() && frame()->isLocalRoot()) |
1715 frame()->view()->enableAutoSizeMode(webView->minAutoSize(), | 1720 frame()->view()->enableAutoSizeMode(webView->minAutoSize(), |
1716 webView->maxAutoSize()); | 1721 webView->maxAutoSize()); |
1717 | 1722 |
1718 frame()->view()->setInputEventsTransformForEmulation( | 1723 frame()->view()->setInputEventsTransformForEmulation( |
1719 m_inputEventsOffsetForEmulation, m_inputEventsScaleFactorForEmulation); | 1724 m_inputEventsOffsetForEmulation, m_inputEventsScaleFactorForEmulation); |
1720 frame()->view()->setDisplayMode(webView->displayMode()); | 1725 frame()->view()->setDisplayMode(webView->displayMode()); |
1721 } | 1726 } |
1722 | 1727 |
1723 WebLocalFrameImpl* WebLocalFrameImpl::fromFrame(LocalFrame* frame) { | 1728 WebLocalFrameImpl* WebLocalFrameImpl::fromFrame(LocalFrame* frame) { |
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2381 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol; | 2386 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol; |
2382 } else if (metric == "wasAlternateProtocolAvailable") { | 2387 } else if (metric == "wasAlternateProtocolAvailable") { |
2383 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable; | 2388 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable; |
2384 } else if (metric == "connectionInfo") { | 2389 } else if (metric == "connectionInfo") { |
2385 feature = UseCounter::ChromeLoadTimesConnectionInfo; | 2390 feature = UseCounter::ChromeLoadTimesConnectionInfo; |
2386 } | 2391 } |
2387 UseCounter::count(frame(), feature); | 2392 UseCounter::count(frame(), feature); |
2388 } | 2393 } |
2389 | 2394 |
2390 } // namespace blink | 2395 } // namespace blink |
OLD | NEW |