-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[content-visibility] Improve skipped content information in RenderStyle
https://bugs.webkit.org/show_bug.cgi?id=259042 Reviewed by Simon Fraser. Improve skipped content information in RenderStyle because beside the fact that something is skipped content we also want to know if the skipped content is in a hidden or auto content-visibility subtree. * LayoutTests/imported/w3c/web-platform-tests/css/css-contain/content-visibility/content-visibility-087-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-contain/content-visibility/content-visibility-087.html: Added. * Source/WebCore/dom/Element.cpp: (WebCore::Element::hasFocusableStyle const): * Source/WebCore/rendering/RenderObject.cpp: (WebCore::RenderObject::isSkippedContent const): * Source/WebCore/rendering/style/RenderStyle.h: * Source/WebCore/rendering/style/RenderStyleInlines.h: (WebCore::RenderStyle::effectivePointerEvents const): (WebCore::RenderStyle::skippedContentReason const): (WebCore::RenderStyle::effectiveSkippedContent const): Deleted. * Source/WebCore/rendering/style/RenderStyleSetters.h: (WebCore::RenderStyle::setEffectiveInert): (WebCore::RenderStyle::setSkippedContentReason): (WebCore::RenderStyle::setEffectiveSkippedContent): Deleted. * Source/WebCore/rendering/style/StyleRareInheritedData.cpp: (WebCore::StyleRareInheritedData::StyleRareInheritedData): * Source/WebCore/rendering/style/StyleRareInheritedData.h: * Source/WebCore/rendering/updating/RenderTreeUpdater.cpp: (WebCore::RenderTreeUpdater::updateRenderTree): (WebCore::RenderTreeUpdater::updateElementRenderer): * Source/WebCore/style/StyleAdjuster.cpp: (WebCore::Style::Adjuster::adjust const): c-v: hidden overrides auto as relevancy reason Canonical link: https://commits.webkit.org/267128@main
- Loading branch information
Showing
11 changed files
with
47 additions
and
22 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
...web-platform-tests/css/css-contain/content-visibility/content-visibility-087-expected.txt
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,3 @@ | ||
|
||
PASS Trying to focus on an element in a nested hidden/auto subtree will not work | ||
|
26 changes: 26 additions & 0 deletions
26
...ted/w3c/web-platform-tests/css/css-contain/content-visibility/content-visibility-087.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,26 @@ | ||
<!doctype HTML> | ||
<html> | ||
<meta charset="utf8"> | ||
<title>Content visibility: focus does not target nested c-v: hidden/auto subtree"</title> | ||
<link rel="author" title="Rob Buis" href="mailto:rbuis@igalia.com"> | ||
<link rel="help" href="https://drafts.csswg.org/css-contain/#content-visibility"> | ||
<meta name="assert" content="focus does not target nested c-v: hidden/auto subtree"> | ||
|
||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
|
||
<div style="content-visibility: hidden"> | ||
<div style="content-visibility: auto"> | ||
<div id="focusable" tabIndex="0"> | ||
focusable thing | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<script> | ||
test(() => { | ||
focusable.focus(); | ||
assert_not_equals(document.activeElement, focusable); | ||
}, "Trying to focus on an element in a nested hidden/auto subtree will not work"); | ||
</script> | ||
</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
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
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
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
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