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

5680 Коммитов

Автор SHA1 Сообщение Дата
Kris Maglione 3bda67deab Bug 1638153: Part 2 - Fix uses of .rootTreeItem to get top browser window. r=geckoview-reviewers,nika,snorp
Differential Revision: https://phabricator.services.mozilla.com/D75429
2020-06-17 17:17:16 +00:00
Markus Stange de82cec706 Bug 1644461 - When determining whether sidebar selections should use vibrancy, check all ancestor frames. r=miko
When a tree row in the sidebar is selected, the background of that selected row
is styled with `-moz-appearance: -moz-mac-(active-)source-list-selection`.
We have two ways of rendering such selections:

 1. With vibrancy, on 10.10+ if the sidebar itself uses vibrancy, and
 2. With a solid fill, on 10.9 or if the sidebar itself does not use vibrancy.

In the Firefox main browser window, sidebar styling crosses document boundaries.

```
<hbox id="browser">
  <vbox id="sidebar-box">  <-- this one has -moz-appearance: -moz-mac-source-list (or not)
    <browser> (bookmarksSidebar.xhtml or historySidebar.xhtml)
      <window>
        <tree> <-- this contains the tree body frame which renders the tree contents,
                   including the selection backgrounds
```

We detect whether "the sidebar itself uses vibrancy" by walking up the frame tree
and looking for a frame with `-moz-appearance: -moz-mac-source-list`.
In the past, this lookup was inconsistent between nsTreeBodyFrame.cpp and theme rendering,
and it stopped at document boundaries. This patch makes the implementations more
consistent and allows it to cross document boundaries.

The old code only worked with the given DOM structure because `-moz-appearance: -moz-mac-source-list`
was repeated on the <tree> element. I'd like to remove that duplication.
The new code works correctly if `-moz-appearance: -moz-mac-source-list` is only set
on <vbox id="sidebar-box"> and not repeated on the tree.

Depends on D51465

Differential Revision: https://phabricator.services.mozilla.com/D78924
2020-06-13 19:03:08 +00:00
Markus Stange 1afb437c70 Bug 1644468 - Invalidate XUL trees when window focus changes. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D78941
2020-06-11 23:35:18 +00:00
Razvan Maries dcf28ff865 Backed out changeset 6bc479713c3c (bug 1644468) for perma failures on nsDisplayList.h. CLOSED TREE 2020-06-12 00:32:04 +03:00
Markus Stange b8932b1368 Bug 1644468 - Invalidate XUL trees when window focus changes. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D78941
2020-06-11 18:42:13 +00:00
Dorel Luca 3a1ae4298b Backed out changeset 53c16c65827a (bug 1644468) for Mochitest failures in checkouts/gecko/layout/painting/nsDisplayListInvalidation.h. CLOSED TREE 2020-06-11 19:45:38 +03:00
Markus Stange a94dd20a0b Bug 1644468 - Invalidate XUL trees when window focus changes. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D78941
2020-06-11 11:47:59 +00:00
Emilio Cobos Álvarez ef3d21048d Bug 1640623 - Use enum classes for LookAndFeel int and float IDs. r=jmathies,geckoview-reviewers,esawin
Differential Revision: https://phabricator.services.mozilla.com/D76694
2020-06-11 11:27:43 +00:00
Timothy Nikkel ec7f81e276 Bug 1644381. Remove listener in nsSliderFrame. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D78882
2020-06-09 13:40:27 +00:00
Kenrick 08f36c530a Bug 1596160: Re-enable eslint rules within layout and address eslint failures in testcases r=dholbert
This patch was largely automated. It was generated by manually
editing .eslintrc.js and then running mach eslint layout --fix.

Additionally, this includes manual changes to test_bug533845.xhtml
and test_bug467442.xhtml that were necessary to appease eslint.

Differential Revision: https://phabricator.services.mozilla.com/D78615
2020-06-09 15:27:37 +00:00
Ting-Yu Lin 1022daa063 Bug 1643173 Part 1 - Convert enum nsIFrame::DISPLAY_CHILD_* to enum class. r=dholbert
The modifications are all straightforward conversion except the one in
nsMathMLContainerFrame, where it is simplified by calling the equivalent
BuildDisplayListForInline() helper.

Differential Revision: https://phabricator.services.mozilla.com/D78166
2020-06-05 02:52:05 +00:00
Razvan Maries a36bb7751f Backed out 3 changesets (bug 1638153) for perma failures on cross-origin-objects.html. CLOSED TREE
Backed out changeset f7aedc92d396 (bug 1638153)
Backed out changeset 07ec713926c6 (bug 1638153)
Backed out changeset 5a656842e241 (bug 1638153)
2020-06-01 23:51:35 +03:00
Kris Maglione b3fcd970ec Bug 1638153: Part 2 - Fix uses of .rootTreeItem to get top browser window. r=geckoview-reviewers,nika,snorp
Differential Revision: https://phabricator.services.mozilla.com/D75429
2020-06-01 17:59:01 +00:00
Haik Aftandilian 0a19d8eeb2 Bug 1592416 - Right click opens context menu on wrong monitor or virtual desktop (mac OS Catalina) r=spohl
Add the NSWindowCollectionBehaviorMoveToActiveSpace behavior to nsCocoaWindow
popups so that they override the "Assign To" space setting and display on the
active space.

This also addresses bug 1589893 where, when "Assign To" space is used, popup
menus are not visible in full screen mode.

With mutiple displays, recreate the popup widget each time it is displayed
to workaround a problem where the re-shown popup appears on the "Assign To"
display instead of the current display.

Differential Revision: https://phabricator.services.mozilla.com/D75419
2020-05-28 04:00:02 +00:00
Razvan Maries c2dda9f2ae Backed out changeset 854feb05fff6 (bug 1592416) for assertion failures. CLOSED TREE 2020-05-28 03:42:16 +03:00
Haik Aftandilian 76c2f2d30d Bug 1592416 - Right click opens context menu on wrong monitor or virtual desktop (mac OS Catalina) r=spohl
Add the NSWindowCollectionBehaviorMoveToActiveSpace behavior to nsCocoaWindow
popups so that they override the "Assign To" space setting and display on the
active space.

This also addresses bug 1589893 where, when "Assign To" space is used, popup
menus are not visible in full screen mode.

With mutiple displays, recreate the popup widget each time it is displayed
to workaround a problem where the re-shown popup appears on the "Assign To"
display instead of the current display.

Differential Revision: https://phabricator.services.mozilla.com/D75419
2020-05-27 22:41:34 +00:00
Emilio Cobos Álvarez 54fd961a29 Bug 1641245 - Make string comparators not virtual. r=froydnj,necko-reviewers,geckoview-reviewers,jgilbert,agi,valentin
There's no use case for stateful comparators, so they can be just plain
function pointers.

This is used in some hot places like CSS selector matching.

Differential Revision: https://phabricator.services.mozilla.com/D77084
2020-05-27 18:11:12 +00:00
Sylvestre Ledru 615c83d723 Bug 1519636 - Reformat recent changes to the Google coding style r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D76451
2020-05-25 07:42:38 +00:00
Butkovits Atila 8a87d1b582 Backed out changeset 09ccf334001b (bug 1592416) for causing bug 1640077 to fail. 2020-05-22 09:37:16 +03:00
Haik Aftandilian 624ed03701 Bug 1592416 - Right click opens context menu on wrong monitor or virtual desktop (mac OS Catalina) r=spohl
Add the NSWindowCollectionBehaviorMoveToActiveSpace behavior to nsCocoaWindow
popups so that they override the "Assign To" space setting and display on the
active space.

This also addresses bug 1589893 where, when "Assign To" space is used, popup
menus are not visible in full screen mode.

With mutiple displays, recreate the popup widget each time it is displayed
to workaround a problem where the re-shown popup appears on the "Assign To"
display instead of the current display.

Differential Revision: https://phabricator.services.mozilla.com/D75419
2020-05-21 00:09:32 +00:00
Kristen Wright 9a760db959 Bug 1626386 - Convert ui.menu.incremental_search.timeout to a static pref r=emilio
Converts `ui.menu.incremental_search.timeout` to a static pref and replaces macros related to the incremental search timeout with the actual pref, so that they are kept in sync without the need to manually update any macros. The two `.xml` files mentioned in the note were nowhere to be found, so this patch makes the assumption that those do not exist anymore and do not need to be kept in sync.

Differential Revision: https://phabricator.services.mozilla.com/D75182
2020-05-19 20:56:06 +00:00
Ting-Yu Lin 9e89df4c56 Bug 1638928 Part 3 - Remove redundant "nsIFrame::" prefix from ChildLists() calls. r=mats
Differential Revision: https://phabricator.services.mozilla.com/D75894
2020-05-19 12:37:41 +00:00
Ting-Yu Lin 162c8d3a67 Bug 1638928 Part 2 - Rename nsIFrame's GetChildLists() to ChildLists(). r=mats
This patch is generated by using my editor's rename functionality.

In the next patch, `nsIFrame::` prefix is going to be removed manually
from all the ChildLists() calls.

Differential Revision: https://phabricator.services.mozilla.com/D75893
2020-05-19 12:37:37 +00:00
Jan Horak 582ea4cda5 Bug 1637948 Don't resize popup on hidpi when not needed r=stransky
We have to compare new width and height multiplied by scale because mBounds is in
real pixels while gdk_window_move_to_rect returns the size without multiplying
by scale factor.

Also to fix overflow popups we need to use NativeMoveResize in nsWindow::ResizeInt
when size of the popup has changed.

Differential Revision: https://phabricator.services.mozilla.com/D75298
2020-05-19 15:34:18 +00:00
Ting-Yu Lin b98820d020 Bug 1635319 Part 3 - Use range-based for loops instead of ChildListIterator in other layout directories. r=mats
Differential Revision: https://phabricator.services.mozilla.com/D75654
2020-05-18 01:12:26 +00:00
Emilio Cobos Álvarez 85f272d163 Bug 1637330 - Flush frames a bit more in nsXULPopupManager. r=tnikkel
Chrome inserts shadow dom lazily during that event, which can make us
reconstruct the menupopup temporarily.

When lazyfc is disabled we reconstruct it immediately so this code gets
a non-null primary frame, but with it enabled we need to flush frames.

Do the same in popuphiding for consistency.

Differential Revision: https://phabricator.services.mozilla.com/D74887
2020-05-12 21:42:16 +00:00
Hiroyuki Ikezoe 49802fc727 Bug 1634616 - Unscale pre-render area for transform animations too. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D74520
2020-05-12 20:58:09 +00:00
Coroiu Cristina f979c1a8d2 Backed out 3 changesets (bug 1634616) for reftest failures at layout/reftests/transform/partial-prerender-expansion-rotate.html on a CLOSED TREE
Backed out changeset 53da1ae188f4 (bug 1634616)
Backed out changeset 60271de42eb8 (bug 1634616)
Backed out changeset 4279b1647e47 (bug 1634616)
2020-05-12 13:47:25 +03:00
Hiroyuki Ikezoe d611690078 Bug 1634616 - Unscale pre-render area for transform animations too. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D74520
2020-05-12 08:32:15 +00:00
Emilio Cobos Álvarez ca996e1ea1 Bug 1637097 - Flush frames in nsXULPopupManager::HandleKeyboardNavigation. r=tnikkel
It uses the frame tree to navigate the popup, so needs to ensure frames
are up-to-date.

Differential Revision: https://phabricator.services.mozilla.com/D74748
2020-05-11 22:43:23 +00:00
Miko Mynttinen 1131025246 Bug 1554499 - Part 12: Remove index from nsDisplayOwnLayer r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D74091
2020-05-11 16:58:26 +00:00
sotaro 230d8f88ed Bug 1635769 - Call WebRenderLayerManager::ClearCachedResources() during re-creating widget r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D74392
2020-05-09 05:44:37 +00:00
Kagami Sascha Rosylight 5ae938ffc0 Bug 1630704 - Merge XUL methods to nsIFrame r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D74335
2020-05-08 17:31:35 +00:00
Emilio Cobos Álvarez 3eb9ef9c18 Bug 1365806 - Make scrollbars not impose a minimum size on the scroller. r=dholbert
Also, don't suppress scrollbars if the scrollport is less than their
length, as that can happen after this patch :)

Differential Revision: https://phabricator.services.mozilla.com/D73395
2020-05-07 20:44:25 +00:00
Emilio Cobos Álvarez 46cce048ef Bug 1635728 - Move nsMenuFrame::BuildAcceleratorText to JS. r=Gijs
The place where it's done right now is just unsound. It modifies
attributes during frame construction and it causes assertions to fire
with lazy frame-construction enabled.

Differential Revision: https://phabricator.services.mozilla.com/D74029
2020-05-07 08:28:29 +00:00
Narcis Beleuzu 6d7a08d1fd Backed out changeset 842955b61f01 (bug 1365806) for wr failures on contain-size-scrollbars-002.html . CLOSED TREE 2020-05-06 14:23:49 +03:00
Emilio Cobos Álvarez 0d476766fc Bug 1365806 - Make scrollbars not impose a minimum size on the scroller. r=dholbert
Also, don't suppress scrollbars if the scrollport is less than their
length, as that can happen after this patch :)

Differential Revision: https://phabricator.services.mozilla.com/D73395
2020-05-06 09:46:20 +00:00
Botond Ballo 173d001b86 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-05-05 19:26:38 +00:00
Emilio Cobos Álvarez 761e9dfe4c Bug 1635094 - Cleanup the ReferrerInfo code. r=ckerschb
The cast in InitWithNode is wrong. AsElement() asserts instead of
checking the flag, so we always pass an element (and if we didn't we'd
have type confusion problems). I audited the callers and we're fine.

Anyhow, always require an element, and add two convenience constructors
for C++ code.

Differential Revision: https://phabricator.services.mozilla.com/D73636
2020-05-04 18:50:20 +00:00
Cosmin Sabou 71a40eae48 Backed out 2 changesets (bug 1635094) for build bustages on nsMacShellService.cpp. CLOSED TREE
Backed out changeset 0a2b0c6ea19a (bug 1635094)
Backed out changeset ead4f26f76ee (bug 1635094)
2020-05-04 20:04:06 +03:00
Emilio Cobos Álvarez 6dde680742 Bug 1635094 - Cleanup the ReferrerInfo code. r=ckerschb
The cast in InitWithNode is wrong. AsElement() asserts instead of
checking the flag, so we always pass an element (and if we didn't we'd
have type confusion problems). I audited the callers and we're fine.

Anyhow, always require an element, and add two convenience constructors
for C++ code.

Differential Revision: https://phabricator.services.mozilla.com/D73636
2020-05-04 16:26:51 +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 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
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
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
Emilio Cobos Álvarez d36c96ab4c Bug 1612068 - Move zoom from the content viewer to the browsing context. r=nika
We need it to live in BrowsingContext instead of WindowContext, because
we need to preserve the zoom level across same-origin navigation.

It'd be nice if it only lived in the top BC, but that's not possible at
the moment because a lot of tests rely on zooming only iframes. Some of
them can be adjusted for scaling the top instead, but not sure it's
worth it's worth fixing them and moving the zoom to be top-only, as it'd
be a bunch of effort, and the complexity and overhead of propagating the
zoom is not so big.

The print-preview-specific code in nsContentViewer is from before we did
the document cloning setup, and it seems useless. I've tested print
preview scaling before and after my patch and both behave the same.

The rest is just various test changes to use the SpecialPowers APIs or
BrowsingContext as needed instead of directly poking at the content
viewer.

I named the pres context hook RecomputeBrowsingContextDependentData, as
more stuff should move there like overrideDPPX and other media emulation
shenanigans.

I also have some ideas to simplify or even remove ZoomChild and such,
but that's followup work.

Differential Revision: https://phabricator.services.mozilla.com/D71969
2020-04-22 19:32:52 +00:00
Botond Ballo 5ecfef966e Bug 1629732 - Fix non-unified build errors in layout/xul. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D71847
2020-04-22 00:11:22 +00:00
Jan Horak 2cc879bea5 Bug 1623974 [wayland] Attach popups to anchor rects; r=stransky
If we want correct popup placement we need to use the right anchor rect
for gdk_window_move_to_rect under Wayland. Patch exports the anchor rect from the
nsMenuPopupFrame to be used in nsWindow.

This patch also fixes popup overflowing the screen by using the size returned from
gdk_window_move_to_rect for the nsMenuPopupFrame.

Differential Revision: https://phabricator.services.mozilla.com/D67810
2020-04-21 19:19:30 +00:00
Kagami Sascha Rosylight 502cb439da Bug 1630704 - Merge nsBox into nsIFrame r=emilio
We want to merge nsFrame into nsIFrame, so this patch merges nsBox first which is the superclass of nsFrame.

Differential Revision: https://phabricator.services.mozilla.com/D71161
2020-04-18 12:06:09 +00:00
Mihai Alexandru Michis 25a1d0163b Backed out changeset 86630db403c1 (bug 1623974) for causing failures in browser_toolbox_zoom_popup.js and in wpt.
CLOSED TREE
2020-04-20 18:07:23 +03:00