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

79 Коммитов

Автор SHA1 Сообщение Дата
Sylvestre Ledru 0b4021fcad Bug 1521460 - Also reformat objective-c files r=mstange,ehsan,spohl
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D17139

--HG--
extra : histedit_source : 084f340503d2e1a2d9e1753c38b2c4ee9c7819f3
2019-01-21 18:18:16 +01:00
Emilio Cobos Álvarez d2ed260822 Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug
Summary: Really sorry for the size of the patch. It's mostly automatic
s/nsIDocument/Document/ but I had to fix up in a bunch of places manually to
add the right namespacing and such.

Overall it's not a very interesting patch I think.

nsDocument.cpp turns into Document.cpp, nsIDocument.h into Document.h and
nsIDocumentInlines.h into DocumentInlines.h.

I also changed a bunch of nsCOMPtr usage to RefPtr, but not all of it.

While fixing up some of the bits I also removed some unneeded OwnerDoc() null
checks and such, but I didn't do anything riskier than that.
2019-01-03 17:48:33 +01:00
Jonathan Watt 906aa3faf2 Bug 1510247. Fix some unified build issues in widget code. r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D13061

--HG--
extra : rebase_source : 919f43d45fc9bc4fe8502b0acf3d01ed067cdd49
2018-11-14 17:03:36 +00:00
Timothy Nikkel 1438d13673 Bug 1490938. Pass the high quality scaling flag when we request decode of images in most cases. r=aosmond
If we do not pass the high quality scaling flag than the resulting surface will be marked as cannot substitute, which is not accurate, so we don't want.

The only place that actually tries to be smart about the size is nsImageFrame::MaybeDecodeForPredictedSize. All other cases just ask for the intrinsic size.

The two most likely cases are that there are no decoded copies of the image, or there is one decoded (or in progress) copy of the image.

In the first case we will request decode at the instrinsic size, and then if we draw at a different size that draw will request the proper size. This doesn't change with this patch.

In the second case there is a decoded copy already available, this is likely from a draw call on the image, and that is the surface size that we want. So we save a decode. If we are actually drawing the image at two different sizes the second size will be slightly delayed, but we have the wrongly sized copy of the image that we can draw until then. This seems like a good tradeoff to avoid always decoding an instrinic size copy of images.
2018-09-27 18:30:17 -05:00
Boris Zbarsky 4783772a18 Bug 1455674 part 17. Remove use of nsIDOMElement in non-dom non-JS code. r=qdot 2018-04-26 23:37:34 -04:00
Markus Stange d649a6d091 Bug 1403989 - Automatically treat black menu icons as templates, so that they get drawn inverted in hovered menuitems. r=jrmuizel,spohl
MozReview-Commit-ID: Bn69Ij0BfRa

--HG--
extra : rebase_source : 9d2d7d0797d89d0b7cf6685d29e458795f518e9d
extra : source : 7b389e4f44679c086a4a510da264f2f0531267ec
2018-04-16 15:23:23 -04:00
Emilio Cobos Álvarez e341b20ec4 Bug 1447483: Merge nsStyleContext and ServoStyleContext, rename to ComputedStyle. r=jwatt on a CLOSED TREE
MozReview-Commit-ID: JPopq0LudD
2018-03-22 20:06:24 +01:00
Emilio Cobos Álvarez 5dd797f154 Back out changeset b683bb3f22a1 (Bug 1447483) for not landing with all the files. r=me on a CLOSED TREE
This reverts commit 1808914126bb9f9e4a82d2c3d7ac961885fe7d62.

MozReview-Commit-ID: 5skESBseEvo
2018-03-22 20:05:22 +01:00
Emilio Cobos Álvarez ca5ac79cca Bug 1447483: Merge nsStyleContext and ServoStyleContext, rename to ComputedStyle. r=jwatt
MozReview-Commit-ID: JPopq0LudD
2018-03-22 19:48:42 +01:00
Emilio Cobos Álvarez 3eb90874c6 Bug 1432490: followup: Fix mac-only bustage on a CLOSED TREE. r=me
MozReview-Commit-ID: TNquyPQhkL
2018-02-25 02:44:18 +01:00
Cameron McCormack 4c3b9a279c Bug 1427512 - Followup fix for macOS test failure. 2018-01-12 13:39:49 +08:00
Cameron McCormack 0ec0b4a768 Bug 1427512 - Part 24: Stop using XPCOM interfaces to access CSS property values in nsMenuItemIconX. r=mstange
MozReview-Commit-ID: HWsKlAQraO5
2018-01-11 16:17:57 +08:00
Emilio Cobos Álvarez c8eb630ebe Bug 1423990: Move the last few attribute-related methods outside of nsIContent. r=bz
MozReview-Commit-ID: 8JZuS6O8f8W
2017-12-25 17:50:10 +01:00
Emilio Cobos Álvarez ffdf5d2cb5 Backout changeset e43f568b3e9a (bug 1423990) because some OSX-only code still doesn't build. r=me 2017-12-25 12:55:45 +01:00
Emilio Cobos Álvarez c0959b2955 Bug 1423990: Move the last few attribute-related methods outside of nsIContent. r=bz
MozReview-Commit-ID: 8JZuS6O8f8W

--HG--
extra : rebase_source : 09b82acb4f3d69e8a4345457ab217443bc28d6e2
2017-12-07 19:13:50 +01:00
Yoshi Huang 26c9043304 Bug 1407498 - Don't query loadingprincipal in common case. r=baku
We queried 'loadingprincipal' attribute on the common call path, however
this should be queried if it's loaded by System Principal.

Also rename loadingprincipal to triggeringprincipal
2017-10-24 10:13:31 +08:00
Kershaw Chang 53cf0a2a8e Bug 1247843 - Part 3: Set request context ID to the http channel created in imgLoader::LoadImage. r=baku
In order to let necko postpone the load of favicon, we have to set request context ID to the http channel that is created to load favicon.
This patch starts with passing a request context ID to nsContentUtils::LoadImage and makes other necessary changes to set the request context ID to the channel.
2017-09-20 20:09:00 -04:00
Tom Tung 0e308b0c4f Bug 1348050 - Part 3: Mark channel as urgent-start for loading image. r=baku,mayhemer
This part is mainly to mark the channel as urgent-start if src related
attributes in HTMLImageElement and HTMLInputElement is set and the channel is
open due to user interaction. Unfortunately, we cannot just check the event
state just after creating channel since some loading image tasks will be queue
and execute in stable state. Thus, I store the event state in elements and
pass it to the place where create the channel.

MozReview-Commit-ID: GBdAkPfVzsn

--HG--
extra : rebase_source : 715352317b4b600f8a7f78b7bc22b894bb272d27
2017-04-25 09:17:38 +08:00
Xidorn Quan fa9c49fce4 Bug 1330235 - Remove NS_STDCALL_FUNCPROTO and replace its usage with decltype. r=froydnj
MozReview-Commit-ID: 5jrTqTfDzSk

--HG--
extra : rebase_source : e2345a4f518757ed9760618d07599a60353875cc
2017-05-09 23:00:37 +10:00
Ehsan Akhgari b3e5ce4a2d Bug 1319908 - Load the menu icons for the bookmarks menu with the correct content type and principal on OSX; r=baku
This patch makes nsMenuItemIconX also participate in the setup
introduced in bug 1277803.
2017-01-20 10:55:23 -05:00
Thomas Nguyen 0aaea58b69 Bug 1304623 - Create a pref to control the default referrer policy - part 3. r=bkelly
MozReview-Commit-ID: 1A6IHPeNYBQ
2017-01-05 11:29:56 +08:00
Christoph Kerschbaumer 52a7f283b3 Bug 1256999 - Pass the right context to new channels for image loads. r=bz r=seth 2016-04-11 10:58:03 +02:00
Jonathan Watt e09f239495 Bug 1259224 - Silence some warnings in the mac widget code. r=mstange 2016-03-07 02:10:17 +00:00
Kyle Huey 91efc5a86c Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08:00
Kyle Huey c7d3c4e21a Bug 1216401: Eviscerate nsIDOMWindow, move still needed methods to nsPIDOMWindow. r=bz 2015-10-26 14:37:32 -07:00
Nathan Froyd 01583602a9 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi

--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 01:24:48 -04:00
Nathan Froyd 583afa0965 Bug 1207245 - part 3 - switch all uses of mozilla::RefPtr<T> to nsRefPtr<T>; r=ehsan
This commit was generated using the following script, executed at the
top level of a typical source code checkout.

 # Don't modify select files in mfbt/ because it's not worth trying to
 # tease out the dependencies currently.
 #
 # Don't modify anything in media/gmp-clearkey/0.1/ because those files
 # use their own RefPtr, defined in their own RefCounted.h.
find . -name '*.cpp' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    grep -v 'mfbt/RefPtr.h' | \
    grep -v 'mfbt/nsRefPtr.h' | \
    grep -v 'mfbt/RefCounted.h' | \
    grep -v 'media/gmp-clearkey/0.1/' | \
    xargs perl -p -i -e '
 s/mozilla::RefPtr/nsRefPtr/g; # handle declarations in headers
 s/\bRefPtr</nsRefPtr</g; # handle local variables in functions
 s#mozilla/RefPtr.h#mozilla/nsRefPtr.h#; # handle #includes
 s#mfbt/RefPtr.h#mfbt/nsRefPtr.h#;       # handle strange #includes
'

 # |using mozilla::RefPtr;| is OK; |using nsRefPtr;| is invalid syntax.
find . -name '*.cpp' -o -name '*.mm' | xargs sed -i -e '/using nsRefPtr/d'

 # RefPtr.h used |byRef| for dealing with COM-style outparams.
 # nsRefPtr.h uses |getter_AddRefs|.
 # Fixup that mismatch.
find . -name '*.cpp' -o -name '*.h'| \
    xargs perl -p -i -e 's/byRef/getter_AddRefs/g'
2015-10-18 00:40:10 -04:00
Christoph Kerschbaumer 9f1e9e2eaa Bug 1048048 - add preload content policy types for images (r=seth)
--HG--
extra : source : 88c2333ff7455b6988eb8d6ccc5e92b414a7ccf8
2015-09-20 14:55:59 -07:00
Wes Kocher cd079d2bf9 Backed out 7 changesets (bug 1048048) for android crashes in various chunks CLOSED TREE
Backed out changeset b5abe23a4ea5 (bug 1048048)
Backed out changeset 4f91b10e8be0 (bug 1048048)
Backed out changeset 450d4a13c90e (bug 1048048)
Backed out changeset 6a727c40eb68 (bug 1048048)
Backed out changeset 88c2333ff745 (bug 1048048)
Backed out changeset 740ab1ecd079 (bug 1048048)
Backed out changeset 02c6d6aef163 (bug 1048048)
2015-09-21 09:08:34 -07:00
Christoph Kerschbaumer 19dc79ddbb Bug 1048048 - add preload content policy types for images (r=seth) 2015-09-20 14:55:59 -07:00
Seth Fowler d34d823d05 Bug 1118655 - Use decode-on-draw only, and ignore RequestDecode and the like, when APZ and downscale-during-decode are enabled. r=tn 2015-01-19 15:46:55 -08:00
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
John Schoenick 4514600c1a Bug 1055750 - Part 3 - Track image vs imageset request load type through ImageLoadingContent::LoadImage r=bz,tanvi 2014-10-24 14:00:14 -07:00
Christoph Kerschbaumer 29facae35b Bug 1041180: Remove deprecated nsIChannelPolicy (r=sstamm,jduell,jst) 2014-10-15 19:11:45 -07:00
Chris Peterson d109c96516 Bug 1068417 - Fix -Wunused-const-variable warnings in widget/cocoa. r=mstange 2014-09-16 16:18:04 -07:00
Olli Pettay d72906c30d Bug 314095 - Eliminate nsIContent::GetDocument, r=jst
--HG--
extra : rebase_source : dd8f690940825b298a478b65b68a57418a9962ff
2014-08-22 23:11:27 +03:00
Markus Stange e40e32e01c Bug 899334 - Don't decrease the resolution of icons in native Mac menus. r=smichaud 2014-07-20 16:31:37 +02:00
Markus Stange 42401caa11 Bug 1037433 - Propagate menu icon updates in native Mac menus upwards. r=smichaud 2014-07-18 21:07:02 +02:00
Birunthan Mohanathas 5f1fde8824 Bug 900908 - Part 3: Change uses of numbered macros in nsIClassInfoImpl.h/nsISupportsImpl.h to the variadic variants. r=froydnj 2014-04-27 03:06:00 -04:00
Adrian Lungu 864ffca9e7 Bug 822480 - Add in the Resource Timing API. r=honzab, r=jst 2013-10-15 18:35:44 -07:00
Jonathan Watt 200e95e9eb Bug 996901 - Remove lots of gfxASurface.h and gfxImageSurface.h includes and forward declarations that are no longer needed. r=mattwoodrow 2014-04-16 01:41:40 +01:00
Jonathan Watt 6b18c742cc Bug 950372 - Convert imgIContainer::GetFrame to return a Moz2D SourceSurface instead of a Thebes gfxASurface. r=mattwoodrow 2014-04-15 19:02:23 +01:00
Jonathan Watt 4eec0bd2f7 Bug 950371 - Convert the Cocoa widget consumers of imgIContainer::GetFrame to act on a Moz2D SourceSurface instead of a Thebes gfxASurface. r=mattwoodrow,mstange. Relanding after accidental backout during m-c merge in ce1a691650ef. 2014-03-08 01:21:24 +00:00
Ed Morley 3aca0e96f2 Backed out changeset a2b62ced704d (bug 950371) 2014-03-07 17:53:05 +00:00
Jonathan Watt ce7820cf73 Bug 950371 - Convert the Cocoa widget consumers of imgIContainer::GetFrame to act on a Moz2D SourceSurface instead of a Thebes gfxASurface. r=mattwoodrow,mstange. Relanding after accidental backout during m-c merge in ce1a691650ef. 2014-02-21 19:07:42 +00:00
Reuben Morais bde629dd63 Bug 458300 - Rename nsINameSpaceManager.h to nsNameSpaceManager.h. r=jst r=hsivonen
--HG--
rename : content/base/public/nsINameSpaceManager.h => content/base/public/nsNameSpaceManager.h
2014-02-27 20:04:46 -03:00
Ryan VanderMeulen 0141bd5b93 Merge m-c to inbound. 2014-02-21 15:01:16 -05:00
Ryan VanderMeulen 18a2214a78 Backed out changeset a00bd379adb2 (bug 950371) for breaking OSX non-unified builds. 2014-02-21 14:58:34 -05:00
Jonathan Watt 26597c713b Bug 950371 - Convert the Cocoa widget consumers of imgIContainer::GetFrame to act on a Moz2D SourceSurface instead of a Thebes gfxASurface. r=mattwoodrow,mstange 2014-02-21 14:50:36 +00:00