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

81 Коммитов

Автор SHA1 Сообщение Дата
Jeff Gilbert 5b753da289 Bug 1470325 - s/FooBinding/Foo_Binding/g - r=qdot
MozReview-Commit-ID: JtTcLL5OPF0
2018-06-26 17:05:01 -07:00
Emilio Cobos Álvarez c7d35aa526 Bug 1470930: Use enums for passing arguments for event dispatch. r=smaug
MozReview-Commit-ID: DsNuF7GAflJ
2018-06-26 18:22:06 +02:00
Boris Zbarsky 98837ca245 Bug 1462789. Fix readystate assertions when document.open() is used on an image document. r=hsivonen
There are a few things going on here:

1)  Better tracking of whether we've done our synthetic document stuff so we
don't redo it when it's not needed.  We should only be doing it on initial
load.

2)  Better handling of our readystate transitions.  We're only responsible for
the transition to READYSTATE_INTERACTIVE if we're the ones setting up the DOM.
Otherwise whoever is doing that should do the readystate transition.

Both of these really use the same mechanism, which is why I ended up doing them
together.
2018-05-23 11:06:34 -04:00
Boris Zbarsky 25aa42d9a4 Bug 1455674 part 16. Remove most use of nsIDOMElement in dom. r=qdot 2018-04-26 23:37:34 -04:00
Boris Zbarsky 4643230674 Bug 1455055 part 6. Clean up HandleEvent implementations in dom. r=masayuki
MozReview-Commit-ID: Ht7HQEhVS8E
2018-04-20 00:49:30 -04:00
Boris Zbarsky 2b6097ae6d Bug 1455055 part 1. Convert nsIDOMEventListener to taking an Event, not an nsIDOMEvent. r=masayuki
This does no cleanup other than what's needed to compile.  Cleanup coming up in
later patches.

MozReview-Commit-ID: 3sOnkj71n09
2018-04-20 00:49:29 -04:00
Christoph Kerschbaumer a929955d1f Bug 1439713 - Change nsIContentPolicy shouldLoad to take an <uri, loadInfo> pair instead of the various args. r=bz 2018-03-29 12:16:23 +02:00
Jonathan Watt 82ebebe276 Bug 1448714 - Fix up comments referring to 'style context' after the rename of nsStyleContext. r=emilio 2018-03-23 13:49:21 +00: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
Boris Zbarsky 29d232e53f Bug 1447098 part 1. Rename FromContent on various DOM classes to FromNode. r=mystor
MozReview-Commit-ID: 202nkbmkwfR
2018-03-21 17:39:04 -04:00
Boris Zbarsky f982b572f8 Bug 1446711 part 2. Get rid of nsIDOMMouseEvent::GetClientX/Y. r=qdot
MozReview-Commit-ID: DqMhK4wajH5
2018-03-20 00:16:05 -04:00
Eugen Sawin 874c98a3f0 Bug 1437930 - [2.0] Don't shrink image document when resolution has changed, e.g., through pinch-zooming on Android. r=qdot 2018-03-05 17:05:39 +01:00
Hiroyuki Ikezoe 1b0cba9367 Bug 1417354 - Introduce nsIDocument::GetPresContext(). r=smaug
It would be convenient to get nsPresContext from nsIDocument.

MozReview-Commit-ID: Ei6V3UE8XGr

--HG--
extra : rebase_source : 8d2a917eb62cf341e4e1810451fd01c01dbc3bad
2018-02-21 07:00:10 +09:00
Dorel Luca f41b03eca9 Backed out changeset 38577c007450 (bug 1424371) for Marionett test failure on testing/marionette/harness/marionette_harness/tests/unit/test_window_maximize.py. CLOSED TREE 2018-02-19 22:15:23 +02:00
Milan Sreckovic 7571df7e7c Bug 1424371: Use BaseRect access methods instead of member variables in dom/ r=qdot
MozReview-Commit-ID: HXWhggOMIEK

--HG--
extra : rebase_source : 9c9eacf80d2b7f78faa82a1549170b98d12cdaa8
2018-02-19 12:56:10 -05:00
Eugen Sawin 1250b92195 Bug 1437930 - [1.0] Avoid redundant image shrinking and scroll position resetting. r=bz 2018-02-15 20:02:29 +01:00
Boris Zbarsky 034e47c66b Bug 1436508 part 12. Remove nsIDOMKeyEvent. r=masayuki
MozReview-Commit-ID: 8giqG5iHiIf
2018-02-09 11:17:10 -05:00
Boris Zbarsky 478687c2e8 Bug 1434686 part 4. Use IgnoreErrors() in dom/. r=mystor
MozReview-Commit-ID: GwVDrTLPTOb
2018-02-01 14:21:14 -05:00
Boris Zbarsky 7c392f077e Bug 1418085 part 6. Remove nsIDOMHTMLElement. r=mystor
MozReview-Commit-ID: 5QUyFeAQYZQ
2018-01-30 00:25:36 -05:00
Boris Zbarsky f60fd673d6 Bug 1432186 part 19. Remove the nsIDOMNode::*_NODE constants. r=mccr8
MozReview-Commit-ID: KvKjeKIOB9K
2018-01-29 23:10:53 -05:00
Andrea Marchesini 2bfde4fc2d Bug 1419771 - Introduce DOMPrefs, a thread-safe access to preferences for DOM - part 19 - Resist finger-printing enabled, r=asuth 2018-01-08 14:05:06 +01:00
Edgar Chen fb66a70ad5 Bug 1414077 - Don't try to scroll image if the image document is not visible; r=bz
MozReview-Commit-ID: J7Roez2btL

--HG--
extra : rebase_source : c65e1bd1239516dbf64d0025e41832a157d0d2ad
2017-11-07 17:51:13 +08:00
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