Title: [249256] releases/WebKitGTK/webkit-2.26/Source/WebCore
- Revision
- 249256
- Author
- [email protected]
- Date
- 2019-08-29 06:09:54 -0700 (Thu, 29 Aug 2019)
Log Message
Merge r249203 - Have RenderSVGBlock compute visual overflow just like everyone else
https://bugs.webkit.org/show_bug.cgi?id=201211
Reviewed by Zalan Bujtas.
RenderSVGBlock overrode visualOverflowRect() just to account for text shadow. This prevents callers
optimizing calls to visualOverflowRect(), so instead have RenderSVGBlock implement computeOverflow()
and call addVisualOverflow().
* rendering/svg/RenderSVGBlock.cpp:
(WebCore::RenderSVGBlock::computeOverflow):
(WebCore::RenderSVGBlock::visualOverflowRect const): Deleted.
* rendering/svg/RenderSVGBlock.h:
Modified Paths
Diff
Modified: releases/WebKitGTK/webkit-2.26/Source/WebCore/ChangeLog (249255 => 249256)
--- releases/WebKitGTK/webkit-2.26/Source/WebCore/ChangeLog 2019-08-29 13:09:50 UTC (rev 249255)
+++ releases/WebKitGTK/webkit-2.26/Source/WebCore/ChangeLog 2019-08-29 13:09:54 UTC (rev 249256)
@@ -1,3 +1,19 @@
+2019-08-28 Simon Fraser <[email protected]>
+
+ Have RenderSVGBlock compute visual overflow just like everyone else
+ https://bugs.webkit.org/show_bug.cgi?id=201211
+
+ Reviewed by Zalan Bujtas.
+
+ RenderSVGBlock overrode visualOverflowRect() just to account for text shadow. This prevents callers
+ optimizing calls to visualOverflowRect(), so instead have RenderSVGBlock implement computeOverflow()
+ and call addVisualOverflow().
+
+ * rendering/svg/RenderSVGBlock.cpp:
+ (WebCore::RenderSVGBlock::computeOverflow):
+ (WebCore::RenderSVGBlock::visualOverflowRect const): Deleted.
+ * rendering/svg/RenderSVGBlock.h:
+
2019-08-28 Ryosuke Niwa <[email protected]>
REGRESSION (r248807): Objects stored in ElementRareData are leaked
Modified: releases/WebKitGTK/webkit-2.26/Source/WebCore/rendering/svg/RenderSVGBlock.cpp (249255 => 249256)
--- releases/WebKitGTK/webkit-2.26/Source/WebCore/rendering/svg/RenderSVGBlock.cpp 2019-08-29 13:09:50 UTC (rev 249255)
+++ releases/WebKitGTK/webkit-2.26/Source/WebCore/rendering/svg/RenderSVGBlock.cpp 2019-08-29 13:09:54 UTC (rev 249256)
@@ -36,16 +36,6 @@
{
}
-LayoutRect RenderSVGBlock::visualOverflowRect() const
-{
- LayoutRect borderRect = borderBoxRect();
-
- if (const ShadowData* textShadow = style().textShadow())
- textShadow->adjustRectForShadow(borderRect);
-
- return borderRect;
-}
-
void RenderSVGBlock::updateFromStyle()
{
RenderBlockFlow::updateFromStyle();
@@ -85,4 +75,17 @@
SVGResourcesCache::clientStyleChanged(*this, diff, style());
}
+void RenderSVGBlock::computeOverflow(LayoutUnit oldClientAfterEdge, bool recomputeFloats)
+{
+ RenderBlockFlow::computeOverflow(oldClientAfterEdge, recomputeFloats);
+
+ const auto* textShadow = style().textShadow();
+ if (!textShadow)
+ return;
+
+ LayoutRect borderRect = borderBoxRect();
+ textShadow->adjustRectForShadow(borderRect);
+ addVisualOverflow(snappedIntRect(borderRect));
}
+
+}
Modified: releases/WebKitGTK/webkit-2.26/Source/WebCore/rendering/svg/RenderSVGBlock.h (249255 => 249256)
--- releases/WebKitGTK/webkit-2.26/Source/WebCore/rendering/svg/RenderSVGBlock.h 2019-08-29 13:09:50 UTC (rev 249255)
+++ releases/WebKitGTK/webkit-2.26/Source/WebCore/rendering/svg/RenderSVGBlock.h 2019-08-29 13:09:54 UTC (rev 249256)
@@ -29,8 +29,6 @@
class RenderSVGBlock : public RenderBlockFlow {
WTF_MAKE_ISO_ALLOCATED(RenderSVGBlock);
public:
- LayoutRect visualOverflowRect() const final;
-
SVGGraphicsElement& graphicsElement() const { return downcast<SVGGraphicsElement>(nodeForNonAnonymous()); }
protected:
@@ -37,6 +35,8 @@
RenderSVGBlock(SVGGraphicsElement&, RenderStyle&&);
void willBeDestroyed() override;
+ void computeOverflow(LayoutUnit oldClientAfterEdge, bool recomputeFloats = false) override;
+
private:
void element() const = delete;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes