Title: [262652] trunk
- Revision
- 262652
- Author
- d...@apple.com
- Date
- 2020-06-05 13:55:29 -0700 (Fri, 05 Jun 2020)
Log Message
REGRESSION (r262366): [ Mac wk1 ] webgl/webgl-backing-store-size-update.html is failing
https://bugs.webkit.org/show_bug.cgi?id=212647
<rdar://problem/63882960>
Address post-commit feedback from Darin Adler.
Source/WebCore:
* dom/Document.cpp:
(WebCore::Document::prepareCanvasesForDisplayIfNeeded): Use a Ref<>.
LayoutTests:
* webgl/webgl-backing-store-size-update.html: Don't need window for requestAnimationFrame.
Modified Paths
Diff
Modified: trunk/LayoutTests/webgl/webgl-backing-store-size-update.html (262651 => 262652)
--- trunk/LayoutTests/webgl/webgl-backing-store-size-update.html 2020-06-05 20:44:16 UTC (rev 262651)
+++ trunk/LayoutTests/webgl/webgl-backing-store-size-update.html 2020-06-05 20:55:29 UTC (rev 262652)
@@ -3,16 +3,16 @@
if (window.testRunner)
testRunner.waitUntilDone();
- var canvas = document.querySelector("canvas");
+ const canvas = document.querySelector("canvas");
function draw() {
// For the purpose of this test, we want the backing store metrics to
// not match the layout metrics.
- var scaleFactor = 2;
+ const scaleFactor = 2;
canvas.width = canvas.clientWidth * scaleFactor;
canvas.height = canvas.clientHeight * scaleFactor;
- var gl = canvas.getContext("webgl");
+ const gl = canvas.getContext("webgl");
gl.clearColor(0, 0, 0, 1);
gl.clear(gl.COLOR_BUFFER_BIT);
}
@@ -25,7 +25,7 @@
// size of the backing store.
canvas.style.width = "50px";
canvas.style.height = "50px";
- window.requestAnimationFrame(function() {
+ requestAnimationFrame(function() {
draw();
if (window.testRunner) {
// Need to give the test system at least a frame to paint
@@ -32,7 +32,7 @@
// after the draw() command, because notifyDone forces a
// dump() and we're inside a rAF (which means it won't
// do any of the post-layout/drawing work in Page::doAfterUpdateRendering)
- window.requestAnimationFrame(function() {
+ requestAnimationFrame(function() {
testRunner.notifyDone();
});
}
Modified: trunk/Source/WebCore/dom/Document.cpp (262651 => 262652)
--- trunk/Source/WebCore/dom/Document.cpp 2020-06-05 20:44:16 UTC (rev 262651)
+++ trunk/Source/WebCore/dom/Document.cpp 2020-06-05 20:55:29 UTC (rev 262652)
@@ -8594,7 +8594,7 @@
if (!canvas->isInTreeScope())
continue;
- auto protectedCanvas = makeRefPtr(canvas);
+ auto protectedCanvas = makeRef(*canvas);
protectedCanvas->prepareForDisplay();
}
m_canvasesNeedingDisplayPreparation.clear();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes