Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(412)

Side by Side Diff: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp

Issue 1565893004: Sets a transparent background for out-of-process subframes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removing background override Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1648 matching lines...) Expand 10 before | Expand all | Expand 10 after
1659 void WebLocalFrameImpl::createFrameView() 1659 void WebLocalFrameImpl::createFrameView()
1660 { 1660 {
1661 TRACE_EVENT0("blink", "WebLocalFrameImpl::createFrameView"); 1661 TRACE_EVENT0("blink", "WebLocalFrameImpl::createFrameView");
1662 1662
1663 ASSERT(frame()); // If frame() doesn't exist, we probably didn't init proper ly. 1663 ASSERT(frame()); // If frame() doesn't exist, we probably didn't init proper ly.
1664 1664
1665 WebViewImpl* webView = viewImpl(); 1665 WebViewImpl* webView = viewImpl();
1666 1666
1667 bool isMainFrame = !parent(); 1667 bool isMainFrame = !parent();
1668 IntSize initialSize = (isMainFrame || !frameWidget()) ? webView->mainFrameSi ze() : (IntSize)frameWidget()->size(); 1668 IntSize initialSize = (isMainFrame || !frameWidget()) ? webView->mainFrameSi ze() : (IntSize)frameWidget()->size();
1669 bool isTransparent = !isMainFrame && parent()->isWebRemoteFrame() ? true : w ebView->isTransparent();
1669 1670
1670 frame()->createView(initialSize, webView->baseBackgroundColor(), webView->is Transparent()); 1671 frame()->createView(initialSize, webView->baseBackgroundColor(), isTranspare nt);
1671 if (webView->shouldAutoResize() && frame()->isLocalRoot()) 1672 if (webView->shouldAutoResize() && frame()->isLocalRoot())
1672 frame()->view()->enableAutoSizeMode(webView->minAutoSize(), webView->max AutoSize()); 1673 frame()->view()->enableAutoSizeMode(webView->minAutoSize(), webView->max AutoSize());
1673 1674
1674 frame()->view()->setInputEventsTransformForEmulation(m_inputEventsOffsetForE mulation, m_inputEventsScaleFactorForEmulation); 1675 frame()->view()->setInputEventsTransformForEmulation(m_inputEventsOffsetForE mulation, m_inputEventsScaleFactorForEmulation);
1675 frame()->view()->setDisplayMode(webView->displayMode()); 1676 frame()->view()->setDisplayMode(webView->displayMode());
1676 } 1677 }
1677 1678
1678 WebLocalFrameImpl* WebLocalFrameImpl::fromFrame(LocalFrame* frame) 1679 WebLocalFrameImpl* WebLocalFrameImpl::fromFrame(LocalFrame* frame)
1679 { 1680 {
1680 if (!frame) 1681 if (!frame)
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
2184 return WebSandboxFlags::None; 2185 return WebSandboxFlags::None;
2185 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags( )); 2186 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags( ));
2186 } 2187 }
2187 2188
2188 void WebLocalFrameImpl::forceSandboxFlags(WebSandboxFlags flags) 2189 void WebLocalFrameImpl::forceSandboxFlags(WebSandboxFlags flags)
2189 { 2190 {
2190 frame()->loader().forceSandboxFlags(static_cast<SandboxFlags>(flags)); 2191 frame()->loader().forceSandboxFlags(static_cast<SandboxFlags>(flags));
2191 } 2192 }
2192 2193
2193 } // namespace blink 2194 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698