Diff
Modified: trunk/LayoutTests/ChangeLog (234202 => 234203)
--- trunk/LayoutTests/ChangeLog 2018-07-25 17:02:28 UTC (rev 234202)
+++ trunk/LayoutTests/ChangeLog 2018-07-25 17:10:10 UTC (rev 234203)
@@ -1,3 +1,16 @@
+2018-07-25 David Fenton <david_fen...@apple.com>
+
+ Unreviewed, rolling out r234187.
+
+ the layout test added with this change is flaky on the bots
+
+ Reverted changeset:
+
+ "Animation stops with object-fit:contain on an animated 2d
+ canvas"
+ https://bugs.webkit.org/show_bug.cgi?id=187840
+ https://trac.webkit.org/changeset/234187
+
2018-07-25 Andy VanWagoner <andy@vanwagoner.family>
[INTL] Intl constructor lengths should be configurable
Deleted: trunk/LayoutTests/fast/repaint/canvas-object-fit-expected.txt (234202 => 234203)
--- trunk/LayoutTests/fast/repaint/canvas-object-fit-expected.txt 2018-07-25 17:02:28 UTC (rev 234202)
+++ trunk/LayoutTests/fast/repaint/canvas-object-fit-expected.txt 2018-07-25 17:10:10 UTC (rev 234203)
@@ -1,21 +0,0 @@
- (GraphicsLayer
- (anchor 0.00 0.00)
- (bounds 800.00 600.00)
- (children 1
- (GraphicsLayer
- (bounds 800.00 600.00)
- (contentsOpaque 1)
- (children 1
- (GraphicsLayer
- (position 8.00 8.00)
- (bounds 202.00 102.00)
- (drawsContent 1)
- (repaint rects
- (rect 70.00 20.00 7.00 7.00)
- )
- )
- )
- )
- )
-)
-
Deleted: trunk/LayoutTests/fast/repaint/canvas-object-fit.html (234202 => 234203)
--- trunk/LayoutTests/fast/repaint/canvas-object-fit.html 2018-07-25 17:02:28 UTC (rev 234202)
+++ trunk/LayoutTests/fast/repaint/canvas-object-fit.html 2018-07-25 17:10:10 UTC (rev 234203)
@@ -1,49 +0,0 @@
-<head>
- <style>
- canvas {
- object-fit: contain;
- border: 1px solid black;
- width: 200px;
- height: 100px;
- }
- </style>
-</head>
-<body>
- <canvas id="canvas" width="200" height="200"></canvas>
-<pre id="layers"></pre>
- <script>
- if (window.testRunner) {
- testRunner.dumpAsText();
- testRunner.waitUntilDone();
- }
-
- var canvas = document.getElementById('canvas');
- var ctx = canvas.getContext('2d');
-
- ctx.fillStyle = "rgb(0, 128, 0)";
- ctx.fillRect(0, 0, 200, 200);
-
- function repaintTest()
- {
- if (window.internals)
- window.internals.startTrackingRepaints();
-
- ctx.fillStyle = "rgb(0, 0, 128)";
- ctx.fillRect(40, 40, 10, 10);
-
- if (window.internals)
- document.getElementById('layers').textContent = window.internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_REPAINT_RECTS);
-
- if (window.testRunner)
- testRunner.notifyDone();
- }
-
- function startTest()
- {
- setTimeout(function() {
- repaintTest();
- }, 0)
- }
- window.addEventListener('load', startTest, false);
- </script>
-</body>
Modified: trunk/Source/WebCore/ChangeLog (234202 => 234203)
--- trunk/Source/WebCore/ChangeLog 2018-07-25 17:02:28 UTC (rev 234202)
+++ trunk/Source/WebCore/ChangeLog 2018-07-25 17:10:10 UTC (rev 234203)
@@ -1,3 +1,16 @@
+2018-07-25 David Fenton <david_fen...@apple.com>
+
+ Unreviewed, rolling out r234187.
+
+ the layout test added with this change is flaky on the bots
+
+ Reverted changeset:
+
+ "Animation stops with object-fit:contain on an animated 2d
+ canvas"
+ https://bugs.webkit.org/show_bug.cgi?id=187840
+ https://trac.webkit.org/changeset/234187
+
2018-07-25 Chris Dumez <cdu...@apple.com>
Turn assertion preventing removal of ActiveDOMObjects while we iterate over them into a RELEASE_ASSERT
Modified: trunk/Source/WebCore/html/HTMLCanvasElement.cpp (234202 => 234203)
--- trunk/Source/WebCore/html/HTMLCanvasElement.cpp 2018-07-25 17:02:28 UTC (rev 234202)
+++ trunk/Source/WebCore/html/HTMLCanvasElement.cpp 2018-07-25 17:10:10 UTC (rev 234203)
@@ -508,23 +508,16 @@
clearCopiedImage();
FloatRect dirtyRect = rect;
- if (auto* renderer = renderBox()) {
- FloatRect destRect;
- if (is<RenderReplaced>(renderer))
- destRect = downcast<RenderReplaced>(renderer)->replacedContentRect();
- else
- destRect = renderer->contentBoxRect();
-
+ if (RenderBox* ro = renderBox()) {
+ FloatRect destRect = ro->contentBoxRect();
// Inflate dirty rect to cover antialiasing on image buffers.
if (drawingContext() && drawingContext()->shouldAntialias())
dirtyRect.inflate(1);
-
FloatRect r = mapRect(dirtyRect, FloatRect(0, 0, size().width(), size().height()), destRect);
r.intersect(destRect);
-
if (!r.isEmpty() && !m_dirtyRect.contains(r)) {
m_dirtyRect.unite(r);
- renderer->repaintRectangle(enclosingIntRect(m_dirtyRect));
+ ro->repaintRectangle(enclosingIntRect(m_dirtyRect));
}
}
notifyObserversCanvasChanged(dirtyRect);
Modified: trunk/Source/WebCore/rendering/RenderHTMLCanvas.cpp (234202 => 234203)
--- trunk/Source/WebCore/rendering/RenderHTMLCanvas.cpp 2018-07-25 17:02:28 UTC (rev 234202)
+++ trunk/Source/WebCore/rendering/RenderHTMLCanvas.cpp 2018-07-25 17:10:10 UTC (rev 234203)
@@ -74,7 +74,7 @@
LayoutRect contentBoxRect = this->contentBoxRect();
contentBoxRect.moveBy(paintOffset);
- LayoutRect replacedContentRect = this->replacedContentRect();
+ LayoutRect replacedContentRect = this->replacedContentRect(intrinsicSize());
replacedContentRect.moveBy(paintOffset);
// Not allowed to overflow the content box.
Modified: trunk/Source/WebCore/rendering/RenderImage.cpp (234202 => 234203)
--- trunk/Source/WebCore/rendering/RenderImage.cpp 2018-07-25 17:02:28 UTC (rev 234202)
+++ trunk/Source/WebCore/rendering/RenderImage.cpp 2018-07-25 17:10:10 UTC (rev 234203)
@@ -285,7 +285,7 @@
void RenderImage::updateInnerContentRect()
{
// Propagate container size to image resource.
- IntSize containerSize(replacedContentRect().size());
+ IntSize containerSize(replacedContentRect(intrinsicSize()).size());
if (!containerSize.isEmpty()) {
URL imageSourceURL;
if (HTMLImageElement* imageElement = is<HTMLImageElement>(element()) ? downcast<HTMLImageElement>(element()) : nullptr)
@@ -497,7 +497,7 @@
LayoutRect contentBoxRect = this->contentBoxRect();
contentBoxRect.moveBy(paintOffset);
- LayoutRect replacedContentRect = this->replacedContentRect();
+ LayoutRect replacedContentRect = this->replacedContentRect(intrinsicSize());
replacedContentRect.moveBy(paintOffset);
bool clip = !contentBoxRect.contains(replacedContentRect);
GraphicsContextStateSaver stateSaver(context, clip);
Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (234202 => 234203)
--- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp 2018-07-25 17:02:28 UTC (rev 234202)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.cpp 2018-07-25 17:10:10 UTC (rev 234203)
@@ -2344,7 +2344,7 @@
#endif
if (is<RenderReplaced>(renderBox)) {
RenderReplaced& renderReplaced = downcast<RenderReplaced>(renderBox);
- contentsRect = renderReplaced.replacedContentRect();
+ contentsRect = renderReplaced.replacedContentRect(renderBox.intrinsicSize());
} else
contentsRect = renderBox.contentBoxRect();
Modified: trunk/Source/WebCore/rendering/RenderReplaced.h (234202 => 234203)
--- trunk/Source/WebCore/rendering/RenderReplaced.h 2018-07-25 17:02:28 UTC (rev 234202)
+++ trunk/Source/WebCore/rendering/RenderReplaced.h 2018-07-25 17:10:10 UTC (rev 234203)
@@ -34,7 +34,6 @@
LayoutUnit computeReplacedLogicalHeight(std::optional<LayoutUnit> estimatedUsedWidth = std::nullopt) const override;
LayoutRect replacedContentRect(const LayoutSize& intrinsicSize) const;
- LayoutRect replacedContentRect() const { return replacedContentRect(intrinsicSize()); }
bool hasReplacedLogicalWidth() const;
bool hasReplacedLogicalHeight() const;
Modified: trunk/Source/WebCore/rendering/shapes/ShapeOutsideInfo.cpp (234202 => 234203)
--- trunk/Source/WebCore/rendering/shapes/ShapeOutsideInfo.cpp 2018-07-25 17:02:28 UTC (rev 234202)
+++ trunk/Source/WebCore/rendering/shapes/ShapeOutsideInfo.cpp 2018-07-25 17:10:10 UTC (rev 234203)
@@ -151,7 +151,7 @@
const LayoutRect& marginRect = getShapeImageMarginRect(m_renderer, m_referenceBoxLogicalSize);
const LayoutRect& imageRect = is<RenderImage>(m_renderer)
- ? downcast<RenderImage>(m_renderer).replacedContentRect()
+ ? downcast<RenderImage>(m_renderer).replacedContentRect(m_renderer.intrinsicSize())
: LayoutRect(LayoutPoint(), imageSize);
ASSERT(!styleImage->isPending());