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

285 Коммитов

Автор SHA1 Сообщение Дата
Masayuki Nakano 55dc8a6004 Bug 1543315 - part 6: Mark ProcessReflowCommands() as MOZ_CAN_RUN_SCRIPT r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D27222

--HG--
extra : moz-landing-system : lando
2019-04-13 12:40:48 +00:00
Masayuki Nakano 40f02a6603 Bug 1543315 - part 5: Mark ResizeReflowIgnoreOverride() as MOZ_CAN_RUN_SCRIPT r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D27221

--HG--
extra : moz-landing-system : lando
2019-04-13 12:40:10 +00:00
Masayuki Nakano e8514bbdc6 Bug 1543315 - part 4: Mark ResizeReflow() as MOZ_CAN_RUN_SCRIPT r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D27220

--HG--
extra : moz-landing-system : lando
2019-04-13 12:39:47 +00:00
Masayuki Nakano 2332e34945 Bug 1543315 - part 3: Mark WillPaint() as MOZ_CAN_RUN_SCRIPT r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D27219

--HG--
extra : moz-landing-system : lando
2019-04-13 12:39:03 +00:00
Masayuki Nakano 0986fb819b Bug 1542506 - Make nsDocShell use mozilla::PresShell* directly rather than nsIPresShell* r=bzbarsky
This patch makes `nsDocShell::GetPresShell()` and
`nsDocShell::GetEldestPresShell()` return `mozilla::PresShell*` and
some non-public methods use `mozilla::PresShell*` directly.

Differential Revision: https://phabricator.services.mozilla.com/D26424

--HG--
extra : moz-landing-system : lando
2019-04-13 01:03:13 +00:00
Masayuki Nakano e8446480e1 Bug 1542407 - Make nsIFrame use mozilla::PresShell directly rather than via nsIPresShell r=emilio
Except retrieving from weak reference, `nsIFrame` should treat
`mozilla::PresShell` directly rather than via `nsIPresShell`.

Differential Revision: https://phabricator.services.mozilla.com/D26388

--HG--
extra : moz-landing-system : lando
2019-04-06 06:02:28 +00:00
Botond Ballo fbb1036cee Bug 1531962 - Extract an MVMContext interface used by MobileViewportManager to interact with its surroundings. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D26246

--HG--
extra : moz-landing-system : lando
2019-04-04 22:11:40 +00:00
Botond Ballo 2cb0da3cd1 Bug 1531962 - Avoid including MobileViewportManager.h from nsIPresShell.h. r=kats
nsIPresShell.h is widely included, so this avoids excessively long rebuilds
when MobileViewportManager.h is modified.

Differential Revision: https://phabricator.services.mozilla.com/D26245

--HG--
extra : moz-landing-system : lando
2019-04-04 22:09:55 +00:00
Masayuki Nakano 9165a150a1 Bug 1540930 - Make nsPresContext use mozilla::PresShell directly rather than via nsIPresShell r=emilio
`nsPresContext` should use `mozilla::PresShell` directly instead of
`nsIPresShell`.  This patch makes it.

Unfortunately, `nsPresContext` and `nsIFrame` have `PresShell()`.  Therefore,
we cannot use `PresShell*` in its methods so that this patch uses `mozilla::`
namespace prefix.

It might be better to rename them as `PresShellPtr()` in another bug.

Differential Revision: https://phabricator.services.mozilla.com/D25721

--HG--
extra : moz-landing-system : lando
2019-04-03 12:40:26 +00:00
Emilio Cobos Álvarez d8e2990d8a Bug 1535788 - Make the Document own the StyleSet. r=heycam
This is the last step to be able to call matchMedia on display: none iframes.

This is green, except for some startup preference query tests that I'm going to
address in a blocking bug (making LangGroupFontPrefs global, basically).

The setup is similar to the ShadowRoot one, except we don't eagerly keep the
StyleSet around up-to-date, we only fill it if it ever had a pres context.

Differential Revision: https://phabricator.services.mozilla.com/D23903

--HG--
extra : moz-landing-system : lando
2019-04-03 07:02:00 +00:00
Masayuki Nakano de2d589e58 Bug 1540015 - part 3: Rename Document::GetShell() to Document::GetPresShell() and make it return PresShell* rather than nsIPresShell* r=smaug,emilio
This makes `Document::GetShell()` return `PresShell*` instead of `nsIPresShell`.

Additonally, "shell" is unclear ("docshell" vs. "presshell").  Therefore, this
also renames `Document::GetShell()` to `Document::GetPresShell()`.

Similarly, some other method names of `Document` are also renamed from
`*Shell*` to `*PresShell*`.

Differential Revision: https://phabricator.services.mozilla.com/D25338

--HG--
extra : moz-landing-system : lando
2019-03-29 15:12:47 +00:00
Masayuki Nakano b7fbcf781f Bug 1540015 - part 2: Make nsPresContext.h stop including nsIPresShel.h and nsIPresShellInlines.h r=smaug
`*Inlines.h` shouldn't be included by another header file, but `nsPresContext.h`
does it.  This causes include-hell which blocks the following fix.

Additionally, it causes an include hell between `PresShell.h` vs.
`nsIPresShell.h` and `nsPresContext.h if `Document.h` includes `PresShell.h`.
Therefore, this patch also solves this include hell with adding
`nsPresContextInlines.h`.

Differential Revision: https://phabricator.services.mozilla.com/D25333

--HG--
extra : moz-landing-system : lando
2019-03-29 15:11:22 +00:00
Dorel Luca 5a0fa68b78 Backed out 3 changesets (bug 1540015) for build bustage. CLOSED TREE
Backed out changeset 7b71c9da0214 (bug 1540015)
Backed out changeset 5723ddbc5c44 (bug 1540015)
Backed out changeset 9561d2c36fa5 (bug 1540015)
2019-03-29 16:14:26 +02:00
Masayuki Nakano 9273f25ce2 Bug 1540015 - part 3: Rename Document::GetShell() to Document::GetPresShell() and make it return PresShell* rather than nsIPresShell* r=smaug,emilio
This makes `Document::GetShell()` return `PresShell*` instead of `nsIPresShell`.

Additonally, "shell" is unclear ("docshell" vs. "presshell").  Therefore, this
also renames `Document::GetShell()` to `Document::GetPresShell()`.

Similarly, some other method names of `Document` are also renamed from
`*Shell*` to `*PresShell*`.

Differential Revision: https://phabricator.services.mozilla.com/D25338

--HG--
extra : moz-landing-system : lando
2019-03-29 13:09:26 +00:00
Masayuki Nakano 2137fa4b14 Bug 1540015 - part 2: Make nsPresContext.h stop including nsIPresShel.h and nsIPresShellInlines.h r=smaug
`*Inlines.h` shouldn't be included by another header file, but `nsPresContext.h`
does it.  This causes include-hell which blocks the following fix.

Additionally, it causes an include hell between `PresShell.h` vs.
`nsIPresShell.h` and `nsPresContext.h if `Document.h` includes `PresShell.h`.
Therefore, this patch also solves this include hell with adding
`nsPresContextInlines.h`.

Differential Revision: https://phabricator.services.mozilla.com/D25333

--HG--
extra : moz-landing-system : lando
2019-03-29 12:13:08 +00:00
Botond Ballo 573a6eaafa Bug 1538511 - Move nsIScrollableFrame::ScrollMode into a separate file. r=kats
This allows this enumeration to be used from nsIPresShell.h without introducing
a circular dependency.

Its new home in layout/base/ScrollTypes.h, included as mozilla/ScrollTypes.h.
Others similar enums can be added to that file if desired.

This patch also makes ScrollMode an enum class (as it's no longer nested
inside a class) and switches its enumerators to the |eName| naming convention.

Differential Revision: https://phabricator.services.mozilla.com/D24796

--HG--
extra : moz-landing-system : lando
2019-03-25 23:17:20 +00:00
Masayuki Nakano db43e47173 Bug 1536366 - Make PresShell::EventHandler::PrepareToDispatchEvent() call TouchManager::PreHandleEvent() instead of PresShell::EventHandler::HandleEventWithCurrentEventInfo() r=smaug
The only caller of `TouchManager::PreHandleEvent()` is
`PresShell::EventHandler::HandleEventWithCurrentEventInfo()` which is guaranteed
that it never handles untrused event by bug 1536353.  Therefore, we can make
`PresShell::EventHandler::PrepareToDispatchEvent()` call it instead.  That's
better place from the point of view of semantics and making
`PresShell::EventHandler::PrepareToDispatchEvent()` simpler.

Note that this may cause changing the score of a telemetry probe,
"INPUT_EVENT_QUEUED_APZ_TOUCH_MOVE_MS" because it will include the time of
the runtime cost of `TouchManager::PreHandleEvent()` when the event is an
`eTouchMove` event and handled by APZ.  However, this was expired in 60.
So, we don't meet any changes with this patch actually.

Differential Revision: https://phabricator.services.mozilla.com/D24133

