Commit graph

47044 commits

Author SHA1 Message Date
Luke Wilde
c0f22065ab LibWeb: Add an extended attribute that makes interfaces use AK::String
Adding the [UseNewAKString] extended attribute to an interface will
cause all IDL string types to use String instead of DeprecatedString.
This is done on an per interface level instead of per type/parameter
because:

- It's much simpler to implement, as the generators can already access
  the interface's extended attributes. Doing it per type/parameter
  would mean parsing and piping extended attributes for each type that
  doesn't already take extended attributes, such as unions.

- Allows more incremental adoption of AK::String. For example, adding
  [UseNewAKString] to BodyInit would require refactoring Request,
  Response and XMLHttpRequest to AK::String in one swoop. Doing it on
  the interface allows you to convert just XHR and its dependencies at
  once, for example.

- Simple string return types (i.e. not parameterised or not in a union)
  already accept any of the string types JS::PrimitiveString::create
  accepts. For example, you can add [UseNewAKString] to DOMStringMap to
  convert Element attributes to AK::String and still return AK::String
  from get_attribute, without adding [UseNewAKString] to Element.

- Adding [UseNewAKString] to one function typically means adding it to
  a bunch of other functions, if not the rest of them. For example,
  adding [UseNewAKString] to the parameters FormData.append would
  either mean converting AK::String to AK::DeprecatedString or storing
  the AK::String as-is, making the other functions of FormData have to
  convert back from AK::String or also support AK::String.
