Last Comment Bug 640917 - Make SVG foreignObject a CSS fixed position containing block
: Make SVG foreignObject a CSS fixed position containing block
Status: RESOLVED FIXED
: testcase
Product: Core
Classification: Components
Component: SVG (show other bugs)
: Trunk
: All All
: -- major (vote)
: mozilla13
Assigned To: Boris Zbarsky [:bz] (Out June 25-July 6)
:
Mentors:
Depends on: 984312 728111
Blocks:
  Show dependency treegraph
 
Reported: 2011-03-11 03:18 PST by Laurent Fournier
Modified: 2014-12-15 21:28 PST (History)
8 users (show)
bzbarsky: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
compare webkit/gecko (21.78 KB, image/jpeg)
2011-03-11 03:25 PST, Laurent Fournier
no flags Details
bug_pos.svg (237 bytes, image/svg+xml)
2011-03-11 03:32 PST, Laurent Fournier
no flags Details
Treat foreignObject as a fixed position containing block. (3.95 KB, patch)
2012-02-21 14:08 PST, Boris Zbarsky [:bz] (Out June 25-July 6)
jwatt: review+
Details | Diff | Review

Description Laurent Fournier 2011-03-11 03:18:55 PST
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.2.15) Gecko/20110303 Firefox/3.6.15 ( .NET CLR 3.5.30729)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.2.15) Gecko/20110303 Firefox/3.6.15 ( .NET CLR 3.5.30729)

An xhtml DIV inside a foreignobject of a SVG document does not render the content with a CSS property 'position:fixed'.
FF does not return ant error and the DOM inspector shows the right block position but content still empty !
Works fine with Webkit (chromium 10.0.629.0 (70502)
The bug exists also on Linux FF4.0 beta13

Reproducible: Always

Steps to Reproduce:
Run this SVG code:
<svg xmlns="http://www.w3.org/2000/svg">
<style type="text/css">div { position:fixed; background: #aaa; } </style>
<foreignObject width="100px" height="100px">
<div xmlns="http://www.w3.org/1999/xhtml">TEXT</div>
</foreignObject>
</svg>
Actual Results:  
empty page

Expected Results:  
'TEXT' string rendered

I have given a minimal example to reproduce the bug but my initial request was to embbed a full HTML5 Ace editor inside an SVG code. (Ace request a fixed div)
Comment 1 Laurent Fournier 2011-03-11 03:25:14 PST
Created attachment 518681 [details]
compare webkit/gecko
Comment 2 Robert Longson 2011-03-11 03:28:49 PST
Can you add the testcase as an attachment rather than pasting it as a comment please?
Comment 3 Laurent Fournier 2011-03-11 03:32:53 PST
Created attachment 518684 [details]
bug_pos.svg
Comment 4 aravindm 2011-03-11 03:44:52 PST
Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0

Able to reproduce in Firefox 4rc1. Works fine for me in Firefox 3.6.15.
Comment 5 Laurent Fournier 2011-03-11 04:54:18 PST
(In reply to comment #4)
> Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0
> 
> Able to reproduce in Firefox 4rc1. Works fine for me in Firefox 3.6.15.
The bug is on both:
Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.2.15) Gecko/20110303 Firefox/3.6.15 ( .NET CLR 3.5.30729)
and nightly build: 4.0b13pre (2011-03-10)
Comment 6 XtC4UaLL [:xtc4uall] 2011-03-11 09:45:14 PST
Confirmed agsinst Trunk & Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2.16pre) Gecko/20110308 Namoroka/3.6.16pre ID:20110308033207
Comment 7 Boris Zbarsky [:bz] (Out June 25-July 6) 2011-08-02 11:47:20 PDT
roc, the frame is there but we seem to not end up painting the div... any idea why?
Comment 8 Boris Zbarsky [:bz] (Out June 25-July 6) 2012-02-21 14:08:47 PST
Created attachment 599351 [details] [diff] [review]
Treat foreignObject as a fixed position containing block.
Comment 9 Boris Zbarsky [:bz] (Out June 25-July 6) 2012-02-21 15:04:29 PST
https://hg.mozilla.org/integration/mozilla-inbound/rev/5a90ee43d1f0
Comment 10 Ed Morley [:emorley] 2012-02-22 10:39:47 PST
https://hg.mozilla.org/mozilla-central/rev/5a90ee43d1f0

Note You need to log in before you can comment on or make changes to this bug.