--HG--
extra : moz-landing-system : lando
2019-03-27 01:08:23 +00:00
Csoregi Natalia d105b005e8 Merge inbound to mozilla-central. a=merge 2019-03-26 19:43:22 +02:00
Masayuki Nakano dbf37b7d62 Bug 1536353 - part 2: Merge PresShell::EventHandler::PrepareToDispatchEvent() and PresShell::EventHandler::PrepareToDispatchContextMenuEvent() r=smaug
`PresShell::EventHandler::PrepareToDispatchEvent()` checked whether the
given event is a trusted event or an untrusted event, but
`PresShell::EventHandler::PrepareToDispatchOntextMenuEvent()` didn't so.
However, now, both of them don't need to check it.  Therefore, we can merge
them.

Differential Revision: https://phabricator.services.mozilla.com/D24132

--HG--
extra : moz-landing-system : lando
2019-03-26 10:04:43 +00:00
Masayuki Nakano f371fabc1b Bug 1536353 - part 1: Make PresShell::EventHandler stop checking WidgetEvent::IsTrusted() at runtime in release channel r=smaug
`PresShell::EventHandler` shouldn't be used to dispatch untrusted event.
However, it checks whether the given event is trusted or untrusted somewhere
and that makes the code harder to understand.  So, it should check each event
only with `MOZ_ASSERT()` or `MOZ_DIAGNOSTIC_ASSERT()` instead.  Then,
developers can trust the event is always a trusted event.

Differential Revision: https://phabricator.services.mozilla.com/D24131

--HG--
extra : moz-landing-system : lando
2019-03-26 10:02:06 +00:00
Cosmin Sabou ddfb7ebc97 Backed out changeset a04938b3a757 (bug 1536781) for android mochitest failures on test_settings_fontinflation.html.
--HG--
extra : rebase_source : 7ca18ca3408b1ad18e5d57ddf4b5ad986f2daa08
2019-03-25 13:45:38 +02:00
Olli Pettay abc400e3b3 Bug 1536781, use the same paint suppression delay on mobile and desktop, r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D24658

--HG--
extra : moz-landing-system : lando
2019-03-25 00:20:15 +00:00
Oana Pop Rus 90e63da7c3 Backed out 2 changesets (bug 1536353) for failing in 1397711.html on a CLOSED TREE
Backed out changeset 6ef59933242a (bug 1536353)
Backed out changeset 64a815f04641 (bug 1536353)
2019-03-22 05:29:03 +02:00
Masayuki Nakano 34f7f05430 Bug 1536353 - part 2: Merge PresShell::EventHandler::PrepareToDispatchEvent() and PresShell::EventHandler::PrepareToDispatchContextMenuEvent() r=smaug
`PresShell::EventHandler::PrepareToDispatchEvent()` checked whether the
given event is a trusted event or an untrusted event, but
`PresShell::EventHandler::PrepareToDispatchOntextMenuEvent()` didn't so.
However, now, both of them don't need to check it.  Therefore, we can merge
them.

Differential Revision: https://phabricator.services.mozilla.com/D24132

--HG--
extra : moz-landing-system : lando
2019-03-20 14:03:21 +00:00
Masayuki Nakano 0bb5218dd8 Bug 1536353 - part 1: Make PresShell::EventHandler stop checking WidgetEvent::IsTrusted() at runtime in release channel r=smaug
`PresShell::EventHandler` shouldn't be used to dispatch untrusted event.
However, it checks whether the given event is trusted or untrusted somewhere
and that makes the code harder to understand.  So, it should check each event
only with `MOZ_ASSERT()` or `MOZ_DIAGNOSTIC_ASSERT()` instead.  Then,
developers can trust the event is always a trusted event.

Differential Revision: https://phabricator.services.mozilla.com/D24131

--HG--
extra : moz-landing-system : lando
2019-03-20 13:58:55 +00:00
Olli Pettay 6143d2b90d Bug 1536781, use the same paint suppression delay on mobile and desktop, r=emilio
Differential Revision: https://phabricator.services.mozilla.com//D24804

--HG--
extra : rebase_source : 5fcdd643e253dcad6ab2f0c94ed3addd48724249
2019-03-25 14:44:56 +02:00
Masayuki Nakano a5791dba14 Bug 1466208 - part 45: Rename `aFrame` of `HandleEvent()` to `aFrameForPresShell` r=smaug
Now, other methods taking `aFrame` of `HandleEvent()` names the argument as
`aFrameForPresShell`.  So, `HandleEvent()`'s `aFrame` should also be renamed.

This patch renames it and adds MOZ_CAN_RUN_SCRIPT and comment to
`nsIPresShell::HandleEvent()`.

This is the final patch for bug 1466208.

Differential Revision: https://phabricator.services.mozilla.com/D22463

--HG--
extra : moz-landing-system : lando
2019-03-13 10:32:36 +00:00
Masayuki Nakano 229762b203 Bug 1466208 - part 44: Rename PresShell::EventHandler::HandleEventInternal() to HandleEventWithCurrentEventInfo() r=smaug
In my understanding, `PresShell::EventHandler::HandleEvent()` may redirect
the event to another class or PresShell first.  Otherwise, it computes
event target and sets current event info of mPresShell to it.  Then, calls
`HandleEventInternal()` to dispatch the event.  Then, `HandleEventInternal()`
may handle the event before dispatch, and/or prepare to dispatch, then,
finally dispatches the event and finalize the state of mPresShell and the
event.  Therefore, `HandleEventInternal()` actually handles the event, but
the word, "internal" is not explicitly explain its different points from
`HandleEvent()`.  Therefore, I think that `HandleEventWithCurrentEventInfo()`
is better name since `HandleEvent()` considers the current event info.

Differential Revision: https://phabricator.services.mozilla.com/D22462

--HG--
extra : moz-landing-system : lando
2019-03-12 04:25:13 +00:00
Masayuki Nakano 5c8444252b Bug 1466208 - part 43: Create PresShell::EventHandler::FinalizeHandlingEvent() r=smaug
Finally, we should move the last switch statement in `HandleEventInternal()`
to the new method.  Then, `HandleEventInternal() does nothing complicated
things by itself.

Differential Revision: https://phabricator.services.mozilla.com/D22461

--HG--
extra : moz-landing-system : lando
2019-03-11 01:52:40 +00:00
Boris Zbarsky 6f2f3304b0 Bug 1533617 part 1. Improve MOZ_CAN_RUN_SCRIPT annotations around synth mouse events. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D22835

--HG--
extra : moz-landing-system : lando
2019-03-11 14:58:04 +00:00
Masayuki Nakano 2e39c4ee90 Bug 1466208 - part 41: Create PresShell::EventHandler::DispatchEvent() r=smaug
This is the part which actually handles the event.  The new method should
notify EventStateManager of dispatching event before and after that, and
actually dispatch the event into the DOM.

Differential Revision: https://phabricator.services.mozilla.com/D22459

--HG--
extra : moz-landing-system : lando
2019-03-09 23:39:16 +00:00
Masayuki Nakano 930da74b1d Bug 1466208 - part 40: Create PresShell::EventHandler::PrepareToDispatchEvent() r=smaug
For making `PresShell::EventHandler::HandleEventInternal()` easier to read,
move the large switch statement for preparation into the new method.

Differential Revision: https://phabricator.services.mozilla.com/D21341

--HG--
extra : moz-landing-system : lando
2019-03-09 23:38:38 +00:00
Masayuki Nakano 1b0e6d02fe Bug 1466208 - part 39: Create PresShell::EventHandler::MaybeHandleKeyboardEventBeforeDispatch() r=smaug
`PresShell::EventHandler::HandleEventInternal()` may handle `Escape` key before
dispatching it in some cases.  This requires too many lines for somebody who
investigate the method for the other events.  Therefore, this patch moves it
into the new method.

Additionally, this patch creates `WidgetKeyboardEvent::CanTreatAsUserInput()`
and `WidgetKeyboardEvent::ShouldInteractionTimeRecorded()` because we should
manage similar checks in one place (we already have
`WidgetKeyboardEvent::CanUserGestureActivateTarget()`).  Finally, their
conditions are not enough for what the comment wants to do there since they do
not check some modifier keys.  Therefore, this patch makes them check all
possible modifier keys too.

Differential Revision: https://phabricator.services.mozilla.com/D21340

--HG--
extra : moz-landing-system : lando
2019-03-08 12:46:17 +00:00
Masayuki Nakano cca9243a46 Bug 1466208 - part 38: Create PresShell::EventHandler::PrepareToDispatchContextMenuEvent() r=smaug
The first switch statement of `PresShell::EventHandler::HandleEventInternal()`
has 2 jobs:
- Prepare something for specific event type.
- Record the preparation time of some types of events to telemetry.

This intermixed code is not easy to understand and somebody may add new
preparation after recording them.  So, even though the preparation time
becomes worse a couple of nanoseconds, we should split those jobs.

The patch moves the latter job into the new method.

Differential Revision: https://phabricator.services.mozilla.com/D21339

--HG--
extra : moz-landing-system : lando
2019-03-08 23:41:30 +00:00
Masayuki Nakano c59fa8ef73 Bug 1466208 - part 36: Create PresShell::EventHandler::PrepareToDispatchContextMenuEvent() r=smaug
If `Shift` state of `eContextMenu` event is active, we make it not fired on
web content.  Additionally, if it's not time to open context menu, we shouldn't
dispatch it into the DOM.  The new method prepare and check them.

Differential Revision: https://phabricator.services.mozilla.com/D21337

--HG--
extra : moz-landing-system : lando
2019-02-28 10:33:52 +00:00
Masayuki Nakano 20dc75af80 Bug 1466208 - part 34: Create a helper class, PresShell::EventHandler::HandlingTimeAccumulator() r=smaug
`PresShell::EventHandler::HandleEventInternal()` needs to accumulate event
handling time per each event type.  The handling start time needs to be
recorded before sending EventStateManager.  Therefore, this patch makes the
helper class which is a stack class, records current time at construction
and calls `Telemetry::AccumulateTimeDelta()` at destruction automatically.

Differential Revision: https://phabricator.services.mozilla.com/D21335

--HG--
extra : moz-landing-system : lando
2019-03-07 06:30:08 +00:00
Masayuki Nakano 6f89be791a Bug 1466208 - part 33: Create PresShell::EventHandler::RecordEventHandlingResponsePerformance() r=smaug
`PresShell::EventHandler::HandleEventInternal()` recodes event handling
response performance with telemetry after it dispatches the event.  We can move
it into new method simply.

Differential Revision: https://phabricator.services.mozilla.com/D21334

--HG--
extra : moz-landing-system : lando
2019-03-06 06:03:54 +00:00
Masayuki Nakano 90e0a6d2d9 Bug 1466208 - part 32: Create PresShell::EventHandler::HandleEventAtFocusedContent() and PresShell::EventHandler::HandleEventWithFrameForPresShell() r=smaug
The remaining part of `PresShell::EventHandler::HandleEvent()` does:
1. Handles the event at focused content.
2. Handles the event with given frame which is a frame for `mPresShell`.

For making them clearer, this patch moves them into new methods.

Differential Revision: https://phabricator.services.mozilla.com/D21197

--HG--
extra : moz-landing-system : lando
2019-03-06 06:03:31 +00:00
Masayuki Nakano 772c722daf Bug 1466208 - part 31: Create a PresShell::EventHandler::MaybeHandleEventWithAnotherPresShell() overload r=smaug
If focused element is in another document,
`PresShell::EventHandler::HandleEvent()` needs to retarget the event to another
`PresShell`.  This patch moves the case into new overload method,
`MaybeHandleEventWithAnotherPresShell()`.

Additionally, removes `PresShell::HandleRetargetedEvent()` and makes
`EventHandler::HandleRetargetedEvent()` non-public because the new method
is the only user of them.

Differential Revision: https://phabricator.services.mozilla.com/D21196

--HG--
extra : moz-landing-system : lando
2019-03-05 06:09:02 +00:00
Masayuki Nakano f410998652 Bug 1466208 - part 30: Create PresShell::EventHandler::AutoCurrentEventInfoSetter class r=smaug
With splitting `HandleEvent()` a lot, it becomes more difficult to keep
managing each set of calling `PushCurrentEventInfo()` and
`PopCurrentEventInfo()`.  So, `EventHandler` should have a helper class
to push and pop current event info into/from the stack.

Differential Revision: https://phabricator.services.mozilla.com/D21198

--HG--
extra : moz-landing-system : lando
2019-03-04 06:12:22 +00:00
Masayuki Nakano 47ef72825f Bug 1466208 - part 29: Create PresShell::EventHandler::ComputeFocusedEventTargetElement() r=smaug
Most remaining code in `PresShell::EventHandler::HandleEvent()` is what computes
event target of the event which should be handled on focused content.  This
patch moves the part to the new method.

Additionally, moves `nsIPresShell::gKeyDownTarget` to
`EventHandler::sLastKeyDownEventTargetElement` and make it use `StaticRefPtr`.

Finally, for using `Element*` instead of `nsIContent*`, changes the result type
of `Document::GetUnfocusedKeyEventTarget()` to `Element*`.

Differential Revision: https://phabricator.services.mozilla.com/D21195

--HG--
extra : moz-landing-system : lando
2019-03-04 06:11:41 +00:00
Masayuki Nakano 291457b9da Bug 1466208 - part 27: Create PresShell::EventHandler::HandleEventUsingCoordinates() r=smaug
Now, the block in HandleEvent(), which handles event using coordinates is
less than 200 lines.  Perhaps, this is good amount to be split to a method.

This patch just moves the block to a new method.

Differential Revision: https://phabricator.services.mozilla.com/D21193

--HG--
extra : moz-landing-system : lando
2019-03-02 00:03:01 +00:00
Masayuki Nakano fcb0072133 Bug 1466208 - part 26: Create PresShell::EventHandler::EventTargetData::UpdateTouchEventTarget() r=smaug
After dispatching pointer events, `PresShell::EventHandler::HandleEvent()`
updates event target only when the event is a touch event.  We should do it in
a new method of `EventTargetData`.

Although I don't know why this is done in
`PresShell::EventHandler::DispatchPrecedingPointerEvent()`.

Differential Revision: https://phabricator.services.mozilla.com/D21192

--HG--
extra : moz-landing-system : lando
2019-03-02 00:02:10 +00:00
Masayuki Nakano 72ca6260c0 Bug 1466208 - part 25: Create PresShell::EventHandler::DispatchPrecedingPointerEvent() r=smaug
Now, we can move the block dispatching preceding pointer event to separated
method.  Then, we can hide the complicated retarget process after dispatching
a pointer event from HandleEvent().

Differential Revision: https://phabricator.services.mozilla.com/D21191

--HG--
extra : moz-landing-system : lando
2019-03-01 02:02:31 +00:00
Masayuki Nakano cfd764b949 Bug 1466208 - part 24: Move `overrideClickTarget` into EventTargetData r=smaug
Currently, PresShell::EventHandler::HandleEvent() sets `overrideClickTarget`
only when Pointer Events is enabled and there is pointer capturing content,
and this is computed while dispatching a pointer event.

So, if we move it into EventTargetData, we can move the pointer event
dispatching block into a separated method and caller can receive it with
an EventTargetData instance which is anyway necessary to receive new
target frame after dispatching a pointer event.

Differential Revision: https://phabricator.services.mozilla.com/D21190

--HG--
extra : moz-landing-system : lando
2019-03-01 01:58:02 +00:00
Masayuki Nakano 1a1542b28c Bug 1466208 - part 23: Create PresShell::EventHandler::ComputeEventTargetFrameAndPresShellAtEventPoint() r=smaug
We cannot move each block into separated methods while computing EventTargetData
because we need to check capturing contents, etc.  Therefore, only each block
should be moved to separated methods for now.

This moves a block which computes event target from point of the event.  If
this can be moved to EventTargetData, it might be easier to understand, but
its helper method GetFrameToHandleNonTouchEvent() requires to access members
of EventHandler.  Therefore, we need to treat EventTargetData as an out param
of the new method.

Differential Revision: https://phabricator.services.mozilla.com/D21189

--HG--
extra : moz-landing-system : lando
2019-02-27 13:59:30 +00:00
Masayuki Nakano ab3745273c Bug 1466208 - part 22: Create PresShell::EventHandler::EventTargetData::ComputeElementFromFrame() r=smaug
This patch moves the block to compute event target of the event using
coordinates into the new method of PresShell::EventHandler::EventTargetData.

Differential Revision: https://phabricator.services.mozilla.com/D19320

--HG--
extra : moz-landing-system : lando
2019-02-18 04:33:06 +00:00
Masayuki Nakano cdf451cbdd Bug 1466208 - part 20: Create PresShell::EventHandler::EventTargetData::MaybeRetargetToActiveDocument() r=smaug
Now, we can create methods to update event target into EventTargetData().
This moves a block in PresShell::EventHandler::HandleEvent() to retarget
to active document into the new method.

Differential Revision: https://phabricator.services.mozilla.com/D19318

--HG--
extra : moz-landing-system : lando
2019-02-15 02:06:31 +00:00
Masayuki Nakano 43ddca81c8 Bug 1466208 - part 19: Group PresShell, nsIFrame and nsIContent with a struct r=smaug
PresShell::EventHandler::HandleEvent() looks for PresShell, nsIFrame and
nsIContent a lot for aGUIEvent.  Sometimes part of them are modified,
otherwise, all of them are modified by some reasons.  Therefore, for
splitting each of the modifiers into separated methods, we need a struct
for making them as a group and usable for in/out parameter.

(If you have some ideas of better name, let me know.)

Differential Revision: https://phabricator.services.mozilla.com/D19317

--HG--
extra : moz-landing-system : lando
2019-02-12 23:23:27 +00:00
Masayuki Nakano ac6fccbe32 Bug 1466208 - part 18: Create PresShell::EventHandler::MaybeDiscardOrDelayMouseEvent() r=smaug
This patch moves the block, which discard or put the event into the delayed event
queue if handling event is a mouse event, to new method.

Differential Revision: https://phabricator.services.mozilla.com/D19301

--HG--
extra : moz-landing-system : lando
2019-02-12 04:12:20 +00:00
Masayuki Nakano 46b802fc11 Bug 1466208 - part 17: Make PresShell::EventHandler::HandleEventWithPointerCapturingContentWithoutItsFrame() to handle event when there is pointer capturing content but it does not have primary frame r=smaug
This patch splits the part handling event when there is pointer capturing
content but it does not have frame.

Differential Revision: https://phabricator.services.mozilla.com/D19300

--HG--
extra : moz-landing-system : lando
2019-02-12 04:10:33 +00:00
Masayuki Nakano 0c300040e9 Bug 1506508 - Make PresShell::EventHandler::HandleEvent() flush any dirty region before deciding to event target of eMouseDown and eMouseUp r=smaug
When preceding mouse event is handled, that may cause changing style of the
target.  Therefore, when an eMouseDown or eMouseUp event is handled, handlers
require the latest layout.  Currently, nsViewManager::DispatchEvent() tries
to guarantee that with calling nsIPresShell::FlushPendingNotifications()
with FlushType::Layout.  However, this just flushes the pending layout in
the PresShell associated with the nsViewManager instance.  I.e., if the
target is in a child PresShell, its layout hasn't been flushed.

This patch makes PresShell::EventHandler::HandleEvent() flush pending
notifications at first of handling events using coordinates (only when
eMouseDown or eMouseUp, though).  Then, when it realizes that the event
should be handled in a child PresShell, makes it flush its pending
notifications and then, recompute event target with the latest layout if
the layout is actually changed.

Differential Revision: https://phabricator.services.mozilla.com/D13720

--HG--
extra : moz-landing-system : lando
2019-02-11 23:25:45 +00:00
Masayuki Nakano 9e085b54d8 Bug 1466208 - part 15: Split PresShell::EventHandler::ComputeRootFrameToHandleEvent() r=smaug
PresShell::EventHandler::ComputeRootFrameToHandleEvent() computes root frame
to handle event with popup frame and/or capturing content.  The former result
can be rewritten with the latter.  So, for cleaning it up with early return
style, we need to split it to 2 methods.

Differential Revision: https://phabricator.services.mozilla.com/D18525

--HG--
extra : moz-landing-system : lando
2019-02-08 23:10:13 +00:00
Masayuki Nakano 33f04c5177 Bug 1466208 - part 14: Create PresShell::EventHandler::ComputeRootFrameToHandleEvent() r=smaug
In some reasons, handling event should be handled in specific frame even if
the coordinates are out of the frame.  PresShell::EventHandler::HandleEvent()
computes it with popups, capturing content, etc.  This patch moves the blocks
into new method for making HandleEvent() simpler.

Note that most of the code is just moved.  The following patch will clean it
up.

Differential Revision: https://phabricator.services.mozilla.com/D18523

--HG--
extra : moz-landing-system : lando
2019-02-08 07:11:01 +00:00
Masayuki Nakano 2719af4bb6 Bug 1466208 - part 13: Create PresShell::EventHandler::MaybeFlushThrottledStyles() r=smaug
PresShell::EventHandler::HandleEvent() tries to flush pending animation first
when it decides frame to handle events using coordinates.  This patch moves
the code into the new method.

Differential Revision: https://phabricator.services.mozilla.com/D18522

--HG--
extra : moz-landing-system : lando
2019-02-08 05:05:45 +00:00
Masayuki Nakano 3ebe8914da Bug 1466208 - part 11: Create PresShell::EventHandler::MaybeDiscardOrDelayKeyboardEvent() r=smaug
PresShell::EventHandler::HandleEvent() discards or puts off to dispatch
the handling event if it's a keyboard event and event dispatching is
suppressed by the document.

This patch moves the block into the new method for making HandleEvent() simpler.

Differential Revision: https://phabricator.services.mozilla.com/D18520

--HG--
extra : moz-landing-system : lando
2019-02-07 01:49:31 +00:00
Masayuki Nakano 1895d1bfe3 Bug 1514940 - part 1: Forcibly disable new keyCode/charCode value of keypress events if the document is Confluence r=smaug,Ehsan,kmag
Old Confluence does not aware of conflated model keypress event (see UI Events
spec, https://w3c.github.io/uievents/#determine-keypress-keyCode).
Additionally, Confluence can be hosted with any domains.  Therefore, we cannot
use blacklist to disable the conflated model keypress event only on it.

This patch checks whether current or parent document is Confluence with JS
module, called KeyPressEventModelCheckerChild.  For kicking this module,
nsHTMLDocument dispatches an custom event, CheckKeyPressEventModel, when it
becomes editable only first time.  Finally, if it's a Confluence instance, the
module let PresShell know that we need to use split model keypress event in it.

Differential Revision: https://phabricator.services.mozilla.com/D17907

--HG--
extra : moz-landing-system : lando
2019-02-05 11:35:43 +00:00
Masayuki Nakano 1ff659133d Bug 1466208 - part 10: Create PresShell::EventHandler::MaybeDiscardEvent() to check whether it's safe to handle the event r=smaug
It may not be safe to handle events even when
PresShell::EventHandler::HandleEvent().  In such case, we need to discard
received events with notifying somebody.  This patch move this rare case
jobs into the new method, MaybeDiscardEvent().  Then, the caller, HandleEvnet(),
becomes easier to read.

Differential Revision: https://phabricator.services.mozilla.com/D16960

--HG--
extra : moz-landing-system : lando
2019-02-02 02:20:28 +00:00
Masayuki Nakano 1cd52b1c57 Bug 1466208 - part 9: Create PresShell::EventHandler::MaybeHandleEventWithAnotherPresShell() to handle event with another PresShell if necessary r=smaug
Let's move the redirection of coming event in
PresShell::EventHandler::HandleEvent() into a method.  This makes the caller
easier to read.

Differential Revision: https://phabricator.services.mozilla.com/D16959

--HG--
extra : moz-landing-system : lando
2019-02-02 02:20:25 +00:00
Masayuki Nakano 2e1d79e20f Bug 1466208 - part 7: Create PresShell::EventHandler::GetFrameForHandlingEventWith() to retrieve a frame which is necessary to handle event with another PresShell instance r=smaug
Next, we need to look for a frame for first parameter of calling
PresShell::HandleEvent() of another PresShell instance.  This patch creates
PresShell::EventHandler::GetFrameForHandlingEventWith() to do it.

Unfortunately, the result is used in 3 patterns.  One is, the caller should
stop handling the event.  Another one is, the caller should keep handling
the event by itself.  The other is, the caller should call
PresShell::HandleEvent() of different PresShell instance.  Therefore, this
patch makes the method take aFrame of the caller.  Then, the caller can check
the last 2 patterns with check the result is same as aFrame.  This is not so
smart approach, but I have no better idea without adding a bool argument or
making the return type bool and adding out argument of nsIFrame.

Differential Revision: https://phabricator.services.mozilla.com/D16957

--HG--
extra : moz-landing-system : lando
2019-02-01 02:15:54 +00:00
Masayuki Nakano ed89310149 Bug 1466208 - part 5: Create PresShell::EventHandler::GetRetargetEventDocument() retrieve retarget document of coming event r=smaug
In some cases, PresShell::EventHandler::HandleEvent() needs to call
HandleEvent() of another instance.

For retrieving the instance, we need to compute retarget document first.
This patch makes new method to retrieve it.  The following patch will clean
up it.

Differential Revision: https://phabricator.services.mozilla.com/D16955

--HG--
extra : moz-landing-system : lando
2019-01-31 02:24:51 +00:00
Masayuki Nakano 6a6fca62ba Bug 1466208 - part 4: Create PresShell::EventHandler::GetCapturingContentFor() to retrieve capturing content for specific event r=smaug
PresShell::HandleEvent() treats capturing content only when received event is
related to pointing device.  And it's used in 2 purposes.  One is for computing
to target document of coming event.  The other is for handling events using
coordinates.  Therefore, if we create a helper method to retrieve it, we can
move the variable into smaller blocks.

Differential Revision: https://phabricator.services.mozilla.com/D16954

--HG--
extra : moz-landing-system : lando
2019-01-30 07:17:43 +00:00
Emilio Cobos Álvarez ed86efb17c Bug 1523062 - Devirtualize a few nsIPresShell bits. r=TYLin,rhunt
No good reason they're virtual, since there's only one nsIPresShell
implementation.

Differential Revision: https://phabricator.services.mozilla.com/D17735
2019-01-29 15:24:31 +01:00
Masayuki Nakano 9c2714dfdc Bug 1466208 - part 2: Create PresShell::EventHandler::MaybeHandleEventWithAccessibleCaret() to handle event with AccessbleCaretEventHub r=smaug
PresShell::EventHandler::HandleEvent() is too big.  That makes us difficult to
understand the flow of them.  So, first of all, we should split the method to
smaller chunks.  Then, we can understand what we're doing in HandleEvent() more.

This patch creates MaybeHandleEventWithAccessibleCaret() for first handling
block in HandleEvent().  Note that the following patch will clean it up.
I.e., this patch just moves the existing block into the new method.

Differential Revision: https://phabricator.services.mozilla.com/D16952

--HG--
extra : moz-landing-system : lando
2019-01-29 10:30:35 +00:00
Masayuki Nakano 015f67628e Bug 1466208 - part 1: Create stack class to handle events in PresShell r=smaug
PresShell::HandleEvent() and PresShell::HandleEventInternal() are too big.
Additionally, we have a lot of methods used only by them.  So, if we'll
split those big methods, PresShell will have a lot of small methods which
are not grouped as a part of event handling.  That's too bad because some
of them may depend on the calling order, etc.

So, for grouping them, PresShell should create a stack class instance to handle
each event.  Then, we can store shared information in it only while we're
handling an event.

This patch creates PresShell::EventHandler and PresShell methods become
wrappers of the stack class, but this patch does not change any logic in the
code, i.e., just reorganizing existing methods.

Note that HandleEventWithTarget() and HandleEventInternal() need to take
WidgetEvent rather than WidgetGUIEvent.  Additionally, some other methods
require WidgetGUIEvent to refer WidgetGUIEvent::mWidget.  Therefore, this
patch does not make the new class store the event as a member.

Differential Revision: https://phabricator.services.mozilla.com/D16951

--HG--
extra : moz-landing-system : lando
2019-01-29 06:04:05 +00:00
Ehsan Akhgari e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
Ryan Hunt 5c7254fba8 Bug 1519462 - Coalesce all scroll anchor adjustments to be performed after layout when flushing notifcations. r=dholbert
We currently perform anchor adjustment in three spots:
  1. If the target of RestyleManager::RecomputePosition is in a scroll anchor chain
  2. If the reflow root is in a scroll anchor chain
  3. In nsHTMLScrollFrame::DidReflow, for itself

It looks like it's possible for a scroll anchor container to be adjusted by (1)
and (2 or 3) in the same PresShell flush.

This should be okay, except that we consume mSuppressAnchorAdjustment when
performing an adjustment, and this can lead us to miss the second time that
we perform adjustments in a PresShell flush.

This commit reworks how we run anchor adjustments so that we collect all
scroll anchor containers that should be adjusted, and only perform the
adjustments once.

Differential Revision: https://phabricator.services.mozilla.com/D16407

--HG--
extra : source : cbdbd08379d99f9d55f756c57d728c28331be5da
2019-01-13 00:54:05 -06:00
Ryan Hunt c7b7401684 Bug 1305957 part 6 - Select scroll anchors when flushing notifications in PresShell. r=hiro
This commit adds a mechanism for scroll anchor containers to request an anchor
node selection at a future time. Currently this is before styling so that anchor
adjustment suppression will have current anchor nodes.

Differential Revision: https://phabricator.services.mozilla.com/D13269

--HG--
extra : rebase_source : 7af2dcc7953e446eb993625fa7ff32aa5a141eab
extra : source : e7124fecb7215769a5404c5f2268bbe715162393
2018-11-27 15:32:47 -06:00
Bogdan Tara 6d78d1e2c9 Backed out 15 changesets (bug 1305957) for ASAN failures CLOSED TREE
Backed out changeset 4d5eb85d3155 (bug 1305957)
Backed out changeset 51c86d025ecb (bug 1305957)
Backed out changeset d8eef8f3e396 (bug 1305957)
Backed out changeset 950bf6ad1ef2 (bug 1305957)
Backed out changeset b4cb2cbebdb6 (bug 1305957)
Backed out changeset bfca5019a9cc (bug 1305957)
Backed out changeset e76b842c7b7f (bug 1305957)
Backed out changeset d9445a5f3458 (bug 1305957)
Backed out changeset d9052f7b34d9 (bug 1305957)
Backed out changeset e7124fecb721 (bug 1305957)
Backed out changeset bdb766faa867 (bug 1305957)
Backed out changeset 3033401ef320 (bug 1305957)
Backed out changeset 6b96050386f6 (bug 1305957)
Backed out changeset c66c00f73296 (bug 1305957)
Backed out changeset 6bd0bdab93cb (bug 1305957)
2019-01-10 18:49:22 +02:00
Ryan Hunt 8976d6f7f7 Bug 1305957 part 6 - Select scroll anchors when flushing notifications in PresShell. r=hiro
This commit adds a mechanism for scroll anchor containers to request an anchor
node selection at a future time. Currently this is before styling so that anchor
adjustment suppression will have current anchor nodes.

Differential Revision: https://phabricator.services.mozilla.com/D13269

--HG--
extra : rebase_source : ba621678b697847e59203444d7b6b0e737742675
extra : histedit_source : b0c6f8642a01bd8ded312d0fa27eecd55c4422a9
2018-11-27 15:32:47 -06:00
Emilio Cobos Álvarez d2ed260822 Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug
Summary: Really sorry for the size of the patch. It's mostly automatic
s/nsIDocument/Document/ but I had to fix up in a bunch of places manually to
add the right namespacing and such.

Overall it's not a very interesting patch I think.

nsDocument.cpp turns into Document.cpp, nsIDocument.h into Document.h and
nsIDocumentInlines.h into DocumentInlines.h.

I also changed a bunch of nsCOMPtr usage to RefPtr, but not all of it.

While fixing up some of the bits I also removed some unneeded OwnerDoc() null
checks and such, but I didn't do anything riskier than that.
2019-01-03 17:48:33 +01:00
Hiroyuki Ikezoe 79798c6cd2 Bug 1516368 - De-virtualize nsIPresShell::IsResolutionUpdated and SetResolutionUpdated. r=botond
Depends on D15342

Differential Revision: https://phabricator.services.mozilla.com/D15343

--HG--
extra : moz-landing-system : lando
2018-12-30 02:17:30 +00:00
Hiroyuki Ikezoe 529616ef3a Bug 1516368 - Change SetResolutionAndScaleTo to take an enum instead of an nsAtoms*. r=botond
There is no reason to use nsAtoms*, it's error prone, i.e. the function
can take arbitrary nsAtoms*.

Depends on D15339

Differential Revision: https://phabricator.services.mozilla.com/D15340

--HG--
extra : moz-landing-system : lando
2018-12-30 02:16:42 +00:00
Sylvestre Ledru 7cf43b9bc0 Bug 1513205 - Ride along, update some code to match the Google coding style r=Ehsan
# ignore-this-changeset

Depends on D14595

Differential Revision: https://phabricator.services.mozilla.com/D14597

--HG--
extra : moz-landing-system : lando
2018-12-14 18:10:08 +00:00
L. David Baron bcf8270be5 Bug 1159042 - p2. Allow reflow roots to have overflow, and allow that overflow to change during reflow - r=dbaron,dholbert
Differential Revision: https://phabricator.services.mozilla.com/D9488

--HG--
extra : moz-landing-system : lando
2018-12-11 20:31:09 +00:00
Botond Ballo 4e2bbb39df Bug 1512267 - If you set a pres shell resolution, you must scale to it. r=kats,JanH
Differential Revision: https://phabricator.services.mozilla.com/D13928

--HG--
extra : moz-landing-system : lando
2018-12-10 19:32:59 +00:00
Botond Ballo a88fd1acef Bug 1511137 - Track more accurately when the main thread originates a resolution change. r=kats
The tracking is done using nsAtom origins, similarly to how updates to the
scroll offset are tracked.

Currently, APZ still uses some heuristics to deduce that the main thread
originated a resolution change in some cases, but the intention is to try
to remove those and rely only on this mechanism in the future.

Differential Revision: https://phabricator.services.mozilla.com/D13741

--HG--
extra : moz-landing-system : lando
2018-12-05 16:29:18 +00:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Masayuki Nakano af36a869b3 Bug 1496288 - part 1: Make blacklist prefs for keypress event behavior changes ride the train r=smaug
Basically, we shouldn't have blacklist to disable web API.  However, the
keypress event behavior changes are not standardized things.  Therefore,
if some web developers realize that they need to change their apps when
it's too late for them, Firefox users need to use another browser for
such web apps for several weeks or more, and such things may make the users
switch their default browser.  For avoiding such worst scenario, we should
take the blacklists and if we get such compatibility reports, we should
add the domains into the blacklist even in release channel.

Differential Revision: https://phabricator.services.mozilla.com/D13374

--HG--
extra : moz-landing-system : lando
2018-11-29 15:04:18 +00:00
Dorel Luca fbe4ae9803 Backed out 6 changesets (bug 1159042) for crashtest failures. CLOSED TREE
Backed out changeset fe77c09dee31 (bug 1159042)
Backed out changeset db0e173a6ed2 (bug 1159042)
Backed out changeset 080b9ceee8ec (bug 1159042)
Backed out changeset 6a5191742ca1 (bug 1159042)
Backed out changeset 3a86c3e65d44 (bug 1159042)
Backed out changeset 845bc8316b05 (bug 1159042)
2018-11-27 06:30:07 +02:00
L. David Baron 66aa3977ba Bug 1159042 - p2. Allow reflow roots to have overflow, and allow that overflow to change during reflow - r=dbaron,dholbert
Differential Revision: https://phabricator.services.mozilla.com/D9488

--HG--
extra : moz-landing-system : lando
2018-11-25 22:07:39 +00:00
Daniel Holbert 9626dd9523 Bug 1507313 part 3: Convert PresShell::mDelayedEvents into an array of UniquePtr (rather than nsAutoPtr). r=TYLin
Differential Revision: https://phabricator.services.mozilla.com/D11947

--HG--
extra : moz-landing-system : lando
2018-11-15 07:40:52 +00:00
Daniel Holbert d7065b05db Bug 1507313 part 2: Convert PresShell::mReflowCountMgr into a UniquePtr (rather than an owning raw pointer). r=TYLin
Differential Revision: https://phabricator.services.mozilla.com/D11946

--HG--
extra : moz-landing-system : lando
2018-11-15 07:27:50 +00:00
Masayuki Nakano 2d19d947df Bug 1502795 - Set keyCode or charCode of keypress event whose value is zero to the other's non-zero value by default again unless dispatched on known broken web apps r=smaug
This patch re-enables the new behavior of bug 1479964, to set keyCode or
charCode of keypress event whose value is zero to the other's non-zero value.

However, some web apps are still broken with the new behavior.  Therefore,
this patch adds a blacklist to keep using our legacy behavior in some specific
web apps.

Note that Google Docs, Gmail and Remember The Milk are reported as broken.
However, I don't see any broken shortcut with Gmail.  Therefore, this patch
adds only Google Docs and Remeber The Milk into the blacklist.

Differential Revision: https://phabricator.services.mozilla.com/D10322

--HG--
extra : moz-landing-system : lando
2018-11-07 06:39:10 +00:00
Botond Ballo cd9f025985 Bug 1502566 - When entering fullscreen mode, use the intrinsic resolution rather than a resolution of 1. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D10754

--HG--
extra : moz-landing-system : lando
2018-11-02 21:18:42 +00:00
Masayuki Nakano 09c4ea6dd3 Bug 1482425 - PresShell::PageMove() should use different rules to look for a container element for aExtend value r=smaug
PresShell::PageMove() climbs up to parent document when there is no scrollable
parent in current document.  However, if aExtend is true, it should expand
Selection in the document itself.  Therefore, it needs different rules to
look for container of expanding Selection from scrollable element to scroll.

Additionally, old rules (i.e., before the fix of bug 1369072 which caused
this regression) were also buggy.  It used parent scrollable element or
root scrollable element simply.  Therefore, if found scrollable element is
ancestor of selection limiter, it didn't work as expected.

This patch creates nsFrameSelection::GetFrameToPageSelect() to retrieve
per-page selection container element with the following rules:
- look for a scrollable element in selection limiter.
- if there is no scrollable element, use selection limiter.
- if there is no selection limiter, use the root frame.

So, nsFrameSelection::CommonPageMove() should take nsIFrame rather than
nsIScrollableFrame since container of per-page selection may be used in
non-scrollable contenteditable element.  If it's called with non-scrollable
frame, it needs to compute the expanding range with the frame size.

Differential Revision: https://phabricator.services.mozilla.com/D8954

--HG--
extra : moz-landing-system : lando
2018-10-18 04:42:53 +00:00
Edgar Chen 92ec9a1f2a Bug 1473108 - Part 1: Devirtualize nsIPresShell::GetCurrentEventFrame/GetEventTargetContent; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D8041

--HG--
extra : moz-landing-system : lando
2018-10-09 09:47:58 +00:00
Brad Werth 6ceb1e8b1e Bug 1290420 Part 4: Make the PresShell create a MobileViewportManager on demand. r=botond,smaug
Depends on D3376

Differential Revision: https://phabricator.services.mozilla.com/D3377

--HG--
extra : moz-landing-system : lando
2018-10-04 03:28:40 +00:00
Daniel Varga 36ff93dc81 Backed out 4 changesets (bug 1290420) for devtools failures on rowser_styleeditor_media_sidebar_links.js on a CLOSED TREE
Backed out changeset 210fdc42d29f (bug 1290420)
Backed out changeset 1d9dad3046ee (bug 1290420)
Backed out changeset a6eb531e1216 (bug 1290420)
Backed out changeset 755a32f27943 (bug 1290420)
2018-09-13 03:09:25 +03:00
Brad Werth 79b8525535 Bug 1290420 Part 4: Make the PresShell create a MobileViewportManager on demand. r=botond,smaug
Depends on D3376

Differential Revision: https://phabricator.services.mozilla.com/D3377

--HG--
extra : moz-landing-system : lando
2018-09-12 22:39:38 +00:00
Edgar Chen 08067b0f64 Bug 1488728 - Remove PresShell::GetEventTargetFrame; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D5025

--HG--
extra : moz-landing-system : lando
2018-09-05 13:36:35 +00:00
Neil Deakin a399d3073b Bug 1473029, convert drag services to internally use CSSIntRegion instead ns nsIScriptableRegion, r=mstange 2018-08-07 09:32:08 -04:00
Dan Glastonbury 165882c3b0 Bug 1330375 - P1: Helper for checking for ancestor of dirty reflow root. r=emilio,heycam,rwood
Including refactoring mDirtyRoots into nsIPresShell to avoid virtual call.

MozReview-Commit-ID: KxST8FMsZl9

--HG--
extra : rebase_source : 1be1a8065815bb1e67293c7839c6e9189fc693bc
2018-07-19 14:18:53 +10:00
Florian Quèze 3c68ddcf79 Bug 962528 - Update the UI resolution synchronously to avoid painting the UI once at the wrong resolution when moving a window across screens of different resolutions, r=mstange. 2018-07-04 16:31:03 +02:00
Mike Conley f88719f6e0 Bug 1449756 - Make DisplayPort suppression PresShell specific and not process global. r=kats
Originally, DisplayPort suppression was a process-global static. This change makes it possible
to control DisplayPort suppression on a per-PresShell basis.

Differential Revision: https://phabricator.services.mozilla.com/D1759
2018-06-25 21:42:25 +00:00
Boris Zbarsky 9748db120d Bug 1455676 part 8. Remove nsIDOMNode usage from layout/. r=qdot 2018-05-29 22:58:48 -04:00
Boris Zbarsky 6213894581 Bug 1455676 part 3. Remove nsIDOMNode usage from widget/. r=qdot 2018-05-29 22:58:48 -04:00
Emilio Cobos Álvarez cb56e2c9f3 Bug 1459529: Remove UPDATE_STYLE. r=heycam
Now that BeginUpdate is useless for the UPDATE_STYLE case, we don't need the
update mechanism at all. Just ensure that ApplicableStylesChanged is called on
the pres shell via the relevant RuleChanged, etc. notifications.

There's a big hidden gotcha here. nsIDocument::BeginUpdate does put a script
blocker on the stack for these updates. However it's not needed, since no script
can run during these notifications (only the stylesheet events we post for
devtools, but those use AsyncEventDispatcher and PostDOMEvents, so they don't
try to run immediately).

nsIDocument::BeginUpdate also does XBL binding attached queue stuff, but we
can't change bindings during these notifications anyway, so it also doesn't
matter.

MozReview-Commit-ID: HJvK6zQfloh
2018-05-15 18:44:29 +02:00
Emilio Cobos Álvarez 6380ec638d Bug 1459529: Remove PresShell::BeginUpdate. r=heycam
It's useless after the last patch.

MozReview-Commit-ID: LdljMfnMjTy
2018-05-15 18:44:27 +02:00
Boris Zbarsky a44e6132ff Bug 1387143 part 28. Remove nsISelection::AsSelection(). r=mats 2018-05-08 13:52:42 -04:00
Boris Zbarsky 46cae9462a Bug 1387143 part 3. Stop using nsISelection in nsISelectionController. r=mats 2018-05-08 13:52:36 -04:00
Emilio Cobos Álvarez 2a42c4ed18 Bug 1457920: Merge ServoStyleSheet and StyleSheet. r=xidorn
These are the most minimal changes I could make. More cleanups incoming.

MozReview-Commit-ID: AdMOA1acQIH
2018-05-02 04:13:10 +02:00
Boris Zbarsky ffa08d7425 Bug 1455674 part 9. Remove nsIDOMElement use from nsIFocusManager. r=qdot 2018-04-26 23:35:19 -04:00
Boris Zbarsky f1e26dcba7 Bug 1455052 part 1. Switch event dispatch to working with Event, not nsIDOMEvent. r=masayuki
MozReview-Commit-ID: 4vZgmBnTWKH
2018-04-20 12:53:16 -04:00
Masayuki Nakano c389fb3752 Bug 1440189 - Stop dispatching keypress event to the default event group in web content (only Nightly and early Beta) unless web page isn't in blacklist r=smaug
UI Events declares that keypress event should be fired only when the keydown
sequence produces some characters.  For conforming to UI Events and
compatibility with the other browsers, we should stop dispatching keypress
events for non-printable keys.

For getting regression reports, we should enable this new behavior only
on Nightly.

However, some web apps actually broken with the standardized behavior.  For
protecting testers from known broken web apps, this patch introduces a
blacklist to take the traditional behavior under specific domain (and path in
it, optionally).  Currently, docs.google.com and mail.google.com are set by
default.

MozReview-Commit-ID: HSrYX8LUB0p

--HG--
extra : rebase_source : a2677d07410af289534db051767543a25c9a957a
2018-03-23 12:06:55 +09:00
Emilio Cobos Álvarez a2cb2d85cd Bug 1447827: Remove unused hover generation. r=xidorn
Not worth to keep the dead code, even if we may end up having to do something
about it in bug 1376082.

MozReview-Commit-ID: 8GG7O9ujtk0
2018-04-07 15:50:59 +02:00
Emilio Cobos Álvarez e42b195001 Bug 1451217: Remove VerifyStyleTree stuff. r=xidorn
MozReview-Commit-ID: DDXMq9WkUkE
2018-04-04 13:34:11 +02:00
Ciure Andrei 5d841a3421 Merge inbound to mozilla-central. a=merge 2018-03-30 01:06:18 +03:00
Olli Pettay 57fd877895 Bug 1447993, when handling pointerup while there is pointercapture, do a hit test in order to find the click target, r=masayuki
--HG--
extra : rebase_source : 160ef0aae3922cb32b11476650c15a3f55334691
2018-03-29 19:22:59 +03:00
Emilio Cobos Álvarez e81a508a48 Bug 1435632: Fix the logic to do layout stuff after reassigning a slot. r=smaug,xidorn
The dirty bit fiddling is nontrivial, but it's pretty much what we do for
invalidation and allows to keep this incrementally easily.

The only caller that we cared about for the GetFlattenedTreeParent check in
DestroyFramesForAndRestyle was the old ShadowRoot invalidation functions that
went away.

MozReview-Commit-ID: GmgPPJ6d2qX
2018-03-29 12:34:38 +02:00
Boris Zbarsky a8a190f4e1 Bug 1447889 part 14. Remove mention of nsIDOMRange from layout/. r=mystor
MozReview-Commit-ID: JWJWGzY45ac
2018-03-27 00:35:22 -04:00
Xidorn Quan 4cf9aed667 Bug 1449400 part 5 - Remove StyleSetHandle. r=emilio
This patch basically does:
* remove StyleSetHandle and its corresponding files
* revisit #includes of related header files and change correspondingly
* change nsIPresShell::mStyleSet to be UniquePtr<ServoStyleSet>
* change the creating path of ServoStyleSet to pass UniquePtr
* change other mentions of StyleSetHandle to ServoStyleSet*
* remove AsServo() calls on ServoStyleSet

Some unfortunate bits:
* some methods of (Servo)StyleSet only accepts ServoStyleSheet while
  many places call into the methods with StyleSheet, so there are many
  ->AsServo() added to sheets

MozReview-Commit-ID: K4zYnuhOurA

--HG--
extra : rebase_source : 459e8efeb171adad089d94272e143e8c244bd279
extra : source : 65ba2f174fcf7dba4e59c00ee8908b1bd0820a48
2018-03-29 22:15:46 +11:00
Xidorn Quan b332985cd4 Bug 1449400 part 3 - Remove ServoStyleSet::RecordStyleSheetChange and its trivial callsites. r=emilio
It is no longer used, and removing this from ServoStyleSet allows us to
remove dependency from ServoStyleSet.h to StyleSheetInlines.h.

MozReview-Commit-ID: HzYNulJF7tf

--HG--
extra : rebase_source : f54811369fd7af27b2ee61d54143726e473c6640
extra : source : f872ca0df2d0a71508eeba67c2b922b87bdcbe01
2018-03-29 22:15:46 +11: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
Emilio Cobos Álvarez f7522ae728 Bug 1447358: Unifdef the old style system code. r=jwatt
Summary:
This has been automatically generated using:

  http://dotat.at/prog/unifdef/

And:

find $OBJDIR -type f -name '*.h' |
while read FILE; do
  echo "$FILE"
  unifdef -m -DMOZ_STYLO -UMOZ_OLD_STYLE "$FILE";
done

find $OBJDIR -type f -name '*.cpp' |
while read FILE; do
  echo "$FILE"
  unifdef -m -DMOZ_STYLO -UMOZ_OLD_STYLE "$FILE";
done

MozReview-Commit-ID: I4NdKqbMXzJ

Reviewers: jwatt

Bug #: 1447358

Differential Revision: https://phabricator.services.mozilla.com/D779
2018-03-21 10:20:34 +01:00
Emilio Cobos Álvarez 751c09d888 Bug 1443339: Stop observing the refresh driver when inserting into the BFCache. r=bz
The nsCSSFrameConstructor bits are now handled in PresShell::Destroy along with
the other refresh driver observers.

I cleaned up the nsRefreshDriver methods because they were using infallible
append anyway, and that simplified the logic.

MozReview-Commit-ID: 1eDUUXjUUS9
2018-03-17 16:11:52 +01:00
shindli 9bfc016707 Merge inbound to mozilla-central. a=merge 2018-03-15 12:15:17 +02:00
Emilio Cobos Álvarez a4486328c8 Bug 1433671: Add MOZ_CAN_RUN_SCRIPT annotations to AccessibleCaret and other stuff. r=bz
MozReview-Commit-ID: Js0CF7WQM73
2018-03-14 23:32:22 +01:00
Tom Ritter ce3c0e4f8f Bug 1443943 Allow internal callers of performance.now() to opt-out of clamping/jittering r=bholley
PresShell only uses performane.now to track refresh times, and notify internal
observers. We can provide more accurate times by not clamping and jittering
these numbers.

MozReview-Commit-ID: FkDGJhrLeAy

--HG--
extra : rebase_source : 99c571d1e5df53f51b4be0304df3818c161d2972
2018-03-09 20:12:53 -06:00
Kartikaya Gupta 99522f2154 Bug 1258238 - Remove code that displays visibility visualization on the APZ minimap. r=mattwoodrow
This code was originally added to debug the frame visibility code.
However it wasn't architected correctly and makes the compositor use an
untrusted layers id from content. Instead of fixing this I'd rather just
delete it, since it's a big pile of code that is basically a debugging
tool that nobody owns anymore.

MozReview-Commit-ID: nPZqVeYsFp
2018-03-12 14:17:34 -04:00
Emilio Cobos Álvarez 00c01ddc68 Bug 1443753: Tidy PresShell.h. r=dholbert
Summary:
 * Remove unnecessary virtual, since we also override.
 * Remove unnecessary mozilla:: qualification, since we are in the mozilla
   namespace already.
 * Avoid inconsistently-followed member-variable indentation.
 * Make the destructor not virtual, since it doesn't override anything and this
   is a final class (the destructor is called from the virtual Release()).

Reviewers: dholbert

Bug #: 1443753

Differential Revision: https://phabricator.services.mozilla.com/D690

MozReview-Commit-ID: Hy2aKuhoOKd
2018-03-08 09:26:14 +01:00
Emilio Cobos Álvarez 432d45b460 Bug 1439027: Simplify PresShell::Initialize. r=bz
Most of the callers pass the already-existing pres-context visible area. The few
that don't can set it themselves.

MozReview-Commit-ID: KRi4ShrgOrE
2018-02-21 12:42:17 +01:00
Emilio Cobos Álvarez cc5a1b6c85 Bug 1439224: Make shadow root style changes not restyle the whole document. r=xidorn
Also, make them not rebuild the CascadeData synchronously, via the
FlushSkinSheets call, since that's broken. That fixes bug 1413119.

This is a little step in getting rid of XBL usage for Shadow DOM.

MozReview-Commit-ID: HJ7FeUZlRTW

--HG--
extra : rebase_source : 0fcd0ed461856c1e87e45ef63c9e1d2e81281469
2018-02-18 14:35:57 +01:00
Cameron McCormack cc7db5c40c Bug 1430014 - Part 4: #ifdef out unnecessary code when the old style system is not built. r=xidorn
MozReview-Commit-ID: 1FZ9VzjcPzN

--HG--
extra : source : de22d220635f8c059834b76f769d5215ab1a8b5b
2018-02-01 15:04:04 +11:00
Stone Shih 653167e88f Bug 1426728 - Don't cache the event target of pointer events when they are generated from touch. r=smaug.
The event targets of touch events are not necessarily to be the same as their corresponding pointer events. So we don't have to cache the event target of pointer events when they are generated from touch.

MozReview-Commit-ID: 9Gd6ion7NXf
2017-12-22 12:27:05 +08:00
Emilio Cobos Álvarez 6abaf32af5 Bug 1420547: Notify the pres shell specially, instead of via mutation observers. r=bz
This makes the pres shell be notified as the last observer unconditionally.

In practice this doesn't matter, and it may already be the case if an iframe
goes display: none and back. In practice, the only dependency that requires this
order is that the pres shell needs to be notified _after_ the content sink, so
we don't try to enter frame construction before beginning the shell update.

That may be worth looking into, but definitely not in the scope of this bug... :)

MozReview-Commit-ID: 9WeJ5kaUtBq

--HG--
extra : rebase_source : 6589df0aa8a875dc270894fabb6b4bc170d6b6fe
2017-12-06 05:26:32 +01:00
Stone Shih 4e51f8e1c5 Bug 1420589 Part7: Using mouse or touch event to do hit test and then generate pointer events with the same target. r=smaug.
MozReview-Commit-ID: 1uM3MxurI9I
2017-11-26 21:54:07 +08:00
Stone Shih cfd5f075ba Bug 1420589 Part5: Separate the logic to get shell for touch events into a function. r=smaug.
MozReview-Commit-ID: LbYKBZAqeJM
2017-12-09 09:11:10 +08:00
Stone Shih edf50a6c24 Bug 1420589 Part3: Merge PresShell::HandlePositionedEvent to PresShell::HandleEvent. r=smaug.
MozReview-Commit-ID: 9w1DSb5uXME
2017-12-02 22:25:25 +08:00
Stone Shih e169d04d5d Bug 1420589 Part2: Define a helper class to store the target of pointer events. r=smaug.
MozReview-Commit-ID: IS5MM3gXpC4
2017-11-26 21:38:55 +08:00
Olli Pettay e84d7b7ef4 Bug 1149555 - Update resize event firing to follow the specs, dispatch right before rAF callbacks, r=dbaron
MozReview-Commit-ID: GFnj2du2bWJ
2015-05-05 17:56:01 +03:00
Emilio Cobos Álvarez 5604b99826 Bug 1420762: Make StyleSheets notify directly to their StyleSets. r=heycam
This also makes the rule map not process all the stylesheets for the document,
which would be a mess with shadow DOM.

Far from the final, ideal state, but hey, progress.

MozReview-Commit-ID: 7TrifME9VZ
2017-12-01 08:46:39 +01:00
Brindusan Cristian 6f5b49da3e Backed out 2 changesets (bug 1420762) for merge conflicts r=merge a=merge
Backed out changeset ba350c82d823 (bug 1420762)
Backed out changeset 00287b88254b (bug 1420762)
2017-12-01 00:20:10 +02:00
Emilio Cobos Álvarez f28656c543 Bug 1420762: Make StyleSheets notify directly to their StyleSets. r=heycam
This also makes the rule map not process all the stylesheets for the document,
which would be a mess with shadow DOM.

Far from the final, ideal state, but hey, progress.

MozReview-Commit-ID: 7TrifME9VZ
2017-11-30 15:42:45 +01:00
Cameron McCormack 3f1ff5c074 Bug 1419645 - Make VerifyReflow work with stylo. r=dbaron
MozReview-Commit-ID: 3ZSQqes8nmA

--HG--
extra : rebase_source : ed4be0144651b2c0343f1d17245401662e089389
2017-11-22 12:03:24 +08:00
James Willcox bacda12532 Bug 1409113 - Add nsIPresShell::HasHandledUserInput() r=masayuki
MozReview-Commit-ID: 3Yr5UmFJx5h
2017-11-22 10:09:04 -06:00
Emilio Cobos Álvarez 0a74c282e1 Bug 1415013: Devirtualize PresShell::IsSafeToFlush. r=bz
MozReview-Commit-ID: BL5qcSFE6Hc
2017-11-08 11:14:59 +01:00
Daniel Holbert 680815cd6e Bug 1412346 part 5: (automated patch) Switch a bunch of C++ files in layout to use our standard mode lines. r=jfkthame
This patch was generated automatically by the "modeline.py" script, available
here: https://github.com/amccreight/moz-source-tools/blob/master/modeline.py

For every file that is modified in this patch, the changes are as follows:
 (1) The patch changes the file to use the exact C++ mode lines from the
     Mozilla coding style guide, available here:
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Mode_Line

 (2) The patch deletes any blank lines between the mode line & the MPL
     boilerplate comment.

 (3) If the file previously had the mode lines and MPL boilerplate in a
     single contiguous C++ comment, then the patch splits them into
     separate C++ comments, to match the boilerplate in the coding style.

MozReview-Commit-ID: EuRsDue63tK

--HG--
extra : rebase_source : 3356d4b80ff6213935192e87cdbc9103fec6084c
2017-10-27 10:33:53 -07:00
Emilio Cobos Álvarez 4deb3bee3b Bug 1411754: Rename PresShell::DestroyFramesFor to DestroyFramesForAndRestyle. r=mats
I'm drive-by removing the comment about the frame tree state because I looked
into it, and the answer is: we properly restore it.

The gotcha is that we retain it too much, indeed, we retain it enough that it
can leak. See bug 1397239.

MozReview-Commit-ID: LP6bXkduEZ4

--HG--
extra : rebase_source : f7e18fc35e48b75c07fcc84b939614d379926828
2017-10-25 23:12:25 +02:00
angelsl bdd58219ae Bug 1393116 - Move double-reflow for sizing-to-content one level lower r=dbaron
After the fix to bug 1294442 and bug 1324499, ResizeReflow began to be called
twice for each DOM update in webext popups, and we also artificially re-set the
scroll outside of ResizeReflow to counter the DidDoReflow callback in
nsHTMLScrollFrame setting scrolltop to zero due to the first reflow, which is
done with unconstrained height.

Because of the scrollport being reset we get spurious DOM scroll events.
Replacing the scrollport also interrupts smooth scrolling.

Move the double-reflow down one level into PresShell, doing it before
DidDoReflow is called. The scrollport is no longer reset (causing a spurious
scroll event), and we don't need to replace it (interrupting smooth scrolling).

Also partially fixes bug 1396034.

MozReview-Commit-ID: HzYITyH4UeW

--HG--
extra : rebase_source : 567056300bc81c9e4c197783f48636caf67cde34
extra : intermediate-source : ef7322dfd99d79a403bb0804638a46c70ece1b45
extra : source : 4f1761bb955473026b4deba76a5e76e93b7ede35
2017-09-09 00:38:54 +08:00
Stone Shih a1d26ab3b4 Bug 1316251 Part1: Separate pointer event implementation from PresShell. r=masayuki
This patch moves pointer event related implementations to a new class.

MozReview-Commit-ID: FdBYl7vYC5I
2017-09-06 15:47:49 +08:00
Wei-Cheng Pan 83f77707b7 Bug 1373814 - Add new probe to measure start-up input latency. data-r=francois r=francois,smaug
For parent process, users may expect the UI is interactable after they saw the
first tab has restored/shown.
So this patch added a new topic "sessionstore-one-or-no-tab-restored" which
represents the parent process has finished a tab restoring. If there is nothing
to restore, it is effectively equal to "sessionstore-windows-restored".

For centent processes, users may expect web content is interactable when the
top-level-content-document has finished loading, which is different from the
parent case.

MozReview-Commit-ID: AtEUW80Ea6n

--HG--
extra : rebase_source : d920975bf95545ea9e3127d3f570b814fe301be9
2017-08-08 17:54:13 +08:00
Emilio Cobos Álvarez 1e6e97fed1 Bug 1389743: Only reconstruct frames synchronously from ContentRemoved when called from frame construction. r=mats
There's only one case of sync frame construction from ContentRemoved now, and
it's not on the element being removed, but on the whitespace siblings if needed,
and _only_ when they don't support lazy frame construction.

Basically, this switches all the RecreateFramesForContent calls to use
`aAsyncInsert` (which I changed to an enum class for readability), except when
we're already reframing.

Also, it switches ReframeTextIfNeeded to opt-in into lazy frame construction,
since it's used only when aFlags == CONTENT_REMOVED.

This allows to simplify the DestroyFramesFor API (which I'm happy to rename to
something more meaningful, since now it's something like
DestroyFramesForAndRecreateThemAsync), and do some other consistency cleanups.

A bunch of the ContentRemoved callsites were pretty random at passing
aAsyncInsert, and that was some kind of a mess. This patch ensures consistency,
and makes it impossible to do O(n^2) work when removing DOM nodes, which is
nice.

The underlying reason for this is explained in the description of bug 1377848,
and basically allows us to remove a bunch of Servo hacks on the longer term (a
few of them are going away already, yay!).

MozReview-Commit-ID: 2DrUTxGV8RX

--HG--
extra : rebase_source : f428d839a5482477dea22c0fea600d54f3e8799c
2017-08-23 09:58:57 +02:00
Michael Kaply 73bafcec5e Bug 1389168 - Remove unnecessary IBM license text. r=gerv
MozReview-Commit-ID: 8HdaBppsJsc

--HG--
extra : rebase_source : 617c17b1162265e44810597fa69d533316da1a6b
2017-08-16 16:10:56 -05:00
Nicholas Nethercote 9ab2597a8d Bug 1387956 (part 2) - Overhaul handling of nsWindowSizes. r=mccr8.
This patch does the following.

- Moves nsWindowSizes from nsWindowMemoryReporter.h to its own file,
  nsWindowSizes.h, so it can be included more widely without exposing
  nsWindowMemoryReporter.

- Merges nsArenaMemoryStats.h (which defines nsTabSizes and nsArenaMemoryStats)
  into nsWindowSizes.h.

- Renames nsArenaMemoryStats as nsArenaSizes, and nsWindowSizes::mArenaStats as
  nsWindowSizes::mArenaSizes. This is the more usual naming scheme for such
  types.

- Renames FRAME_ID_STAT_FIELD as NS_ARENA_SIZES_FIELD.

- Passes nsWindowSizes to PresShell::AddSizeOfIncludingThis() and
  nsPresArena::AddSizeOfExcludingThis(), instead of a bunch of smaller things.
  One nice consequence is that the odd nsArenaMemoryStats::mOther field is no
  longer necessary, because we can update nsWindowSizes::mLayoutPresShellSize
  directly in nsPresArena::AddSizeOfExcludingThis().

- Adds |const| to a few methods.

MozReview-Commit-ID: EpgFWKFqy7Y
2017-08-10 14:14:09 +10:00
Ehsan Akhgari cf4e6a817c Bug 1386411 - Part 7: Inline EditorBase::GetSelection(); r=masayuki 2017-08-03 17:06:31 -04:00
Ehsan Akhgari dd8fbce0c9 Bug 1386411 - Part 6: Add a more efficient nsISelectionController::GetSelection() API for retrieving native Selection objects; r=bzbarsky
This API avoids needless refcounting and QueryInterface overhead.
2017-08-03 17:05:24 -04:00
Ryan Hunt 74d75aee90 Bug 1379280 - Move FocusTarget include from nsIPresShell to PresShell. r=smaug
FocusTarget used to be needed in nsIPresShell, but it was moved to PresShell.

MozReview-Commit-ID: HQFpT9OJaUz

--HG--
extra : rebase_source : ddc29462fc71f8a71dd2419823ddf6f7e92a60ce
2017-07-13 13:00:21 -05:00