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

431 Коммитов

Автор SHA1 Сообщение Дата
Michelangelo De Simone 1c12c5271d Bug 1313788 - Remove DOM/wifi and related code. r=jst
MozReview-Commit-ID: BRT6bSvPpT

--HG--
extra : rebase_source : c5ae9e88e80ae1a9c46bf80439388bd9ef2ba4df
2016-11-08 15:02:45 -08:00
Sebastian Hengst d35f739e98 Bug 1310297 - Remove test annotations using b2g, mulet or gonk: dom/xbl. r=RyanVM
MozReview-Commit-ID: EqoZrlHQFNG

--HG--
extra : rebase_source : dfb4efc7e998c0e55ef86f1201245aa3fb7f9e44
2016-11-05 11:29:18 +01:00
Xidorn Quan 1cbd4cb699 Bug 1309868 part 1 - Use const nsIContent pointer in some DOM utils. r=bholley
MozReview-Commit-ID: H4g2VbWJUba

--HG--
extra : source : 77e67e5163ac9c450e18d4c4e5b690cee5d3f1a3
2016-10-18 15:29:03 +11:00
Jon Coppeard 6ca64e3652 Bug 1308919 - Don't make Handles to Heap<T> as it avoids the read barrier r=bz 2016-10-14 09:45:28 +01:00
Phil Ringnalda 400813c30b Merge m-i to m-c, a=merge 2016-09-30 23:24:52 -07:00
cku 818c1c0974 Bug 1302779 - Part 1. Resolve a local fragment against the current document that relative URLs are resolved against. r=heycam
MozReview-Commit-ID: 2vJDnfzoPiC

--HG--
extra : rebase_source : 3c43bd335caa918ac32f3ba1979f822db5319b11
2016-09-20 14:13:13 +08:00
Xidorn Quan 2f49a48a09 Bug 1304302 part 10 - Replace all uses of StyleSheetHandle. r=heycam
This commit is generated by the following commands with some minor
manual adjustment:

find . \( -name '*.h' -or -name '*.cpp' \) -not -path './layout/style/StyleSheet*' -exec sed -i -b \
  -e '/^\(#include\|using\)/s/StyleSheetHandle/StyleSheet/g' \
  -e 's/\(mozilla::\)\?StyleSheetHandle::RefPtr/RefPtr<\1StyleSheet>/g' \
  -e 's/StyleSheetHandle()/nullptr/g' \
  -e 's/->AsStyleSheet()//g' \
  -e 's/StyleSheetHandle/StyleSheet*/g' {} +
sed -i -b 's/sheet->AsVoidPtr()/sheet.get()/' layout/style/Loader.cpp
sed -i -b 's/AsHandle()/this/' layout/style/StyleSheet.cpp

MozReview-Commit-ID: 7abdvlKHukd

--HG--
extra : source : e5682242db07203b5a91810fe1e243c955310588
2016-09-26 22:03:25 +10:00
Terrence Cole 0edc10380c Bug 1297558 - Use a read barrier on Heap to ExposeToActiveJS r=sfink r=mccr8 2016-02-07 09:08:55 -08:00
Masayuki Nakano 97735168f1 Bug 1297013 part.2 Implement some helper methods to log constants related to event handling r=smaug
This patch implements some helper methods to log constants related to event handling.

ToString(KeyNameIndex) and ToString(CodeNameIndex) converts the enum itmes to human readable string.  They use WidgetKeyboardEvent's helper class which returns Unicode text.  Therefore, this need to convert from UTF16 to UTF8.  That's the reason why these methods don't return |const char*|.

GetDOMKeyCodeName(uint32_t) returns DOM keycode name if it's defined.  Otherwise, returns hexadecimal value.  For generating switch-case statement, VirtualKeyCodeList.h shouldn't include ",".  Therefore, this patch removes "," from VirtualKeyCodeList.h and append it at defining NS_DEFINE_VK.  Additionally, the last item of enum and array should not end with ",".  Therefore, this adds dummy last item at each of them.  Finally, some of the keyCode values are shared between 2 keys.  Therefore, it needs to support NS_DISALLOW_SAME_KEYCODE for switch-case generator.  See the comment in the file for more detail.

GetModifiersName(Modifiers) returns all modifier names included in the given value.

MozReview-Commit-ID: 9i2ftFOTpDn

--HG--
extra : rebase_source : 458a4d28624dc10dd4454f2e7708d746d1fcb045
2016-09-15 00:48:47 +09:00
Andrea Marchesini 5994c71158 Bug 1301251 - Handle GetSpec() failure in nsContentUtils::GetWrapperSafeScriptFilename(), r=smaug 2016-09-19 15:50:22 +02:00
Nicholas Nethercote 5622a00748 Bug 1297300 - Add missing checks to GetSpec() calls in dom/xbl/. r=bz.
--HG--
extra : rebase_source : b7279c4ce02ac111c39dc099652fe0837b98f30b
2016-09-08 14:19:01 +10:00
Carsten "Tomcat" Book 7c6c7db247 Merge mozilla-central to autoland 2016-09-07 17:26:11 +02:00
Andi-Bogdan Postelnicu d8fd5713a3 Bug 1300769 - call ConstructPrototype only if mType is NS_HANDLER_TYPE_XUL. r=mrbkap
MozReview-Commit-ID: H7vS03mVj4s

--HG--
extra : rebase_source : 045747d04c04ba589f5b1e7c4a371bc727613fb4
2016-09-07 11:01:51 +03:00
Nicholas Nethercote 34dcc7b852 Bug 1299384 - Use MOZ_MUST_USE with NS_warn_if_impl(). r=erahm.
This change avoids lots of false positives for Coverity's CHECKED_RETURN
warning, caused by NS_WARN_IF's current use in both statement-style and
expression-style.

In the case where the code within the NS_WARN_IF has side-effects, I made the
following change.

> NS_WARN_IF(NS_FAILED(FunctionWithSideEffects()));
> -->
> Unused << NS_WARN_IF(NS_FAILED(FunctionWithSideEffects()));

In the case where the code within the NS_WARN_IF lacks side-effects, I made the
following change.

> NS_WARN_IF(!condWithoutSideEffects);
> -->
> NS_WARNING_ASSERTION(condWithoutSideEffects, "msg");

This has two improvements.
- The condition is not evaluated in non-debug builds.
- The sense of the condition is inverted to the familiar "this condition should
  be true" sense used in assertions.

A common variation on the side-effect-free case is the following.

> nsresult rv = Fn();
> NS_WARN_IF_(NS_FAILED(rv));
> -->
> DebugOnly<nsresult rv> = Fn();
> NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "Fn failed");

--HG--
extra : rebase_source : 58788245021096efa8372a9dc1d597a611d45611
2016-09-02 17:12:24 +10:00
Nicholas Nethercote 742fc7eb48 Bug 1297961 (part 1) - Introduce nsURI::GetSpecOrDefault(). r=hurley.
This function is an infallible alternative to nsIURI::GetSpec(). It's useful
when it's appropriate to handle a GetSpec() failure with a failure string, e.g.
for log/warning/error messages. It allows code like this:

  nsAutoCString spec;
  uri->GetSpec(spec);
  printf("uri: %s", spec.get());

to be changed to this:

  printf("uri: %s", uri->GetSpecOrDefault().get());

This introduces a slight behavioural change. Previously, if GetSpec() failed,
an empty string would be used here. Now, "[nsIURI::GetSpec failed]" will be
produced instead. In most cases this failure string will make for a clearer
log/warning/error message than the empty string.
* * *
Bug 1297961 (part 1b) - More GetSpecOrDefault() additions. r=hurley.

I will fold this into part 1 before landing.

--HG--
extra : rebase_source : ddc19a5624354ac098be019ca13cc24b99b80ddc
2016-08-26 16:02:31 +10:00
Jared Wein b2e0fdce56 Bug 1297993 - Include the ID of the offending <key> element in the key conflict message. r=masayuki
MozReview-Commit-ID: 7hZLCZqfHAy
2016-08-31 12:53:24 -04:00
Bobby Holley 7d4ef4ac54 Bug 1292662 - Style XBL anonymous content after binding explicit children to insertion points. r=heycam
We're doing it too soon, which means that the subtree isn't fully set up.
2016-08-25 21:36:46 -07:00
Bobby Holley 263669837b Bug 1292279 - Clear up the semantics of our Servo traversal APIs. r=heycam 2016-08-25 21:34:31 -07:00
Leo Gaspard 2df9fd1853 Bug 1297244 - Assert on the type given as a parameter to Heap. r=terrence
--HG--
extra : rebase_source : 2523f190a45bf3669f40392226df6a0b6fbc9806
2016-08-24 14:21:42 -07:00
Jon Coppeard d1435a2a8c Bug 1296688 - Add JSCLASS_FOREGROUND_FINALIZE flag r=sfink r=smaug 2016-08-24 14:18:10 +01:00
Kan-Ru Chen b6d880aca1 Bug 1297276 - Rename mfbt/unused.h to mfbt/Unused.h for consistency. r=froydnj
The patch is generated from following command:

  rgrep -l unused.h|xargs sed -i -e s,mozilla/unused.h,mozilla/Unused.h,

MozReview-Commit-ID: AtLcWApZfES


--HG--
rename : mfbt/unused.h => mfbt/Unused.h
2016-08-24 14:47:04 +08:00
Jonathan Kingston 556ed99119 Bug 1173199 - Create preference to disable MathML. r=heycam, r=huseby, r=smaug
If the mathml.disabled preference is true, treat <math> and other MathML
elements as generic XML elements.

This patch disables the rendering code of MathML however preserves the
namespace so to reduce the breakage.

Original patch by: Kathy Brade <brade@pearlcrescent.com>

MozReview-Commit-ID: A2f2Q2b4eqR

--HG--
extra : rebase_source : 3c8530816727c01b68a831d560bfe16e7b02bd9d
2016-06-28 15:24:48 +01:00
Emilio Cobos Álvarez 11ac7c1d96 Bug 1288590: Rename nsAttrInfo to mozilla::dom::BorrowedAttrInfo. r=bholley
Unfortunately couldn't add all the debug checks that I'd want, since we can't
assert that is not safe to run script in quite a few places :(

MozReview-Commit-ID: 8m3Wm1WntZs
2016-07-27 11:18:33 -07:00
Emilio Cobos Álvarez ba64988f2f Bug 1288590: Use GetAttrInfoAt in nsXBLPrototypeBinding.cpp. r=bholley
MozReview-Commit-ID: EDqajfBFPra
2016-07-27 11:18:33 -07:00
Emilio Cobos Álvarez 16ed085072 Bug 1288590: Use GetAttrInfoAt in nsXBLBinding.cpp. r=bholley
MozReview-Commit-ID: Bm29ogNHXwR
2016-07-27 11:18:33 -07:00
Bobby Holley 64639661c1 Bug 1289620 - Hook up initial styling. r=heycam
Aside from the parser-side hacks, this should subsume all the current scattered
logic in the stylo tree to handle initial styling.
2016-07-27 09:44:25 -07:00
Eric Rahm 7db242c608 Bug 1286084 - Remove warning that startup cache is null. r=enn 2016-07-26 14:31:03 -07:00
Tom Tromey 5538d692d3 Bug 1286877 - do not set c-basic-offset for python-mode; r=gps
This removes the unnecessary setting of c-basic-offset from all
python-mode files.

This was automatically generated using

    perl -pi -e 's/; *c-basic-offset: *[0-9]+//'

... on the affected files.

The bulk of these files are moz.build files but there a few others as
well.

MozReview-Commit-ID: 2pPf3DEiZqx

--HG--
extra : rebase_source : 0a7dcac80b924174a2c429b093791148ea6ac204
2016-07-14 10:16:42 -06: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
Andrew McCreight 2c5b2b21f3 Bug 1287624, part 1 - Use RefPtr::forget() instead of ::swap() in dom/. r=froydnj
These uses all null the return value first, so there should be no change in behavior.
2016-07-20 15:19:00 -07:00
Emilio Cobos Álvarez 1a49c35a07 Bug 1286445: stylo: Support restyles of non-pseudo content on state change. r=heycam
This includes, for example :hover.

Also removes the call to IsStyledByServo() in the document constructor, it's not
only unnecessary, but also we call UpdateStyleBackendType() too early.

MozReview-Commit-ID: 4YfCdmLoSxu
2016-07-16 16:22:12 -07:00
Lee Salzman 0e1e833b40 Bug 1286317 - part 2 - remove Qt widget usage from plugins. r=jrmuizel 2016-07-12 20:28:31 -04:00
Boris Zbarsky efc4dcf284 Bug 1275315 part 2. Use the new Realm getters in binding code. r=peterv 2016-07-09 00:19:52 -04: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
Nicholas Nethercote 3c7909e181 Bug 1278452 - Fix some null checks in dom/xbl/. r=mrbkap.
--HG--
extra : rebase_source : 2ffe1b24834ee863705b36085da44cefe331f951
2016-06-07 15:24:48 +10:00
Olli Pettay 1c8273e348 Bug 1277078 - inline some commonly used methods in bindingmanager, r=baku 2016-06-01 12:03:45 +03:00
Boris Zbarsky dc120449d2 Bug 1275698. Get rid of nsScriptSecurityManager::ScriptAllowed and replace it with xpc::Scriptability::Get(obj).Allowed() for better performance and less indirection. r=khuey 2016-05-27 20:26:56 -04:00
Jim Chen a7f33faa4e Bug 1275371 - Don't forward delete on shift+backspace; r=esawin
Shift+backspace causes a forward delete on some platforms, but not on
Android. The new Google keyboard is sending us shift+backspace, and we
need to handle it normally like a backspace.
2016-05-27 14:29:15 -04:00
Cameron McCormack 45dfce2c7c Bug 1275452 - Part 3: Eagerly restyle XBL-provided anonymous content in stylo. r=bholley
--HG--
extra : rebase_source : 4da7aa1a6364581cc9970baa42401bc49d33fa68
2016-05-25 16:55:50 +10:00
Mike Conley 359f06fb50 Bug 1166351 - Prioritize getting the nsXBLDocumentInfo out of the bound document's nsBindingManager instead of the nsXULPrototypeCache. r=bobbyholley+313730
This is kind of a long story, stay with me on this.

In bug 990290, a WeakMap was added to any JS scope that loaded an XBL
binding. That WeakMap stored the JS prototypes that are injected into
a bound node's prototype chain.

When a binding is removed, we search the prototype chain for the
JS prototype that we'd added, and remove it.

The XUL prototype cache caches numerous things, including nsXBLDocumentInfo,
which we use to get at the nsXBLPrototypeBinding for a particular binding,
which is then used to generate the class object that's put into the WeakMap.

When the XUL prototype cache is flushed, that means that when a binding
is bound, its definition needs to be reloaded off of the disk. If, however,
there was a pre-existing instance of the binding already being used in a
document, now we were in a funny case.

We were in a funny case, because when attempting to remove a binding, we
would look up the nsXBLPrototypeBinding via the nsXBLDocumentInfo that's
being held within the nsXULPrototypeCache, find (or load off the disk) a
_new_ nsXBLDocumentInfo and generate a _new_ nsXBLPrototypeBinding that
did not match to the one that we'd already stored in the WeakMap. This
would mean that removal would go wrong, and things would break horribly.

This patch makes it so that we prioritize checking the nsBindingManager
for a document for the nsXBLDocumentInfo before checking the
global nsXULPrototypeCache. That way, even if the cache gets cleared,
if the binding was ever used in this document, it'll be in the
nsBindingManager, and we'll get the same nsXULProtoypeBinding that
we'd been using before, and sanity will prevail.

MozReview-Commit-ID: G8iLDbCPRAC

--HG--
extra : rebase_source : 4322965c0b7150b22454651ad7a9461ee76d766b
2016-05-16 19:07:26 -04:00
Mike Conley 4e5e8f7b73 Bug 1166351 - Add an assertion to make sure that we use the correct cached XBL binding prototypes. r=bobbyholley+313730
MozReview-Commit-ID: 7MfslXmortQ

--HG--
extra : rebase_source : 478d19031d5820acf2eeb077d689159769318b2a
2016-04-29 14:54:12 -04:00
Makoto Kato fbbac87fd2 Bug 1253284 - Allow reserved attribute without command attribute r=masayuki
MozReview-Commit-ID: A2aEOgTx5Jz

--HG--
extra : rebase_source : f0ecefde7d39b63caf1b69cb88e3ed49b1bef084
2016-05-06 18:38:44 +09:00
Chris Peterson 353ee65255 Bug 1272513 - Part 1: Suppress -Wshadow warnings-as-errors in some directories. r=glandium 2016-05-11 00:00:01 -07: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
Terrence Cole 8e2294b2b6 Bug 1267699 - Move some public types to the right namespace; r=sfink
--HG--
extra : rebase_source : f79f7d86aab708b86a65e6f2426baeb8488f47e5
2016-04-26 09:18:48 -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
Geoff Brown 22f6c292d5 Bug 1268050 - Skip dom/xbl/crashtests/336744-1.html on Android, for frequent failures 2016-04-28 10:49:40 -06:00
Christoph Kerschbaumer da0d241d98 Bug 1206961 - Use channel->AsyncOpen2() for imageLoader; Remove security checks from callsites (r=bz) 2016-04-27 19:41:13 +02:00
Masayuki Nakano 8f62c5aa3c Bug 1257759 part.8 nsXBLWindowKeyHandler should handle eKeyDownOnPlugin and eKeyUpOnPlugin events only with reserved shortcut key handlers r=smaug
eKeyDownOnPlugin (mozkeydownonplugin) and eKeyUpOnPlugin (mozkeyuponplugin) should execute if the key combination is reserved by the linked <command> element.

Note that there is no eKeyPressOnPlugin.  Therefore, eKeyDownOnPlugin may execute shortcut key handler which is registered as a keypress event handler.

MozReview-Commit-ID: CpjsFW02y26

--HG--
extra : rebase_source : 361be61bc6ff0213e3386427878d2f81321ca0df
2016-04-23 02:12:54 +09:00