embed-rect.html: <!DOCTYPE html> <html><body> <p>Text above the rect</p> <object width="400" height="400" type="image/svg+xml" data="huge-rect.svg"/> <p>Text below the rect</p> </body></html> huge-rect.svg: <?xml version="1.0"?> <svg width="4000" height="4000" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <rect width="100" height="100" fill="blue" stroke-width="5" stroke="green"/> </svg> Firefox and Opera properly display the entire rect inside the 400x400 frame of the <object> element. WebKit does not properly change the size of the rendered rect, only displaying the top-left corner in the 400x400 frame. See http://www.w3.org/TR/SVG11/coords.html#ViewportSpace : "The width attribute on the outermost 'svg' element establishes the viewport's width, unless the following conditions are met: * the SVG content is a separately stored resource that is embedded by reference (such as the 'object' element in [XHTML]), or the SVG content is embedded inline within a containing document; * and the referencing element or containing document is styled using CSS [CSS2] or XSL [XSL]; * and there are CSS-compatible positioning properties [ CSS2-POSN] specified on the referencing element (e.g., the 'object' element) or on the containing document's outermost 'svg' element that are sufficient to establish the width of the viewport. Under these conditions, the positioning properties establish the viewport's width." This means that the width/height of the viewport are established by the object's width/height attributes and override the SVG's width/height.
Created attachment 52534 [details] Test HTML file
Created attachment 52535 [details] Test SVG file
The patch on bug 10526 fixes this bug.
Fixed in r87526.