Commit Graph

25 Commits

Author SHA1 Message Date
jwu
53aed8093b Bug 1285802 - Always add listener when orientation locked. r=wchen
When remove fullscreenchange listener, mFullScreenListener doesn't
assign to nullptr. But the listener only been added when
mFullScreenListener is null.

MozReview-Commit-ID: 1qn72ix7z9Q
2016-12-27 11:23:01 +08:00
Boris Zbarsky
e2698ecac9 Bug 1325016 part 5. Switch ScreenOrientation's angle getter to use the caller-type version of ResistFingerprinting. r=bkelly 2016-12-22 11:05:55 -08:00
Boris Zbarsky
f9640191ef Bug 1325016 part 4. Switch ScreenOrientation's type getter to use the caller-type version of ResistFingerprinting. r=bkelly 2016-12-22 11:05:55 -08:00
Boris Zbarsky
8401fe7317 Bug 1325016 part 3. Switch ScreenOrientation's DeviceAngle getter to use the caller-type version of ResistFingerprinting. r=bkelly 2016-12-22 11:05:54 -08:00
Boris Zbarsky
b25ea6b806 Bug 1325016 part 2. Switch ScreenOrientation's deviceType getter to use the caller-type version of ResistFingerprinting. r=bkelly 2016-12-22 11:05:54 -08:00
Ehsan Akhgari
232f3438b3 Bug 1318356 - Remove the special casing for apps locking screen orientation; r=baku 2016-11-17 12:35:54 -05:00
Nicholas Nethercote
b5810a1eb4 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");
2016-09-02 17:12:24 +10:00
Kaku Kuo
bcb7169ac7 Bug 1292091 - Part 2 - replace MaybeResolve(JS::UndefinedHandleValue) with MaybeResolveWithUndefined(); r=bz
MozReview-Commit-ID: KNbxVcCVqts
2016-08-09 17:15:13 +08:00
Arthur Edelstein
8405407656 Bug 1281949 - When resisting fingerprinting, spoof screen.orientation
When privacy.resistFingerprinting is enabled, make sure that
screen.orientation.angle -> 0 and
screen.orientation.type -> "landscape-primary"

Also refactors screen.mozOrientation.

Based on https://trac.torproject.org/18958
2016-06-24 09:53:00 -07:00
Wei-Cheng Pan
775702c721 Bug 1273079 - Use MOZ_MUST_USE in hal. r=gsvelto
MozReview-Commit-ID: 7VLDpz34DRu
2016-05-16 17:24:03 +08:00
Sebastian Hengst
f0c01cd56b Backed out changeset a906d38b7c07 (bug 1273079) for bustage. r=backout 2016-05-19 15:10:49 +02:00
Wei-Cheng Pan
db216c823e Bug 1273079 - Use MOZ_MUST_USE in hal. r=gsvelto
MozReview-Commit-ID: 7VLDpz34DRu
2016-05-16 17:24:03 +08:00
Xidorn Quan
fb19e3539c Bug 1269157 - Add Document.fullscreen attribute. r=smaug
MozReview-Commit-ID: 7mMjGoc7cvA
2016-05-12 10:28:56 +10:00
Kyle Huey
b972c94d0f 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
aadd508ffe Backed out changeset 85ce8cb0639a (bug 1268313) 2016-04-29 14:21:16 +02:00
Kyle Huey
e62a0823c9 Bug 1268313: Part 7 - Move NS_NewRunnableMethod and friends to mozilla::NewRunnableMethod. r=froydnj 2016-04-28 14:08:25 -07:00
Michelangelo De Simone
e376f8b723 Bug 1250109 - Change DOMEventTargetHelper subclasses to not assume that GetOwner() is non-null, since it can be nulled out by navigation. r=bzbarsky
MozReview-Commit-ID: 8EGB58FWLi2
2016-03-04 13:37:50 -08:00
Xidorn Quan
b3af14b27f Bug 743198 part 6 - Add unprefixed fullscreen events. r=smaug 2016-02-17 08:47:11 +08:00
Kyle Huey
e95edb30a9 Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08:00
Olli Pettay
6249848da6 bug 120684 may have changed which .cpp files are compiled together in unified builds causing ScreenOrientation.cpp to not compile on Windows, a=bustage, CLOSED TREE 2015-10-27 20:52:58 +02:00
Nathan Froyd
4e6d8f6705 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
2015-10-18 01:24:48 -04:00
Kit Cambridge
cfcdba2314 Bug 1209361 - Add missing includes to dom/base. r=mccr8 2015-09-28 21:31:56 -07:00
William Chen
35904f6c4e Bug 1131470 - Part 5: Handle changes to active orientation lock. r=smaug 2015-08-18 15:28:01 -07:00
William Chen
88d04357dc Bug 1131470 - Part 4: Check sandboxing flag for orientation lock. r=baku 2015-08-18 15:28:01 -07:00
William Chen
24793a0aee Bug 1131470 - Part 3: Implement ScreenOrientation interface. r=baku 2015-08-18 14:55:21 -07:00