WebKit
WebKit copied to clipboard
[css-anchor-position-1] Implement parsing support for anchor-center value
f8e1f7229c0a882457f223ae288d019e4ee413a8
[css-anchor-position-1] Implement parsing support for anchor-center value https://bugs.webkit.org/show_bug.cgi?id=281846 Reviewed by NOBODY (OOPS!). WIP * Source/WebCore/css/CSSPrimitiveValueMappings.h: * Source/WebCore/css/CSSProperties.json: * Source/WebCore/css/CSSValueKeywords.in: * Source/WebCore/css/parser/CSSPropertyParserConsumer+Align.cpp: (WebCore::CSSPropertyParserHelpers::isSelfPositionKeyword): * Source/WebCore/rendering/RenderFlexibleBox.cpp: (WebCore::alignmentOffset): * Source/WebCore/rendering/RenderGrid.cpp: (WebCore::RenderGrid::columnAxisPositionForGridItem const): (WebCore::RenderGrid::rowAxisPositionForGridItem const): * Source/WebCore/rendering/style/RenderStyleConstants.cpp: (WebCore::operator<<): * Source/WebCore/rendering/style/RenderStyleConstants.h:
https://github.com/WebKit/WebKit/commit/f8e1f7229c0a882457f223ae288d019e4ee413a8
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/f8e1f7229c0a882457f223ae288d019e4ee413a8)
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/228fb71ec8b393b5c9c13f9ca8b6c9bca0f9be48)
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/47ddd35b99c3e0fe6cb5a5019c6fff2f49735ef0)
LGTM. I'd prefer that the TODOs have links to the bugzilla to implement them, but I suppose you're close to getting them work anyway.
EWS run on current version of this PR (hash https://github.com/WebKit/WebKit/commit/3df0c5d0567b4e2c4e175647952bfc29a4c775ef)
LGTM. I'd prefer that the TODOs have links to the bugzilla to implement them, but I suppose you're close to getting them work anyway.
I've added the links as in few days I'm starting holidays, so it will take at least few weeks before I land the followup.
Committed 285641@main (c0f2f40263cc): https://commits.webkit.org/285641@main
Reviewed commits have been landed. Closing PR #35517 and removing active labels.
Does the current parsing support unsafe anchor-center?
Does the current parsing support
unsafe anchor-center?
No - unless previous implementation supported it - in that case it does as a side effect.
Does the current parsing support
unsafe anchor-center?No - unless previous implementation supported it - in that case it does as a side effect.
It should work with this patch, since anything in isSelfPositionKeyword should work with safe/unsafe.
Though I did notice that the parser-grammar-unused changes in this patch are incorrect. They should be undone, and anchor-center should be added here instead: https://searchfox.org/wubkat/rev/1e937703de6af995ef2cd93867292c9da1d3b86c/Source/WebCore/css/CSSProperties.json#10997
I mention it because this case requires the unsafe anchor-center.
https://x.com/tabatkins/status/1849581984143777956
Does the current parsing support
unsafe anchor-center?No - unless previous implementation supported it - in that case it does as a side effect.
It should work with this patch, since anything in
isSelfPositionKeywordshould work with safe/unsafe.Though I did notice that the
parser-grammar-unusedchanges in this patch are incorrect. They should be undone, andanchor-centershould be added here instead: https://searchfox.org/wubkat/rev/1e937703de6af995ef2cd93867292c9da1d3b86c/Source/WebCore/css/CSSProperties.json#10997
Good point, I'll fix that before adding actual implementation.
As for unsafe anchor-center - I'll take a deeper look at it by the way.
๐งช api-wpe
๐ vision