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

Issue 2715243004: [blink] Support (semi-)transparent background colors in WebView/Frame. (Closed)

Created:
3 years, 9 months ago by Eric Seckler
Modified:
3 years, 8 months ago
Reviewers:
chrishtr, lfg, dcheng, piman
CC:
blink-reviews, chrishtr, chromium-reviews, creis+watch_chromium.org, danakj, darin-cc_chromium.org, dcheng, dgozman, kinuko+watch, mlamouri+watch-blink_chromium.org, mlamouri+watch-content_chromium.org, nasko+codewatch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[blink] Support (semi-)transparent background colors in WebView/Frame. We allow controlling the WebViewImpl's background and base background color via DevTools, whose users may set the background color to a transparent or semi-transparent color. For correct application of this color, the LayerTree's has_transparent_background should be updated accordingly. BUG=689349 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Review-Url: https://codereview.chromium.org/2715243004 Cr-Commit-Position: refs/heads/master@{#461084} Committed: https://chromium.googlesource.com/chromium/src/+/f2bd55f7d81eae9cd0736aaf68879ceb0309c92e

Patch Set 1 #

Patch Set 2 : Set WebViewImpl transparency for fullscreen. #

Total comments: 6

Patch Set 3 : Use background color override for setIsTransparent. #

Patch Set 4 : remove set/isTransparent from WebViewImpl and FrameView, use setBaseBackgroundColor instead #

Total comments: 6

Patch Set 5 : address comments #

Total comments: 12

Patch Set 6 : fix WebLocalFrameImpl::createFrameView() #

Patch Set 7 : add unit test for remote frame transparency #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+185 lines, -140 lines) Patch
M content/renderer/gpu/render_widget_compositor.h View 1 2 3 4 5 1 chunk +0 lines, -1 line 0 comments Download
M content/renderer/gpu/render_widget_compositor.cc View 1 2 3 4 5 1 chunk +2 lines, -4 lines 0 comments Download
M content/renderer/render_view_impl.cc View 1 2 3 4 5 2 chunks +11 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/frame/FrameView.h View 1 2 3 2 chunks +2 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/core/frame/FrameView.cpp View 1 2 3 4 5 3 chunks +6 lines, -21 lines 2 comments Download
M third_party/WebKit/Source/core/frame/LocalFrame.h View 1 2 3 4 5 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/frame/LocalFrame.cpp View 1 2 3 4 5 2 chunks +1 line, -2 lines 0 comments Download
M third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutTestHelper.cpp View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/paint/ViewPainter.cpp View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp View 1 2 3 4 5 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/testing/WebLayerTreeViewImplForTesting.h View 1 2 3 4 5 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/testing/WebLayerTreeViewImplForTesting.cpp View 1 2 3 4 5 1 chunk +2 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/web/DevToolsEmulator.cpp View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/web/FullscreenController.h View 1 2 3 4 3 chunks +6 lines, -1 line 0 comments Download
M third_party/WebKit/Source/web/FullscreenController.cpp View 1 2 5 chunks +25 lines, -10 lines 0 comments Download
M third_party/WebKit/Source/web/InspectorOverlay.cpp View 1 2 3 4 5 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/web/WebFrameWidgetImpl.h View 1 2 3 4 chunks +10 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp View 1 2 3 4 5 10 chunks +38 lines, -14 lines 0 comments Download
M third_party/WebKit/Source/web/WebLocalFrameImpl.cpp View 1 2 3 4 5 2 chunks +5 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/web/WebPagePopupImpl.cpp View 1 2 3 4 5 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/web/WebViewFrameWidget.h View 1 2 3 4 5 1 chunk +4 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/web/WebViewFrameWidget.cpp View 1 2 3 4 5 1 chunk +12 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/web/WebViewImpl.h View 1 2 3 4 5 4 chunks +5 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/web/WebViewImpl.cpp View 1 2 3 4 5 8 chunks +17 lines, -29 lines 0 comments Download
M third_party/WebKit/Source/web/tests/WebFrameTest.cpp View 1 2 3 4 5 6 2 chunks +21 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/web/tests/WebViewTest.cpp View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/public/platform/WebLayerTreeView.h View 1 2 3 1 chunk +0 lines, -3 lines 0 comments Download
M third_party/WebKit/public/web/WebFrameWidget.h View 1 2 3 1 chunk +7 lines, -4 lines 0 comments Download

Messages

