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

5670 Коммитов

Автор SHA1 Сообщение Дата
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
Jan Horak 5664a8f139 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-20 12:50:25 +00:00
Kagami Sascha Rosylight a55438228f Bug 1630928 - Remove dead code in nsSprocketLayout r=dbaron
Differential Revision: https://phabricator.services.mozilla.com/D71310
2020-04-17 17:29:23 +00:00
Emilio Cobos Álvarez cd014b922b Bug 1629096 - Honor scroll-padding / margin in ns{ListControl,MenuPopup}Frame. r=hiro
Kinda drive-by, but I think this is sane and not risky... This is used for
<select size> / <select multiple>, and only scrolls the option into view (it
only scrolls a single scroll frame, the one inside the <select>).

If the author specifies scroll-padding / margin in there I don't see why we
shouldn't respect it when doing key selection / navigation / etc.

Same for menupopups (though those are even less risky because we control the CSS
there).

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

--HG--
extra : moz-landing-system : lando
2020-04-10 21:34:22 +00:00
Shyam Sundar 0225b28ab8 Bug 1626766 - Removing else after return statement r=sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D70605

--HG--
extra : moz-landing-system : lando
2020-04-11 13:10:23 +00:00
Kristen Wright 6de3ea1964 Bug 1626388 - Convert ui.key.menuAccessKeyFocuses to static pref r=njn
Converts `ui.key.menuAccessKeyFocuses` to a static pref and removes `nsMenuBarListener::InitializeStatics()`. This pref sets to `true` in windows and linux, which may affect behavior in SeaMonkey and Thunderbird.

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

--HG--
extra : moz-landing-system : lando
2020-04-07 17:10:30 +00:00
Edgar Chen 0409345a7c Bug 1615732 - Don't dispatch xul command event on Mac if it is from mouse event with ctrl key is pressed; r=Gijs,NeilDeakin
Depends on D68775

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

--HG--
extra : moz-landing-system : lando
2020-04-06 23:59:53 +00:00
Edgar Chen ca012184ae Bug 1615732 - Don't show menu on Mac when ctrl key is pressed; r=NeilDeakin
On Mac, ctrl-click will send a context menu event from the widget, so we don't
want to bring up the panel when ctrl key is pressed.

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

--HG--
extra : moz-landing-system : lando
2020-04-06 20:56:17 +00:00
Cosmin Sabou 3b3f1af25e Backed out 7 changesets (bug 1615732) for bc failures on browser_ext_pageAction_click_types.js. CLOSED TREE
Backed out changeset 031b8abf43a8 (bug 1615732)
Backed out changeset 297d82b338dc (bug 1615732)
Backed out changeset bbcb173e6c44 (bug 1615732)
Backed out changeset d7c5824d4579 (bug 1615732)
Backed out changeset f648cf0653a7 (bug 1615732)
Backed out changeset fcd441a2a860 (bug 1615732)
Backed out changeset fa861e50f198 (bug 1615732)

--HG--
extra : histedit_source : 16a05a43f3a9666c4fcf244062c28a5dc81061fd
2020-04-06 23:49:58 +03:00
Brian Grinstead 30b9da5519 Bug 1623992 - Automated rewrite from chrome://global/skin/ to chrome://global/skin/global.css in markup r=marionette-reviewers,perftest-reviewers,mossop,whimboo,sparky
This was generated with

```
cp .gitignore .rgignore
rg -l -g '*.{html,xhtml}' 'href="chrome://global/skin/"' | xargs sed -i "" 's/href\="chrome:\/\/global\/skin\/"/href\="chrome:\/\/global\/skin\/global.css"/g'
```

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

--HG--
extra : moz-landing-system : lando
2020-04-03 22:23:23 +00:00
Edgar Chen f8e3c1a6a9 Bug 1615732 - Don't dispatch xul command event on Mac if it is from mouse event with ctrl key is pressed; r=Gijs,NeilDeakin
Differential Revision: https://phabricator.services.mozilla.com/D68735

--HG--
extra : moz-landing-system : lando
2020-04-06 13:15:30 +00:00