Changeset 277320 in webkit
- Timestamp:
- May 11, 2021, 5:24:00 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 6 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/css/visited-link-mix-blend-mode-expected.html (added)
-
LayoutTests/fast/css/visited-link-mix-blend-mode.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/rendering/style/RenderStyle.cpp (modified) (1 diff)
-
Source/WebCore/rendering/style/RenderStyle.h (modified) (2 diffs)
-
Source/WebCore/rendering/style/StyleRareInheritedData.cpp (modified) (3 diffs)
-
Source/WebCore/rendering/style/StyleRareInheritedData.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r277315 r277320 1 2021-05-11 Antti Koivisto <antti@apple.com> 2 3 Don't allow :visited link style in subtrees that use mix-blend-mode 4 https://bugs.webkit.org/show_bug.cgi?id=225446 5 rdar://65686091 6 7 Reviewed by Darin Adler. 8 9 * fast/css/visited-link-mix-blend-mode-expected.html: Added. 10 * fast/css/visited-link-mix-blend-mode.html: Added. 11 1 12 2021-05-10 Chris Dumez <cdumez@apple.com> 2 13 -
trunk/Source/WebCore/ChangeLog
r277316 r277320 1 2021-05-11 Antti Koivisto <antti@apple.com> 2 3 Don't allow :visited link style in subtrees that use mix-blend-mode 4 https://bugs.webkit.org/show_bug.cgi?id=225446 5 rdar://65686091 6 7 Reviewed by Darin Adler. 8 9 Test: fast/css/visited-link-mix-blend-mode.html 10 11 * rendering/style/RenderStyle.cpp: 12 (WebCore::RenderStyle::visitedDependentColor const): 13 14 Return unvisited style in substrees that use mix-blend-mode. 15 16 * rendering/style/RenderStyle.h: 17 (WebCore::RenderStyle::setBlendMode): 18 (WebCore::RenderStyle::isInSubtreeWithBlendMode const): 19 20 Add an inherited fake property for tracking this. 21 22 * rendering/style/StyleRareInheritedData.cpp: 23 (WebCore::StyleRareInheritedData::StyleRareInheritedData): 24 (WebCore::StyleRareInheritedData::operator== const): 25 * rendering/style/StyleRareInheritedData.h: 26 1 27 2021-05-10 Wenson Hsieh <wenson_hsieh@apple.com> 2 28 -
trunk/Source/WebCore/rendering/style/RenderStyle.cpp
r276465 r277320 2115 2115 return unvisitedColor; 2116 2116 2117 #if ENABLE(CSS_COMPOSITING) 2118 if (isInSubtreeWithBlendMode()) 2119 return unvisitedColor; 2120 #endif 2121 2117 2122 Color visitedColor = colorResolvingCurrentColor(colorProperty, true); 2118 2123 -
trunk/Source/WebCore/rendering/style/RenderStyle.h
r276465 r277320 821 821 #if ENABLE(CSS_COMPOSITING) 822 822 BlendMode blendMode() const { return static_cast<BlendMode>(m_rareNonInheritedData->effectiveBlendMode); } 823 void setBlendMode(BlendMode mode) { SET_VAR(m_rareNonInheritedData, effectiveBlendMode, static_cast<unsigned>(mode)); }823 void setBlendMode(BlendMode); 824 824 bool hasBlendMode() const { return static_cast<BlendMode>(m_rareNonInheritedData->effectiveBlendMode) != BlendMode::Normal; } 825 bool isInSubtreeWithBlendMode() const { return m_rareInheritedData->isInSubtreeWithBlendMode; } 825 826 826 827 Isolation isolation() const { return static_cast<Isolation>(m_rareNonInheritedData->isolation); } … … 2203 2204 } 2204 2205 2206 inline void RenderStyle::setBlendMode(BlendMode mode) 2207 { 2208 SET_VAR(m_rareNonInheritedData, effectiveBlendMode, static_cast<unsigned>(mode)); 2209 SET_VAR(m_rareInheritedData, isInSubtreeWithBlendMode, mode != BlendMode::Normal); 2210 } 2211 2205 2212 inline void RenderStyle::setLogicalWidth(Length&& logicalWidth) 2206 2213 { -
trunk/Source/WebCore/rendering/style/StyleRareInheritedData.cpp
r275199 r277320 136 136 , hasAutoCaretColor(true) 137 137 , hasVisitedLinkAutoCaretColor(true) 138 , isInSubtreeWithBlendMode(false) 138 139 , effectiveTouchActions(RenderStyle::initialTouchActions()) 139 140 , strokeWidth(RenderStyle::initialStrokeWidth()) … … 232 233 , hasAutoCaretColor(o.hasAutoCaretColor) 233 234 , hasVisitedLinkAutoCaretColor(o.hasVisitedLinkAutoCaretColor) 235 , isInSubtreeWithBlendMode(o.isInSubtreeWithBlendMode) 234 236 , effectiveTouchActions(o.effectiveTouchActions) 235 237 , eventListenerRegionTypes(o.eventListenerRegionTypes) … … 355 357 && hasAutoCaretColor == o.hasAutoCaretColor 356 358 && hasVisitedLinkAutoCaretColor == o.hasVisitedLinkAutoCaretColor 359 && isInSubtreeWithBlendMode == o.isInSubtreeWithBlendMode 357 360 && effectiveTouchActions == o.effectiveTouchActions 358 361 && eventListenerRegionTypes == o.eventListenerRegionTypes -
trunk/Source/WebCore/rendering/style/StyleRareInheritedData.h
r275199 r277320 162 162 unsigned hasVisitedLinkAutoCaretColor : 1; 163 163 164 unsigned isInSubtreeWithBlendMode : 1; 165 164 166 OptionSet<TouchAction> effectiveTouchActions; 165 167 OptionSet<EventListenerRegionType> eventListenerRegionTypes;
Note:
See TracChangeset
for help on using the changeset viewer.