Gecko engine for Wine
Go to file
Kyle Huey 0cae034974 Bug 783162: Make mapped attributes hold the image alive. r=bz
The nsCSSValue in nsGenericHTMLElement::MapBackgroundInto is a temporary.  This causes a problem after Bug 697230 landed, because the nsCSSValue::Image we put into that value is destroyed once we're done doing style stuff.  Previously the nsImageLoader would grab the request off the nsCSSValue::Image and hold it alive.  Bug 697230 changed the behavior here; now when the nsCSSValue::Image is destroyed it tells the image loader to drop the request.  The result is that all the references to the request are dropped and the frame is never told it has a background.

The solution is to keep the nsCSSValue::Image alive longer.  This patch adds two new types of nsAttrValue.  The first is an nsCSSValue::URL.  A ParseBackgroundAttribute method is added on nsGenericHTMLElement that the relevant elements (body/td/th/table/tr/tbody/thead/tfoot) call that parses background into an nsCSSValue::URL.  The second is an nsCSSValue::Image.  nsGenericHTMLElement::MapBackgroundInto attempts to convert the nsCSSValue::URL into an nsCSSValue::Image by kicking off the image load.  The result is that image loads are only started when the element is actually visible.  This also mirrors the way background-image works.  This also allows us to fix two longstanding bugs in this code.  Since MapBackgroundInto doesn't have a pointer to the actual element, it relied on grabbing the principal of the document.  Now we can grab the principal of the node in ParseBackgroundAttribute.  MapBackgroundInto also has no way to get at the element's base URI (to honor xml:base), which is now possible in ParseBackgroundAttribute.

nsCSSValue::[Image|URL] have also been moved to be mozilla::css::[Image|URL]Value.  nsAttrValue.h is included in external linkage code, so it can't include nsCSSValue.h to get the declarations of nsCSSValue::[Image|URL], and nested classes can't be forward declared.  Moving the classes to a namespace solves the problem.

Finally some old inoperative quirks mode code was removed.  This code has done nothing since Bug 273078 was landed in 2004.
2012-08-24 10:50:49 -07:00
accessible Bug 750570, part 4 - Switch most native CC classes to use the purple buffer. r=smaug 2012-08-24 09:50:06 -07:00
b2g No bug. Don't prelaunch app processes in debug builds, for easier debuggability. irc-r=bent 2012-08-22 22:59:32 -07:00
browser Revert bug 776208 for semi-consistent failures: 2012-08-24 13:08:15 -04:00
build Bug 785238 - Should catch AgentError inside devicemanagerSUT's getInfo. r=wlach 2012-08-24 09:53:27 -04:00
caps Merge m-c to inbound. 2012-08-23 19:50:46 -04:00
chrome Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg 2012-08-22 11:56:38 -04:00
config Bug 766793: Look for .pp files for shared libraries. r=ted a=philor for landing on a CLOSED TREE 2012-08-23 13:32:37 -07:00
content Bug 783162: Make mapped attributes hold the image alive. r=bz 2012-08-24 10:50:49 -07:00
db/sqlite3 Bug 774032 bonus - Use @DEPTH@ and @relativesrcdir@ in Makefile.in. r=ted 2012-08-04 20:26:44 +02:00
dbm Bug 780009: Update NSS to NSS_3_13_6_RTM. Note that this overwrites 2012-08-10 18:36:28 -07:00
docshell Back out 670c8a2695b3 (bug 771354), 134557d57e6e 4ad52e488977 (bug 774607), and... 2012-08-23 21:34:27 -07:00
dom Bug 783162: Make mapped attributes hold the image alive. r=bz 2012-08-24 10:50:49 -07:00
editor Bug 750570, part 4 - Switch most native CC classes to use the purple buffer. r=smaug 2012-08-24 09:50:06 -07:00
embedding Back out 670c8a2695b3 (bug 771354), 134557d57e6e 4ad52e488977 (bug 774607), and... 2012-08-23 21:34:27 -07:00
extensions Bug 625199 - s/JSAutoEnterCompartment/JSAutoCompartment/ and make it infallible (r=bholley) 2012-08-21 18:42:53 -07:00
gfx Bug 781380 - Fix cairo surface memory leak in DrawTargetCairo::DrawSurfaceWithShadow(). r=roc 2012-08-23 19:50:59 -04:00
hal Backed out changeset df85150b8d2f 2012-08-23 17:33:12 -07:00
image Bug 784726 - 'Remove old IPC::URI'. r=cjones+khuey. 2012-08-23 12:33:46 -07:00
intl Bug 783206 - replace NULL with nullptr in intl except to OS API usages. r=smontagu 2012-08-24 16:49:00 +09:00
ipc Back out 670c8a2695b3 (bug 771354), 134557d57e6e 4ad52e488977 (bug 774607), and... 2012-08-23 21:34:27 -07:00
js Bug 785175: Discard column information if the script is too large instead of aborting. r=jorendorff 2012-08-24 09:54:37 -07:00
layout Bug 783162: Make mapped attributes hold the image alive. r=bz 2012-08-24 10:50:49 -07:00
media Bug 579517 - Part 4: Manually rewrite some parts of the code base not covered by the automated conversion; r=bsmedberg 2012-08-22 11:59:54 -04:00
memory Bug 780287 - Don't wrap jemalloc on gonk, r=glandium 2012-08-06 16:22:26 -04:00
mfbt Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg 2012-08-22 11:56:38 -04:00
mobile Revert bug 776208 for semi-consistent failures: 2012-08-24 13:08:15 -04:00
modules Bug 784726 - 'Remove old IPC::URI'. r=cjones+khuey. 2012-08-23 12:33:46 -07:00
mozglue Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg 2012-08-22 11:56:38 -04:00
netwerk Bug 779845 - Import PSL test from http://publicsuffix.org/list/test.txt. r=gerv. 2012-08-24 14:57:51 +01:00
nsprpub Bug 778845 - Must upgrade Aurora 16 to NSPR 4.9.2 final, r=wtc 2012-08-02 23:04:47 +02:00
other-licenses Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg 2012-08-22 11:56:38 -04:00
parser Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg 2012-08-22 11:56:38 -04:00
probes Bug 774032 bonus - Use @DEPTH@ and @relativesrcdir@ in Makefile.in. r=ted 2012-08-04 20:26:44 +02:00
profile Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg 2012-08-22 11:56:38 -04:00
python Bug 579517 - Part 4: Manually rewrite some parts of the code base not covered by the automated conversion; r=bsmedberg 2012-08-22 11:59:54 -04:00
rdf Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg 2012-08-22 11:56:38 -04:00
security Bug 625199 - s/JSAutoEnterCompartment/JSAutoCompartment/ and make it infallible (r=bholley) 2012-08-21 18:42:53 -07:00
services merge m-c to fx-team 2012-08-16 11:10:41 -07:00
startupcache Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg 2012-08-22 11:56:38 -04:00
storage Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg 2012-08-22 11:56:38 -04:00
testing Bug 785273 - Prevent circular references to Marionette instances, r=mdas 2012-08-23 17:31:42 -07:00
toolkit Revert bug 776208 for semi-consistent failures: 2012-08-24 13:08:15 -04:00
tools Bug 625199 - s/JSAutoEnterCompartment/JSAutoCompartment/ and make it infallible (r=bholley) 2012-08-21 18:42:53 -07:00
uriloader Bug 784726 - 'Remove old IPC::URI'. r=cjones+khuey. 2012-08-23 12:33:46 -07:00
view Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg 2012-08-22 11:56:38 -04:00
webapprt Bug 780530 - Notification after webapp uninstallation. r=mhommey 2012-08-18 08:25:48 -04:00
widget Bug 783899, notify the view for resize events before the webshellwindow, fixing thunderbird window size when maximized, r=jmathies 2012-08-24 08:42:15 -04:00
xpcom Bug 750570, part 4 - Switch most native CC classes to use the purple buffer. r=smaug 2012-08-24 09:50:06 -07:00
xpfe Back out 670c8a2695b3 (bug 771354), 134557d57e6e 4ad52e488977 (bug 774607), and... 2012-08-23 21:34:27 -07:00
xulrunner Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg 2012-08-22 11:56:38 -04:00
.gdbinit Bug 184013 - Add a .gdbinit containing useful debugging macros to the tree so that it is found automagically; r=jimb 2012-05-03 20:06:14 -04:00
.gitignore Bug 760094 - Ignore egg-info directories in source tree. r=ted 2012-05-31 12:24:17 -04:00
.hgignore Bug 760094 - Ignore egg-info directories in source tree. r=ted 2012-05-31 12:24:17 -04:00
.hgtags Added tag FIREFOX_AURORA_16_BASE for changeset 6fdf9985acfe 2012-07-16 10:17:04 -07:00
aclocal.m4 Bug 778740 - Allow to use Linux kernel headers for perf events. r=khuey 2012-08-04 08:55:00 +02:00
allmakefiles.sh Bug 774032 part 7 - Remove make-makefile and acoutput-fast.pl. r=ted 2012-08-04 08:47:28 +02:00
client.mk Bug 781431 - A few minor build system improvements. r=ted 2012-08-15 22:06:43 +05:30
client.py Bug 782784 - client.py update_nss and update_nspr should toggle the trailing whitespace line, r=glandium 2012-08-16 08:28:57 +02:00
configure.in Bug 774062 - Make configure error out if the DirectX SDK redistributables cannot be found; r=ted 2012-08-22 15:11:21 +01:00
LEGAL
LICENSE
Makefile.in Bug 740194 - [Skia] Implement a version of SkMemory for Mozilla that uses the infallible mozalloc allocators r=cjones 2012-08-15 23:51:34 -04:00
mozilla-config.h.in Bug 774032 part 6 - Replace autoconf handling of config files and headers with our own. r=ted 2012-08-04 08:47:28 +02:00
README.txt added nightly.mozilla.org mention to README.txt, pushing to a CLOSED TREE, a=davidb 2011-03-30 08:23:52 -03:00

An explanation of the Mozilla Source Code Directory Structure and links to
project pages with documentation can be found at:

    https://developer.mozilla.org/en/Mozilla_Source_Code_Directory_Structure

For information on how to build Mozilla from the source code, see:

    http://developer.mozilla.org/en/docs/Build_Documentation

To have your bug fix / feature added to Mozilla, you should create a patch and
submit it to Bugzilla (https://bugzilla.mozilla.org). Instructions are at:

    http://developer.mozilla.org/en/docs/Creating_a_patch
    http://developer.mozilla.org/en/docs/Getting_your_patch_in_the_tree

If you have a question about developing Mozilla, and can't find the solution
on http://developer.mozilla.org, you can try asking your question in a
mozilla.* Usenet group, or on IRC at irc.mozilla.org. [The Mozilla news groups
are accessible on Google Groups, or news.mozilla.org with a NNTP reader.]

You can download nightly development builds from the Mozilla FTP server.
Keep in mind that nightly builds, which are used by Mozilla developers for
testing, may be buggy. Firefox nightlies, for example, can be found at:

    ftp://ftp.mozilla.org/pub/firefox/nightly/latest-trunk/
            - or -
    http://nightly.mozilla.org/