Changeset 286123 in webkit
- Timestamp:
- Nov 22, 2021 5:46:15 PM (8 months ago)
- Location:
- trunk
- Files:
-
- 4 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/TestExpectations (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/css/MediaQueryEvaluator.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r286116 r286123 1 2021-11-22 Myles C. Maxfield <mmaxfield@apple.com> 2 3 rem in media queries should be calculated using font-size:initial, not root element font-size 4 https://bugs.webkit.org/show_bug.cgi?id=156684 5 <rdar://problem/25778616> 6 7 Reviewed by Antti Koivisto. 8 9 * TestExpectations: 10 1 11 2021-11-22 Chris Fleizach <cfleizach@apple.com> 2 12 -
trunk/LayoutTests/TestExpectations
r286100 r286123 1485 1485 imported/w3c/web-platform-tests/css/mediaqueries/device-aspect-ratio-001.html [ Skip ] 1486 1486 imported/w3c/web-platform-tests/css/mediaqueries/device-aspect-ratio-005.html [ Skip ] 1487 1488 webkit.org/b/156684 imported/w3c/web-platform-tests/css/mediaqueries/relative-units-001.html [ ImageOnlyFailure ]1489 webkit.org/b/156684 imported/w3c/web-platform-tests/css/mediaqueries/mq-calc-005.html [ ImageOnlyFailure ]1490 1487 1491 1488 # nth-child tests takes long time and Debug build sometimes timeouts because there are many test cases. -
trunk/Source/WebCore/ChangeLog
r286122 r286123 1 2021-11-22 Myles C. Maxfield <mmaxfield@apple.com> 2 3 rem in media queries should be calculated using font-size:initial, not root element font-size 4 https://bugs.webkit.org/show_bug.cgi?id=156684 5 <rdar://problem/25778616> 6 7 Reviewed by Antti Koivisto. 8 9 The CSS spec says: 10 > Relative units in media queries are based on the initial value, which means that units are never based on results of declarations. 11 12 Tests: imported/w3c/web-platform-tests/css/mediaqueries/relative-units-001.html 13 imported/w3c/web-platform-tests/css/mediaqueries/mq-calc-005.html 14 15 * css/MediaQueryEvaluator.cpp: 16 (WebCore::MediaQueryEvaluator::evaluate const): 17 1 18 2021-11-22 Cameron McCormack <heycam@apple.com> 2 19 -
trunk/Source/WebCore/css/MediaQueryEvaluator.cpp
r284536 r286123 50 50 #include "RenderView.h" 51 51 #include "Settings.h" 52 #include "StyleFontSizeFunctions.h" 52 53 #include "Theme.h" 53 54 #include <wtf/HashMap.h> … … 927 928 if (!document.documentElement()) 928 929 return false; 930 931 auto defaultStyle = RenderStyle::create(); 932 auto fontDescription = defaultStyle.fontDescription(); 933 auto size = Style::fontSizeForKeyword(CSSValueMedium, false, document); 934 fontDescription.setComputedSize(size); 935 fontDescription.setSpecifiedSize(size); 936 defaultStyle.setFontDescription(WTFMove(fontDescription)); 937 defaultStyle.fontCascade().update(); 929 938 930 939 // Pass `nullptr` for `parentStyle` because we are in the context of a media query. 931 return function(expression.value(), { m_style, document.documentElement()->renderStyle(), nullptr, document.renderView(), 1, std::nullopt }, *frame, NoPrefix);940 return function(expression.value(), { m_style, &defaultStyle, nullptr, document.renderView(), 1, std::nullopt }, *frame, NoPrefix); 932 941 } 933 942
Note: See TracChangeset
for help on using the changeset viewer.