gecko/layout
Kyle Huey a2581f4219 Bug 816498: Fix some things about background attribute handling that are still broken. r=bz
As filed the bug is about table backgrounds failing to print.  The root cause of this is that we load images from the original document, because print/print-preview documents (which are static clones of the original) cannot do loads.  This results in an entry in the css::ImageValue's request table under the original document, but entry under the printing document.  Then we do layout, try to get the request, and fail, and nothing is displayed.  The solution to this is to force us to clone the request for the printing document if we're loading off the original document.  I manually verified that this does not regress Bug 560235.

While writing a test for this, we discovered another problem.  The reftest print code does not actually use the printing codepath.  Instead it takes an existing document, tears down its presshell, and creates a new presshell for printing.  Fixing the above bug did not make the reftest print test pass because ImageLoader does not deal properly with presshell destruction/recreation.  It assumes that when the presshell is destroyed all of the css::ImageValues can be cleared of their entries for that document.  This fails for ImageValues for mapped attributes because they are held alive by the content tree.  When a new presshell for this document is then created there is no entry for the document and thus no image request to paint.  The fix for this is to only clear the frame to request and request to frame mapping hashtables and not to clear the document's entry on the ImageValue when the presshell is destroyed.  The destruction of the ImageLoader (which is held from a strong reference on the document) is when those entries are removed.  The final change is to change css::ImageValue's hashtable from holding a strong reference to the keys (which are documents) to holding raw pointer references.  This is safe because we clear the relevant entry when the corresponding ImageLoader dies, and is needed to prevent a reference cycle that was being broken by presshell destruction.

--HG--
rename : layout/reftests/backgrounds/table-background-ref.html => layout/reftests/backgrounds/table-background-print-ref.html
rename : layout/reftests/backgrounds/table-background.html => layout/reftests/backgrounds/table-background-print.html
2013-02-23 06:59:43 -08:00
..
analysis
base Bug 816498: Fix some things about background attribute handling that are still broken. r=bz 2013-02-23 06:59:43 -08:00
build Fix for bug 825628 (Implement NamedConstructor) - use NamedConstructor for Image() and Option(). r=bz. 2013-01-22 11:53:13 +01:00
doc Bug 781360 patch 3: Rename {nsIFrame,nsStyleContext,nsComputedDOMStyle}::GetStyle* to Style*, since they can never return null. r=dholbert 2013-02-16 13:51:02 -08:00
forms Bug 378369 - Crash test. 2013-02-23 11:38:13 +01:00
generic Bug 843322 - Make CSS 'text-overflow' apply to ::-moz-placeholder. r=roc 2013-02-23 11:38:15 +01:00
inspector Bug 833169 - add font family name to font entries and use in user font cache key. r=jkew 2013-02-18 11:22:55 +09:00
ipc Bug 840902. Part 2: Remove nsresults from various display list methods. r=mattwoodrow 2013-02-15 00:12:27 +13:00
mathml Bug 400157 - Crash test. 2013-02-23 11:38:14 +01:00
media bug 844133 - eliminate the MOZ_GRAPHITE configure option. r=ted 2013-02-22 16:52:20 +00:00
printing Backed out 6 changesets (bug 832920, bug 825341, bug 838582, bug 842726, bug 629801, bug 842561) for Linux32 debug mochitest-2 and Windows/OSX mochitest-browser-chrome failures on a CLOSED TREE. 2013-02-22 15:30:06 -05:00
reftests Bug 816498: Fix some things about background attribute handling that are still broken. r=bz 2013-02-23 06:59:43 -08:00
style Bug 816498: Fix some things about background attribute handling that are still broken. r=bz 2013-02-23 06:59:43 -08:00
svg bug 842514 - consistently use signed types for appUnitsPerDevPixel variables. r=roc 2013-02-19 21:46:27 +00:00
tables Bug 781360 patch 3: Rename {nsIFrame,nsStyleContext,nsComputedDOMStyle}::GetStyle* to Style*, since they can never return null. r=dholbert 2013-02-16 13:51:02 -08:00
tools Bug 842683: Add #ifdef guard around mac-specific chunk of reftest.js. r=dbaron 2013-02-22 22:32:30 -08:00
xul Bug 433429 - Crash test. 2013-02-23 11:38:15 +01:00
Makefile.in Bug 833879 - Move layout/xul/base/src/tree/ to layout/xul/tree, layout/xul/base/src/grid to layout/xul/grid. r=roc 2013-02-04 07:11:49 -05:00