Граф коммитов

37 Коммитов

Автор SHA1 Сообщение Дата
Sid Stamm 55e3ccdad7 Bug 704320 - apply referrer policies to image loads (r=seth) 2014-11-18 08:46:53 -05:00
Seth Fowler a886c715d8 Bug 1098202 (Part 1) - Rename imgINotificationObserver handlers to be consistent with the notifications they handle. r=tn
--HG--
extra : rebase_source : 991d277afba4826ed403b74bbcbb9408b3dac0cc
2014-11-17 14:29:56 -08:00
Seth Fowler f4a8da7b65 Bug 1098652 - ImageLoader::OnStopFrame should be called when we get FRAME_COMPLETE, not LOAD_COMPLETE. r=tn
--HG--
extra : rebase_source : 5ab4ec002657890d615cbd6aa23da98ce8ade1d1
2014-11-17 14:29:56 -08:00
Seth Fowler 819193bb68 Bug 969406 - Make ImageLoader force painting on FRAME_COMPLETE but not FRAME_CHANGED. r=mattwoodrow 2014-11-07 15:40:12 -08:00
Timothy Nikkel 295021d470 Bug 1033679. When we clear frames from the image loader make sure that we also remove the images from the refresh driver. r=khuey
Normally a frame being destroyed would do this via PresShell::NotifyDestroyingFrame -> ImageLoader::DropRequestsForFrame but when we are tearing down the whole frame tree we skip per frame notifications like that for perf reasons. So we now make sure to do it when clearing out frames wholesale.

We also need to pass a prescontext pointer to ClearFrames because the ImageLoader only has a document pointer, and by that point in the presshell destruction sequence the presshell pointer on the document has been cleared.
2014-09-04 23:27:16 -05:00
Adrian Lungu 864ffca9e7 Bug 822480 - Add in the Resource Timing API. r=honzab, r=jst 2013-10-15 18:35:44 -07:00
Sotaro Ikeda 4e32dd880b Bug 957391 - Call nsIFrame::SchedulePaint() in ImageLoader::DoRedraw(). r=mattwoodrow 2014-02-10 09:34:11 -05:00
Ehsan Akhgari 77b5078c36 Bug 921753 - Part 1: Avoid #including nsStyleStructInlines.h in nsIFrame.h; r=roc
This patch reduces the number of files that transitively #include
gfx/2d.h from 1782 to 1582.
2013-10-01 17:00:38 -04:00
Robert O'Callahan 03e7828db2 Bug 910989. Remove nsTHashtable::Init, fallible allocation, and MT hashtables. r=ehsan,bsmedberg
--HG--
extra : rebase_source : 0787130b1814c74bfb38dc178de94022f0b2e64e
2013-09-02 20:41:57 +12:00
Robert O'Callahan 2bed019e71 Bug 909157. Invalidate rendering observers when an image changes. r=mattwoodrow
--HG--
extra : rebase_source : 04b127fde9a9e07e50c6196f53a1eea3c8f04db6
2013-09-04 23:13:11 +12:00
Matt Woodrow fbfd2fa87a Bug 844750 - Don't use per-display-item invalidation for table frames. r=roc 2013-03-08 15:18:45 +13:00
Kyle Huey 0660c18b2f 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
L. David Baron c5b9eee040 Bug 781360 patch 3: Rename {nsIFrame,nsStyleContext,nsComputedDOMStyle}::GetStyle* to Style*, since they can never return null. r=dholbert
Except for the changes in:
  layout/generic/nsIFrame.h (part)
  layout/style/nsComputedDOMStyle.h (all)
  layout/style/nsRuleNode.cpp (part)
  layout/style/nsStyleContext.cpp (part)
  layout/style/nsStyleContext.h (part)
(see patch 3b in the bug), this patch was written with the sed script:
s/\<GetStyle\(Font\|Color\|List\|Text\|Visibility\|Quotes\|UserInterface\|TableBorder\|SVG\|Background\|Position\|TextReset\|Display\|Content\|UIReset\|Table\|Margin\|Padding\|Border\|Outline\|XUL\|SVGReset\|Column\)\>/Style\1/g
2013-02-16 13:51:02 -08:00
Boris Zbarsky e4fca1d362 Bug 618479 part 1. Clean up the nsTArray binary-insert code a little bit. r=jlebar,kinetik 2013-02-13 10:11:53 -05:00
Jeff Muizelaar 47c921e73e Bug 801061. Switch from imgIRequest to imgRequestProxy. r=joe
This doesn't switch all of the users yet, but is a step in the right
direction.

--HG--
extra : rebase_source : 91b4fef3f67586179c119208d000cf7629e04963
2012-10-12 08:43:01 -04:00
Matt Woodrow 716946b5d9 Backout changeset e8f5182d94c5 (Bug 805343) for regressing android talos tests 2012-12-14 11:50:57 +13:00
Robert O'Callahan f3332e603a Bug 805343. Identify DisplayItemDatas that are completely hidden by other opaque content in their ThebesLayer, and ignore them when we check to see whether there's an image we might need to invalidate. r=mattwoodrow
--HG--
extra : rebase_source : 7e68dc33324d8ff26286723bdbaaea18060354ac
2012-12-10 18:47:33 +13:00
Matt Woodrow ced424bb37 Bug 798964 - Don't invalidate nsDisplayBackgroundColor if only the image changed. r=roc 2012-11-07 11:04:53 +13:00
Josh Matthews c8eb573b6f Bug 505385 - Part 18: Reduce number of notifications - START_REQUEST/START_CONTAINER -> SIZE_AVAILABLE, remove START_DECODE and START_FRAME. Rename remaining ones for clarity. r=joe 2012-10-12 12:11:23 -04:00
Josh Matthews b84562cef3 Bug 505385 - Part 11: Create a new imgINotificationObserver interface to replace all uses of imgIContainerObserver and imgIDecoderObserver outside of image/. r=joe 2012-10-12 12:11:22 -04:00
Josh Matthews 138935b14a Back out bug 585385 for build bustage. 2012-10-11 21:58:24 -04:00
Josh Matthews fcd1ce5c84 Bug 505385 - Part 18: Reduce number of notifications - START_REQUEST/START_CONTAINER -> SIZE_AVAILABLE, remove START_DECODE and START_FRAME. Rename remaining ones for clarity. r=joe 2012-10-11 21:34:24 -04:00
Josh Matthews abbb0715c2 Bug 505385 - Part 11: Create a new imgINotificationObserver interface to replace all uses of imgIContainerObserver and imgIDecoderObserver outside of image/. r=joe 2012-10-11 21:34:23 -04:00
Matt Woodrow cee1aa3599 Bug 539356 - Part 9c - Remove old invalidation code. r=bz 2012-08-29 17:39:31 +12:00
Ed Morley aba3a8f5ef Revert mozilla-inbound to e4dd1fa6d222 for crashes and test failures on a CLOSED TREE 2012-09-27 16:34:46 +01:00
Matt Woodrow 4d096475d2 Bug 539356 - Part 9 - Implement DLBI. r=roc,bz,jwatt 2012-08-29 17:38:58 +12:00
Kyle Huey 8443a7a8f1 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
Ehsan Akhgari e368dc9c85 Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg
This patch was generated by a script.  Here's the source of the script for
future reference:

function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
       ! -wholename "*security/nss*" \
       ! -wholename "*/.hg*" \
       ! -wholename "obj-ff-dbg*" \
       ! -name nsXPCOMCID.h \
       ! -name prtypes.h \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert PRInt8 int8_t
convert PRUint8 uint8_t
convert PRInt16 int16_t
convert PRUint16 uint16_t
convert PRInt32 int32_t
convert PRUint32 uint32_t
convert PRInt64 int64_t
convert PRUint64 uint64_t

convert PRIntn int
convert PRUintn unsigned

convert PRSize size_t

convert PROffset32 int32_t
convert PROffset64 int64_t

convert PRPtrdiff ptrdiff_t

convert PRFloat64 double
2012-08-22 11:56:38 -04:00
Olli Pettay 29137b6a72 Bug 783015 - Chrome refreshdriver runs all the time, r=khuey 2012-08-21 16:14:06 -07:00
Kyle Huey 342d6878b6 Bug 783379: Remove unnecessary (wrong) optimization of image decoding notifications. r=roc
--HG--
extra : rebase_source : d485d0f5bbe35dc969712ca50654c8671b033c80
2012-08-20 17:14:04 -07:00
Kyle Huey 2fa3cc6685 Bug 780618: Follow up to switch to nsError.h in merged patches. r=me 2012-08-15 06:52:06 -07:00
Kyle Huey 06324078f4 No bug: Eradicate some nsnulls. 2012-08-14 13:34:20 -07:00
Kyle Huey 20fdae0e99 Bug 697230: Part 3 - Make style images block onload. r=bz 2012-08-13 16:04:17 -07:00
Kyle Huey 2e07e6f8c2 Bug 697230: Part 1 - Centralize style image observers. r=bz 2012-08-13 15:04:19 -07:00
Kyle Huey 5e3fddb58d Back out Bug 679230 due to Android reftest failures. 2012-04-07 10:36:49 -07:00
Kyle Huey 2732cf7774 Bug 697230: Part 3 - Make style images block onload. r=bz 2012-04-07 09:00:27 -07:00
Kyle Huey dd495263dd Bug 697230: Part 1 - Centralize style image observers. r=bz 2012-04-07 08:58:41 -07:00