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

17432 Коммитов

Автор SHA1 Сообщение Дата
Simon Giesecke b8e5abc46a Bug 1626570 - Improve handling of copying arrays in layout/generic/. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D72353
2020-05-05 10:11:01 +00:00
Timothy Nikkel c346bc87cc Bug 1633276. Ensure that when IsFrameScrolledOutOfView calls nsLayoutUtils::TransformFrameRectToAncestor the ancestor frame is actually an ancestor. r=hiro
The SCROLLABLE_FIXEDPOS_FINDS_ROOT flag makes GetNearestScrollableFrame return the root scroll frame for fixed pos frames. Fixed pos frames are direct children of the root _frame_, which means that the frame we pass to TransformFrameRectToAncestor are not ancestors of each other in either direction.

Differential Revision: https://phabricator.services.mozilla.com/D73587
2020-05-05 07:19:46 +00:00
Mirko Brodesser a060e2efd4 Bug 1634663: part 4) Declare callers of `Selection::GetRangeAt` `const` in layout code. r=masayuki
Depends on D73446

Differential Revision: https://phabricator.services.mozilla.com/D73447
2020-05-02 23:46:01 +00:00
Narcis Beleuzu 3d39ec06bb Backed out changeset d578f391630a (bug 1633276) for mochitest failures on test_restyles.html . CLOSED TREE 2020-05-04 06:36:38 +03:00
Timothy Nikkel b4a7e854ed Bug 1633276. Ensure that when IsFrameScrolledOutOfView calls nsLayoutUtils::TransformFrameRectToAncestor the ancestor frame is actually an ancestor. r=hiro
The SCROLLABLE_FIXEDPOS_FINDS_ROOT flag makes GetNearestScrollableFrame return the root scroll frame for fixed pos frames. Fixed pos frames are direct children of the root _frame_, which means that the frame we pass to TransformFrameRectToAncestor are not ancestors of each other in either direction.

So we treat fixed pos frames specially and don't pass that flag.

Differential Revision: https://phabricator.services.mozilla.com/D73587
2020-05-04 02:32:43 +00:00
Emilio Cobos Álvarez 95e878963c Bug 1634743 - Fix caret baseline on a line with only inlines to account for line-height properly. r=jfkthame
While I'm looking at this code... This fixes the case described in
comment 46.

Differential Revision: https://phabricator.services.mozilla.com/D73465
2020-05-02 19:18:27 +00:00
Emilio Cobos Álvarez 08e6a50949 Bug 1633828 - crashtest.
Differential Revision: https://phabricator.services.mozilla.com/D73455
2020-05-01 14:28:41 +00:00
Emilio Cobos Álvarez f5823dea35 Bug 1634543 - Followup: Remove one too many consts to unbust the build.
MANUAL PUSH: Bustage fix on a CLOSED TREE
2020-05-01 18:45:37 +02:00
Emilio Cobos Álvarez 50168d214b Bug 1634543 - Fix caret baseline of a block with only empty lines. r=jfkthame
Even with the fix above, we get the caret baseline wrong because the
line is non-empty, but the baseline is all the way to the top.

Maybe an alternative to this would be to move the line-height hack to
the beginning of layout but that sounds a bit more fishy.

Otherwise we should do this more often, I suspect. I added one test that
fails because of nsInlineFrame... Anyhow probably follow-up material?

Depends on D73362

Differential Revision: https://phabricator.services.mozilla.com/D73363
2020-05-01 14:34:11 +00:00
Emilio Cobos Álvarez 8903f8bdd0 Bug 1634543 - Make emptiness check for contenteditable also account for empty frames. r=jfkthame
Like abspos and other out of flows. Seems to match more what other browsers do.

Differential Revision: https://phabricator.services.mozilla.com/D73362
2020-05-01 15:05:34 +00:00
Mats Palmgren fa99004b91 Bug 1633720 - [css-grid-2] Adjust the grid area stored in the Subgrid property as well for removed 'auto-fit' tracks in the parent. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D73007
2020-04-30 11:34:20 +00:00
Markus Stange 74091d0878 Bug 1634547 - Remove an unnecessary (and sometimes incorrect) clip. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D73346
2020-04-30 20:39:53 +00:00
Emilio Cobos Álvarez d3f45f6b31 Bug 1633434 - Ensure inverting a valid aspect ratio generates a valid aspect ratio. r=dholbert
It seems like a reasonable expectation, but it may not hold with massive
ratios. Make it hold by returning the floating point epsilon in that
case.

Differential Revision: https://phabricator.services.mozilla.com/D73029
2020-04-30 14:04:24 +00:00
Masayuki Nakano 11af44e544 Bug 1632726 - part 2: Remove some unused `nsISelectionController` methods r=smaug
Even in comm-central and BlueGriffon, `nsISelectionController::*ForDelete()`
are not used.  Therefore, we can remove them safely.

Differential Revision: https://phabricator.services.mozilla.com/D72296
2020-04-27 06:20:31 +00:00
Masayuki Nakano adf7a304f3 Bug 1632726 - part 1: Create utility methods to compute delete range from collapsed selection in `nsFrameSelection` r=smaug
Currently, `EditorBase::ExtendSelectionForDelete()` depends on some
`nsISelectionController` methods to compute extended range for deletion
from collapsed selection.  They are implemented by
`nsFrameSelection::MoveCaret()` and `nsFrameSelection::TakeFocus()`.
Ideally, we should split these methods for computation part and performing
part.  However, they change selection with updating other selection state,
for example, table selection state and bidi information.  Therefore, it's
impossible to split them with simple code.  However, I need to change
`EditorBase::ExtendSelectionForDelete()` just return extended range.

Therefore, this patch creates `nsFrameSelection::PeekOffsetForCaretMove()`
which has the main path in `MoveCaret()` for the `EditorBase` method.

Then, `MoveCaret()` and new `nsFrameSelection::CreateRangeExtendedToSomewhere()`
share the computation code of expanding normal selection.

Finally, this patch wraps `nsFrameSelection::CreateRangeExtendedToSomewhere()`
with new public inline methods for `EditorBase`.

The following patch will remove no-user methods of `nsISelectionController`.

Differential Revision: https://phabricator.services.mozilla.com/D72295
2020-04-30 10:05:35 +00:00
Kagami Sascha Rosylight 3b1e0f755c Bug 1630704 - Merge standalone overrriding methods to nsIFrame r=emilio
This patch merges nsFrame methods to nsIFrame, where merging only requires simple signature changes.

Differential Revision: https://phabricator.services.mozilla.com/D73070
2020-04-29 18:22:50 +00:00
Daniel Varga d0212aae27 Backed out changeset a8ca75f3002d (bug 1633985) on request by dev 2020-04-30 01:58:25 +03:00
Brendan Dahl 6a11b1827e Bug 1629770 - Create popupgroup for any main process system privileged documents. r=emilio,Jamie
Fixes tooltips/menus in responsive design mode. A few accesibility tests
had to be adjusted since tooltips are now automatically created
for them.

Differential Revision: https://phabricator.services.mozilla.com/D72400
2020-04-29 21:52:51 +00:00
Glenn Watson ab3883a1e7 Bug 1633985 - Remove unused clip parent and backface flag from push_iframe r=kats,nical
Differential Revision: https://phabricator.services.mozilla.com/D73006
2020-04-29 21:54:14 +00:00
Dorel Luca f906702a66 Backed out changeset 0a9371673354 (bug 1633985) for Webrender bustages. CLOSED TREE 2020-04-30 00:03:23 +03:00
Glenn Watson c222acf8ae Bug 1633985 - Remove unused clip parent and backface flag from push_iframe r=kats,nical
Differential Revision: https://phabricator.services.mozilla.com/D73006
2020-04-29 17:14:50 +00:00
Mats Palmgren f022da2018 Bug 1633045 - Don't use the Print Preview viewport scroll frame as a scroll container for 'position:sticky' content. r=TYLin
Differential Revision: https://phabricator.services.mozilla.com/D72529
2020-04-27 19:19:38 +00:00
Dzmitry Malyshau 4f512f2215 Bug 1632696 - Fix updating of WebGPU canvas image descriptor r=aosmond
I believe the image descriptor was stale, since the code that updated it
was only doing this in case of a new image key. So if there was a new scene with the same image key
but different image descriptor, we'd not be updating it properly.

Differential Revision: https://phabricator.services.mozilla.com/D72404
2020-04-28 15:05:21 +00:00
Mirko Brodesser 9b384325c1 Bug 1633448: part 2) Rename `nsFrameSelection::GetTableCellSelection` to `IsInTableSelectionMode`. r=smaug
Depends on D72688

Differential Revision: https://phabricator.services.mozilla.com/D72689
2020-04-27 19:34:53 +00:00
Csoregi Natalia b073baab86 Backed out 30 changesets (bug 1556556, bug 1631568) for multiple mochitest failures. CLOSED TREE
Backed out changeset edd529f7a9c5 (bug 1631568)
Backed out changeset 1cc0881e244b (bug 1631568)
Backed out changeset ed3c1e85d5e3 (bug 1556556)
Backed out changeset 38ffc6215bbf (bug 1556556)
Backed out changeset 03c2c25d8023 (bug 1556556)
Backed out changeset 9c717eb067b8 (bug 1556556)
Backed out changeset 98e26bc98b85 (bug 1556556)
Backed out changeset 05a6a581e755 (bug 1556556)
Backed out changeset 867946cf05bb (bug 1556556)
Backed out changeset 20d72a334530 (bug 1556556)
Backed out changeset 2c62e61d9054 (bug 1556556)
Backed out changeset 62a223d057d2 (bug 1556556)
Backed out changeset 2c5d55a1f0b1 (bug 1556556)
Backed out changeset 700447945b4e (bug 1556556)
Backed out changeset 93190ae4f5ff (bug 1556556)
Backed out changeset a7bd34d961bb (bug 1556556)
Backed out changeset fccd1d3c7189 (bug 1556556)
Backed out changeset 24056e47183d (bug 1556556)
Backed out changeset 204881474cc1 (bug 1556556)
Backed out changeset 387320881876 (bug 1556556)
Backed out changeset be8f5eb58460 (bug 1556556)
Backed out changeset 629c58a9166b (bug 1556556)
Backed out changeset 4312b2b5dda8 (bug 1556556)
Backed out changeset d11dbf6403a5 (bug 1556556)
Backed out changeset 95c54c023779 (bug 1556556)
Backed out changeset 80fcb7e71188 (bug 1556556)
Backed out changeset d75a4ecb0d47 (bug 1556556)
Backed out changeset 903c4de34e7a (bug 1556556)
Backed out changeset f15334a3e803 (bug 1556556)
Backed out changeset 9553e99137ea (bug 1556556)
2020-04-28 12:43:11 +03:00
Botond Ballo 2cb46cfa4b Bug 1631568 - Have nsLayoutUtils::GetFrameForPoint() and GetFramesForArea() take a RelativeTo parameter. r=tnikkel
This removes the need for FrameForPointOptions::IsRelativeToLayoutViewport,
and makes sure each call site of these functions indicates whether the
input point/rect is in visual or layout coordinates.

Several call sites were passing in layout coordinates without setting the
IsRelativeToLayoutViewport flag, which this patch corrects.

Differential Revision: https://phabricator.services.mozilla.com/D71705
2020-04-28 01:44:43 +00:00
Botond Ballo 9910a0e22a Bug 1631568 - Move ViewportType and RelativeTo into a separate header. r=tnikkel
This allows headers which nsLayoutUtils.h includes to use these types without
creating a circular dependency.

As part of this change, the types are also moved into namespace mozilla.

Differential Revision: https://phabricator.services.mozilla.com/D71704
2020-04-28 07:22:59 +00:00
Botond Ballo a44bc6dd0b Bug 1556556 - Include the layout-to-visual transform for a zoomed content root in GetTransformMatrix(). r=kats,mattwoodrow
This is the "core" change of the patch series, which causes most
existing layout codepaths to correctly factor in the visual to
layout transform (or its inverse), as long as the callers correctly
propagate it in the correct ViewportType.

Differential Revision: https://phabricator.services.mozilla.com/D68920
2020-04-28 01:42:14 +00:00
Botond Ballo 405c8807cd Bug 1556556 - Propagate RelativeTo far and wide. r=kats,mattwoodrow
This "upgrades" various nsLayoutUtils functions which take as inputs
a set of coordinates and a frame that the coordinates are relative to,
to accept a RelativeTo object instead of a frame.

Most of the patch is just dumb propagation, but the few places where
we use an explicit ViewportType::Visual are important. There are
probably a few other places I've overlooked, but this seems to cover
the important ones that come up commonly.

There are undoubtedly other functions into which we can propagate
RelativeTo, in this patch I've propagated it as far as necessary
for my needs in this bug (mainly GetTransformToAncestor() and
GetEventCoordinatesRelativeTo()).

Differential Revision: https://phabricator.services.mozilla.com/D68919
2020-04-28 01:40:35 +00:00
Botond Ballo bc3d0b2701 Bug 1556556 - Use the "relative to layout viewport" flag to determine when to divide the composition bounds clip by the resolution. r=mstange
We were using "during event delivery" as a proxy for this, but it was an inaccurate proxy.

Differential Revision: https://phabricator.services.mozilla.com/D68915
2020-04-28 01:38:00 +00:00
Botond Ballo b11a399d42 Bug 1556556 - Remove many uses of IgnoreRootScrollFrame. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D68913
2020-04-28 02:25:51 +00:00
Botond Ballo 480ee775c9 Bug 1556556 - Apply the visual-to-layout transform during display list building and display list based hit testing. r=kats,mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D68728
2020-04-28 01:36:34 +00:00
Mats Palmgren 3622105887 Bug 1607954 part 2 - [css-grid][css-align] Implement Masonry layout. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D67062
2020-04-28 01:18:47 +00:00
Emilio Cobos Álvarez 8cfb840466 Bug 1627643 - Allow to find and display selection native anonymous content. r=jfkthame
The check for generated content in nsTextFrame is to the best of my
knowledge useless: We don't display generated content as selected when
the parent is selected anyhow, and the offsets would be wrong.

We special-case text inputs and textarea because of ::placeholder, see
the comment, but otherwise there's no reason you shouldn't be able to
find-in-page generated content / fallback / etc.

I added ForceBreakBetween so as to not create ranges that span across
shadow / anonymous content boundaries. They don't work anyway (see the
TODO in test_find.html), so it seems better to make that explicit until
we properly handle them (bug 1590379).

I added a pref just to be safe since this is long-standing behavior, but
I think it should be uncontroversial.

Differential Revision: https://phabricator.services.mozilla.com/D72447
2020-04-27 13:56:04 +00:00
Masayuki Nakano 6cbea10c99 Bug 1632724 - part 1: Move common methods for handling delete selection to `EditorBase` r=m_kato
`DeleteSelection*()` are members of `TextEditor`, but they are also used by
`HTMLEditor`.  Therefore, they and pref cache members for them should be
in `EditorBase` too.

Depends on D71911

Differential Revision: https://phabricator.services.mozilla.com/D72290
2020-04-24 14:55:09 +00:00
Razvan Maries 7bca279e4d Backed out changeset 8f4da5c776b0 (bug 1630704) for build bustages. CLOSED TREE 2020-04-25 15:29:59 +03:00
Kagami Sascha Rosylight fd1da8df32 Bug 1630704 - Move nsBidi* types to nsBidi.h r=emilio
nsBidi.h currently includes nsIFrame.h only to import nsBidi* types. This patch moves those types to nsBidi.h where it's more relevant, to reduce the size of nsIFrame.h.

Differential Revision: https://phabricator.services.mozilla.com/D72442
2020-04-25 11:24:47 +00:00
Sylvestre Ledru 34acbb653a Bug 1619165 - Reformat recent changes to the Google coding style r=andi
First reformat with clang-format 10

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D68802
2020-04-25 09:40:08 +00:00
Kagami Sascha Rosylight aa6ba15dc8 Bug 1630704 - Remove NS_FRAME_TRACE_MSG r=emilio
NS_FRAME_TRACE_MSG is identical to NS_FRAME_TRACE, no need to keep it.

Differential Revision: https://phabricator.services.mozilla.com/D72410
2020-04-24 19:12:56 +00:00
Simon Giesecke 2d8c4390b7 Bug 1628715 - Part 15: Replace MOZ_NONNULL_RETURN by returning NotNull<elem_type*>. r=xpcom-reviewers,necko-reviewers,dragana,nika
Differential Revision: https://phabricator.services.mozilla.com/D71300
2020-04-24 13:35:27 +00:00
Simon Giesecke 191a830575 Bug 1628715 - Part 7: Add MOZ_NONNULL_RETURN to infallible nsTArray::AppendElements. r=xpcom-reviewers,necko-reviewers,nika,valentin
Differential Revision: https://phabricator.services.mozilla.com/D70831
2020-04-24 13:31:14 +00:00
Jonathan Kew 3751d26654 Bug 425915 - Use complex line breaker to identify word boundaries in SEAsian languages without interword spaces. r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D71206
2020-04-23 14:18:08 +00:00
L. David Baron f3b1d5a5c9 Bug 1631941 - Add writing mode assertions for mozilla::LogicalSides. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D71886
2020-04-22 23:43:56 +00:00
L. David Baron b4556207cc Bug 1631941 - Add DEBUG-only mWritingMode to mozilla::LogicalSides. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D71885
2020-04-22 23:52:08 +00:00
L. David Baron b3bbfa3a41 Bug 1631941 - Make nsIFrame::ContentSize and nsIFrame::SynthesizeBaselineBOffsetFromContentBox apply skip sides correctly for orthogonal writing modes. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D71884
2020-04-22 23:43:53 +00:00
Stefan Hindli ed13e122ee Backed out 3 changesets (bug 1631941) for mass build bustages CLOSED TREE
Backed out changeset 8a7e21f2b5f9 (bug 1631941)
Backed out changeset 6a53d6f1ec95 (bug 1631941)
Backed out changeset 91ac0b7e571b (bug 1631941)
2020-04-23 02:14:30 +03:00
L. David Baron fd0206f269 Bug 1631941 - Add writing mode assertions for mozilla::LogicalSides. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D71886
2020-04-22 18:00:07 +00:00
L. David Baron 129af7be9b Bug 1631941 - Add DEBUG-only mWritingMode to mozilla::LogicalSides. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D71885
2020-04-22 17:54:28 +00:00
L. David Baron 6dd37deb03 Bug 1631941 - Make nsIFrame::ContentSize and nsIFrame::SynthesizeBaselineBOffsetFromContentBox apply skip sides correctly for orthogonal writing modes. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D71884
2020-04-22 17:40:50 +00:00
Emilio Cobos Álvarez 3e3dc71cba Bug 1631887 - Claim to support NonDisappearingScrollbarWidth on the non-native theme. r=spohl
This is used by platforms with overlay scrollbars, only in order to
reserve enough space for the chevron of the `<select>` element.

So our general min-widget-size, which is the same as for scrollbars
works.

Differential Revision: https://phabricator.services.mozilla.com/D71825
2020-04-22 17:45:39 +00:00