Bug 12256 - Context menu icons are not showing (iframe reference path set to parent instead of current document)
Summary: Context menu icons are not showing (iframe reference path set to parent inste...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL: http://www.fckeditor.net/nightly/brow...
Keywords: HasReduction
Depends on:
Blocks:
 
Reported: 2007-01-13 04:04 PST by webkit
Modified: 2009-01-14 10:12 PST (History)
3 users (show)

See Also:


Attachments
Simplified testcase (1.69 KB, application/zip)
2007-06-11 13:39 PDT, Alfonso Martínez de Lizarrondo
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description webkit 2007-01-13 04:04:42 PST
In the context menu, the icons are being shown correctly when opening them. But, live for a few seconds the menu opened. You will see that the icons are being replaced with the "?" image placeholder. In localhost it happens almost instantly.

The icons are loaded from a image strip (a single image with all icons on it). The icon tag is something like this:

<img class="TB_Button_Image" src="spacer.gif" style="background-position: 0px -16px;background-image: url(strip.gif);">

So, it seams that for some reason "spacer.gif" is not being found.
Comment 1 Alfonso Martínez de Lizarrondo 2007-06-11 13:39:17 PDT
Created attachment 14938 [details]
Simplified testcase

This testcase shows the root of the problem.
In a framed document the javascript appends a new iframe to its container, and the elements that are appended to that iframe get the reference path of the parent container instead of using the path from the document were the javascript is run.
IE, Firefox and Opera show the green background and the smiley, only Safari fails.
Comment 2 webkit 2007-09-22 03:28:24 PDT
We have introduced a workaround for it in FCKeditor, so it is not blocking it anymore. 

There is still a bug on WebKit, so core devs should re-title this ticket properly.
Comment 3 David Kilzer (:ddkilzer) 2007-09-22 07:18:36 PDT
(In reply to comment #2)
> We have introduced a workaround for it in FCKeditor, so it is not blocking it
> anymore. 

Could you describe the work-around or post example code?  This may be useful for others until a fix is implemented.

> There is still a bug on WebKit, so core devs should re-title this ticket
> properly.

Done.

Comment 4 webkit 2007-09-26 03:19:28 PDT
David, the fix has been done by Alfonso (see Comment #1). It is related to the base path for script created IFRAME elements. The workaround at our side can be found here:

http://dev.fckeditor.net/changeset/368
Comment 5 David Kilzer (:ddkilzer) 2009-01-13 16:50:41 PST
This appears to be fixed as of WebKit nightly r39872.  Federico, can you confirm?
Comment 6 webkit 2009-01-14 09:55:45 PST
I confirm it's working properly with the nightly (r39853).
Comment 7 David Kilzer (:ddkilzer) 2009-01-14 10:12:06 PST
(In reply to comment #6)
> I confirm it's working properly with the nightly (r39853).

Resolving as fixed.