Changeset 185846 in webkit
- Timestamp:
- Jun 22, 2015 3:06:45 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r185842 r185846 1 2015-06-22 Dean Jackson <dino@apple.com> 2 3 Element with blur backdrop-filter shows edge duplication and dark edges 4 https://bugs.webkit.org/show_bug.cgi?id=146215 5 <rdar://problem/20367695> 6 7 Reviewed by Tim Horton. 8 9 Add a pixel test to show that the input images to backdrop filters should duplicate their 10 edge pixels. Unfortunately this is not reproducible with normal filters, so it 11 can't be a reference test. 12 13 * css3/filters/backdrop/blur-input-bounds.html: Added. 14 * platform/mac/css3/filters/backdrop/blur-input-bounds-expected.png: Added. 15 * platform/mac/css3/filters/backdrop/blur-input-bounds-expected.txt: Added. 16 1 17 2015-06-22 Myles C. Maxfield <mmaxfield@apple.com> 2 18 -
trunk/Source/WebCore/ChangeLog
r185844 r185846 1 2015-06-22 Dean Jackson <dino@apple.com> 2 3 Element with blur backdrop-filter shows edge duplication and dark edges 4 https://bugs.webkit.org/show_bug.cgi?id=146215 5 <rdar://problem/20367695> 6 7 Reviewed by Tim Horton. 8 9 The input images to backdrop filters should duplicate their edge pixels 10 outwards, rather than using transparent pixels. This is a flag we 11 set on the Gaussian blur, but means we have to remember if the 12 FilterOperations list came from a regular filter or a backdrop filter. 13 14 Test: css3/filters/backdrop/blur-input-bounds.html 15 16 * css/CSSPropertyNames.in: New custom convertor for backdrop-filter. 17 * css/StyleBuilderConverter.h: 18 (WebCore::StyleBuilderConverter::convertBackdropFilterOperations): New convertor 19 that sets the backdrop flag, but is otherwise the same as a normal filter 20 convertor. 21 * page/animation/CSSPropertyAnimation.cpp: 22 (WebCore::blendFilterOperations): Inherit the backdrop flag if either of our 23 inputs has it. 24 * platform/graphics/ca/mac/PlatformCAFiltersMac.mm: Set the inputNormalizeEdges 25 key on the CAFilter if necessary. 26 * platform/graphics/filters/FilterOperations.cpp: Add a new flag indicating if 27 these operations are intended for backdrops. 28 (WebCore::FilterOperations::operator=): 29 (WebCore::FilterOperations::operator==): 30 * platform/graphics/filters/FilterOperations.h: 31 (WebCore::FilterOperations::isUsedForBackdropFilters): 32 (WebCore::FilterOperations::setUsedForBackdropFilters): 33 1 34 2015-06-22 Tim Horton <timothy_horton@apple.com> 2 35 -
trunk/Source/WebCore/css/CSSPropertyNames.in
r183805 r185846 477 477 -webkit-justify-content = justify-content 478 478 #if defined(ENABLE_FILTERS_LEVEL_2) && ENABLE_FILTERS_LEVEL_2 479 -webkit-backdrop-filter [ConditionalConverter= FilterOperations]479 -webkit-backdrop-filter [ConditionalConverter=BackdropFilterOperations] 480 480 #endif 481 481 justify-self [Initial=initialSelfAlignment, Converter=SelfOrDefaultAlignmentData] -
trunk/Source/WebCore/css/StyleBuilderConverter.h
r183748 r185846 105 105 static Optional<Length> convertMarqueeIncrement(StyleResolver&, CSSValue&); 106 106 static Optional<FilterOperations> convertFilterOperations(StyleResolver&, CSSValue&); 107 #if ENABLE(FILTERS_LEVEL_2) 108 static Optional<FilterOperations> convertBackdropFilterOperations(StyleResolver&, CSSValue&); 109 #endif 107 110 static Vector<RefPtr<MaskImageOperation>> convertMaskImageOperations(StyleResolver&, CSSValue&); 108 111 #if PLATFORM(IOS) … … 1006 1009 } 1007 1010 1011 #if ENABLE(FILTERS_LEVEL_2) 1012 inline Optional<FilterOperations> StyleBuilderConverter::convertBackdropFilterOperations(StyleResolver& styleResolver, CSSValue& value) 1013 { 1014 FilterOperations operations; 1015 if (styleResolver.createFilterOperations(value, operations)) { 1016 operations.setUsedForBackdropFilters(true); 1017 return operations; 1018 } 1019 return Nullopt; 1020 } 1021 #endif 1022 1008 1023 static inline WebKitCSSResourceValue* maskImageValueFromIterator(CSSValueList& maskImagesList, CSSValueList::iterator it) 1009 1024 { -
trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp
r185238 r185846 193 193 } 194 194 } 195 #if ENABLE(FILTERS_LEVEL_2) 196 result.setUsedForBackdropFilters(from.isUsedForBackdropFilters() || to.isUsedForBackdropFilters()); 197 #endif 198 195 199 return result; 196 200 } -
trunk/Source/WebCore/platform/graphics/ca/mac/PlatformCAFiltersMac.mm
r181191 r185846 162 162 CAFilter *filter = [CAFilter filterWithType:kCAFilterGaussianBlur]; 163 163 [filter setValue:[NSNumber numberWithFloat:floatValueForLength(blurOperation.stdDeviation(), 0)] forKey:@"inputRadius"]; 164 #if ENABLE(FILTERS_LEVEL_2) 165 if (filters.isUsedForBackdropFilters()) 166 [filter setValue:[NSNumber numberWithBool:YES] forKey:@"inputNormalizeEdges"]; 167 #endif 164 168 [filter setName:filterName]; 165 169 [array.get() addObject:filter]; -
trunk/Source/WebCore/platform/graphics/filters/FilterOperations.cpp
r174654 r185846 52 52 { 53 53 m_operations = other.m_operations; 54 #if ENABLE(FILTERS_LEVEL_2) 55 m_usedForBackdropFilters = other.m_usedForBackdropFilters; 56 #endif 54 57 return *this; 55 58 } … … 59 62 if (m_operations.size() != o.m_operations.size()) 60 63 return false; 61 64 65 #if ENABLE(FILTERS_LEVEL_2) 66 if (m_usedForBackdropFilters != o.m_usedForBackdropFilters) 67 return false; 68 #endif 69 62 70 unsigned s = m_operations.size(); 63 71 for (unsigned i = 0; i < s; i++) { -
trunk/Source/WebCore/platform/graphics/filters/FilterOperations.h
r180441 r185846 43 43 44 44 WEBCORE_EXPORT FilterOperations& operator=(const FilterOperations&); 45 45 46 46 bool operator==(const FilterOperations&) const; 47 47 bool operator!=(const FilterOperations& o) const … … 71 71 72 72 bool hasReferenceFilter() const; 73 74 #if ENABLE(FILTERS_LEVEL_2) 75 bool isUsedForBackdropFilters() const { return m_usedForBackdropFilters; } 76 void setUsedForBackdropFilters(bool usedForBackdrop) { m_usedForBackdropFilters = usedForBackdrop; } 77 #endif 78 73 79 private: 74 80 Vector<RefPtr<FilterOperation>> m_operations; 81 #if ENABLE(FILTERS_LEVEL_2) 82 bool m_usedForBackdropFilters { false }; 83 #endif 75 84 }; 76 85
Note: See TracChangeset
for help on using the changeset viewer.