Title: [291812] trunk/Source/WebKit
- Revision
- 291812
- Author
- hironori.fu...@sony.com
- Date
- 2022-03-24 12:53:47 -0700 (Thu, 24 Mar 2022)
Log Message
[WinCairo] WCTileGrid should create tiles only for the inside of layer area
https://bugs.webkit.org/show_bug.cgi?id=238317
Reviewed by Don Olmstead.
The coverage rect returned by computeVisibleAndCoverageRect may be
bigger than the layer rect. Tiles should be paved only for the
intersection of the coverage rect and the layer rect.
* WebProcess/WebPage/wc/WCTileGrid.cpp:
(WebKit::WCTileGrid::tileRectFromPixelRect): Take the intersection
with the layer rect. Return an empty rect if the intersection is
empty.
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (291811 => 291812)
--- trunk/Source/WebKit/ChangeLog 2022-03-24 19:39:09 UTC (rev 291811)
+++ trunk/Source/WebKit/ChangeLog 2022-03-24 19:53:47 UTC (rev 291812)
@@ -1,3 +1,19 @@
+2022-03-24 Fujii Hironori <hironori.fu...@sony.com>
+
+ [WinCairo] WCTileGrid should create tiles only for the inside of layer area
+ https://bugs.webkit.org/show_bug.cgi?id=238317
+
+ Reviewed by Don Olmstead.
+
+ The coverage rect returned by computeVisibleAndCoverageRect may be
+ bigger than the layer rect. Tiles should be paved only for the
+ intersection of the coverage rect and the layer rect.
+
+ * WebProcess/WebPage/wc/WCTileGrid.cpp:
+ (WebKit::WCTileGrid::tileRectFromPixelRect): Take the intersection
+ with the layer rect. Return an empty rect if the intersection is
+ empty.
+
2022-03-24 Per Arne Vollan <pvol...@apple.com>
[iOS] Disable unneeded code when content filtering is running in the Network process
Modified: trunk/Source/WebKit/WebProcess/WebPage/wc/WCTileGrid.cpp (291811 => 291812)
--- trunk/Source/WebKit/WebProcess/WebPage/wc/WCTileGrid.cpp 2022-03-24 19:39:09 UTC (rev 291811)
+++ trunk/Source/WebKit/WebProcess/WebPage/wc/WCTileGrid.cpp 2022-03-24 19:53:47 UTC (rev 291812)
@@ -57,12 +57,15 @@
m_tiles.clear();
}
-WebCore::IntRect WCTileGrid::tileRectFromPixelRect(const WebCore::IntRect& rect)
+WebCore::IntRect WCTileGrid::tileRectFromPixelRect(const WebCore::IntRect& pixelRect)
{
- int x = std::max(rect.x(), 0);
- int y = std::max(rect.y(), 0);
- int maxX = std::max(rect.maxX(), 0);
- int maxY = std::max(rect.maxY(), 0);
+ auto rect = WebCore::intersection(pixelRect, { { }, m_size });
+ if (rect.isEmpty())
+ return { };
+ int x = rect.x();
+ int y = rect.y();
+ int maxX = rect.maxX();
+ int maxY = rect.maxY();
x /= tilePixelSize().width();
y /= tilePixelSize().height();
maxX = (maxX + tilePixelSize().width() - 1) / tilePixelSize().width();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes