Changeset 209167 in webkit
- Timestamp:
- Nov 30, 2016 6:33:04 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r209166 r209167 1 2016-11-30 Antoine Quint <graouts@apple.com> 2 3 [Modern Media Controls] LayoutNode: only mark properties as dirty if different than current value 4 https://bugs.webkit.org/show_bug.cgi?id=165236 5 6 Reviewed by Simon Fraser. 7 8 Update LayoutNode property tests to check that setting a given property to the 9 same value doesn't schedule an update. 10 11 * media/modern-media-controls/layout-node/height-expected.txt: 12 * media/modern-media-controls/layout-node/height.html: 13 * media/modern-media-controls/layout-node/visible-expected.txt: 14 * media/modern-media-controls/layout-node/visible.html: 15 * media/modern-media-controls/layout-node/width-expected.txt: 16 * media/modern-media-controls/layout-node/width.html: 17 * media/modern-media-controls/layout-node/x-expected.txt: 18 * media/modern-media-controls/layout-node/x.html: 19 * media/modern-media-controls/layout-node/y-expected.txt: 20 * media/modern-media-controls/layout-node/y.html: 21 1 22 2016-11-30 Jiewen Tan <jiewen_tan@apple.com> 2 23 -
trunk/LayoutTests/media/modern-media-controls/layout-node/height-expected.txt
r206686 r209167 17 17 PASS node.height is 20 18 18 PASS node.element.style.height is "20px" 19 20 node.height = 20 21 PASS scheduler.hasScheduledLayoutCallbacks is false 22 19 23 PASS successfullyParsed is true 20 24 -
trunk/LayoutTests/media/modern-media-controls/layout-node/height.html
r206686 r209167 31 31 shouldBe("node.height", "20"); 32 32 shouldBeEqualToString("node.element.style.height", "20px"); 33 34 debug(""); 35 debug("node.height = 20"); 36 node.height = 20; 37 shouldBeFalse("scheduler.hasScheduledLayoutCallbacks"); 38 debug(""); 39 33 40 finishJSTest(); 34 41 }; -
trunk/LayoutTests/media/modern-media-controls/layout-node/visible-expected.txt
r206686 r209167 21 21 PASS node.visible is true 22 22 PASS node.element.style.display is "inherit" 23 24 node.visible = true 25 PASS scheduler.hasScheduledLayoutCallbacks is false 26 23 27 PASS successfullyParsed is true 24 28 -
trunk/LayoutTests/media/modern-media-controls/layout-node/visible.html
r206686 r209167 37 37 shouldBe("node.visible", "true"); 38 38 shouldBeEqualToString("node.element.style.display", "inherit"); 39 40 debug(""); 41 debug("node.visible = true"); 42 node.visible = true; 43 shouldBeFalse("scheduler.hasScheduledLayoutCallbacks"); 44 debug(""); 45 39 46 finishJSTest(); 40 47 break; -
trunk/LayoutTests/media/modern-media-controls/layout-node/width-expected.txt
r206686 r209167 17 17 PASS node.width is 20 18 18 PASS node.element.style.width is "20px" 19 20 node.width = 20 21 PASS scheduler.hasScheduledLayoutCallbacks is false 22 19 23 PASS successfullyParsed is true 20 24 -
trunk/LayoutTests/media/modern-media-controls/layout-node/width.html
r206686 r209167 31 31 shouldBe("node.width", "20"); 32 32 shouldBeEqualToString("node.element.style.width", "20px"); 33 34 debug(""); 35 debug("node.width = 20"); 36 node.width = 20; 37 shouldBeFalse("scheduler.hasScheduledLayoutCallbacks"); 38 debug(""); 39 33 40 finishJSTest(); 34 41 }; -
trunk/LayoutTests/media/modern-media-controls/layout-node/x-expected.txt
r206686 r209167 17 17 PASS node.x is 20 18 18 PASS node.element.style.left is "20px" 19 20 node.x = 20 21 PASS scheduler.hasScheduledLayoutCallbacks is false 22 19 23 PASS successfullyParsed is true 20 24 -
trunk/LayoutTests/media/modern-media-controls/layout-node/x.html
r206686 r209167 31 31 shouldBe("node.x", "20"); 32 32 shouldBeEqualToString("node.element.style.left", "20px"); 33 34 debug(""); 35 debug("node.x = 20"); 36 node.x = 20; 37 shouldBeFalse("scheduler.hasScheduledLayoutCallbacks"); 38 debug(""); 39 33 40 finishJSTest(); 34 41 }; -
trunk/LayoutTests/media/modern-media-controls/layout-node/y-expected.txt
r206686 r209167 17 17 PASS node.y is 20 18 18 PASS node.element.style.top is "20px" 19 20 node.y = 20 21 PASS scheduler.hasScheduledLayoutCallbacks is false 22 19 23 PASS successfullyParsed is true 20 24 -
trunk/LayoutTests/media/modern-media-controls/layout-node/y.html
r206686 r209167 31 31 shouldBe("node.y", "20"); 32 32 shouldBeEqualToString("node.element.style.top", "20px"); 33 34 debug(""); 35 debug("node.y = 20"); 36 node.y = 20; 37 shouldBeFalse("scheduler.hasScheduledLayoutCallbacks"); 38 debug(""); 39 33 40 finishJSTest(); 34 41 }; -
trunk/Source/WebCore/ChangeLog
r209166 r209167 1 2016-11-30 Antoine Quint <graouts@apple.com> 2 3 [Modern Media Controls] LayoutNode: only mark properties as dirty if different than current value 4 https://bugs.webkit.org/show_bug.cgi?id=165236 5 6 Reviewed by Simon Fraser. 7 8 Check that the new value is different than the current value before marking the property as dirty. 9 10 * Modules/modern-media-controls/controls/layout-node.js: 11 (LayoutNode.prototype.set x): 12 (LayoutNode.prototype.set y): 13 (LayoutNode.prototype.set width): 14 (LayoutNode.prototype.set height): 15 (LayoutNode.prototype.set visible): 16 (performScheduledLayout): 17 * Modules/modern-media-controls/controls/scheduler.js: 18 (const.scheduler.new.prototype.get hasScheduledLayoutCallbacks): 19 1 20 2016-11-30 Jiewen Tan <jiewen_tan@apple.com> 2 21 -
trunk/Source/WebCore/Modules/modern-media-controls/controls/layout-node.js
r207111 r209167 38 38 set x(x) 39 39 { 40 if (x === this._x) 41 return; 42 40 43 this._x = x; 41 44 this.markDirtyProperty("x"); … … 49 52 set y(y) 50 53 { 54 if (y === this._y) 55 return; 56 51 57 this._y = y; 52 58 this.markDirtyProperty("y"); … … 60 66 set width(width) 61 67 { 68 if (width === this._width) 69 return; 70 62 71 this._width = width; 63 72 this.markDirtyProperty("width"); … … 71 80 set height(height) 72 81 { 82 if (height === this._height) 83 return; 84 73 85 this._height = height; 74 86 this.markDirtyProperty("height"); … … 82 94 set visible(flag) 83 95 { 96 if (flag === this._visible) 97 return; 98 84 99 this._visible = flag; 85 100 this.markDirtyProperty("visible"); … … 266 281 dirtyNodes.forEach(node => { 267 282 node.needsLayout = false; 268 node.layout() 283 node.layout(); 269 284 }); 270 285 dirtyNodes.clear(); -
trunk/Source/WebCore/Modules/modern-media-controls/controls/scheduler.js
r207111 r209167 10 10 11 11 // Public 12 13 get hasScheduledLayoutCallbacks() 14 { 15 return this._frameID !== -1 || this._layoutCallbacks.size > 0; 16 } 12 17 13 18 scheduleLayout(callback)
Note: See TracChangeset
for help on using the changeset viewer.