Changeset 100034 in webkit
- Timestamp:
- Nov 11, 2011, 3:15:14 PM (15 years ago)
- Location:
- branches/chromium/874
- Files:
-
- 5 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/platform/mac/svg/as-object/svg-embedded-in-html-in-iframe-expected.txt (modified) (1 diff)
-
LayoutTests/svg/as-object/svg-embedded-in-html-in-iframe.html (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/rendering/svg/RenderSVGRoot.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/chromium/874/LayoutTests/ChangeLog
r98521 r100034 1 2011-10-24 Levi Weintraub <leviw@chromium.org> 2 3 <svg> fails to use explicit width and height inside <html> inside IFRAME 4 https://bugs.webkit.org/show_bug.cgi?id=64823 5 6 Reviewed by Nikolas Zimmermann. 7 8 Fixing a bug where SVG negotiated size when embedded in html inside an iframe. 9 10 * platform/chromium/test_expectations.txt: Will update with results on other platforms. 11 * platform/mac/svg/as-object/svg-embedded-in-html-in-iframe-expected.png: Added. 12 * platform/mac/svg/as-object/svg-embedded-in-html-in-iframe-expected.txt: Added. 13 * svg/as-object/svg-embedded-in-html-in-iframe.html: Added. 14 1 15 2011-10-20 Simon Fraser <simon.fraser@apple.com> 2 16 -
branches/chromium/874/LayoutTests/platform/mac/svg/as-object/svg-embedded-in-html-in-iframe-expected.txt
r99115 r100034 14 14 RenderText {#text} at (0,0) size 0x0 15 15 RenderText {#text} at (0,0) size 0x0 16 layer at (0,0) size 800x600 17 RenderView at (0,0) size 800x600 18 layer at (0,0) size 800x170 19 RenderBlock {HTML} at (0,0) size 800x170 20 RenderBody {BODY} at (8,8) size 784x154 21 RenderPartObject {IFRAME} at (0,0) size 784x150 22 layer at (0,0) size 784x150 23 RenderView at (0,0) size 784x150 24 layer at (0,0) size 784x120 25 RenderBlock {HTML} at (0,0) size 784x120 26 RenderBody {BODY} at (8,8) size 768x104 27 RenderSVGRoot {svg} at (8,8) size 100x100 28 RenderSVGPath {circle} at (8,8) size 100x100 [fill={[type=SOLID] [color=#0000FF]}] [cx=50.00] [cy=50.00] [r=50.00] 29 RenderText {#text} at (0,0) size 0x0 30 RenderText {#text} at (0,0) size 0x0 -
branches/chromium/874/LayoutTests/svg/as-object/svg-embedded-in-html-in-iframe.html
r99115 r100034 21 21 </html> 22 22 23 <!DOCTYPE html> 24 <html> 25 <head> 26 <script type="text/javascript"> 27 function CreateCircle(){ 28 var B=""; 29 B+="<!DOCTYPE html>"; 30 B+="<html>"; 31 B+="<body>"; 32 B+="<svg style=\"width:100px;height:100px;\">"; 33 B+="<circle cx=\"50%\" cy=\"50%\" r=\"50%\" fill=\"blue\" stroke=\"none\" />"; 34 B+="</svg>"; 35 B+="</body></html>"; 36 return B; 37 } 38 </script> 39 </head> 40 <body> 41 <iframe src="javascript:parent.CreateCircle();" width="100%" height="100%" frameborder="0" scrolling="no"></iframe> 42 </body> 43 </html> 44 -
branches/chromium/874/Source/WebCore/ChangeLog
r98522 r100034 1 2011-10-24 Levi Weintraub <leviw@chromium.org> 2 3 <svg> fails to use explicit width and height inside <html> inside IFRAME 4 https://bugs.webkit.org/show_bug.cgi?id=64823 5 6 Reviewed by Nikolas Zimmermann. 7 8 Checking that embedded SVG is in an SVG document before negotiating size 9 with the host document. 10 11 Test: svg/as-object/svg-embedded-in-html-in-iframe.html 12 13 * rendering/svg/RenderSVGRoot.cpp: 14 (WebCore::isEmbeddedThroughFrameContainingSVGDocument): 15 (WebCore::RenderSVGRoot::computeReplacedLogicalWidth): 16 (WebCore::RenderSVGRoot::computeReplacedLogicalHeight): 17 1 18 2011-10-21 Simon Fraser <simon.fraser@apple.com> 2 19 -
branches/chromium/874/Source/WebCore/rendering/svg/RenderSVGRoot.cpp
r94372 r100034 131 131 } 132 132 133 static inline bool isEmbeddedThroughFrameContainingSVGDocument(const Frame* frame) 134 { 135 ASSERT(frame); 136 ASSERT(frame->document()); 137 // If our frame has an owner renderer, we're embedded through eg. object/embed/iframe, 138 // but we only negotiate if we're in an SVG document. 139 return !frame->ownerRenderer() || !frame->document()->isSVGDocument(); 140 } 141 133 142 LayoutUnit RenderSVGRoot::computeReplacedLogicalWidth(bool includeMaxWidth) const 134 143 { … … 138 147 return computeIntrinsicWidth(replacedWidth); 139 148 140 // If our frame has an owner renderer, we're embedded through eg. object/embed. 149 if (isEmbeddedThroughFrameContainingSVGDocument(frame)) 150 return computeIntrinsicWidth(replacedWidth); 151 141 152 RenderPart* ownerRenderer = frame->ownerRenderer(); 142 if (!ownerRenderer)143 return computeIntrinsicWidth(replacedWidth);144 145 153 RenderStyle* ownerRendererStyle = ownerRenderer->style(); 146 154 ASSERT(ownerRendererStyle); … … 180 188 return computeIntrinsicHeight(replacedHeight); 181 189 182 // If our frame has an owner renderer, we're embedded through eg. object/embed. 190 if (isEmbeddedThroughFrameContainingSVGDocument(frame)) 191 return computeIntrinsicHeight(replacedHeight); 192 183 193 RenderPart* ownerRenderer = frame->ownerRenderer(); 184 if (!ownerRenderer)185 return computeIntrinsicHeight(replacedHeight);186 187 194 RenderStyle* ownerRendererStyle = ownerRenderer->style(); 188 195 ASSERT(ownerRendererStyle);
Note:
See TracChangeset
for help on using the changeset viewer.