Commit Graph

2849 Commits

Author SHA1 Message Date
Stone Shih
1aa4b81fa4 Bug 1293174 - [Pointer Event] Implement implicit pointer capture for touch. f=bevistseng. r=smaug
--HG--
extra : rebase_source : ef86008679a1c0e7af30bab658e0c7668093adfe
2016-08-11 14:49:15 +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
Xidorn Quan
1dc2955ab8 Bug 1304302 part 8 - Change include of {CSS,Servo}StyleSheet.h to StyleSheetInlines.h. r=heycam
It is a preparation for later patch which moves functions from those
classes into StyleSheet. Some of the functions are better defined in
StyleSheetInlines.h.

This commit is generated by the following command:

find . \( -name '*.h' -or -name '*.cpp' \) -not -name '*StyleSheet*' -exec sed -i -b \
  -e '/^#include/ s_/\(CSS\|Servo\)StyleSheet\.h_/StyleSheetInlines.h_' \
  -e '1,\_^#include "mozilla/StyleSheetInlines.h"_ ! { \_^#include "mozilla/StyleSheetInlines.h"_d }' {} +

MozReview-Commit-ID: 54H5x27Pmso

--HG--
extra : source : e4fe253a8f82c3c58e5191d6af66fb0e85f2df19
2016-09-26 22:03:25 +10:00
Carsten "Tomcat" Book
f7e4d70ba8 Merge mozilla-central to mozilla-inbound 2016-09-23 12:38:03 +02:00
Joel Maher
58f71c11c8 Backout 472858f465b0 (Bug 1290158) for perf regression.
MozReview-Commit-ID: 92eO5YtKLoj
2016-09-23 06:20:33 -04:00
Daniel Holbert
c31ad35f39 Bug 1304540 part 2: Use nsCOMPtr/RefPtr (and their forget() API) instead of manual NS_ADDREF macros, in a few files within layout. r=mats
MozReview-Commit-ID: SrJNtbwc1B

--HG--
extra : rebase_source : 2fd086157bf4d8d16effe18037258a3bf12623fc
2016-09-21 15:41:26 -07:00
Daniel Holbert
2a6754c4c7 Bug 1304540 part 1: minor code-cleanup in the neighborhood of some NS_ADDREF usages. r=mats
DETAILS ON THE CLEANUP:

* In nsFrameTraversal.cpp:
 - Whitespace fix.
 - Remove a useless nullptr assignment.
 - Use "=" to initialize a nsCOMPtr, per coding style guideline ("initialize variables with nsFoo aFoo = bFoo and not nsFoo aFoo(bFoo)").

* In nsPresShell.cpp:
 - Wrap a longish assignment to 2 lines (since next patch will make the first line longer, which would push the whole thing over 80 characters if it weren't wrapped).
 - Add braces around "if" body.

* In nsTextFrame.cpp:
 - Remove a useless nullptr assignment.
 - Move the "metrics->GetThebesFontGroup()" call slightly earlier, so it happens *before* we've implicitly transferred ownership the object pointed to by "metrics".
 - Add a code-comment.

MozReview-Commit-ID: LG6vgOmM9MK

--HG--
extra : rebase_source : 7754d4edefb09ae7992275b9dcb7e84371955d9c
2016-09-21 15:39:48 -07:00
Bill McCloskey
50c44c717c Bug 1279086 - Allow painting for tab switch when JS is running (r=dvander,mconley,mrbkap) 2016-09-16 20:35:11 -07:00
Neil Rashbrook
bf6bdf8c7c Bug 1290158 Don't generate synthetic paint events for invisible documents r=mattwoodrow 2016-09-14 15:55:45 +01:00
Timothy Nikkel
0b6fd97ae9 Bug 1284350. Backed out changeset 69abdc731a99 (Bug 1261554 (Part 1) - Prepare for implementing in-displayport visibility tracking. r=mstange) 2016-09-12 00:19:08 -05:00
Timothy Nikkel
154ad5a083 Bug 1284350. Backed out changeset 82c3b4b81d82 (Bug 1261554 (Part 2) - Mark frames which are added to the display list when painting to the window as having Visibility::IN_DISPLAYPORT. r=mstange) 2016-09-12 00:19:08 -05:00
Timothy Nikkel
c630475661 Bug 1284350. Backed out changeset bb3bf463c0ec (Bug 1261554 (Part 3) - Visualize Visibility::IN_DISPLAYPORT regions in the APZ minimap visibility debugger. r=botond) 2016-09-12 00:19:08 -05:00
Timothy Nikkel
391116c2ba Bug 1284350. Backed out changeset a909de86c183 (Bug 1261554 (Followup) - Fix memory reporting for PresShell::mVisibleRegions. r=me) 2016-09-12 00:19:07 -05:00
Timothy Nikkel
2ae56af6d0 Bug 1284350. Backed out changeset e9df21facccf (Bug 1269931 - Send visible region updates for pres shells associated with nested views. r=botond) 2016-09-12 00:19:07 -05:00
Timothy Nikkel
88bb36312b Bug 1284350. Backed out changeset 4517cddd204e (Bug 1269934 - Handle visible frame sets more generically in PresShell. r=mstange) 2016-09-12 00:19:07 -05:00
Timothy Nikkel
dbce89963b Bug 1284350. Backed out changeset 45c3308d49c9 (Bug 1269935 - Replace PresShell::DecVisibleCount() with a general map function. r=mstange) 2016-09-12 00:19:07 -05:00
Timothy Nikkel
c4c23eb8a6 Bug 1284350. Backed out changeset d0aa5cf74699 (Bug 1269937 - Manage updating visible frames and regions using RAII. r=mstange) 2016-09-12 00:19:07 -05:00
Timothy Nikkel
4c09312224 Bug 1284350. Backed out changeset 719d6d5d9d21 (Bug 1259281 - Mark frames NONVISIBLE if their pres shell is inactive or frozen. r=mstange) 2016-07-26 13:48:00 -05:00
Timothy Nikkel
3b81ba0aeb Bug 1298101. Implement telemetry to take event handling time during page load. r=smaug 2016-09-07 23:30:24 -05:00
Michael Layzell
118a8b7507 Bug 1018486 - Part 4: Changes in layout/, r=bz
MozReview-Commit-ID: BsaKGHsoqOq
2016-09-07 10:50:40 -04:00
Ho-Pang Hsu
0174b1ed3b Bug 1258808 - Part 1: Passing PointerId (Gecko). r=smaug, f=btseng
--HG--
extra : rebase_source : 82113a04a209748d003d72b9103de78db4d1f73d
extra : histedit_source : 07c3c256639c7042487a0a2dc4135dc3063078b8
2016-09-01 16:12:15 +08:00
Nicholas Nethercote
b71747b2ac Bug 1299727 - Rename NS_WARN_IF_FALSE as NS_WARNING_ASSERTION. r=erahm.
The new name makes the sense of the condition much clearer. E.g. compare:

  NS_WARN_IF_FALSE(!rv.Failed());

with:

  NS_WARNING_ASSERTION(!rv.Failed());

The new name also makes it clearer that it only has effect in debug builds,
because that's standard for assertions.

--HG--
extra : rebase_source : 886e57a9e433e0cb6ed635cc075b34b7ebf81853
2016-09-01 15:01:16 +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
Stone Shih
c9ead475fc Bug 1292070 - Part 1: Fire pointermove when no button state changes. f=bevistseng, r=smaug
--HG--
extra : rebase_source : 674319fb1a142c5236f8d7c71ac43f2bbe088a5d
extra : histedit_source : ace84d35fadb69a6c4dfd60c6e5f8df42c39d8c4
2016-08-18 13:18:48 +08:00
Stone Shih
b6697d07aa Bug 1294335 - [Pointer Event] Refine setPointerCapture / releasePointerCapture to follow the algorithm defined in the spec. f=bevistseng, r=smaug 2016-08-12 09:49:31 +08:00
Bobby Holley
ff780d017f Bug 1299348 - Remove StylingStarted(). r=emilio
StylingStarted is a kind of nebulous and not-very-useful concept. The concept
that _is_ useful is whether the presshell has been initialized or not, but the
root element may not exist at that point.

So we need to make sure we that we can trigger the initial document style in both
presshell initialized _and_ ContentInserted, which has the nice effect of handling
root element reinsertions.

We also take the opportunity to make StyleDocument assert the existence of a root
element, and align the responsibility for clearing the dirty descendant bits between
document and non-document nodes.
2016-08-31 10:32:42 -07:00
Ryan VanderMeulen
2df9e8fe53 Backed out changeset 254e306bc62c (bug 277178) for likely causing test_sessionhistory.html to permafail.
CLOSED TREE

--HG--
extra : rebase_source : b3511d478945d6c055b8f0f6608e8f574ee7552a
2016-08-29 17:06:53 -04:00
Takeshi Kurosawa
76c800fd89 Bug 277178 - Move focus to a fragment identifier (#fragment) if it's focusable. r=smaug
This change improves HTML Standard compliance and browser compatibility.
https://html.spec.whatwg.org/multipage/browsers.html#scroll-to-the-fragment-identifier

MozReview-Commit-ID: BgOq9dPwdGF

--HG--
extra : transplant_source : %26%7D%7Fm%EES%C4%91%1F%CEI%25%8F%EDc%28%3C%DE%0F%CF
2016-08-23 11:06:32 +09:00
Bobby Holley
0ecda8e2e2 Bug 1292279 - Add a helper to get the real container and use it in nsPresShell::Content{Inserted,Removed}. r=heycam
The existing static_cast checks are totally wrong, by the way, since
nsIDocuments are never nsIContent. Looks like they were erroneously
added in bug 862763.
2016-08-25 21:36:41 -07:00
Bobby Holley
bfbb6b5feb Bug 1292279 - Explicitly style new children in Content{Appended/Inserted} rather than using restyle hints. r=heycam
This gives us more control over what gets restyled when.
2016-08-25 21:36:32 -07: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
Mats Palmgren
e3a3b7c245 Bug 1293985 part 1 - Hold a strong ref on aDocument. r=tn 2016-08-19 19:56:20 +02:00
Nicholas Nethercote
67af4817e9 Bug 1293596 (part 2) - Rework nsIWidget bounds getters. r=mstange.
This patch makes GetBounds(), GetScreenBounds() and GetClientBounds() more
obviously infallible, like existing functions such as GetNaturalBounds() and
GetClientSize(). This results in clearer behaviour in nsCocoaWindow.mm if
Objective C exceptions occur. Along the way, the patch removes some useless
failure checks for these functions.

The patch also removes the NS_IMETHOD from GetRestoredBounds and makes that
function MOZ_MUST_USE.
2016-08-19 09:03:04 +10:00
Kartikaya Gupta
490b3f507c Bug 1162771 - Encapsulate the gCaptureTouchList so that it's not exposed outside of the TouchManager class. r=smaug
MozReview-Commit-ID: FkaJxTvJOzQ
2016-08-18 07:13:28 -04:00
Randall Barker
9a3fae864f Bug 1291373 - [geckoview] part 3, Remove MOZ_ANDROID_APZ r=botond,snorp 2016-08-16 14:33:43 -07:00
Wes Kocher
2253eb9510 Merge m-c to inbound, a=merge 2016-08-15 14:53:49 -07:00
Wes Kocher
d602abb016 Merge inbound to central, a=merge 2016-08-15 14:20:38 -07:00
Igor
175543fda8 Bug 1293384 - Part 2: Rename Snprintf.h header to Sprintf.h. r=froydnj 2016-08-14 23:43:21 -07:00
Igor
a57972337d Bug 1293384 - Part 1: Rename snprintf_literal to SprintfLiteral. r=froydnj 2016-08-14 23:44:00 -07:00
L. David Baron
6660436867 Bug 1294918 - Fix spelling of method name nsIFrame::IsAbsPosContainingBlock. r=dholbert
This misspelling was introduced in bug 1125767, changeset b9951cca6d1f.

MozReview-Commit-ID: KQNlLelY2Kn

--HG--
extra : rebase_source : 7b2b8379da23b06737b462dd4c316b5758d807a9
2016-08-12 18:39:45 -07:00
Nicholas Nethercote
bab6d17ebf Bug 1293117 (part 4) - Change many NS_IMETHODIMP occurrences to NS_IMETHOD. r=froydnj.
This patch makes the following changes on many in-class methods.

- NS_IMETHODIMP F() override;      --> NS_IMETHOD F() override;
- NS_IMETHODIMP F() override {...} --> NS_IMETHOD F() override {...}
- NS_IMETHODIMP F() final;         --> NS_IMETHOD F() final;
- NS_IMETHODIMP F() final {...}    --> NS_IMETHOD F() final {...}

Using NS_IMETHOD is the preferred way of marking in-class virtual methods.
Although these transformations add an explicit |virtual|, they are safe --
there's an implicit |virtual| anyway because |override| and |final| only work
with virtual methods.

--HG--
extra : rebase_source : 386ee4e4ea2ecd8d5001efabc3ac87b4d6c0659f
2016-08-08 10:54:47 +10:00
Stone Shih
0936be8e70 Bug 1293175 - [Pointer Event] Add Element.hasPointerCapture API. r=smaug
--HG--
extra : rebase_source : 25dcafa70e5260259fd7703134b376c3351595c0
2016-08-10 15:31:43 +08:00
Stone Shih
6a29290e1b Bug 1258804 - Part 2: Attributes of gotpointercapture and lostpointercapture should be the same as the pointer event that causes them. r=smaug
--HG--
extra : rebase_source : 8f72d77e100e50c8a4d0354e82733cca900282ea
2016-08-01 15:12:11 +08:00
Stone Shih
ae0a4d32bf Bug 1258804 - Part 1: Process pending pointer capture when firing pointer events. r=smaug
--HG--
extra : rebase_source : 0fae1842c3080c45ff65af83bd6f282f20cb5777
2016-08-01 09:16:27 +08:00
Nicholas Nethercote
e7f10a07fd Bug 1293603 (part 2) - Make Run() declarations consistent. r=erahm.
This patch makes most Run() declarations in subclasses of nsIRunnable have the
same form: |NS_IMETHOD Run() override|.

As a result of these changes, I had to add |override| to a couple of other
functions to satisfy clang's -Winconsistent-missing-override warning.

--HG--
extra : rebase_source : 815d0018b0b13329bb5698c410f500dddcc3ee12
2016-08-08 12:18:10 +10:00
Bobby Holley
83d2ff11d1 Bug 1291891 - Switch to NS_WARNING for unimplemented <style scoped>. r=emilio 2016-08-03 18:30:57 -07:00
Wes Kocher
ae855cdb28 Merge m-c to inbound, a=merge 2016-08-03 16:47:07 -07:00
Emilio Cobos Álvarez
95abaaa872 Bug 1290335: Hoist frame-construction logic in RestyleManager to static members in RestyleManagerBase. r=heycam
MozReview-Commit-ID: BqywJXZ0CYU
2016-08-03 15:11:15 -07:00
Masayuki Nakano
78b4a701e3 Bug 1259665 part.3 Rename WidgetPointerEvent::isPrimary to mIsPrimary r=smaug
MozReview-Commit-ID: LfKzpwCjMcz

--HG--
extra : rebase_source : d4fd41db8ff4dc39a7156f2f509aae89d1c126a1
2016-08-03 17:34:53 +09:00
Masayuki Nakano
b38025c056 Bug 1259665 part.2 Rename WidgetPointerEvent::height to mHeight r=smaug
MozReview-Commit-ID: Ji4X53dByiH

--HG--
extra : rebase_source : 0e79a45d34142453e79f2412eddb7abc132e11d7
2016-08-03 17:23:56 +09:00