mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:48:11 +00:00
LibWeb: Remove pointless type casts
In these cases, the parameters' static type matched the desired dynamic type, so these calls were discarded.
This commit is contained in:
parent
f95a11a7da
commit
b19fe744ab
2 changed files with 1 additions and 4 deletions
|
@ -68,8 +68,6 @@ Vector<MatchingRule> StyleResolver::collect_matching_rules(DOM::Element const& e
|
||||||
|
|
||||||
size_t style_sheet_index = 0;
|
size_t style_sheet_index = 0;
|
||||||
for_each_stylesheet([&](auto& sheet) {
|
for_each_stylesheet([&](auto& sheet) {
|
||||||
if (!is<CSSStyleSheet>(sheet))
|
|
||||||
return;
|
|
||||||
size_t rule_index = 0;
|
size_t rule_index = 0;
|
||||||
static_cast<CSSStyleSheet const&>(sheet).for_each_effective_style_rule([&](auto& rule) {
|
static_cast<CSSStyleSheet const&>(sheet).for_each_effective_style_rule([&](auto& rule) {
|
||||||
size_t selector_index = 0;
|
size_t selector_index = 0;
|
||||||
|
|
|
@ -97,8 +97,7 @@ void HTMLFormElement::submit_form(RefPtr<HTMLElement> submitter, bool from_submi
|
||||||
|
|
||||||
Vector<URLQueryParam> parameters;
|
Vector<URLQueryParam> parameters;
|
||||||
|
|
||||||
for_each_in_inclusive_subtree_of_type<HTMLInputElement>([&](auto& node) {
|
for_each_in_inclusive_subtree_of_type<HTMLInputElement>([&](auto& input) {
|
||||||
auto& input = verify_cast<HTMLInputElement>(node);
|
|
||||||
if (!input.name().is_null() && (input.type() != "submit" || &input == submitter))
|
if (!input.name().is_null() && (input.type() != "submit" || &input == submitter))
|
||||||
parameters.append({ input.name(), input.value() });
|
parameters.append({ input.name(), input.value() });
|
||||||
return IterationDecision::Continue;
|
return IterationDecision::Continue;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue