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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 #include "core/style/StyleInheritedData.h" | 158 #include "core/style/StyleInheritedData.h" |
159 #include "core/timing/DOMWindowPerformance.h" | 159 #include "core/timing/DOMWindowPerformance.h" |
160 #include "core/timing/Performance.h" | 160 #include "core/timing/Performance.h" |
161 #include "modules/app_banner/AppBannerController.h" | 161 #include "modules/app_banner/AppBannerController.h" |
162 #include "modules/installation/InstallationServiceImpl.h" | 162 #include "modules/installation/InstallationServiceImpl.h" |
163 #include "platform/ScriptForbiddenScope.h" | 163 #include "platform/ScriptForbiddenScope.h" |
164 #include "platform/UserGestureIndicator.h" | 164 #include "platform/UserGestureIndicator.h" |
165 #include "platform/WebFrameScheduler.h" | 165 #include "platform/WebFrameScheduler.h" |
166 #include "platform/clipboard/ClipboardUtilities.h" | 166 #include "platform/clipboard/ClipboardUtilities.h" |
167 #include "platform/fonts/FontCache.h" | 167 #include "platform/fonts/FontCache.h" |
| 168 #include "platform/graphics/Color.h" |
168 #include "platform/graphics/GraphicsContext.h" | 169 #include "platform/graphics/GraphicsContext.h" |
169 #include "platform/graphics/GraphicsLayerClient.h" | 170 #include "platform/graphics/GraphicsLayerClient.h" |
170 #include "platform/graphics/paint/ClipRecorder.h" | 171 #include "platform/graphics/paint/ClipRecorder.h" |
171 #include "platform/graphics/paint/DisplayItemCacheSkipper.h" | 172 #include "platform/graphics/paint/DisplayItemCacheSkipper.h" |
172 #include "platform/graphics/paint/DrawingRecorder.h" | 173 #include "platform/graphics/paint/DrawingRecorder.h" |
173 #include "platform/graphics/paint/PaintRecordBuilder.h" | 174 #include "platform/graphics/paint/PaintRecordBuilder.h" |
174 #include "platform/graphics/skia/SkiaUtils.h" | 175 #include "platform/graphics/skia/SkiaUtils.h" |
175 #include "platform/heap/Handle.h" | 176 #include "platform/heap/Handle.h" |
176 #include "platform/instrumentation/tracing/TraceEvent.h" | 177 #include "platform/instrumentation/tracing/TraceEvent.h" |
177 #include "platform/loader/fetch/ResourceFetcher.h" | 178 #include "platform/loader/fetch/ResourceFetcher.h" |
(...skipping 1541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1719 WebViewImpl* webView = viewImpl(); | 1720 WebViewImpl* webView = viewImpl(); |
1720 | 1721 |
1721 // Check if we're shutting down. | 1722 // Check if we're shutting down. |
1722 if (!webView->page()) | 1723 if (!webView->page()) |
1723 return; | 1724 return; |
1724 | 1725 |
1725 bool isMainFrame = !parent(); | 1726 bool isMainFrame = !parent(); |
1726 IntSize initialSize = (isMainFrame || !frameWidget()) | 1727 IntSize initialSize = (isMainFrame || !frameWidget()) |
1727 ? webView->mainFrameSize() | 1728 ? webView->mainFrameSize() |
1728 : (IntSize)frameWidget()->size(); | 1729 : (IntSize)frameWidget()->size(); |
1729 bool isTransparent = !isMainFrame && parent()->isWebRemoteFrame() | 1730 Color baseBackgroundColor = webView->baseBackgroundColor(); |
1730 ? true | 1731 if (!isMainFrame && parent()->isWebRemoteFrame()) |
1731 : webView->isTransparent(); | 1732 baseBackgroundColor = Color::transparent; |
1732 | 1733 |
1733 frame()->createView(initialSize, webView->baseBackgroundColor(), | 1734 frame()->createView(initialSize, webView->baseBackgroundColor()); |
1734 isTransparent); | |
1735 if (isMainFrame) { | 1735 if (isMainFrame) { |
1736 frame()->view()->setInitialViewportSize( | 1736 frame()->view()->setInitialViewportSize( |
1737 webView->pageScaleConstraintsSet().initialViewportSize()); | 1737 webView->pageScaleConstraintsSet().initialViewportSize()); |
1738 } | 1738 } |
1739 if (webView->shouldAutoResize() && frame()->isLocalRoot()) | 1739 if (webView->shouldAutoResize() && frame()->isLocalRoot()) |
1740 frame()->view()->enableAutoSizeMode(webView->minAutoSize(), | 1740 frame()->view()->enableAutoSizeMode(webView->minAutoSize(), |
1741 webView->maxAutoSize()); | 1741 webView->maxAutoSize()); |
1742 | 1742 |
1743 frame()->view()->setInputEventsTransformForEmulation( | 1743 frame()->view()->setInputEventsTransformForEmulation( |
1744 m_inputEventsOffsetForEmulation, m_inputEventsScaleFactorForEmulation); | 1744 m_inputEventsOffsetForEmulation, m_inputEventsScaleFactorForEmulation); |
(...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2516 createMarkup(startPosition, endPosition, AnnotateForInterchange, | 2516 createMarkup(startPosition, endPosition, AnnotateForInterchange, |
2517 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); | 2517 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); |
2518 } else { | 2518 } else { |
2519 clipHtml = | 2519 clipHtml = |
2520 createMarkup(endPosition, startPosition, AnnotateForInterchange, | 2520 createMarkup(endPosition, startPosition, AnnotateForInterchange, |
2521 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); | 2521 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); |
2522 } | 2522 } |
2523 } | 2523 } |
2524 | 2524 |
2525 } // namespace blink | 2525 } // namespace blink |
OLD | NEW |