Commit Graph

4883 Commits

Author SHA1 Message Date
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
Benjamin Smedberg
d8f80b82e5 Revert bug 776208 for semi-consistent failures:
TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/browser/base/content/test/browser_pluginplaypreview.js | Test 1a, the overlay about: content is expected
TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/browser/base/content/test/browser_pluginplaypreview.js | an unexpected uncaught JS exception reported through window.onerror - TypeError: Components.classes is undefined at jar:file:///c:/talos-slave/test/build/firefox/omni.ja!/chrome/toolkit/content/global/about.xhtml:38
TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/browser/base/content/test/browser_pluginplaypreview.js | an unexpected uncaught JS exception reported through window.onerror - TypeError: Components.classes is undefined at jar:file:///c:/talos-slave/test/build/firefox/omni.ja!/chrome/toolkit/content/global/about.xhtml:38
TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/browser/base/content/test/browser_pluginplaypreview.js | Found an unexpected tab at the end of test run: jar:file:///c:/talos-slave/test/build/firefox/omni.ja!/chrome/toolkit/content/global/about.xhtml
TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/browser/base/content/test/browser_pluginplaypreview.js | Found an unexpected tab at the end of test run: chrome://mochitests/content/browser/browser/base/content/test/plugin_test.html

--HG--
extra : rebase_source : e000988677d466b4796c5b2a51968f586743e6db
2012-08-24 13:08:15 -04:00
Andrew McCreight
7f27900535 Bug 782735 - turn nsNodeInfoManager into a non-leaking native CC class. r=smaug 2012-08-24 09:50:06 -07:00
Yury
9044c64c6a Bug 776208 - Plugin preview overlay. r=johns,jaws,margaret sr=joshmoz
--HG--
extra : rebase_source : f9b13bbda1318dbdaa71b04b3e04736655e65081
2012-08-23 17:11:51 -04:00
Matt Brubeck
424ea88da6 Back out 670c8a2695b3 (bug 771354), 134557d57e6e 4ad52e488977 (bug 774607), and...
036eb8c2a08a d4d36e3b948f 35334e820632 6bd07fd5147d d49e7c0d762c 407f19deb14c d84551808abb (bug 774633)
on a CLOSED TREE
2012-08-23 21:34:27 -07:00
Luke Wagner
ce71e55555 Bug 625199 - s/JSAutoEnterCompartment/JSAutoCompartment/ and make it infallible (r=bholley)
--HG--
extra : rebase_source : 12acf2288285f5caefd7fecea8207de3a47eab5b
2012-08-21 18:42:53 -07:00
Luke Wagner
48412c861d Bug 625199 - kill dummy frames (r=mrbkap)
--HG--
extra : rebase_source : df4e3bddabf20cdc5b9122370fa62b40e64177c7
2012-08-17 18:05:06 -07:00
Bobby Holley
63dfef11f8 Bug 774607 - Remove use of JS_{Is,Make}SystemObject from Gecko. r=bz
We currently set this for system globals and anything whose parent
chain leads to a system global. Maybe this was relevant before, but
with CPG this is just equivalent to asking whether the object is in
a system compartment. And the only place where we _check_ this bit
is immediately after checking for a system compartment, in
WrapperFactory. So AFAICT this can go away entirely.
2012-08-23 16:44:53 -07:00
Daniel Holbert
f4e969d582 Bug 785191: Push a null JSContext when binding / unbinding image elements in a document. r=bz 2012-08-23 16:24:58 -07:00
Ben Turner
2e0265c8ef Bug 784726 - 'Remove old IPC::URI'. r=cjones+khuey.
--HG--
rename : ipc/glue/IPCSerializableParams.ipdlh => ipc/glue/InputStreamParams.ipdlh
extra : transplant_source : %A6%BC%8B%8D%3A_%7Df%2B%FE%AA%94%81%AB%CAW%15K%A7%03
2012-08-23 12:33:46 -07:00
Bobby Holley
d806bf9ec7 Bug 784560 - Fix more tests. r=mccr8 2012-08-23 11:45:28 -07:00
Chris Double
f02292c9f4 Backout bug 730765 Part 3/3
--HG--
extra : rebase_source : 2aadbb2419cceeac30bd95484e37ab905525662f
2012-08-24 00:12:53 +12:00
Chris Double
af6a76cff2 Backed out changeset 5583ccdfea18 2012-08-23 22:42:14 +12:00
Paul Adenot
1fb050e013 Bug 730765 - Media cache shouldn't be used when loading from blob: urls. r=biesi 2012-08-21 16:00:23 -07:00
Ryan VanderMeulen
15bd519dbe Backout 3ce94808577b, 56f288230d5a, and 18ff170ecb1f (bug 730765) for bustage. r=fail 2012-08-21 18:45:54 -04:00
Paul Adenot
e7f75f1f49 Bug 730765 - Media cache shouldn't be used when loading from blob: urls. r=biesi 2012-08-15 10:36:12 -07:00
David Keeler
486518fb5c Bug 767636 - expose plugin fallback type to extensions. r=jaws 2012-08-21 12:40:07 -07:00
Bobby Holley
826e13d885 Bug 784233 - Relax __exposedProps__ check for sandboxes until we can repack AMO addons. r=gal 2012-08-21 10:27:08 -07:00
Bobby Holley
7e122c271a Backed out changeset 61e9eaf9aae2
--HG--
extra : rebase_source : 30fb2e7a057482412d29a96f8b8e98135beb6a79
2012-08-20 21:07:07 -07:00
Bobby Holley
db7c7123df Bug 784233 - Relax __exposedProps__ check for sandboxes until we can repack AMO addons. r=gal 2012-08-20 21:03:44 -07:00
L. David Baron
b7240dcf1a Only do hyphenation when the language was specified explicitly, rather than using an encoding-inferred language. (Bug 702121, patch 2) r=jfkthame 2012-08-20 19:23:32 -07:00
Peter Van der Beken
854457d901 Fix for bug 768692 (Move DOM list binding generation to the new DOM binding codegen). r=bzbarsky.
--HG--
extra : rebase_source : 651a0fac4c9a87ef1c0a9cd91588c6421fd050c4
2012-05-22 15:46:20 +02:00
Justin Lebar
44c2b316f2 Bug 784436 - Part 2: Use new infallible nsIDocShell methods. r=bz 2012-08-22 18:27:04 -07:00
Ian Melven
d09de1cd52 Bug 341604 - modify CheckMayLoad to allow sandboxed workers to load blob and data URIs r=jst 2012-08-20 11:34:33 -07:00
Ian Melven
915cb4516e Bug 341604 - Implement HTML5 sandbox attribute for IFRAMEs r=smaug r=jst 2012-08-20 11:34:32 -07:00
Nicolas Silva
54dd2bf57f Bug 782372 - Splits ImageLayers.h into ImageLayers.h ImageContainer.h and ImageTypes.h, r=bgirard 2012-08-19 15:33:25 -04:00
Ed Morley
b6d4311a94 Backout 2b5b8baa5816 (bug 767636) for causing bug 783836 2012-08-19 02:08:13 +01:00
Chris Jones
630e2d21db Bug 783736: Load in-gecko controls for media-plugin types. r=roc 2012-08-18 14:48:25 -07:00
Bobby Holley
2fd623ff39 Bug 553102 - Make content-> access default to deny if __exposedProps__ is not defined. r=mrbkap 2012-08-17 23:14:55 -07:00
Gregor Wagner
3c9e4e0a45 Bug 781331 - Hook up systemXHR to permissions manager. r=sicking 2012-08-17 17:42:00 -07:00
Sid Stamm
7ab0ecade7 Bug 783497 - Fix CSPSource expression intersection to resolve "self" data. (r=jst) 2012-08-17 15:03:24 -07:00
John Schoenick
a70ab36c9b Bug 781126 - Part 2 - nsObjectLoadingContent should call shouldLoad and shouldProcess sanely. r=jst 2012-08-17 14:45:04 -07:00
David Keeler
3e8296712e Bug 767636 - Expose plugin fallback type to extensions. r=josh 2012-08-17 14:24:00 -07:00
John Schoenick
da0857020f Bug 783351 - Remove unused variable. r=josh 2012-08-17 14:24:00 -07:00
John Schoenick
38f4839fbf Bug 782707 - Move waiting-on-channel bailout to after we potentially close it in nsObjectLoadingContent. r=josh 2012-08-17 14:24:00 -07:00
John Schoenick
e23f728e85 Bug 782703 - Ensure object tags get reloaded when unbound/rebound to the tree. r=josh 2012-08-17 14:24:00 -07:00
John Schoenick
1611111079 Bug 767639 - nsObjectLoadingContent - Remove activeX stubs and simpify classid/java handling. r=josh 2012-08-17 14:23:59 -07:00
Justin Lebar
3b4e0b1899 Bug 776129 - Part 1: When an <iframe mozbrowser> calls window.open, the resulting frame must be OOP iff the opener frame is OOP. r=smaug
--HG--
extra : rebase_source : 14db2573db5e9d8ffb72798f3d856f98e49f8a83
2012-08-17 17:07:54 -04:00
Ed Morley
7435db4163 Backout 506268f7735e & ea163112807d (bug 746142) for Android build failures 2012-08-17 12:30:02 +01:00
Zoe Bellot
92b9e29b2d Bug 746142 - Part 1 - Add inputmode attribute to HTMLInputElement. r=mounir sr=smaug 2012-08-17 11:53:44 +02:00
Chris Pearce
23bfa1c21b Bug 775965 - Ensure presentation persists across nsSubDocumentFrame reframes. r=roc 2012-08-14 16:06:44 +12:00
Chris Pearce
254af92bf4 Bug 781384 - Allow web apps to exit fullscreen outside of user generated event handlers. r=jlebar 2012-08-17 12:47:48 +12:00
Chris Pearce
92fe46975e Bug 782852 - Assume fullscreen/pointer lock is approved hwhen full-screen-api.approval-required pref is false. r=smaug 2012-08-17 12:47:37 +12:00
Marshall Moutenot
bc7078aad0 Bug 737064 - sync CSP source-expression parsing with w3c spec (r=geekboy)
--HG--
extra : rebase_source : 895ec1b90e688f14e5c19af1411c4b2631cbc818
2012-08-16 11:02:17 -07:00
Andrew McCreight
b9e8900f73 Bug 782677 - Misc. fixes for CHECK_VALID_NODEINFO, and demacro it. r=smaug 2012-08-16 08:07:55 -07:00
Ben Turner
81d9415df5 Bug 781256 - 'Share FileDescriptors across processes in preparation for OS-level sandbox'. r=khuey+cjones.
--HG--
rename : netwerk/base/public/nsIIPCSerializable.idl => netwerk/base/public/nsIIPCSerializableObsolete.idl
extra : transplant_source : %EB%18%9D%E6%B1%C6%26%A2%16%F3%85g%1A%25%B1%8E%A1%E72e
2012-08-16 00:02:32 -04:00
John Schoenick
d52dac5d07 Bug 781265 - Remove old logic that double-creates frameloaders in nsObjectLoadingContent. r=josh 2012-08-15 11:26:36 -07:00
John Schoenick
adeb369622 Bug 782707 - Avoid an assertion in nsObjectLoadingContent. r=josh 2012-08-15 11:26:35 -07:00
John Schoenick
59273e427e Bug 781394 - Don't fire plugin errors for plugins that never got to a determined type. r=josh 2012-08-15 11:26:35 -07:00
Ed Morley
57fe127515 Merge mozilla-central to mozilla-inbound 2012-08-15 19:00:48 +01:00