Fix HTML loading stalls on large modern pages

- batch asynchronous HTTP stylesheets and apply them in a single reload
  - skip unsupported block at-rules without leaking nested rules
  - prevent scripts nested in unknown custom elements from entering the render tree
  - add regression coverage for unsupported at-rules and nested scripts
  - document the Ninja release workflow for performance testing
This commit is contained in:
Martín Lucas Golini
2026-08-02 00:55:03 -03:00
parent fe8417bdc7
commit eb7398f9ec
6 changed files with 105 additions and 3 deletions
+7
View File
@@ -958,6 +958,8 @@ class EE_API UISceneNode : public SceneNode {
bool mIsLoading{ false };
bool mUpdatingLayouts{ false };
bool mStyleDuringLoad{ false };
Uint32 mPendingHTTPStyleSheetLoads{ 0 };
bool mHTTPStyleSheetChanged{ false };
UIThemeManager* mUIThemeManager{ nullptr };
UIIconThemeManager* mUIIconThemeManager{ nullptr };
std::vector<Graphics::FontPtr> mFontFaces;
@@ -1183,6 +1185,11 @@ class EE_API UISceneNode : public SceneNode {
*/
void loadCSS( URI uri, std::optional<Time> defer, CSS::StyleSheet::SourceOrder sourceOrder );
void combineHTTPStyleSheet( const std::string& css, const std::string& url, URI baseURI,
CSS::StyleSheet::SourceOrder sourceOrder );
void finishHTTPStyleSheetLoad();
/**
* @brief Loads glyph icons from @glyph-icon rules.
*