Build fix after r214280. Don't render components until its element is inserted into...
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 30 Mar 2017 21:48:16 +0000 (21:48 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 30 Mar 2017 21:48:16 +0000 (21:48 +0000)
* public/v3/components/base.js:
(ComponentBase):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214628 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Websites/perf.webkit.org/ChangeLog
Websites/perf.webkit.org/public/v3/components/base.js

index 17be09a..c570b52 100644 (file)
@@ -1,3 +1,10 @@
+2017-03-30  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Build fix after r214280. Don't render components until its element is inserted into a document.
+
+        * public/v3/components/base.js:
+        (ComponentBase):
+
 2017-03-29  Ryosuke Niwa  <rniwa@webkit.org>
 
         Another build fix after r214502.
index caa8c91..2ca8b97 100644 (file)
@@ -18,7 +18,7 @@ class ComponentBase {
         this._actionCallbacks = new Map;
 
         if (!ComponentBase.useNativeCustomElements)
-            this.enqueueToRender();
+            element.addEventListener('DOMNodeInsertedIntoDocument', () => this.enqueueToRender());
         if (!ComponentBase.useNativeCustomElements && new.target.enqueueToRenderOnResize)
             ComponentBase._connectedComponentToRenderOnResize(this);
     }
@@ -288,7 +288,7 @@ class ComponentBase {
     }
 }
 
-ComponentBase.useNativeCustomElements = !!window.customElements;
+ComponentBase.useNativeCustomElements = false;//!!window.customElements;
 ComponentBase._componentByName = new Map;
 ComponentBase._componentByClass = new Map;
 ComponentBase._currentlyConstructedByInterface = new Map;