mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:57:35 +00:00
LibWeb: Store stylesheet sources as StringViews
This commit is contained in:
parent
13d2111b74
commit
faab2fe101
2 changed files with 8 additions and 9 deletions
|
@ -115,9 +115,8 @@ static CSSStyleSheet& default_stylesheet()
|
|||
{
|
||||
static JS::Handle<CSSStyleSheet> sheet;
|
||||
if (!sheet.cell()) {
|
||||
extern char const default_stylesheet_source[];
|
||||
DeprecatedString css = default_stylesheet_source;
|
||||
sheet = JS::make_handle(parse_css_stylesheet(CSS::Parser::ParsingContext(), css));
|
||||
extern StringView default_stylesheet_source;
|
||||
sheet = JS::make_handle(parse_css_stylesheet(CSS::Parser::ParsingContext(), default_stylesheet_source));
|
||||
}
|
||||
return *sheet;
|
||||
}
|
||||
|
@ -126,9 +125,8 @@ static CSSStyleSheet& quirks_mode_stylesheet()
|
|||
{
|
||||
static JS::Handle<CSSStyleSheet> sheet;
|
||||
if (!sheet.cell()) {
|
||||
extern char const quirks_mode_stylesheet_source[];
|
||||
DeprecatedString css = quirks_mode_stylesheet_source;
|
||||
sheet = JS::make_handle(parse_css_stylesheet(CSS::Parser::ParsingContext(), css));
|
||||
extern StringView quirks_mode_stylesheet_source;
|
||||
sheet = JS::make_handle(parse_css_stylesheet(CSS::Parser::ParsingContext(), quirks_mode_stylesheet_source));
|
||||
}
|
||||
return *sheet;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue