Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
text-decoration: underline
is not applied to web component
https://bugs.webkit.org/show_bug.cgi?id=226724 <rdar://problem/78987286> Reviewed by Ryosuke Niwa. Source/WebCore: 'text-decoration' is not an inherited property in itself but its effective value behaves as it was. We fail to inherit this effective value into author shadow trees. Test case by Jeroen Zwartepoorte. Test: fast/shadow-dom/effective-text-decoration-inheritance.html * style/StyleAdjuster.cpp: (WebCore::Style::shouldInheritEffectiveTextDecorations): Test for user agent shadow tree, not a shadow tree in general. Also inverse the logic and refactor a bit. (WebCore::Style::Adjuster::adjust const): (WebCore::Style::isAtShadowBoundary): Deleted. (WebCore::Style::doesNotInheritTextDecoration): Deleted. LayoutTests: * fast/shadow-dom/effective-text-decoration-inheritance-expected.html: Added. * fast/shadow-dom/effective-text-decoration-inheritance.html: Added. Canonical link: https://commits.webkit.org/238591@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@278602 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
5 changed files
with
86 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
LayoutTests/fast/shadow-dom/effective-text-decoration-inheritance-expected.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<div style="text-decoration: underline">This should be underlined</div> |
21 changes: 21 additions & 0 deletions
21
LayoutTests/fast/shadow-dom/effective-text-decoration-inheritance.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<script> | ||
class CustomElement extends HTMLElement { | ||
constructor() { | ||
super(); | ||
|
||
const shadow = this.attachShadow({ mode: 'open' }); | ||
const slot = document.createElement('slot'); | ||
const style = document.createElement('style'); | ||
style.textContent = ` | ||
:host { | ||
text-decoration: underline; | ||
} | ||
`; | ||
shadow.append(style, slot); | ||
} | ||
} | ||
|
||
customElements.define('custom-element', CustomElement); | ||
</script> | ||
|
||
<custom-element>This should be underlined</custom-element> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters