mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 19:59:17 +00:00
LibWeb: Move ExceptionOr from DOM/ to WebIDL/
This is a concept fully defined in the Web IDL spec and doesn't belong in the DOM directory/namespace - not even DOMException, despite the name :^)
This commit is contained in:
parent
c0eda77928
commit
ad04d7ac9b
Notes:
sideshowbarker
2024-07-17 06:38:13 +09:00
Author: https://github.com/linusg
Commit: ad04d7ac9b
Pull-request: https://github.com/SerenityOS/serenity/pull/15357
Reviewed-by: https://github.com/awesomekling ✅
107 changed files with 441 additions and 440 deletions
|
@ -8,7 +8,7 @@
|
|||
#include <LibWeb/CSS/Parser/Parser.h>
|
||||
#include <LibWeb/CSS/StyleSheetList.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/DOM/ExceptionOr.h>
|
||||
#include <LibWeb/WebIDL/ExceptionOr.h>
|
||||
|
||||
namespace Web::CSS {
|
||||
|
||||
|
@ -39,7 +39,7 @@ void CSSStyleSheet::visit_edges(Cell::Visitor& visitor)
|
|||
}
|
||||
|
||||
// https://www.w3.org/TR/cssom/#dom-cssstylesheet-insertrule
|
||||
DOM::ExceptionOr<unsigned> CSSStyleSheet::insert_rule(StringView rule, unsigned index)
|
||||
WebIDL::ExceptionOr<unsigned> CSSStyleSheet::insert_rule(StringView rule, unsigned index)
|
||||
{
|
||||
// FIXME: 1. If the origin-clean flag is unset, throw a SecurityError exception.
|
||||
|
||||
|
@ -71,7 +71,7 @@ DOM::ExceptionOr<unsigned> CSSStyleSheet::insert_rule(StringView rule, unsigned
|
|||
}
|
||||
|
||||
// https://www.w3.org/TR/cssom/#dom-cssstylesheet-deleterule
|
||||
DOM::ExceptionOr<void> CSSStyleSheet::delete_rule(unsigned index)
|
||||
WebIDL::ExceptionOr<void> CSSStyleSheet::delete_rule(unsigned index)
|
||||
{
|
||||
// FIXME: 1. If the origin-clean flag is unset, throw a SecurityError exception.
|
||||
|
||||
|
@ -89,7 +89,7 @@ DOM::ExceptionOr<void> CSSStyleSheet::delete_rule(unsigned index)
|
|||
}
|
||||
|
||||
// https://www.w3.org/TR/cssom/#dom-cssstylesheet-removerule
|
||||
DOM::ExceptionOr<void> CSSStyleSheet::remove_rule(unsigned index)
|
||||
WebIDL::ExceptionOr<void> CSSStyleSheet::remove_rule(unsigned index)
|
||||
{
|
||||
// The removeRule(index) method must run the same steps as deleteRule().
|
||||
return delete_rule(index);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue