RESOLVED FIXED 159242
Update focus test
https://bugs.webkit.org/show_bug.cgi?id=159242
Summary Update focus test
Jon Lee
Reported 2016-06-28 17:54:51 PDT
Update focus test
Attachments
Patch (17.70 KB, patch)
2016-06-28 18:01 PDT, Jon Lee
dino: review+
Radar WebKit Bug Importer
Comment 1 2016-06-28 17:56:52 PDT
Jon Lee
Comment 2 2016-06-28 18:01:12 PDT
Said Abou-Hallawa
Comment 3 2016-06-28 18:38:46 PDT
Comment on attachment 282309 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=282309&action=review Looks good to me. Unofficial r=me. > PerformanceTests/Animometer/tests/master/resources/focus.js:12 > +var movementDuration = 2500; Should not these be const? > PerformanceTests/Animometer/tests/master/resources/focus.js:27 > + this.particle = document.createElement('div'); Don't we need to append this.particle the childList of some parent? stage.element.appendChild(obj.particle); > PerformanceTests/Animometer/tests/master/resources/focus.js:38 > + this.animate(stage, 0, 0); Why do we need this call here? The FocusElement.animate() function will be called anyway from FocusStage.animate(). It is strange also we call this function before appending this.particle to any parent. > PerformanceTests/Animometer/tests/master/resources/focus.js:-97 > - Utilities.setElementPrefixedProperty(this._centerElement, "filter", "blur(" + blur + "px)"); Why did we remove the center element? Is this because we want more accurate results?
Jon Lee
Comment 4 2016-06-28 18:42:47 PDT
Comment on attachment 282309 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=282309&action=review >> PerformanceTests/Animometer/tests/master/resources/focus.js:12 >> +var movementDuration = 2500; > > Should not these be const? I avoided it to keep things simple. >> PerformanceTests/Animometer/tests/master/resources/focus.js:27 >> + this.particle = document.createElement('div'); > > Don't we need to append this.particle the childList of some parent? stage.element.appendChild(obj.particle); That's done in tune(). >> PerformanceTests/Animometer/tests/master/resources/focus.js:38 >> + this.animate(stage, 0, 0); > > Why do we need this call here? The FocusElement.animate() function will be called anyway from FocusStage.animate(). It is strange also we call this function before appending this.particle to any parent. The order is that we create the particle, add it, and then style it. It is possible that before we style it in animate() we paint after adding, in which case you get a flash of opaque circles. >> PerformanceTests/Animometer/tests/master/resources/focus.js:-97 >> - Utilities.setElementPrefixedProperty(this._centerElement, "filter", "blur(" + blur + "px)"); > > Why did we remove the center element? Is this because we want more accurate results? Remove some variability.
Dean Jackson
Comment 5 2016-06-28 18:47:52 PDT
Comment on attachment 282309 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=282309&action=review > PerformanceTests/Animometer/tests/dom/resources/focus.js:16 > + // size and blurring are a function of depth Nit: We do comments with sentence case and periods. > PerformanceTests/Animometer/tests/dom/resources/focus.js:137 > + // update center element before loop Here too. >>> PerformanceTests/Animometer/tests/master/resources/focus.js:12 >>> +var movementDuration = 2500; >> >> Should not these be const? > > I avoided it to keep things simple. I'm not sure if all other browsers support const. >>> PerformanceTests/Animometer/tests/master/resources/focus.js:27 >>> + this.particle = document.createElement('div'); >> >> Don't we need to append this.particle the childList of some parent? stage.element.appendChild(obj.particle); > > That's done in tune(). Nit: Use " not '
Jon Lee
Comment 6 2016-06-28 18:50:20 PDT
Comment on attachment 282309 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=282309&action=review >> PerformanceTests/Animometer/tests/dom/resources/focus.js:16 >> + // size and blurring are a function of depth > > Nit: We do comments with sentence case and periods. Done. >> PerformanceTests/Animometer/tests/dom/resources/focus.js:137 >> + // update center element before loop > > Here too. Removed this instead. >>>> PerformanceTests/Animometer/tests/master/resources/focus.js:27 >>>> + this.particle = document.createElement('div'); >>> >>> Don't we need to append this.particle the childList of some parent? stage.element.appendChild(obj.particle); >> >> That's done in tune(). > > Nit: Use " not ' Done.
Jon Lee
Comment 7 2016-06-28 18:52:40 PDT
Note You need to log in before you can comment on or make changes to this bug.