Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 0ef6378c4923a62d3ea1cf172308b9a8ffd2431e
https://github.com/WebKit/WebKit/commit/0ef6378c4923a62d3ea1cf172308b9a8ffd2431e
Author: Cathie Chen <[email protected]>
Date: 2022-12-21 (Wed, 21 Dec 2022)
Changed paths:
M Source/WebCore/dom/Element.cpp
M Source/WebCore/dom/Element.h
M Source/WebCore/dom/ElementRareData.cpp
M Source/WebCore/dom/ElementRareData.h
M Source/WebCore/rendering/RenderBox.cpp
Log Message:
-----------
[css-contain-intrinsic-size] Introduce last remembered size to Element
https://bugs.webkit.org/show_bug.cgi?id=248998
Reviewed by Cameron McCormack.
Per[1], when contain-intrinsic-size is with the auto-length value, the last
remembered size could be its explicit intrinsic inner size.
This patch introduce last remembered size to Element, and the work related to
ResizeObserver will be done in the follow-up patches.
[1]
https://w3c.github.io/csswg-drafts/css-sizing-4/#valdef-contain-intrinsic-width-auto-length
* Source/WebCore/dom/Element.cpp:
(WebCore::Element::lastRememberedSize const):
(WebCore::Element::setLastRememberedSize):
(WebCore::Element::clearLastRememberedSize):
* Source/WebCore/dom/Element.h:
* Source/WebCore/dom/ElementRareData.cpp:
* Source/WebCore/dom/ElementRareData.h:
(WebCore::ElementRareData::lastRememberedSize const): The lastRememberedSize is
a RefPtr of ResizeObserverSize, and is stored it in ElementRareData.
(WebCore::ElementRareData::setLastRememberedSize):
(WebCore::ElementRareData::clearLastRememberedSize):
(WebCore::ElementRareData::useTypes const):
* Source/WebCore/rendering/RenderBox.cpp:
(WebCore::RenderBox::explicitIntrinsicInnerWidth const): Handle AutoAndLength
and use lastRememberedSize if exist.
(WebCore::RenderBox::explicitIntrinsicInnerHeight const):
Canonical link: https://commits.webkit.org/258183@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes