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

21744 Коммитов

Автор SHA1 Сообщение Дата
Mirko Brodesser 217ea6c8ea Bug 1685303: part 14) Annotate `SelectByTypeAtPoint` with `MOZ_CAN_RUN_SCRIPT`. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D101762
2021-01-15 09:28:07 +00:00
Micah Tigley 1b5b46ec79 Bug 1680637 - Update tests using the old dialog UI to only use the old UI. r=jaws,Gijs,marionette-reviewers,whimboo,remote-protocol-reviewers
Depends on D100172

Differential Revision: https://phabricator.services.mozilla.com/D101388
2021-01-14 21:45:14 +00:00
Mirko Brodesser 0114f7f280 Bug 1685303: part 11) Add some `const`-correctness to frame code. r=smaug
Helps distinguishing what modifies frames and what doesn't.

Differential Revision: https://phabricator.services.mozilla.com/D101751
2021-01-14 14:45:01 +00:00
Mirko Brodesser c0d32bffc5 Bug 1685303: part 10) Annotate `nsFrameSelection::HandleClick` with `MOZ_CAN_RUN_SCRIPT`. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D101598
2021-01-14 13:24:36 +00:00
Mirko Brodesser 31e33f4d2c Bug 1685303: part 9) Correct some comments in `PresShell::EventHandler::HandleEvent`. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D101571
2021-01-14 13:24:23 +00:00
Mirko Brodesser f6f7a6f1aa Bug 1685303: part 8) Annotate `nsFrameSelection::SetDragState` with `MOZ_CAN_RUN_SCRIPT`. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D101467
2021-01-14 13:24:16 +00:00
Bogdan Tara 0700454a9e Backed out 4 changesets (bug 1685303) for bustage complaining about offsets CLOSED TREE
Backed out changeset a4640aac6619 (bug 1685303)
Backed out changeset bd2020c26531 (bug 1685303)
Backed out changeset 3f2e96b93f19 (bug 1685303)
Backed out changeset 8cf49a7677c9 (bug 1685303)
2021-01-14 12:58:25 +02:00
Mirko Brodesser c6272f3a54 Bug 1685303: part 10) Annotate `nsFrameSelection::HandleClick` with `MOZ_CAN_RUN_SCRIPT`. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D101598
2021-01-14 10:21:17 +00:00
Mirko Brodesser 374d554fe2 Bug 1685303: part 9) Correct some comments in `PresShell::EventHandler::HandleEvent`. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D101571
2021-01-14 10:20:30 +00:00
Mirko Brodesser 353996bf27 Bug 1685303: part 8) Annotate `nsFrameSelection::SetDragState` with `MOZ_CAN_RUN_SCRIPT`. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D101467
2021-01-14 10:20:30 +00:00
Masayuki Nakano 269faceec3 Bug 1357365 - part 5: Make `TypeInState::OnSelectionChange` stop keeping link style for new inserting content when selection is changed by JS r=m_kato,edgar
This is the most important situation.  If selection is collapsed to a edge of a
link, the other browsers does not insert new content into the link.  So, from
the point of view of web developers, this cause should work exactly same as
the other browsers.

Note that the new failures in `editing/run/inserttext.html` are passed only
on Gecko.  So, the test should be updated after fixing this bug.

Differential Revision: https://phabricator.services.mozilla.com/D101004
2021-01-13 01:55:40 +00:00
Butkovits Atila 4d521226ef Backed out changeset f8e28ebbdaa0 (bug 1675720) for causing failures on browser_system_dialog_subdialog_hidden.js. CLOSED TREE 2021-01-13 03:00:31 +02:00
Butkovits Atila 7742c03714 Backed out 4 changesets (bug 1680637, bug 1682395) for causing Marionette failures. CLOSED TREE
Backed out changeset 073e0be7db95 (bug 1680637)
Backed out changeset 552b91b31b0f (bug 1682395)
Backed out changeset c80de6c72779 (bug 1680637)
Backed out changeset d513e228b0ad (bug 1680637)
2021-01-13 02:13:06 +02:00
Micah Tigley 06e7942185 Bug 1680637 - Update tests using the old dialog UI to only use the old UI. r=jaws,Gijs
Depends on D100172

Differential Revision: https://phabricator.services.mozilla.com/D101388
2021-01-12 22:32:24 +00:00
Erik Nordin 979cf92582 Bug 1675720 - Fix print_to_filename prefs for Linux system dialog r=emilio
This patch ensures that the global print_to_filename pref is checked
when initializing print settings from prefs.

It also fixes a regression which was preventing the Linux system dialog
from correctly reading its printer-specific print_to_filename prefs.

Differential Revision: https://phabricator.services.mozilla.com/D98975
2021-01-12 22:08:21 +00:00
Mirko Brodesser fe32930e22 Bug 1685303: part 6) Add verbose logging to `AccessibleCaretManager::SelectWord`. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D101356
2021-01-11 15:09:52 +00:00
Mirko Brodesser 6a09f69657 Bug 1685303: part 1) Extend documentation of `AccessibleCaretManager::OnSelectionChanged`. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D100984
2021-01-07 22:36:40 +00:00
Kartik Gautam 7ae6aea145 Bug 1684173 - Add newline character at end of files when missing r=sylvestre,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D100484
2021-01-07 08:53:08 +00:00
Sylvestre Ledru b58ddc19df Bug 1519636 - Reformat recent changes to the Google coding style r=andi
Updated with Debian clang-format version 11.0.1-1

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D100934
2021-01-06 17:17:23 +00:00
Edgar Chen f8fb06fea1 Bug 1662363 - Rename eTopLevel/eChild to ePlatformTopLevel/ePlatformChild; r=smaug
This is a follow-up of bug 1653949.

Differential Revision: https://phabricator.services.mozilla.com/D100729
2021-01-05 09:48:24 +00:00
Daniel Holbert af327bde4e Bug 1669905 part 3: Add support for 2 and 6 as options for pages-per-sheet, in the print-related frame classes (and add tests for these values). r=TYLin
Differential Revision: https://phabricator.services.mozilla.com/D99553
2021-01-05 02:13:03 +00:00
Mats Palmgren c694fef0e0 Bug 1683180 - Revert bug 1672527 to fix SVG perf regression. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D100713
2021-01-04 20:26:25 +00:00
Emilio Cobos Álvarez bd8cffdd58 Bug 1351248 - Simplify nsIFrame::IsFocusable API. r=layout-reviewers,mats
We always compute the tabindex value, so just return it to the caller
all the time. This allows us to use early-returns which makes the code a
bit easier to follow.

This patch shouldn't change behavior.

Differential Revision: https://phabricator.services.mozilla.com/D100423
2021-01-03 23:30:51 +00:00
Robert Mader 820fe68cd4 Bug 1681030 - Fix some regressions from bug 1645528, r=emilio
This fixes a bunch of regressions:
 - a wrong calculation in `GetIdleDeadlineHint()`, leading to pageload
regressions.
 - in certain situations we'd use `StartupRefreshDriverTimer` instead
of `VsyncRefreshDriverTimer` when initializing timers early
 - unnecessary use of `BrowserChild` on backends that don't opt for
per-browser-child vsync - i.e. all but Wayland.

This is partly done by reverting to pre-1645528 behaviour, although
with some code simplifications.

FTR: I also played with some more radical changes, but given the
complexity of the code involved I found the regression potential too
big. Thus this is the most conservative solution I could come up with.

Differential Revision: https://phabricator.services.mozilla.com/D100471
2020-12-26 23:26:49 +00:00
Narcis Beleuzu 49264e13c2 Backed out changeset f64bb4f21c91 (bug 1681030) for causing crashes. 2020-12-28 19:51:40 +02:00
Cosmin Sabou 2978aa00a3 Backed out changeset dbed1cdf588f (bug 1684173) for mochitest plain and devtools failures. a=backout DONTBUILD 2020-12-28 00:43:51 +02:00
Kartik Gautam 775cdec032 Bug 1684173 - Add newline character at end of files when missing r=sylvestre
Depends on D100443

Differential Revision: https://phabricator.services.mozilla.com/D100484
2020-12-27 11:43:41 +00:00
Robert Mader 31f99b1a13 Bug 1681030 - Fix some regressions from bug 1645528, r=emilio
This fixes a bunch of regressions:
 - a wrong calculation in `GetIdleDeadlineHint()`, leading to pageload
regressions.
 - in certain situations we'd use `StartupRefreshDriverTimer` instead
of `VsyncRefreshDriverTimer` when initializing timers early
 - unnecessary use of `BrowserChild` on backends that don't opt for
per-browser-child vsync - i.e. all but Wayland.

This is partly done by reverting to pre-1645528 behaviour, although
with some code simplifications.

FTR: I also played with some more radical changes, but given the
complexity of the code involved I found the regression potential too
big. Thus this is the most conservative solution I could come up with.

Differential Revision: https://phabricator.services.mozilla.com/D100471
2020-12-26 23:26:49 +00:00
Daniel Holbert 5a10b53059 Bug 1682294: Increase fuzzy-match threshold for test_printpreview.xhtml subtest "printpreview_pps_uw4.html". (no review, just a test tweak)
For now, this subtest (ab)uses a fuzzy-failure allowance, to annotate a piece
of the test as a known failure on Windows (for an issue tracked in
bug 1680838).

The fuzzy annotation needs a bit of an increase, apparently, per at least one
failure log on Bug 1682294. This commit makes that increase, to avoid
test-failure-spam.

Differential Revision: https://phabricator.services.mozilla.com/D100477
2020-12-26 06:45:18 +00:00
Botond Ballo 06fad2134b Bug 1466224 - Follow out-of-flow frames to their placeholders in GetAsyncScrollableAncestorFrame(). r=tnikkel
This ensures that the notion of a scroll frame's scrollable ancestor used in
SetZeroMarginDisplayPortOnAsyncScrollableAncestor() to activate ancestors
when activating a scroll frame, matches what the actual ancestor is
according to display list building logic.

This avoids us taking the buggy "activate a scroll parent after the fact"
codepath (AutoCurrentActiveScrolledRootSetter::InsertScrollFrame()), which
can result in a display list with incorrect ASRs, in at least some cases.

Differential Revision: https://phabricator.services.mozilla.com/D100303
2020-12-22 04:00:51 +00:00
Dorel Luca 963794deaa Backed out changeset e514b3f35198 (bug 1682929) for crashtest failures in layout/generic/crashtests/553504-1.xhtml 2020-12-21 05:00:07 +02:00
Emilio Cobos Álvarez 5f20ee06ab Bug 1682929 - Properly prevent overflow from nsLayoutUtils::AddIntrinsicSizeOffset. r=hiro
Even though this particular test-case is regressed by bug 1624080, this
is really a pre-existing bug.

The reason why we didn't crash before that bug is that we were
incorrectly not accounting for logical border-radius properties (like
border-end-end-radius) in has_author_specified_rules, which caused us to
not disable native appearance. This in turn ended up fixing up our value
returned from AddIntrinsicSizeOffset, which covered the bug.

Use saturating math properly to prevent returning negative sizes
incorrectly from that function, which causes deeper bugs down the
pipeline.

Given the crashtest relies on our particular nscoord represenation it
doesn't seem to be worth putting in WPT, but let me know if you
disagree.

Differential Revision: https://phabricator.services.mozilla.com/D100186
2020-12-20 21:57:50 +00:00
Edgar Chen 2b16b12d46 Bug 1680405 - Make mouse capture working on OOP iframe; r=smaug
This patch add a way to track remote target for mouse capturing. The tracking
remote target will be reset when capturing content is changed or
ReleaseCapturingContent() is called.

In order to make `mouseup` would also be dispatched to correct remote target, we
do ReleaseCapturingContent in EventSetateManager::PostHandleEvent, instead of
in nsIFrame::HandleRelease.

Differential Revision: https://phabricator.services.mozilla.com/D98592
2020-12-18 18:21:23 +00:00
Ting-Yu Lin 378bde9842 Bug 1585485 Part 2 - Move IsReplacedBoxResolvedAgainstZero() into nsIFrame, and rename it. r=dholbert
We want to call it in nsFlexContainerFrame in the next part.

The method also tests form control elements via the helper
FormControlShrinksForPercentISize, not just replaced boxes, so rename it
for accuracy. We also rename the helper by dropping "I" from the
"PercentISize" because the axis the element contributingx to isn't
necessarily its inline-axis.

Differential Revision: https://phabricator.services.mozilla.com/D99951
2020-12-17 20:01:58 +00:00
Emilio Cobos Álvarez 04502effb0 Bug 1618584 - Some tests are asserting less.
MANUAL PUSH: UNEXPECTED-PASS fixes on a CLOSED TREE
2020-12-18 17:25:58 +01:00
Bogdan Tara 0e0311351e Backed out 9 changesets (bug 1656107) for frequent assertion failures on layout/style/nsComputedDOMStyle.cpp CLOSED TREE
Backed out changeset 2d9843871809 (bug 1656107)
Backed out changeset 87031ccf6c8e (bug 1656107)
Backed out changeset 1e06017a213c (bug 1656107)
Backed out changeset b51bae240379 (bug 1656107)
Backed out changeset 8d98b76de39a (bug 1656107)
Backed out changeset 0f4ea8cdd34a (bug 1656107)
Backed out changeset 95eeff5318e5 (bug 1656107)
Backed out changeset 469fa7a429c2 (bug 1656107)
Backed out changeset ec3d7e825bc9 (bug 1656107)
2020-12-17 22:19:09 +02:00
Steven MacLeod 76ff990d2f Bug 1656107 - remove FindContentForSubDocument use from nsPresContext. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D98618
2020-12-16 01:06:47 +00:00
Razvan Maries a7af908f30 Backed out changeset 5e9006d8c218 (bug 1680405) for perma failures on PresShell.cpp and browser_mouse_enterleave_switch_tab.js. CLOSED TREE 2020-12-17 13:24:39 +02:00
Edgar Chen 45ea02297b Bug 1680405 - Make mouse capture working on OOP iframe; r=smaug
This patch add a way to track remote target for mouse capturing. The tracking
remote target will be reset when capturing content is changed or
ReleaseCapturingContent() is called.

In order to make `mouseup` would also be dispatched to correct remote target, we
do ReleaseCapturingContent in EventSetateManager::PostHandleEvent, instead of
in nsIFrame::HandleRelease.

Differential Revision: https://phabricator.services.mozilla.com/D98592
2020-12-17 09:28:00 +00:00
Jed Davis 907aa1cd3c Bug 1470983 - Remote all LookAndFeel values for the Gtk backend. r=spohl,jld
This adds a new LookAndFeel implementation, RemoteLookAndFeel, which can
be used in content processes and is supplied with all of its values by the
parent process.

Co-authored-by: Cameron McCormack <cam@mcc.id.au>

Differential Revision: https://phabricator.services.mozilla.com/D97977
2020-12-16 04:17:36 +00:00
Dorel Luca c7cf087b6e Backed out changeset 7253a9d881d0 (bug 1680405) for assertion failures in worker/checkouts/gecko/layout/base/PresShell.cpp. CLOSED TREE 2020-12-16 07:19:44 +02:00
Edgar Chen 9b5d278abd Bug 1680405 - Make mouse capture working on OOP iframe; r=smaug
This patch add a way to track remote target for mouse capturing. The tracking
remote target will be reset when capturing content is changed or
ReleaseCapturingContent() is called.

In order to make `mouseup` would also be dispatched to correct remote target, we
do ReleaseCapturingContent in EventSetateManager::PostHandleEvent, instead of
in nsIFrame::HandleRelease.

Differential Revision: https://phabricator.services.mozilla.com/D98592
2020-12-16 00:29:40 +00:00
Sean Feng 12424aa6b0 Bug 1662265 - Fix input events handling for sync XHR when both TaskController and e10s are enabled r=smaug
There are two issues in our current setup

1) Input events which are occurring in the same tab are going to be lost
because sync XHR. We have event handling suppression for synx XHR, so input
events are going to be discarded.

2) Input events that are happening in another tab (same process as the
synx XHR tab) are not going to be delayed. This is not correct since
sync XHR should block the Javascript execution.

This patches fixes the above cases for when both TaskController and e10s are
enabled by suspending the InputTaskManager during sync XHR, which
delays the input event handling and keeps the events around.

Differential Revision: https://phabricator.services.mozilla.com/D90780
2020-12-15 01:33:24 +00:00
Hiroyuki Ikezoe 493c9d70d3 Bug 1493208 - Tweak scrollable rect offset to (0, 0) for the popup window opened by extensions. r=botond
So that we can make sure APZ handles (0, 0) based coordinates for remote
contents in popup windows, etc.

Differential Revision: https://phabricator.services.mozilla.com/D99309
2020-12-14 21:21:33 +00:00
Ting-Yu Lin f7561e7d4d Bug 1681402 - Improve stability and error handling for _selection_location_helper(). r=emilio
This patch doesn't change the behavior, but should improve the stability
and error handling of _selection_location_helper().

From the current intermittent pattern, `self.selection_rect_list(0)` can
fail sometimes. We set a retry limit of three times, and raise
exceptions with clearer message if we give up. Bug 1682382 tracks the
root cause behind this.

Differential Revision: https://phabricator.services.mozilla.com/D99288
2020-12-14 19:56:13 +00:00
Botond Ballo 6c367f7388 Bug 1487181 - Fix some include-what-you-use issues. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D99565
2020-12-13 21:02:25 +00:00
Emilio Cobos Álvarez 0473b8d667 Bug 1677353 - Ignore padding when computing definite percentages if we're abspos boxes. r=mats
As percentages in abspos boxes resolve against the padding box.

Differential Revision: https://phabricator.services.mozilla.com/D99455
2020-12-12 11:18:56 +00:00
Emilio Cobos Álvarez 3987c781d0 Bug 1635914 - Move active flag handling explicitly to BrowsingContext. r=nika
And have it mirror in the parent process more automatically.

The docShellIsActive setter in the browser-custom-element side needs to
be there rather than in the usual DidSet() calls because the
AsyncTabSwitcher code relies on getting an exact amount of notifications
as response to that specific setter. Not pretty, but...

BrowserChild no longer sets IsActive() on the docshell itself for OOP
iframes. This fixes bug 1679521. PresShell activeness is used to
throttle rAF as well, which handles OOP iframes nicely as well.

Differential Revision: https://phabricator.services.mozilla.com/D96072
2020-12-11 15:43:19 +00:00
Emilio Cobos Álvarez ab1ebe2e24 Bug 1681026 - Fix PrintPreviewScrollToPage assert and simplify it. r=hiro
It was off-by-one as the pages are one-indexed.

Differential Revision: https://phabricator.services.mozilla.com/D99212
2020-12-09 21:17:22 +00:00
Ting-Yu Lin 1e4e187165 Bug 1649191 - Remove the guarding statement about mismatching carets mode from AccessibleCaretManager APIs. r=botond
Steps to reproduce:
1. Open https://bugzilla.mozilla.org/home
   (Note the cursor is already blinking in the <input>
   "Enter a bug number or some search terms")
2. Pinch-zoom in.
3. Tap on the <input> "Enter a bug number or some search terms."
4. Pan/scroll the page, and the scrolling is very laggy.

Without this patch, AccessibleCaret disables APZ incorrectly via the
above operations. Here's an analysis.

In step 2, `OnScrollEnd()` called at the end of the pinch-zoom operation
is supposed to reset `mIsScrollStarted` to `false`, but `GetCaretMode()`
returns `CaretMode::Cursor` because the page already has a focus on
<input>. We are early-returned from `OnScrollEnd()` because
`mLastUpdateCaretMode` is still the default value `CaretMode::None`.

In step 3, tapping the <input> will call `UpdateCaretsForCursorMode()`,
setting `mIsCaretPositionChanged` to `true`. Then
`UpdateShouldDisableApz()` incorrectly sets `mShouldDisableApz` to
`true` because we still have `mIsScrollStarted=true`.

In step 4, the operation is laggy because APZ is disabled.

This patch fixed this bug by removing the guarding statement
`mLastUpdateCaretMode != GetCaretMode()` from three callback methods.

The statements were added in the very first patch introducing
`AccessibleCaretManager`. I don't recall why we needed them. (Perhaps to
avoid unnecessary updates notified from other PresShell?). Anyway, since
then, these callbacks have evolved to update carets only if any caret is
logically visible, so I don't see why we need these guards nowadays. By
doing so, `mIsScrollStarted` can be reset to `false` in `OnScrollEnd()`
in step 2.

Differential Revision: https://phabricator.services.mozilla.com/D99284
2020-12-09 23:02:34 +00:00