Changeset 249203 in webkit
- Timestamp:
- Aug 28, 2019, 9:57:31 AM (7 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
-
ChangeLog (modified) (1 diff)
-
rendering/svg/RenderSVGBlock.cpp (modified) (2 diffs)
-
rendering/svg/RenderSVGBlock.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r249198 r249203 1 2019-08-28 Simon Fraser <simon.fraser@apple.com> 2 3 Have RenderSVGBlock compute visual overflow just like everyone else 4 https://bugs.webkit.org/show_bug.cgi?id=201211 5 6 Reviewed by Zalan Bujtas. 7 8 RenderSVGBlock overrode visualOverflowRect() just to account for text shadow. This prevents callers 9 optimizing calls to visualOverflowRect(), so instead have RenderSVGBlock implement computeOverflow() 10 and call addVisualOverflow(). 11 12 * rendering/svg/RenderSVGBlock.cpp: 13 (WebCore::RenderSVGBlock::computeOverflow): 14 (WebCore::RenderSVGBlock::visualOverflowRect const): Deleted. 15 * rendering/svg/RenderSVGBlock.h: 16 1 17 2019-08-28 Ryosuke Niwa <rniwa@webkit.org> 2 18 -
trunk/Source/WebCore/rendering/svg/RenderSVGBlock.cpp
r232018 r249203 35 35 : RenderBlockFlow(element, WTFMove(style)) 36 36 { 37 }38 39 LayoutRect RenderSVGBlock::visualOverflowRect() const40 {41 LayoutRect borderRect = borderBoxRect();42 43 if (const ShadowData* textShadow = style().textShadow())44 textShadow->adjustRectForShadow(borderRect);45 46 return borderRect;47 37 } 48 38 … … 86 76 } 87 77 78 void RenderSVGBlock::computeOverflow(LayoutUnit oldClientAfterEdge, bool recomputeFloats) 79 { 80 RenderBlockFlow::computeOverflow(oldClientAfterEdge, recomputeFloats); 81 82 const auto* textShadow = style().textShadow(); 83 if (!textShadow) 84 return; 85 86 LayoutRect borderRect = borderBoxRect(); 87 textShadow->adjustRectForShadow(borderRect); 88 addVisualOverflow(snappedIntRect(borderRect)); 88 89 } 90 91 } -
trunk/Source/WebCore/rendering/svg/RenderSVGBlock.h
r228908 r249203 30 30 WTF_MAKE_ISO_ALLOCATED(RenderSVGBlock); 31 31 public: 32 LayoutRect visualOverflowRect() const final;33 34 32 SVGGraphicsElement& graphicsElement() const { return downcast<SVGGraphicsElement>(nodeForNonAnonymous()); } 35 33 … … 37 35 RenderSVGBlock(SVGGraphicsElement&, RenderStyle&&); 38 36 void willBeDestroyed() override; 37 38 void computeOverflow(LayoutUnit oldClientAfterEdge, bool recomputeFloats = false) override; 39 39 40 40 private:
Note:
See TracChangeset
for help on using the changeset viewer.