Changeset 100045 in webkit
- Timestamp:
- Nov 11, 2011 4:30:05 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 9 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r100044 r100045 1 2011-11-11 Florin Malita <fmalita@google.com> 2 3 clipPath does not work on foreignObject 4 https://bugs.webkit.org/show_bug.cgi?id=68251 5 6 Reviewed by Dirk Schulze. 7 8 * svg/foreignObject/clip-expected.png: Added. 9 * svg/foreignObject/clip-expected.txt: Added. 10 * svg/foreignObject/clip.html: Added. 11 * svg/foreignObject/filter-expected.png: Added. 12 * svg/foreignObject/filter-expected.txt: Added. 13 * svg/foreignObject/filter.html: Added. 14 * svg/foreignObject/mask-expected.png: Added. 15 * svg/foreignObject/mask-expected.txt: Added. 16 * svg/foreignObject/mask.html: Added. 17 1 18 2011-11-11 Ojan Vafai <ojan@chromium.org> 2 19 -
trunk/Source/WebCore/ChangeLog
r100041 r100045 1 2011-11-11 Florin Malita <fmalita@google.com> 2 3 clipPath does not work on foreignObject 4 https://bugs.webkit.org/show_bug.cgi?id=68251 5 6 Reviewed by Dirk Schulze. 7 8 Add ForeignObject clipping, filtering and masking support using the SVGRenderSupport helpers 9 (prepareToRenderSVGContent, finishRenderSVGContent) on RenderSVGForeignObject's paint path. 10 This also allows us to remove explicit transparency handling, since the helpers already cover it. 11 12 Tests: svg/foreignObject/clip.html 13 svg/foreignObject/filter.html 14 svg/foreignObject/mask.html 15 16 * rendering/svg/RenderSVGForeignObject.cpp: 17 (WebCore::RenderSVGForeignObject::paint): 18 * rendering/svg/SVGResources.cpp: 19 (WebCore::clipperFilterMaskerTags): 20 1 21 2011-11-11 Adam Klein <adamk@chromium.org> 2 22 -
trunk/Source/WebCore/rendering/svg/RenderSVGForeignObject.cpp
r99862 r100045 59 59 childPaintInfo.context->clip(m_viewport); 60 60 61 float opacity = style()->opacity();62 if ( opacity < 1.0f)63 c hildPaintInfo.context->beginTransparencyLayer(opacity);61 bool continueRendering = true; 62 if (paintInfo.phase == PaintPhaseForeground) 63 continueRendering = SVGRenderSupport::prepareToRenderSVGContent(this, childPaintInfo); 64 64 65 // Paint all phases of FO elements atomically, as though the FO element established its 66 // own stacking context. 67 bool preservePhase = paintInfo.phase == PaintPhaseSelection || paintInfo.phase == PaintPhaseTextClip; 68 LayoutPoint childPoint = IntPoint(); 69 childPaintInfo.phase = preservePhase ? paintInfo.phase : PaintPhaseBlockBackground; 70 RenderBlock::paint(childPaintInfo, IntPoint()); 71 if (!preservePhase) { 72 childPaintInfo.phase = PaintPhaseChildBlockBackgrounds; 73 RenderBlock::paint(childPaintInfo, childPoint); 74 childPaintInfo.phase = PaintPhaseFloat; 75 RenderBlock::paint(childPaintInfo, childPoint); 76 childPaintInfo.phase = PaintPhaseForeground; 77 RenderBlock::paint(childPaintInfo, childPoint); 78 childPaintInfo.phase = PaintPhaseOutline; 79 RenderBlock::paint(childPaintInfo, childPoint); 65 if (continueRendering) { 66 // Paint all phases of FO elements atomically, as though the FO element established its 67 // own stacking context. 68 bool preservePhase = paintInfo.phase == PaintPhaseSelection || paintInfo.phase == PaintPhaseTextClip; 69 LayoutPoint childPoint = IntPoint(); 70 childPaintInfo.phase = preservePhase ? paintInfo.phase : PaintPhaseBlockBackground; 71 RenderBlock::paint(childPaintInfo, IntPoint()); 72 if (!preservePhase) { 73 childPaintInfo.phase = PaintPhaseChildBlockBackgrounds; 74 RenderBlock::paint(childPaintInfo, childPoint); 75 childPaintInfo.phase = PaintPhaseFloat; 76 RenderBlock::paint(childPaintInfo, childPoint); 77 childPaintInfo.phase = PaintPhaseForeground; 78 RenderBlock::paint(childPaintInfo, childPoint); 79 childPaintInfo.phase = PaintPhaseOutline; 80 RenderBlock::paint(childPaintInfo, childPoint); 81 } 80 82 } 81 83 82 if ( opacity < 1.0f)83 childPaintInfo.context->endTransparencyLayer();84 if (paintInfo.phase == PaintPhaseForeground) 85 SVGRenderSupport::finishRenderSVGContent(this, childPaintInfo, paintInfo.context); 84 86 } 85 87 -
trunk/Source/WebCore/rendering/svg/SVGResources.cpp
r95901 r100045 82 82 s_tagList.add(SVGNames::tspanTag.localName().impl()); 83 83 84 // Not listed in the definitions is the foreignObject element, but clip-path 85 // is a supported attribute. 86 s_tagList.add(SVGNames::foreignObjectTag.localName().impl()); 87 84 88 // Elements that we ignore, as it doesn't make any sense. 85 89 // defs, pattern, switch (FIXME: Mail SVG WG about these)
Note: See TracChangeset
for help on using the changeset viewer.