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

57 Коммитов

Автор SHA1 Сообщение Дата
Kyle Machulis 1cc8b01353 Bug 1406224 - Remove nsIDOMHTMLImageElement; r=bz
MozReview-Commit-ID: GCATWRt6qMo

--HG--
extra : rebase_source : 29854f1374c6ad318da0b5b68be23507667c3be4
2017-10-06 13:27:23 -07:00
Kris Maglione 5fdcb5a5d2 Bug 1407056: Part 1 - Provide more consistent principal/origin URL to content policies. r=bz,ckerschb
We're currently fairly vague and inconsistent about the values we provide to
content policy implementations for requestOrigin and requestPrincipal. In some
cases they're the triggering principal, sometimes the loading principal,
sometimes the channel principal.

Our existing content policy implementations which require or expect a loading
principal currently retrieve it from the context node. Since no current
callers require the principal to be the loading principal, and some already
expect it to be the triggering principal (which there's currently no other way
to retrieve), I chose to pass the triggering principal whenever possible, but
use the loading principal to determine the origin URL.

As a follow-up, I'd like to change the nsIContentPolicy interface to
explicitly receive loading and triggering principals, or possibly just
LoadInfo instances, rather than poorly-defined request
origin/principal/context args. But since that may cause trouble for
comm-central, I'd rather not do it as part of this bug.

MozReview-Commit-ID: LqD9GxdzMte

--HG--
extra : rebase_source : 41ce439912ae7b895e0a3b0e660fa6ba571eb50f
2017-10-12 15:43:55 -07:00
Andrew McCreight 7f7f149167 Bug 1395636 - Convert code to use NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED. r=peterv
MozReview-Commit-ID: DivJPerL5SF

--HG--
extra : rebase_source : 890df75914906a5d34e8af67f9fc3a4be239d2d6
2017-08-31 16:29:22 -07:00
Sebastian Hengst 2f7f455fa1 Backed out changeset 9306866e8df0 (bug 1395636) for build bustage. r=backout on a CLOSED TREE
--HG--
extra : amend_source : 20d028d6b971cf6a221dc2f1553687d6c074bdcb
2017-09-06 19:18:06 +02:00
Andrew McCreight 4d6e76dfcf Bug 1395636 - Convert code to use NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED. r=peterv
MozReview-Commit-ID: DivJPerL5SF

--HG--
extra : rebase_source : cb952cfc5600a163a5580438e5b0177595689dab
2017-08-31 16:29:22 -07:00
Chung-Sheng Fu e5b80e9a8f Bug 863246 - Move resources that need to be exposed to web content to locations that are marked as contentaccessible r=billm
MozReview-Commit-ID: ArhSHKPYOr8

--HG--
extra : rebase_source : 888f7ce8f9db809ad5abbe6340af74e9dfb1d73b
2017-06-08 17:52:46 +08:00
Sebastian Hengst 2e163c99b1 Backed out changeset 1bfbae351dd7 (bug 863246) 2017-08-25 16:43:44 +02:00
Chung-Sheng Fu bb279d6d5e Bug 863246 - Move resources that need to be exposed to web content to locations that are marked as contentaccessible r=billm
MozReview-Commit-ID: ArhSHKPYOr8

--HG--
extra : rebase_source : b0cf8d159ba6bfa6e7bcd9528ae2f9851185ac30
2017-06-08 17:52:46 +08:00
Nicholas Nethercote 025461bde7 Bug 1390428 (part 1) - Remove many nsXPIDLCString local variables. r=erahm.
These are all easy cases where an nsXPIDLCString local variable is set via
getter_Copies() and then is only used in ways that nsCStrings can also be used
(i.e. no null checks or implicit conversions to |char*|).

In every case the patch trivially replaces the nsXPIDLCString with an
nsCString. (Also, there are a couple of unused nsXPIDLCString variables that
the patch simply removes.)
2017-08-16 13:58:35 +10:00
Nicholas Nethercote f941156987 Bug 1386600 - Change nsIStringBundle methods to return |AString| instead of |wstring|. r=emk,sr=dbaron.
This removes about 2/3 of the occurrences of nsXPIDLString in the tree. The
places where nsXPIDLStrings are null-checked are replaced with |rv| checks.

The patch also removes a couple of unused declarations from
nsIStringBundle.idl.

Note that nsStringBundle::GetStringFromNameHelper() was merged into
GetStringFromName(), because they both would have had the same signature.

--HG--
extra : rebase_source : ac40bc31c2a4997f2db0bd5069cc008757a2df6d
2017-08-04 14:40:52 +10:00
Andrew Osmond 8a1d7d4bf1 Bug 1359833 - Part 7. nsImageLoadingContent native observers should use the new API. r=tnikkel 2017-07-19 14:15:12 -04:00
Andrew McCreight bf7fff95f0 Bug 1379786, part 4 - Use GetIsSystemPrincipal() method instead of going through secman in CHECK_PRINCIPAL_AND_DATA. r=mrbkap
MozReview-Commit-ID: INBsjjxbXZz

--HG--
extra : rebase_source : fd6d491d01acc70be1bf51e25ec31bbcde81344a
2017-07-10 15:00:03 -07:00
Boris Zbarsky aad387a7cd Bug 1378147. Hold strong refs to elements when calling various functions that can run script. r=mystor 2017-07-13 23:46:59 -04:00
Boris Zbarsky 38dc3c65cd Bug 1380413 part 2. Remove nsIDOMHTMLImageElement.width/height. r=mccr8 2017-07-13 23:46:12 -04:00
Boris Zbarsky 31878bd57a Bug 1380393 part 5. Remove nsIDOMHTMLElement.offsetTop/Left. r=mccr8 2017-07-13 23:45:50 -04:00
Nicholas Nethercote c86dc10505 Bug 1380227 - Avoid many UTF16toUTF8 and UTF8toUTF16 conversions in nsStringBundle. r=emk.
Most of the names passed to nsIStringBundle::{Get,Format}StringFromUTF8Name
have one of the two following forms:

- a 16-bit C string literal, which is then converted to an 8-bit string in
  order for the lookup to occur;

- an 8-bit C string literal converted to a 16-bit string, which is then
  converted back to an 8-bit string in order for the lookup to occur.

This patch introduces and uses alternative methods that can take an 8-bit C
string literal, which requires changing some signatures in other methods and
functions. It replaces all C++ uses of the old methods.

The patch also changes the existing {Get,Format}StringFromName() methods so
they take an AUTF8String argument for the name instead of a wstring, because
that's nicer for JS code.

Even though there is a method for C++ code and a different one for JS code,
|binaryname| is used so that the existing method names can be used for the
common case in both languages.

The change reduces the number of NS_ConvertUTF8toUTF16 and
NS_ConvertUTF16toUTF8 conversions while running Speedometer v2 from ~270,000 to
~160,000. (Most of these conversions involved the string
"deprecatedReferrerDirective" in nsCSPParser.cpp.)

--HG--
extra : rebase_source : 3bee57a501035f76a81230d95186f8c3f460ff8e
2017-07-12 15:13:37 +10:00
Sylvestre Ledru 4e9cf83ee8 Bug 1378712 - Remove all trailing whitespaces r=Ehsan
MozReview-Commit-ID: Kdz2xtTF9EG

--HG--
extra : rebase_source : 7235b3802f25bab29a8c6ba40a181a722f3df0ce
2017-07-06 14:00:35 +02:00
Chung-Sheng Fu 3f9fb1de56 Bug 1369357 - Enabling privacy.resistFingerprinting implies disabling browser.zoom.siteSpecific r=arthuredelstein,dao
MozReview-Commit-ID: XmzvzyUVnu

--HG--
extra : rebase_source : f8819d740923cdc1ebec3d4d76a718abbf39548c
2017-06-19 10:33:23 +08:00
Bill McCloskey f115503a0b Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-26 14:19:58 -07:00
Carsten "Tomcat" Book 8a1350b5a6 Backed out changeset 4f6302a98ae4 (bug 1372405)
--HG--
extra : rebase_source : 41632f3158e88e692809731394a683d065a73dfb
2017-06-21 13:59:26 +02:00
Bill McCloskey 6b3e84ed5f Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-20 21:44:11 -07:00
Carsten "Tomcat" Book ea1b86680c Backed out changeset 9846de3bd954 (bug 1372405)
--HG--
extra : rebase_source : 5d4a48e8ec394c329994689d938d2a6e9b2752b0
2017-06-20 08:27:02 +02:00
Bill McCloskey 4592152411 Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-19 22:25:47 -07:00
David Major dc67bfc9a3 Bug 1344629 - Part 6: Rewrite unnecessary uses of nsLiteralString. r=dbaron
There's an antipattern where nsLiteralString is used as an unnecessary intermediary in converting from CharT* to CharT*,
e.g. CallAFunctionThatTakesACharPointer(NS_LITERAL_CSTRING("foo").get());
or
NS_NAMED_LITERAL_STRING(foo, "abc");
CallAFunctionThatTakesACharPointer(foo.get());

This patch rewrites the callsites that can be trivially changed to use char*/char16_t*.

I'd somewhat like to remove nsTLiteralString::get() altogether, but in code that's less straightforward than these examples, get() is useful enough to keep.

MozReview-Commit-ID: Kh1rUziVllo

--HG--
extra : rebase_source : c21a65694d6e1c42fd88f73632f7ac8f38d005ae
2017-03-14 15:26:27 +13:00
Iris Hsiao 5cece96e1c Backed out 12 changesets (bug 1344629) for stylo build bustage
Backed out changeset cf4273d3ac30 (bug 1344629)
Backed out changeset a96390e044e0 (bug 1344629)
Backed out changeset d9b330f9bc24 (bug 1344629)
Backed out changeset 2b460fe020af (bug 1344629)
Backed out changeset 0ada91b0452e (bug 1344629)
Backed out changeset 083304fcd6bd (bug 1344629)
Backed out changeset 53d7d1ce2c97 (bug 1344629)
Backed out changeset 55eee7078ae4 (bug 1344629)
Backed out changeset 7d3c06b3eca9 (bug 1344629)
Backed out changeset e5df14c3db61 (bug 1344629)
Backed out changeset 636095ff2815 (bug 1344629)
Backed out changeset 0be052ad24c1 (bug 1344629)
2017-03-14 11:52:24 +08:00
David Major 40f4821701 Bug 1344629 - Part 6: Rewrite unnecessary uses of nsLiteralString. r=dbaron
There's an antipattern where nsLiteralString is used as an unnecessary intermediary in converting from CharT* to CharT*,
e.g. CallAFunctionThatTakesACharPointer(NS_LITERAL_CSTRING("foo").get());
or
NS_NAMED_LITERAL_STRING(foo, "abc");
CallAFunctionThatTakesACharPointer(foo.get());

This patch rewrites the callsites that can be trivially changed to use char*/char16_t*.

I'd somewhat like to remove nsTLiteralString::get() altogether, but in code that's less straightforward than these examples, get() is useful enough to keep.

MozReview-Commit-ID: Kh1rUziVllo

--HG--
extra : rebase_source : c21a65694d6e1c42fd88f73632f7ac8f38d005ae
2017-03-14 15:26:27 +13:00
Timothy Nikkel 00df7e7328 Bug 1338913. Don't reset the zoom when viewing a multipart image standalone in an image document. r=bz
Multipart images send a size available notification for each part (even if the size is the same). We only need to make updates if the size changes.

(In the future we may not support size changing in multipart images; our current support may be very buggy and incomplete anyways.)
2017-02-13 16:46:47 -06:00
Julian Seward 6f7fcae338 Bug 1232696 - Remove NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW as it causes segfaulting for GCC 6 builds (2 of 5, fixes for dom/). r=bkelly. 2017-01-24 17:10:39 +01:00
Cameron McCormack babad063ff Bug 1328832 - Part 2: Rename mozFlushType to mozilla::FlushType and make it an enum class. r=bzbarsky
MozReview-Commit-ID: D3fIngSHSsl
2017-01-05 15:31:56 +08:00
Edgar Chen d42b608901 Bug 1311673 - Remove ImageDocument::ImageResizingEnabled. r=smaug 2016-11-03 11:34:16 +08:00
Michael Layzell c47fca1cd7 Bug 1018486 - Part 1: Changes in dom/, r=baku
MozReview-Commit-ID: 4tCUM4KRe81
2016-09-07 10:50:35 -04:00
Chris Peterson b175c9fdd5 Bug 1277106 - Part 2: Expand MOZ_UTF16() strings to u"" string literals. r=Waldo 2016-07-20 22:03:25 -07:00
Jonathan Watt b15368cfcb Bug 1279451 - Remove a lot of unnecessary includes of nsAutoPtr.h. rs=sparky 2016-06-07 21:10:18 +01:00
Kyle Huey 941ab1f522 Bug 1268313: Part 7 - Move NS_NewRunnableMethod and friends to mozilla::NewRunnableMethod. r=froydnj 2016-05-05 01:45:00 -07:00
Carsten "Tomcat" Book ba3fe0975c Backed out changeset 85ce8cb0639a (bug 1268313)
--HG--
extra : rebase_source : 56d1cf41a2dc4959b67f834e07192a5c772176a8
2016-04-29 14:21:16 +02:00
Kyle Huey 48a594a09e Bug 1268313: Part 7 - Move NS_NewRunnableMethod and friends to mozilla::NewRunnableMethod. r=froydnj 2016-04-28 14:08:25 -07:00
Timothy Nikkel 6a480df969 Bug 1251088. Update the stored mImageWidth/Height on ImageDocuments when we get the document load event. r=bz
We only update mImageWidth/Height when we get the load event for the img element. But the style sheet TopLevelImageDocument.css can be loaded after the img load event. TopLevelImageDocument.css specifies that the orientation of the image comes from the embedded exif data, thus when it is loaded the image can rotate and change size. So we need to be sure to re-get the size after all style sheets are loaded.

This means mImageWidth/Height could be wrong during loading.
2016-04-13 00:42:15 -05:00
Stephan Leroux 8ebbf59152 Bug 1252015 - Change mImageContent reference to be Element type instead of nsIContent. r=baku
MozReview-Commit-ID: 9Mwhgg5ADmY

--HG--
extra : rebase_source : 74b6fed65537455d0b752d72b05b5609a295d7c9
2016-03-03 12:55:54 -05:00
Boris Zbarsky aba42b7132 Bug 1251280. When zooming in or out on a resized full-page image, we may need to update our vertical-overflow class even if we don't change anything else. r=khuey 2016-03-04 18:02:08 -05:00
Timothy Nikkel 82b750a534 Backed out changeset 93f722efcdec (bug 1145903) for causing bug 1251796. 2016-02-27 12:53:28 -06:00
Benoit Girard 222f9bc8c4 Bug 1145903 - Use CSS to shrinkToFit instead of a racy set of width/height on the image frame. r=tnikkel
MozReview-Commit-ID: GnBcPLMGKDS

--HG--
extra : rebase_source : 665ac8fd0cf60745dff19940ddd1201a6cd5145f
2016-02-22 19:02:26 -05:00
Cameron McCormack 7c95c39734 Bug 1244068 - Part 4: Use StyleSetHandle instead of concrete style set class in most places. r=dholbert 2016-02-24 18:01:11 +11:00
Boris Zbarsky 6019ca23a6 Bug 812899 part 2. Change the centering code in nsImageDocument to only try vertically centering via auto margins when we're not overflowing in the vertical direction, because if we _are_ overflowing that should cut off part of the image per spec. r=khuey 2016-02-05 23:31:19 -05:00
Boris Zbarsky 09c344191e Bug 812899 part 1. Split the "image is overflow" concept in ImageDocument into two separate booleans for vertical and horizontal overflow. r=khuey 2016-02-05 23:31:09 -05:00
Kyle Huey 91efc5a86c Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08: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
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
Andrew McCreight 9e8f4b219e Bug 1152551, part 2 - Fix mode lines in dom/. r=jst 2015-05-03 15:32:37 -04:00