Closed Bug 909157 Opened 11 years ago Closed 11 years ago

-moz-element background fails to update after image reloads

Categories

(Core :: Web Painting, defect)

19 Branch
defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla26
Tracking Status
firefox22 --- affected
firefox23 --- affected
firefox24 --- affected
firefox25 --- affected
firefox26 --- verified
firefox-esr17 --- unaffected

People

(Reporter: pjs.nl, Assigned: roc)

References

Details

(Keywords: dev-doc-complete, regression, site-compat)

Attachments

(2 files)

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.
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
Ever confirmed: true
Keywords: regression
OS: Other → All
Hardware: Other → All
Version: 23 Branch → 19 Branch
Attached file reporter's testcase
Attached patch fixSplinter Review
Assignee: nobody → roc
Attachment #795812 - Flags: review?(matt.woodrow)
Attachment #795812 - Flags: review?(matt.woodrow) → review+
https://hg.mozilla.org/mozilla-central/rev/b48f9c8d7aff
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
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
Component: Layout: View Rendering → Layout: Web Painting
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: