Title: [213523] trunk/Source/WebCore
Revision
213523
Author
[email protected]
Date
2017-03-07 09:59:13 -0800 (Tue, 07 Mar 2017)

Log Message

Animated GIFs fail to play in multi-column layout
https://bugs.webkit.org/show_bug.cgi?id=167901
<rdar://problem/30382262>

Reviewed by Zalan Bujtas.

* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeRectForRepaint):
Make sure to handle the case where we pass in a null repaintContainer and need
to cross a multicolumn flow thread -> region boundary as a result.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (213522 => 213523)


--- trunk/Source/WebCore/ChangeLog	2017-03-07 17:33:45 UTC (rev 213522)
+++ trunk/Source/WebCore/ChangeLog	2017-03-07 17:59:13 UTC (rev 213523)
@@ -1,3 +1,16 @@
+2017-03-07  Dave Hyatt  <[email protected]>
+
+        Animated GIFs fail to play in multi-column layout
+        https://bugs.webkit.org/show_bug.cgi?id=167901
+        <rdar://problem/30382262>
+
+        Reviewed by Zalan Bujtas.
+
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::computeRectForRepaint):
+        Make sure to handle the case where we pass in a null repaintContainer and need
+        to cross a multicolumn flow thread -> region boundary as a result.
+
 2017-03-07  Fujii Hironori  <[email protected]>
 
         ShadowBlur::calculateLayerBoundingRect doesn't need to return the enclosingIntRect of layerRect

Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (213522 => 213523)


--- trunk/Source/WebCore/rendering/RenderBox.cpp	2017-03-07 17:33:45 UTC (rev 213522)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp	2017-03-07 17:59:13 UTC (rev 213523)
@@ -59,6 +59,7 @@
 #include "RenderIterator.h"
 #include "RenderLayer.h"
 #include "RenderLayerCompositor.h"
+#include "RenderMultiColumnFlowThread.h"
 #include "RenderNamedFlowFragment.h"
 #include "RenderNamedFlowThread.h"
 #include "RenderTableCell.h"
@@ -2296,6 +2297,21 @@
         adjustedRect.expand(locationOffset - flooredLocationOffset);
         locationOffset = flooredLocationOffset;
     }
+
+    if (is<RenderMultiColumnFlowThread>(this)) {
+        // We won't normally run this code. Only when the repaintContainer is null (i.e., we're trying
+        // to get the rect in view coordinates) will we come in here, since normally repaintContainer
+        // will be set and we'll stop at the flow thread. This case is mainly hit by the check for whether
+        // or not images should animate.
+        // FIXME: Just as with offsetFromContainer, we aren't really handling objects that span
+        // multiple columns properly.
+        LayoutPoint physicalPoint(flipForWritingMode(adjustedRect.location()));
+        if (auto* region = downcast<RenderMultiColumnFlowThread>(*this).physicalTranslationFromFlowToRegion((physicalPoint))) {
+            adjustedRect.setLocation(region->flipForWritingMode(physicalPoint));
+            return region->computeRectForRepaint(adjustedRect, repaintContainer, context);
+        }
+    }
+
     LayoutPoint topLeft = adjustedRect.location();
     topLeft.move(locationOffset);
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to