Total messages: 82 (55 generated)
Eric Seckler
John, would you be a good person to take a look at this? I'm making ...
3 years, 9 months ago (2017-03-01 13:00:32 UTC) #9
jam
On 2017/03/01 13:00:32, Eric Seckler wrote: > John, would you be a good person to ...
3 years, 9 months ago (2017-03-01 15:47:47 UTC) #12
chrishtr
https://codereview.chromium.org/2715243004/diff/20001/third_party/WebKit/Source/web/FullscreenController.cpp File third_party/WebKit/Source/web/FullscreenController.cpp (right): https://codereview.chromium.org/2715243004/diff/20001/third_party/WebKit/Source/web/FullscreenController.cpp#newcode199 third_party/WebKit/Source/web/FullscreenController.cpp:199: m_initialTransparency = m_webViewImpl->isTransparent(); For m_initialPageScaleFactor, it is "reset" in ...
3 years, 9 months ago (2017-03-01 16:16:54 UTC) #14
dgozman
https://codereview.chromium.org/2715243004/diff/20001/third_party/WebKit/Source/web/WebViewImpl.cpp File third_party/WebKit/Source/web/WebViewImpl.cpp (right): https://codereview.chromium.org/2715243004/diff/20001/third_party/WebKit/Source/web/WebViewImpl.cpp#newcode4019 third_party/WebKit/Source/web/WebViewImpl.cpp:4019: m_layerTreeView->setHasTransparentBackground(alphaChannel(color) < Similarly to Chris' question, do we actually ...
3 years, 9 months ago (2017-03-01 19:11:52 UTC) #15
Eric Seckler
+lfg@ -jam@ Lucas: I'm attempting to remove setIsTransparent from WebViewImpl and use setBackgroundColorOverride in RenderViewImpl::OnSetBackgroundOpaque ...
3 years, 9 months ago (2017-03-07 18:00:47 UTC) #18
Eric Seckler
+lfg -jam for real :P Lucas: I'm attempting to remove setIsTransparent from WebViewImpl and use ...
3 years, 9 months ago (2017-03-07 18:01:32 UTC) #20
chrishtr
Hi - I kind of assumed you are waiting on other feedback and not mine, ...
3 years, 9 months ago (2017-03-08 22:47:04 UTC) #23
Eric Seckler
On 2017/03/08 22:47:04, chrishtr wrote: > Hi - I kind of assumed you are waiting ...
3 years, 9 months ago (2017-03-08 22:51:25 UTC) #24
lfg
Apologies for the delay, as I was OOO last week. On 2017/03/07 18:01:32, Eric Seckler ...
3 years, 9 months ago (2017-03-20 21:35:07 UTC) #25
Eric Seckler
On 2017/03/20 21:35:07, lfg wrote: > Apologies for the delay, as I was OOO last ...
3 years, 9 months ago (2017-03-22 16:16:43 UTC) #39
lfg
Thanks for doing this. lgtm with nits. https://codereview.chromium.org/2715243004/diff/100001/third_party/WebKit/Source/web/FullscreenController.h File third_party/WebKit/Source/web/FullscreenController.h (right): https://codereview.chromium.org/2715243004/diff/100001/third_party/WebKit/Source/web/FullscreenController.h#newcode35 third_party/WebKit/Source/web/FullscreenController.h:35: #include "platform/geometry/FloatPoint.h" ...
3 years, 9 months ago (2017-03-23 16:05:21 UTC) #42
Eric Seckler
Thanks, Lucas! Chris, I think this is ready for you to have another look now ...
3 years, 9 months ago (2017-03-23 16:34:49 UTC) #43
Eric Seckler
chrishtr@ friendly ping :)
3 years, 8 months ago (2017-03-28 11:40:53 UTC) #52
chrishtr
https://codereview.chromium.org/2715243004/diff/120001/third_party/WebKit/Source/core/paint/ViewPainter.cpp File third_party/WebKit/Source/core/paint/ViewPainter.cpp (right): https://codereview.chromium.org/2715243004/diff/120001/third_party/WebKit/Source/core/paint/ViewPainter.cpp#newcode90 third_party/WebKit/Source/core/paint/ViewPainter.cpp:90: isMainFrame && (frameView.baseBackgroundColor().alpha() > 0); This doesn't look right. ...
3 years, 8 months ago (2017-03-28 19:45:56 UTC) #53
Eric Seckler
lfg@, PTAL at WebLocalFrameImpl comment :) https://codereview.chromium.org/2715243004/diff/120001/third_party/WebKit/Source/core/paint/ViewPainter.cpp File third_party/WebKit/Source/core/paint/ViewPainter.cpp (right): https://codereview.chromium.org/2715243004/diff/120001/third_party/WebKit/Source/core/paint/ViewPainter.cpp#newcode90 third_party/WebKit/Source/core/paint/ViewPainter.cpp:90: isMainFrame && (frameView.baseBackgroundColor().alpha() ...
3 years, 8 months ago (2017-03-29 10:50:18 UTC) #56
lfg
https://codereview.chromium.org/2715243004/diff/120001/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp File third_party/WebKit/Source/web/WebLocalFrameImpl.cpp (right): https://codereview.chromium.org/2715243004/diff/120001/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp#newcode1721 third_party/WebKit/Source/web/WebLocalFrameImpl.cpp:1721: baseBackgroundColor = Color::transparent; On 2017/03/29 10:50:18, Eric Seckler wrote: ...
3 years, 8 months ago (2017-03-29 15:19:43 UTC) #59
chrishtr
lgtm LGTM modulo lfg@'s comments. https://codereview.chromium.org/2715243004/diff/120001/third_party/WebKit/Source/core/paint/ViewPainter.cpp File third_party/WebKit/Source/core/paint/ViewPainter.cpp (right): https://codereview.chromium.org/2715243004/diff/120001/third_party/WebKit/Source/core/paint/ViewPainter.cpp#newcode90 third_party/WebKit/Source/core/paint/ViewPainter.cpp:90: isMainFrame && (frameView.baseBackgroundColor().alpha() > ...
3 years, 8 months ago (2017-03-29 15:36:41 UTC) #60
Eric Seckler
+dcheng@ for WebKit/web +jbroman@ for Webkit/platform +piman@ for content/ Thanks! https://codereview.chromium.org/2715243004/diff/120001/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp File third_party/WebKit/Source/web/WebLocalFrameImpl.cpp (right): https://codereview.chromium.org/2715243004/diff/120001/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp#newcode1721 ...
3 years, 8 months ago (2017-03-30 10:46:38 UTC) #62
jbroman
Chris' approval covers Source/platform/, so removing myself as a reviewer.
3 years, 8 months ago (2017-03-30 14:24:21 UTC) #67
Eric Seckler
On 2017/03/30 14:24:21, jbroman wrote: > Chris' approval covers Source/platform/, so removing myself as a ...
3 years, 8 months ago (2017-03-30 14:29:43 UTC) #68
jbroman
On 2017/03/30 at 14:29:43, eseckler wrote: > On 2017/03/30 14:24:21, jbroman wrote: > > Chris' ...
3 years, 8 months ago (2017-03-30 14:32:01 UTC) #69
Eric Seckler
On 2017/03/30 14:29:43, Eric Seckler wrote: > On 2017/03/30 14:24:21, jbroman wrote: > > Chris' ...
3 years, 8 months ago (2017-03-30 14:32:58 UTC) #72
piman
lgtm
3 years, 8 months ago (2017-03-30 22:48:47 UTC) #73
dcheng
https://codereview.chromium.org/2715243004/diff/160001/third_party/WebKit/Source/core/frame/FrameView.cpp File third_party/WebKit/Source/core/frame/FrameView.cpp (right): https://codereview.chromium.org/2715243004/diff/160001/third_party/WebKit/Source/core/frame/FrameView.cpp#newcode2357 third_party/WebKit/Source/core/frame/FrameView.cpp:2357: forAllNonThrottledFrameViews([baseBackgroundColor](FrameView& frameView) { Btw, I'm wondering something: we only ...
3 years, 8 months ago (2017-03-31 01:21:15 UTC) #75
Eric Seckler
https://codereview.chromium.org/2715243004/diff/160001/third_party/WebKit/Source/core/frame/FrameView.cpp File third_party/WebKit/Source/core/frame/FrameView.cpp (right): https://codereview.chromium.org/2715243004/diff/160001/third_party/WebKit/Source/core/frame/FrameView.cpp#newcode2357 third_party/WebKit/Source/core/frame/FrameView.cpp:2357: forAllNonThrottledFrameViews([baseBackgroundColor](FrameView& frameView) { On 2017/03/31 01:21:15, dcheng wrote: > ...
3 years, 8 months ago (2017-03-31 08:32:28 UTC) #76
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2715243004/160001
3 years, 8 months ago (2017-03-31 09:06:27 UTC) #79
commit-bot: I haz the power
3 years, 8 months ago (2017-03-31 09:12:50 UTC) #82
Message was sent while issue was closed.
Committed patchset #7 (id:160001) as
https://chromium.googlesource.com/chromium/src/+/f2bd55f7d81eae9cd0736aaf6887...

Powered by Google App Engine
This is Rietveld 408576698