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

Unified Diff: third_party/WebKit/Source/core/frame/FrameView.cpp

Issue 2715243004: [blink] Support (semi-)transparent background colors in WebView/Frame. (Closed)
Patch Set: add unit test for remote frame transparency Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.h ('k') | third_party/WebKit/Source/core/frame/LocalFrame.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/frame/FrameView.cpp
diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp
index 9e3e71408ab44b0965cd124d0b0e2d83e0f629b5..39864ac75be23d07b0678e581e7a046c620c90fd 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -174,7 +174,6 @@ FrameView::FrameView(LocalFrame& frame)
TaskRunnerHelper::get(TaskType::UnspecedTimer, &frame),
this,
&FrameView::updatePluginsTimerFired),
- m_isTransparent(false),
m_baseBackgroundColor(Color::white),
m_mediaType(MediaTypeNames::screen),
m_safeToPropagateScrollToParent(true),
@@ -2328,20 +2327,8 @@ void FrameView::setNeedsLayout() {
layoutViewItem.setNeedsLayout(LayoutInvalidationReason::Unknown);
}
-bool FrameView::isTransparent() const {
- return m_isTransparent;
-}
-
-void FrameView::setTransparent(bool isTransparent) {
- m_isTransparent = isTransparent;
- DisableCompositingQueryAsserts disabler;
- if (!layoutViewItem().isNull() &&
- layoutViewItem().layer()->hasCompositedLayerMapping())
- layoutViewItem().layer()->compositedLayerMapping()->updateContentsOpaque();
-}
-
bool FrameView::hasOpaqueBackground() const {
- return !m_isTransparent && !m_baseBackgroundColor.hasAlpha();
+ return !m_baseBackgroundColor.hasAlpha();
}
Color FrameView::baseBackgroundColor() const {
@@ -2365,13 +2352,11 @@ void FrameView::setBaseBackgroundColor(const Color& backgroundColor) {
page()->animator().scheduleVisualUpdate(m_frame.get());
}
-void FrameView::updateBackgroundRecursively(const Color& backgroundColor,
- bool transparent) {
- forAllNonThrottledFrameViews(
- [backgroundColor, transparent](FrameView& frameView) {
- frameView.setTransparent(transparent);
- frameView.setBaseBackgroundColor(backgroundColor);
- });
+void FrameView::updateBaseBackgroundColorRecursively(
+ const Color& baseBackgroundColor) {
+ forAllNonThrottledFrameViews([baseBackgroundColor](FrameView& frameView) {
dcheng 2017/03/31 01:21:15 Btw, I'm wondering something: we only call this fr
Eric Seckler 2017/03/31 08:32:28 I'm not sure if there is a way for children to be
+ frameView.setBaseBackgroundColor(baseBackgroundColor);
+ });
}
void FrameView::scrollToFragmentAnchor() {
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.h ('k') | third_party/WebKit/Source/core/frame/LocalFrame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698