Note: There are a few cases of duplicates in user autocompletion which are being worked on.

-moz-element background fails to update after image reloads

VERIFIED FIXED in Firefox 26

Status

()

Core
Layout: View Rendering
VERIFIED FIXED
4 years ago
4 years ago

People

(Reporter: Peter J. Sloetjes, Assigned: roc)

Tracking

({dev-doc-complete, regression, site-compat})

19 Branch
mozilla26
dev-doc-complete, regression, site-compat
Points:
---

Firefox Tracking Flags

(firefox22 affected, firefox23 affected, firefox24 affected, firefox25 affected, firefox26 verified, firefox-esr17 unaffected)

Details

Attachments

(2 attachments)

(Reporter)

Description

4 years ago
User Agent: Mozilla/5.0 (masking-agent; rv:17.0) Gecko/17.0 Firefox/17.0 (Nightly/Aurora)
Build ID: 20130825004001

Steps to reproduce:

I used -moz-element in the following way (test case):

<html>
	<head>
		<style>
			#B{background-image:-moz-element(#A)}
		</style>
		<script>
			function setBackground() {
				document.getElementById("A").style.backgroundImage = 
					"url(data:image/gif;base64,R0lGODlhAQABAJEAAAAA" + 
					"/wAAAAAAAAAAACwAAAAAAQABAAAIBAABBAQAOw==)";
			}
		</script>
	</head>
	<body onload="setBackground()">
		<div id="A">A</div>
		<div id="B">_ ->B</div>
	</body>
</html>



Actual results:

After the background of div A is modified, the background of div B fails to be updated. The update can be forced by selecting text or by events that enforce a full redraw. The update does not fail after reloading the page, probably due to caching (please consider this when trying to confirm this bug).

In other cases involving -moz-element, no means can be found to enforce redraws, hence in those cases backgrounds remain missing (details are complex and will not be discussed in this thread).



Expected results:

-moz-element is a very useful feature, but it should be perfectly reliable or it may lead to invisible background images and hidden page functionality.

Almost 4000 users of my add-ons are affected by this bug. I have post-poned the release of several new add-ons because of it.

Comment 1

4 years ago
Regression window(m-i)
Good:
http://hg.mozilla.org/integration/mozilla-inbound/rev/3523098f7911
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/19.0 Firefox/19.0 ID:20121106135430
Bad:
http://hg.mozilla.org/integration/mozilla-inbound/rev/8d793eb6a281
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/19.0 Firefox/19.0 ID:20121106140530
Pushlog:
http://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=3523098f7911&tochange=8d793eb6a281

regressed by: Bug 798964
Blocks: 798964
Status: UNCONFIRMED → NEW
status-firefox22: --- → affected
status-firefox23: --- → affected
status-firefox24: --- → affected
status-firefox25: --- → affected
status-firefox26: --- → affected
status-firefox-esr17: --- → unaffected
Ever confirmed: true
Keywords: regression
OS: Other → All
Hardware: Other → All
Version: 23 Branch → 19 Branch

Comment 2

4 years ago
Created attachment 795284 [details]
reporter's testcase
Created attachment 795812 [details] [diff] [review]
fix
Assignee: nobody → roc
Attachment #795812 - Flags: review?(matt.woodrow)
Attachment #795812 - Flags: review?(matt.woodrow) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/b48f9c8d7aff
https://hg.mozilla.org/mozilla-central/rev/b48f9c8d7aff
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/25/Site_Compatibility
status-firefox26: affected → fixed
Keywords: dev-doc-complete, site-compat
Verified as fixed using the following environments:

Build identifier: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0
Build id:20131017004002
http://hg.mozilla.org/releases/mozilla-aurora/rev/7b18d2da3414
OS: Windows 7 x64

Build identifier: Mozilla/5.0 (X11; Linux i686; rv:26.0) Gecko/20100101 Firefox/26.0
Build id:20131017004002
http://hg.mozilla.org/releases/mozilla-aurora/rev/7b18d2da3414
OS:Ubuntu 12.10 x32

Build Identifier:Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:26.0) Gecko/20100101 Firefox/26.0
Build id:20131017004002
http://hg.mozilla.org/releases/mozilla-aurora/rev/7b18d2da3414
OS: Mac Os x Version 10.7.5
Status: RESOLVED → VERIFIED
status-firefox26: fixed → verified
You need to log in before you can comment on or make changes to this bug.