mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
LibWeb: Rename Document::for_each_css_style_sheet for clarity
This only iterates style sheets that are in use, so make this clear by renaming it to `for_each_active_css_style_sheet()`.
This commit is contained in:
parent
421fb6309f
commit
c29f4f69ef
Notes:
github-actions[bot]
2024-09-03 09:13:55 +00:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/LadybirdBrowser/ladybird/commit/c29f4f69ef9 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1168 Reviewed-by: https://github.com/trflynn89
3 changed files with 4 additions and 4 deletions
|
@ -269,7 +269,7 @@ void StyleComputer::for_each_stylesheet(CascadeOrigin cascade_origin, Callback c
|
|||
callback(*m_user_style_sheet, {});
|
||||
}
|
||||
if (cascade_origin == CascadeOrigin::Author) {
|
||||
document().for_each_css_style_sheet([&](CSSStyleSheet& sheet) {
|
||||
document().for_each_active_css_style_sheet([&](CSSStyleSheet& sheet) {
|
||||
callback(sheet, {});
|
||||
});
|
||||
|
||||
|
|
|
@ -2706,7 +2706,7 @@ void Document::evaluate_media_rules()
|
|||
return;
|
||||
|
||||
bool any_media_queries_changed_match_state = false;
|
||||
for_each_css_style_sheet([&](CSS::CSSStyleSheet& style_sheet) {
|
||||
for_each_active_css_style_sheet([&](CSS::CSSStyleSheet& style_sheet) {
|
||||
if (style_sheet.evaluate_media_queries(*window))
|
||||
any_media_queries_changed_match_state = true;
|
||||
});
|
||||
|
@ -5108,7 +5108,7 @@ WebIDL::ExceptionOr<void> Document::set_adopted_style_sheets(JS::Value new_value
|
|||
return {};
|
||||
}
|
||||
|
||||
void Document::for_each_css_style_sheet(Function<void(CSS::CSSStyleSheet&)>&& callback) const
|
||||
void Document::for_each_active_css_style_sheet(Function<void(CSS::CSSStyleSheet&)>&& callback) const
|
||||
{
|
||||
if (m_style_sheets) {
|
||||
for (auto& style_sheet : m_style_sheets->sheets()) {
|
||||
|
|
|
@ -161,7 +161,7 @@ public:
|
|||
CSS::StyleSheetList& style_sheets();
|
||||
CSS::StyleSheetList const& style_sheets() const;
|
||||
|
||||
void for_each_css_style_sheet(Function<void(CSS::CSSStyleSheet&)>&& callback) const;
|
||||
void for_each_active_css_style_sheet(Function<void(CSS::CSSStyleSheet&)>&& callback) const;
|
||||
|
||||
CSS::StyleSheetList* style_sheets_for_bindings() { return &style_sheets(); }
|
||||
|
||||
|
|
Loading…
Reference in a new issue