Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Disallow styles using container units from matched declarations cache
https://bugs.webkit.org/show_bug.cgi?id=241261 Reviewed by Alan Bujtas. We may fail to invalidate styles using container units correctly on container size change because they are getting cached. * LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/container-units-invalidation-expected.txt: * Source/WebCore/css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::computeNonCalcLengthDouble): Mark styles that use container units. * Source/WebCore/css/CSSToLengthConversionData.cpp: (WebCore::CSSToLengthConversionData::defaultViewportFactor const): (WebCore::CSSToLengthConversionData::smallViewportFactor const): (WebCore::CSSToLengthConversionData::largeViewportFactor const): (WebCore::CSSToLengthConversionData::dynamicViewportFactor const): (WebCore::CSSToLengthConversionData::setUsesContainerUnits const): * Source/WebCore/css/CSSToLengthConversionData.h: * Source/WebCore/dom/Document.cpp: (WebCore::Document::updateViewportUnitsOnResize): * Source/WebCore/rendering/RenderIFrame.cpp: (WebCore::RenderIFrame::isFullScreenIFrame const): * Source/WebCore/rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::RenderStyle): * Source/WebCore/rendering/style/RenderStyle.h: (WebCore::RenderStyle::setUsesViewportUnits): (WebCore::RenderStyle::usesViewportUnits const): Also rename hasViewportUnits -> usesViewportUnits for clarity. (WebCore::RenderStyle::setUsesContainerUnits): (WebCore::RenderStyle::usesContainerUnits const): (WebCore::RenderStyle::NonInheritedFlags::operator== const): (WebCore::RenderStyle::NonInheritedFlags::copyNonInheritedFrom): (WebCore::RenderStyle::setHasViewportUnits): Deleted. (WebCore::RenderStyle::hasViewportUnits const): Deleted. * Source/WebCore/style/MatchedDeclarationsCache.cpp: (WebCore::Style::MatchedDeclarationsCache::isCacheable): Disallow caching. (WebCore::Style::MatchedDeclarationsCache::clearEntriesAffectedByViewportUnits): * Source/WebCore/style/StyleResolver.cpp: (WebCore::Style::Resolver::styleForElement): (WebCore::Style::Resolver::pseudoStyleForElement): Canonical link: https://commits.webkit.org/251268@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@295211 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
10 changed files
with
37 additions
and
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
Test | ||
|
||
FAIL cqi respond when selected container changes type (inline-size -> none) assert_equals: expected "50px" but got "30px" | ||
FAIL cqb respond when selected container changes type (size -> none) assert_equals: expected "60px" but got "40px" | ||
FAIL cqb respond when intermediate container changes type (inline-size -> size) assert_equals: expected "20px" but got "40px" | ||
FAIL cqi respond when selected container changes inline-size assert_equals: expected "5px" but got "30px" | ||
FAIL cqb respond when selected container changes block-size assert_equals: expected "5px" but got "40px" | ||
PASS cqi respond when selected container changes type (inline-size -> none) | ||
PASS cqb respond when selected container changes type (size -> none) | ||
PASS cqb respond when intermediate container changes type (inline-size -> size) | ||
PASS cqi respond when selected container changes inline-size | ||
PASS cqb respond when selected container changes block-size | ||
|
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