2023-02-18 01:23:36 +01:00
Kenneth Myhra
84c7af4dcb LibWeb: Make factory method of XHR::ProgressEvent fallible 2023-02-18 00:52:47 +01:00
Kenneth Myhra
35622606c1 LibWeb: Make factory method of URL::URLSearchParams fallible 2023-02-18 00:52:47 +01:00
Kenneth Myhra
71316614b8 LibWeb: Make factory method of SVG::SVGLength fallible 2023-02-18 00:52:47 +01:00
Kenneth Myhra
bfc8cbcf3b LibWeb: Make factory method of HTML::ModuleScript fallible 2023-02-18 00:52:47 +01:00
Kenneth Myhra
3e834636a6 LibWeb: Make factory method of HTML::Window fallible 2023-02-18 00:52:47 +01:00
Kenneth Myhra
b41401bab2 LibWeb: Make factory method of HTML::Storage fallible 2023-02-18 00:52:47 +01:00
Kenneth Myhra
d7ee378018 LibWeb: Make factory method of HTML::Navigator fallible 2023-02-18 00:52:47 +01:00
Kenneth Myhra
2f4db60c08 LibWeb: Make factory method of HTML::History fallible 2023-02-18 00:52:47 +01:00
Kenneth Myhra
3941e64fde LibWeb: Make factory method of HTML::PromiseRejectionEvent fallible 2023-02-18 00:52:47 +01:00
Kenneth Myhra
193de231e0 LibWeb: Make factory method of HTML::WorkerNavigator fallible 2023-02-18 00:52:47 +01:00
Kenneth Myhra
86b7f148b9 LibWeb: Make factory method of HTML::Path2D fallible 2023-02-18 00:52:47 +01:00
Kenneth Myhra
2b391ea622 LibWeb: Make factory method of HTML::HTMLOptionsCollection fallible 2023-02-18 00:52:47 +01:00
Kenneth Myhra
b604bbaf29 LibWeb: Make factory method of HTML::DOMStringMap fallible 2023-02-18 00:52:47 +01:00
Kenneth Myhra
809206f50e LibWeb: Make factory method of HTML::SubmitEvent fallible 2023-02-18 00:52:47 +01:00
Kenneth Myhra
c5de2c3348 LibWeb: Make factory method of HTML::TextMetrics fallible 2023-02-18 00:52:47 +01:00
Kenneth Myhra
d9845bb24b LibWeb: Make factory method of HTML::PageTransitionEvent fallible 2023-02-18 00:52:47 +01:00
Kenneth Myhra
97b5aa56da LibWeb: Make factory method of HTML::ErrorEvent fallible 2023-02-18 00:52:47 +01:00
Kenneth Myhra
2ed7f64c73 LibWeb: Make factory method of HTML::CloseEvent fallible 2023-02-18 00:52:47 +01:00
Kenneth Myhra
b7c488e51e LibWeb: Make factory method of HTML::CanvasRenderingContext2D fallible 2023-02-18 00:52:47 +01:00
Kenneth Myhra
2506666991 LibWeb: Make factory methods of HTML::CanvasGradient fallible 2023-02-18 00:52:47 +01:00
Kenneth Myhra
63b69f3672 LibWeb: Make factory method of SVG::SVGAnimatedLength fallible 2023-02-18 00:52:47 +01:00
Kenneth Myhra
200d22c650 LibWeb: Make factory method of DOM::Text fallible 2023-02-18 00:52:47 +01:00
Kenneth Myhra
2411dadc35 LibWeb: Make factory method of DOM::StaticNodeList fallible 2023-02-18 00:52:47 +01:00
Kenneth Myhra
d94b59263e LibWeb: Make factory method of DOM::NodeIterator fallible 2023-02-18 00:52:47 +01:00
Kenneth Myhra
0791195843 LibWeb: Make factory methods of DOM::Range fallible 2023-02-18 00:52:47 +01:00
Kenneth Myhra
e3e281addd LibWeb: Make factory method of DOM::NamedNodeMap fallible 2023-02-18 00:52:47 +01:00
Kenneth Myhra
ce18dfc417 LibWeb: Make factory method of DOM::MutationRecord fallible 2023-02-18 00:52:47 +01:00
Kenneth Myhra
7852915dd3 LibWeb: Make factory method of DOM::MutationObserver fallible 2023-02-18 00:52:47 +01:00
Kenneth Myhra
24d7e688fc LibWeb: Make factory method of DOM::LiveNodeList fallible 2023-02-18 00:52:47 +01:00
Kenneth Myhra
ff875d353b LibWeb: Make factory method of DOM::HTMLCollection fallible 2023-02-18 00:52:47 +01:00
Kenneth Myhra
c120c46acc LibWeb: Make factory methods of DOM::Event fallible
Because of interdependencies between DOM::Event and UIEvents::MouseEvent
to template function fire_an_event() in WebDriverConnection.cpp, the
commit: 'LibWeb: Make factory methods of UIEvents::MouseEvent fallible'
have been squashed into this commit.
2023-02-18 00:52:47 +01:00
Kenneth Myhra
0d9076c9f5 LibWeb: Make factory methods of DOM::Document fallible 2023-02-18 00:52:47 +01:00
Kenneth Myhra
552663a2ba LibWeb: Make factory method of DOM::TreeWalker fallible 2023-02-18 00:52:47 +01:00
Kenneth Myhra
251c063897 LibWeb: Make factory method of DOM::DOMTokenList fallible 2023-02-18 00:52:47 +01:00
Kenneth Myhra
1e03aa0ece LibWeb: Make factory method of DOM::AccessibilityTreeNode fallible 2023-02-18 00:52:47 +01:00
Kenneth Myhra
2c8a689390 LibWeb: Make factory methods of DOM::CustomEvent fallible 2023-02-18 00:52:47 +01:00
Kenneth Myhra
5ef9e02658 LibWeb: Make factory method of DOM::Comment fallible 2023-02-18 00:52:47 +01:00
Kenneth Myhra
50c5f0d7da LibWeb: Make factory method of DOM::Attr fallible 2023-02-18 00:52:47 +01:00
Kenneth Myhra
b9c5828fe6 LibWeb: Make factory method of DOM::DOMImplementation fallible 2023-02-18 00:52:47 +01:00
Kenneth Myhra
a5ad8b2959 LibWeb: Make factory method of DOM::AbortSignal fallible 2023-02-18 00:52:47 +01:00
Kenneth Myhra
c4d559bd37 LibWeb: Make factory method of DOM::DocumentType fallible 2023-02-18 00:52:47 +01:00
Kenneth Myhra
5f552ddc5c LibWeb: Make factory method of DOM::AbortController fallible 2023-02-18 00:52:47 +01:00
Kenneth Myhra
491c18a346 LibWeb: Make factory method of DOM::DocumentFragment fallible 2023-02-18 00:52:47 +01:00
Kenneth Myhra
8fbd43cb27 LibWeb: Make factory method of CSS::ResolvedCSSStyleDeclaration fallible 2023-02-18 00:52:47 +01:00
Kenneth Myhra
f28b8431bf LibWeb: Make factory method of XHR::XMLHttpRequest fallible 2023-02-18 00:52:47 +01:00
Kenneth Myhra
719839b882 LibWeb: Make factory method of CSS::StyleSheetList fallible 2023-02-18 00:52:47 +01:00
Kenneth Myhra
57c34e6325 LibWeb: Make factory method of CSS::Screen fallible 2023-02-18 00:52:47 +01:00
Kenneth Myhra
1e24126004 LibWeb: Make factory method of CSS::MediaQueryListEvent fallible 2023-02-18 00:52:47 +01:00
Kenneth Myhra
64e4d3fd94 LibWeb: Make factory method of CSS::CSSSupportsRule fallible 2023-02-18 00:52:47 +01:00