1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 08:08:12 +00:00

LibWeb: Mark compilation-unit-only functions as static

This enables a nice warning in case a function becomes dead code. Also, in the
case of {Event,Node}WrapperFactory.cpp, the corresponding header was forgotten.
This would cause an issue later when we enable -Wmissing-declarations.

Is my clang-format misconfigured? Why is the diff for NodeWrapperFactory.cpp
so large?
This commit is contained in:
Ben Wiederhake 2020-08-11 00:07:16 +02:00 committed by Andreas Kling
parent 3ec7b8b33c
commit e050f21f36
5 changed files with 21 additions and 21 deletions

View file

@ -42,7 +42,7 @@ static bool matches_hover_pseudo_class(const DOM::Element& element)
return element.is_ancestor_of(*hovered_node);
}
bool matches(const CSS::Selector::SimpleSelector& component, const DOM::Element& element)
static bool matches(const CSS::Selector::SimpleSelector& component, const DOM::Element& element)
{
switch (component.pseudo_class) {
case CSS::Selector::SimpleSelector::PseudoClass::None:
@ -114,7 +114,7 @@ bool matches(const CSS::Selector::SimpleSelector& component, const DOM::Element&
}
}
bool matches(const CSS::Selector& selector, int component_list_index, const DOM::Element& element)
static bool matches(const CSS::Selector& selector, int component_list_index, const DOM::Element& element)
{
auto& component_list = selector.complex_selectors()[component_list_index];
for (auto& component : component_list.compound_selector) {