Commit Graph

102 Commits

Author SHA1 Message Date
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