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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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 "modules/screen_orientation/ScreenOrientationControllerImpl.h" | 163 #include "modules/screen_orientation/ScreenOrientationControllerImpl.h" |
164 #include "platform/ScriptForbiddenScope.h" | 164 #include "platform/ScriptForbiddenScope.h" |
165 #include "platform/UserGestureIndicator.h" | 165 #include "platform/UserGestureIndicator.h" |
166 #include "platform/WebFrameScheduler.h" | 166 #include "platform/WebFrameScheduler.h" |
167 #include "platform/clipboard/ClipboardUtilities.h" | 167 #include "platform/clipboard/ClipboardUtilities.h" |
168 #include "platform/fonts/FontCache.h" | 168 #include "platform/fonts/FontCache.h" |
169 #include "platform/graphics/Color.h" | |
169 #include "platform/graphics/GraphicsContext.h" | 170 #include "platform/graphics/GraphicsContext.h" |
170 #include "platform/graphics/GraphicsLayerClient.h" | 171 #include "platform/graphics/GraphicsLayerClient.h" |
171 #include "platform/graphics/paint/ClipRecorder.h" | 172 #include "platform/graphics/paint/ClipRecorder.h" |
172 #include "platform/graphics/paint/DisplayItemCacheSkipper.h" | 173 #include "platform/graphics/paint/DisplayItemCacheSkipper.h" |
173 #include "platform/graphics/paint/DrawingRecorder.h" | 174 #include "platform/graphics/paint/DrawingRecorder.h" |
174 #include "platform/graphics/paint/PaintRecordBuilder.h" | 175 #include "platform/graphics/paint/PaintRecordBuilder.h" |
175 #include "platform/graphics/skia/SkiaUtils.h" | 176 #include "platform/graphics/skia/SkiaUtils.h" |
176 #include "platform/heap/Handle.h" | 177 #include "platform/heap/Handle.h" |
177 #include "platform/instrumentation/tracing/TraceEvent.h" | 178 #include "platform/instrumentation/tracing/TraceEvent.h" |
178 #include "platform/loader/fetch/ResourceFetcher.h" | 179 #include "platform/loader/fetch/ResourceFetcher.h" |
(...skipping 1529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1708 WebViewImpl* webView = viewImpl(); | 1709 WebViewImpl* webView = viewImpl(); |
1709 | 1710 |
1710 // Check if we're shutting down. | 1711 // Check if we're shutting down. |
1711 if (!webView->page()) | 1712 if (!webView->page()) |
1712 return; | 1713 return; |
1713 | 1714 |
1714 bool isMainFrame = !parent(); | 1715 bool isMainFrame = !parent(); |
1715 IntSize initialSize = (isMainFrame || !frameWidget()) | 1716 IntSize initialSize = (isMainFrame || !frameWidget()) |
1716 ? webView->mainFrameSize() | 1717 ? webView->mainFrameSize() |
1717 : (IntSize)frameWidget()->size(); | 1718 : (IntSize)frameWidget()->size(); |
1718 bool isTransparent = !isMainFrame && parent()->isWebRemoteFrame() | 1719 Color baseBackgroundColor = webView->baseBackgroundColor(); |
1719 ? true | 1720 if (!isMainFrame && parent()->isWebRemoteFrame()) |
1720 : webView->isTransparent(); | 1721 baseBackgroundColor = Color::transparent; |
chrishtr
2017/03/28 19:45:56
I think the old code just used a conditional here
Eric Seckler
2017/03/29 10:50:18
My understanding is that the old code was setting
lfg
2017/03/29 15:19:43
Yes, that's my understanding as well.
Eric Seckler
2017/03/30 10:46:38
Added a unit test and filed https://crbug.com/7067
| |
1721 | 1722 |
1722 frame()->createView(initialSize, webView->baseBackgroundColor(), | 1723 frame()->createView(initialSize, webView->baseBackgroundColor()); |
1723 isTransparent); | |
1724 if (isMainFrame) { | 1724 if (isMainFrame) { |
1725 frame()->view()->setInitialViewportSize( | 1725 frame()->view()->setInitialViewportSize( |
1726 webView->pageScaleConstraintsSet().initialViewportSize()); | 1726 webView->pageScaleConstraintsSet().initialViewportSize()); |
1727 } | 1727 } |
1728 if (webView->shouldAutoResize() && frame()->isLocalRoot()) | 1728 if (webView->shouldAutoResize() && frame()->isLocalRoot()) |
1729 frame()->view()->enableAutoSizeMode(webView->minAutoSize(), | 1729 frame()->view()->enableAutoSizeMode(webView->minAutoSize(), |
1730 webView->maxAutoSize()); | 1730 webView->maxAutoSize()); |
1731 | 1731 |
1732 frame()->view()->setInputEventsTransformForEmulation( | 1732 frame()->view()->setInputEventsTransformForEmulation( |
1733 m_inputEventsOffsetForEmulation, m_inputEventsScaleFactorForEmulation); | 1733 m_inputEventsOffsetForEmulation, m_inputEventsScaleFactorForEmulation); |
(...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2505 createMarkup(startPosition, endPosition, AnnotateForInterchange, | 2505 createMarkup(startPosition, endPosition, AnnotateForInterchange, |
2506 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); | 2506 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); |
2507 } else { | 2507 } else { |
2508 clipHtml = | 2508 clipHtml = |
2509 createMarkup(endPosition, startPosition, AnnotateForInterchange, | 2509 createMarkup(endPosition, startPosition, AnnotateForInterchange, |
2510 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); | 2510 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); |
2511 } | 2511 } |
2512 } | 2512 } |
2513 | 2513 |
2514 } // namespace blink | 2514 } // namespace blink |
OLD | NEW |