mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-11 02:29:21 +00:00
LibWeb: Bring back cache of intrinsic sizes across layout runs
12c6ac78e2
with fixed mistake when cache
slot is copied instead of being referenced:
```cpp
auto cache =
box.cached_intrinsic_sizes().min_content_height.ensure(width);
```
while it should've been:
```cpp
auto& cache =
box.cached_intrinsic_sizes().min_content_height.ensure(width);
```
This commit is contained in:
parent
73a4b176cf
commit
a4463c45b9
Notes:
github-actions[bot]
2025-03-08 13:53:25 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: a4463c45b9
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3857
13 changed files with 108 additions and 102 deletions
|
@ -50,26 +50,6 @@ enum class QuirksMode {
|
|||
Yes
|
||||
};
|
||||
|
||||
#define ENUMERATE_SET_NEEDS_LAYOUT_REASONS(X) \
|
||||
X(CharacterDataReplaceData) \
|
||||
X(FinalizeACrossDocumentNavigation) \
|
||||
X(HTMLImageElementReactToChangesInTheEnvironment) \
|
||||
X(HTMLImageElementUpdateTheImageData) \
|
||||
X(HTMLVideoElementSetVideoTrack) \
|
||||
X(KeyframeEffect) \
|
||||
X(LayoutTreeUpdate) \
|
||||
X(NavigableSetViewportSize) \
|
||||
X(SVGImageElementFetchTheDocument) \
|
||||
X(StyleChange)
|
||||
|
||||
enum class SetNeedsLayoutReason {
|
||||
#define ENUMERATE_SET_NEEDS_LAYOUT_REASON(e) e,
|
||||
ENUMERATE_SET_NEEDS_LAYOUT_REASONS(ENUMERATE_SET_NEEDS_LAYOUT_REASON)
|
||||
#undef ENUMERATE_SET_NEEDS_LAYOUT_REASON
|
||||
};
|
||||
|
||||
[[nodiscard]] StringView to_string(SetNeedsLayoutReason);
|
||||
|
||||
#define ENUMERATE_INVALIDATE_LAYOUT_TREE_REASONS(X) \
|
||||
X(DocumentAddAnElementToTheTopLayer) \
|
||||
X(DocumentRequestAnElementToBeRemovedFromTheTopLayer) \
|
||||
|
@ -358,8 +338,6 @@ public:
|
|||
void update_paint_and_hit_testing_properties_if_needed();
|
||||
void update_animated_style_if_needed();
|
||||
|
||||
void set_needs_layout(SetNeedsLayoutReason);
|
||||
|
||||
void invalidate_layout_tree(InvalidateLayoutTreeReason);
|
||||
void invalidate_stacking_context_tree();
|
||||
|
||||
|
@ -1076,8 +1054,6 @@ private:
|
|||
// Used by evaluate_media_queries_and_report_changes().
|
||||
Vector<WeakPtr<CSS::MediaQueryList>> m_media_query_lists;
|
||||
|
||||
bool m_needs_layout { false };
|
||||
|
||||
bool m_needs_full_style_update { false };
|
||||
bool m_needs_full_layout_tree_update { false };
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue