WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
138384
[filters2] Support for backdrop-filter
https://bugs.webkit.org/show_bug.cgi?id=138384
Summary
[filters2] Support for backdrop-filter
Dean Jackson
Reported
2014-11-04 16:19:47 PST
[filters2] Support for backdrop-filter
Attachments
Patch
(203.06 KB, patch)
2014-11-04 16:30 PST
,
Dean Jackson
no flags
Details
Formatted Diff
Diff
Patch
(169.63 KB, patch)
2014-11-04 17:26 PST
,
Dean Jackson
no flags
Details
Formatted Diff
Diff
Patch
(169.63 KB, patch)
2014-11-05 10:34 PST
,
Dean Jackson
no flags
Details
Formatted Diff
Diff
Patch
(169.78 KB, patch)
2014-11-05 12:13 PST
,
Dean Jackson
no flags
Details
Formatted Diff
Diff
Patch
(169.94 KB, patch)
2014-11-05 12:55 PST
,
Dean Jackson
no flags
Details
Formatted Diff
Diff
Patch
(168.03 KB, patch)
2014-11-05 13:53 PST
,
Dean Jackson
no flags
Details
Formatted Diff
Diff
Patch
(168.64 KB, patch)
2014-11-05 13:59 PST
,
Dean Jackson
simon.fraser
: review+
Details
Formatted Diff
Diff
Show Obsolete
(6)
View All
Add attachment
proposed patch, testcase, etc.
Dean Jackson
Comment 1
2014-11-04 16:22:13 PST
http://dev.w3.org/fxtf/filters-2/#BackdropFilterProperty
Support enough of backdrop-filter to show as a prototype. - parse the CSS - provide computed style - render the background in the compositor - set the CoreAnimation properties to filter the rendering
Radar WebKit Bug Importer
Comment 2
2014-11-04 16:23:06 PST
<
rdar://problem/18874494
>
Dean Jackson
Comment 3
2014-11-04 16:30:55 PST
Created
attachment 240976
[details]
Patch
Dean Jackson
Comment 4
2014-11-04 16:31:18 PST
Not for review yet. Just checking build.
WebKit Commit Bot
Comment 5
2014-11-04 16:32:55 PST
Attachment 240976
[details]
did not pass style-queue: ERROR: Source/WebCore/WebCore.exp.in:0: Source/WebCore/WebCore.exp.in should be sorted, use Tools/Scripts/sort-export-file script [list/order] [5] Total errors found: 1 in 59 files If any of these errors are false positives, please file a bug against check-webkit-style.
Dean Jackson
Comment 6
2014-11-04 17:26:40 PST
Created
attachment 240989
[details]
Patch
WebKit Commit Bot
Comment 7
2014-11-04 17:28:16 PST
Attachment 240989
[details]
did not pass style-queue: ERROR: Source/WebCore/WebCore.exp.in:0: Source/WebCore/WebCore.exp.in should be sorted, use Tools/Scripts/sort-export-file script [list/order] [5] Total errors found: 1 in 48 files If any of these errors are false positives, please file a bug against check-webkit-style.
Dean Jackson
Comment 8
2014-11-05 10:34:54 PST
Created
attachment 241039
[details]
Patch
WebKit Commit Bot
Comment 9
2014-11-05 10:37:14 PST
Attachment 241039
[details]
did not pass style-queue: ERROR: Source/WebCore/WebCore.exp.in:0: Source/WebCore/WebCore.exp.in should be sorted, use Tools/Scripts/sort-export-file script [list/order] [5] Total errors found: 1 in 48 files If any of these errors are false positives, please file a bug against check-webkit-style.
Dean Jackson
Comment 10
2014-11-05 12:13:40 PST
Created
attachment 241048
[details]
Patch
WebKit Commit Bot
Comment 11
2014-11-05 12:17:02 PST
Attachment 241048
[details]
did not pass style-queue: ERROR: Source/WebCore/WebCore.exp.in:0: Source/WebCore/WebCore.exp.in should be sorted, use Tools/Scripts/sort-export-file script [list/order] [5] Total errors found: 1 in 48 files If any of these errors are false positives, please file a bug against check-webkit-style.
Dean Jackson
Comment 12
2014-11-05 12:55:26 PST
Created
attachment 241051
[details]
Patch
WebKit Commit Bot
Comment 13
2014-11-05 12:58:02 PST
Attachment 241051
[details]
did not pass style-queue: ERROR: Source/WebCore/WebCore.exp.in:0: Source/WebCore/WebCore.exp.in should be sorted, use Tools/Scripts/sort-export-file script [list/order] [5] Total errors found: 1 in 48 files If any of these errors are false positives, please file a bug against check-webkit-style.
Simon Fraser (smfr)
Comment 14
2014-11-05 13:26:08 PST
Comment on
attachment 241051
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=241051&action=review
> Source/WebCore/platform/graphics/GraphicsLayer.h:439 > + enum CustomAppearance { NoCustomAppearance, ScrollingOverhang, ScrollingShadow, UsesBackdrop };
Not sure that you need UsesBackdrop.
> Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp:1689 > + m_backdropLayer->setMasksToBounds(true);
Is this necessary?
> Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp:1701 > + if (LayerMap* layerCloneMap = m_layerClones.get()) { > + LayerMap::const_iterator end = layerCloneMap->end(); > + for (LayerMap::const_iterator it = layerCloneMap->begin(); it != end; ++it) { > + if (m_replicaLayer && isReplicatedRootClone(it->key)) > + continue; > + > + it->value->setFilters(m_filters); > + } > + }
Seems wrong.
> Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h:440 > + BackdropFiltersChanged = 1LLU << 33
Please move up to below FiltersChanged and adjust all the values.
> Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm:828 > + case GraphicsLayer::UsesBackdrop:
Why?
> Source/WebKit2/Shared/mac/RemoteLayerTreePropertyApplier.mm:119 > + case GraphicsLayer::UsesBackdrop:
Remove?
> Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.mm:1185 > + case PlatformCALayer::LayerTypeBackdropLayer: > + ts << "backdrop-layer"; > + break;
There should be some dumping of the backdrop filters too here somewhere.
> Source/WebKit2/UIProcess/ios/RemoteLayerTreeHostIOS.mm:119 > +@interface WKBackdropView : WKCompositingView > +@end > + > +@implementation WKBackdropView > ++ (Class)layerClass > +{ > + return [CABackdropLayer self]; > +} > + > +@end
Doesn't UIKit have a backdrop view class?
> LayoutTests/css3/filters/backdrop/backdropfilter-property-computed-style-expected.txt:352 > +Color then three values : drop-shadow(red 1px 2px 3px) > +PASS filterStyle.length is 1 > +PASS subRule.operationType is WebKitCSSFilterValue.CSS_FILTER_DROP_SHADOW > +PASS subRule.cssText is 'drop-shadow(rgb(255, 0, 0) 1px 2px 3px)' > + > +Three values then color : drop-shadow(1px 2px 3px red) > +PASS filterStyle.length is 1 > +PASS subRule.operationType is WebKitCSSFilterValue.CSS_FILTER_DROP_SHADOW > +PASS subRule.cssText is 'drop-shadow(rgb(255, 0, 0) 1px 2px 3px)' > + > +Color then three values with zero length : drop-shadow(#abc 0 0 0) > +PASS filterStyle.length is 1 > +PASS subRule.operationType is WebKitCSSFilterValue.CSS_FILTER_DROP_SHADOW > +PASS subRule.cssText is 'drop-shadow(rgb(170, 187, 204) 0px 0px 0px)' > + > +Three values with zero length : drop-shadow(0 0 0) > +PASS filterStyle.length is 1 > +PASS subRule.operationType is WebKitCSSFilterValue.CSS_FILTER_DROP_SHADOW > +PASS subRule.cssText is 'drop-shadow(rgba(0, 0, 0, 0) 0px 0px 0px)' > + > +Two values no color : drop-shadow(1px 2px) > +PASS filterStyle.length is 1 > +PASS subRule.operationType is WebKitCSSFilterValue.CSS_FILTER_DROP_SHADOW > +PASS subRule.cssText is 'drop-shadow(rgba(0, 0, 0, 0) 1px 2px 0px)'
Disallow drop shadow as a backdrop filter?
Dean Jackson
Comment 15
2014-11-05 13:34:10 PST
Comment on
attachment 241051
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=241051&action=review
>> Source/WebCore/platform/graphics/GraphicsLayer.h:439 >> + enum CustomAppearance { NoCustomAppearance, ScrollingOverhang, ScrollingShadow, UsesBackdrop }; > > Not sure that you need UsesBackdrop.
OK. I'll remove it.
>> Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp:1689 >> + m_backdropLayer->setMasksToBounds(true); > > Is this necessary?
Yes. Otherwise the blur would be visible around the edges of the element.
>> Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp:1701 >> + } > > Seems wrong.
It can be removed at the moment (until cloning is done)
>> Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h:440 >> + BackdropFiltersChanged = 1LLU << 33 > > Please move up to below FiltersChanged and adjust all the values.
OK
>> Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm:828 >> + case GraphicsLayer::UsesBackdrop: > > Why?
Will remove.
>> Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.mm:1185 >> + break; > > There should be some dumping of the backdrop filters too here somewhere.
I guess so, but do we do that for normal filters?
>> Source/WebKit2/UIProcess/ios/RemoteLayerTreeHostIOS.mm:119 >> +@end > > Doesn't UIKit have a backdrop view class?
Yes I think so, but I'm not sure we want to use that. Do we?
>> LayoutTests/css3/filters/backdrop/backdropfilter-property-computed-style-expected.txt:352 >> +PASS subRule.cssText is 'drop-shadow(rgba(0, 0, 0, 0) 1px 2px 0px)' > > Disallow drop shadow as a backdrop filter?
Actually, I think it should be supported, even though it is pretty weird. The background might not be a solid image, in which case you might want to apply a shadow. Although we currently don't support shadows on our CA filters.
Dean Jackson
Comment 16
2014-11-05 13:53:38 PST
Created
attachment 241054
[details]
Patch
WebKit Commit Bot
Comment 17
2014-11-05 13:56:55 PST
Attachment 241054
[details]
did not pass style-queue: ERROR: Source/WebCore/WebCore.exp.in:0: Source/WebCore/WebCore.exp.in should be sorted, use Tools/Scripts/sort-export-file script [list/order] [5] Total errors found: 1 in 47 files If any of these errors are false positives, please file a bug against check-webkit-style.
Dean Jackson
Comment 18
2014-11-05 13:59:44 PST
Created
attachment 241055
[details]
Patch
WebKit Commit Bot
Comment 19
2014-11-05 14:01:58 PST
Attachment 241055
[details]
did not pass style-queue: ERROR: Source/WebCore/WebCore.exp.in:0: Source/WebCore/WebCore.exp.in should be sorted, use Tools/Scripts/sort-export-file script [list/order] [5] Total errors found: 1 in 48 files If any of these errors are false positives, please file a bug against check-webkit-style.
Dean Jackson
Comment 20
2014-11-05 21:51:02 PST
Committed
r175672
: <
http://trac.webkit.org/changeset/175672
>
WebKit Commit Bot
Comment 21
2014-11-05 23:39:05 PST
Re-opened since this is blocked by
bug 138455
Dean Jackson
Comment 22
2014-11-06 14:23:57 PST
Committed
r175716
: <
http://trac.webkit.org/changeset/175716
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug