[Webkit-unassigned] [Bug 37086] New: Explicit size of object tag ignored
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Apr 5 07:46:31 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=37086
Summary: Explicit size of object tag ignored
Product: WebKit
Version: 528+ (Nightly build)
Platform: PC
OS/Version: Mac OS X 10.5
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: SVG
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: codedread at gmail.com
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.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list