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

5607 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez d9d7f09456 Bug 1619428 - Make the overlay scrollbars check work in all platforms. r=mstange
Reuse the AddXULMinSize logic which already deals with all the widget stuff,
non-themed scrollbars, etc.

Remove some useless margin declarations and such in GeckoView scrollbars code
now that AddXULMinSize does look at the min-width/height properties.

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

--HG--
extra : moz-landing-system : lando
2020-03-03 20:30:52 +00:00
shindli b961822146 Backed out changeset be3b005bfc6d (bug 1619428) for causing reftest failure in contain-size-select-elem-002-ref.html CLOSED TREE 2020-03-03 22:15:47 +02:00
Emilio Cobos Álvarez cdad6a0be8 Bug 1619428 - Make the overlay scrollbars check work in all platforms. r=mstange
Reuse the AddXULMinSize logic which already deals with all the widget stuff,
non-themed scrollbars, etc.

Remove some useless margin declarations and such in GeckoView scrollbars code
now that AddXULMinSize does look at the min-width/height properties.

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

--HG--
extra : moz-landing-system : lando
2020-03-03 18:50:07 +00:00
Henri Sivonen 419b10fad5 Bug 1618163 - Use BrowsingContext for activeness check in nsXULPopupManager::MayShowPopup. r=NeilDeakin
Differential Revision: https://phabricator.services.mozilla.com/D64353

--HG--
extra : moz-landing-system : lando
2020-03-02 13:16:10 +00:00
Oana Pop Rus 1901c7b352 Backed out changeset 1beef00f147f (bug 1618163) for build bustages in nsXULPopupManager.cpp on a CLOSED TREE 2020-03-02 14:20:55 +02:00
Henri Sivonen 6bc59540de Bug 1618163 - Use BrowsingContext for activeness check in nsXULPopupManager::MayShowPopup. r=NeilDeakin
Differential Revision: https://phabricator.services.mozilla.com/D64353

--HG--
extra : moz-landing-system : lando
2020-03-02 11:55:12 +00:00
Simon Giesecke 32c9aeaad4 Bug 1617542 - Remove nsRefPtrHashtable::Put overload accepting already_AddRefed and adapt all uses. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D63865

--HG--
extra : moz-landing-system : lando
2020-02-25 09:36:12 +00:00
Cosmin Sabou 7f1afff492 Backed out 5 changesets (bug 1617604, bug 1617542, bug 1617546) for causing build bustages on ipc/mscom/Interceptor.cpp.
CLOSED TREE

Backed out changeset 5faa54ad950e (bug 1617542)
Backed out changeset cb38779e1eb6 (bug 1617604)
Backed out changeset 3aea18e0396f (bug 1617542)
Backed out changeset bc3eeefdfb6c (bug 1617542)
Backed out changeset b76a3aa5ff6f (bug 1617546)
2020-02-24 19:50:13 +02:00
Simon Giesecke df538d9a79 Bug 1617542 - Remove nsRefPtrHashtable::Put overload accepting already_AddRefed and adapt all uses. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D63865

--HG--
extra : moz-landing-system : lando
2020-02-24 17:08:30 +00:00
Sylvestre Ledru ca6530131a Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan,kvark
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2020-02-24 15:33:38 +00:00
Emilio Cobos Álvarez 5e65211744 Bug 1617472 - Use enums for text-align / text-align-last. r=jfkthame
This also fixes some backwards logic in nsBlockFrame::ReflowDirtyLines, and adds
some static assertions to nsGenericHTMLElement that almost cause a very subtle
bug.

Depends on D63792

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

--HG--
extra : moz-landing-system : lando
2020-02-24 13:32:57 +00:00
Emilio Cobos Álvarez fff63130d9 Bug 1617421 - Use cbindgen for cursors. r=jwatt
Pretty straight-forward.

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

--HG--
extra : moz-landing-system : lando
2020-02-23 13:07:30 +00:00
Simon Giesecke 9350e6b741 Bug 1613985 - Use MOZ_COUNTED_DEFAULT_CTOR_*/MOZ_COUNTED_DTOR_* macros. r=froydnj
This removes the need for explicit #ifdef NS_BUILD_REFCNT_LOGGING without
introducing user-defined destructors when it is not defined.

Also, some uses of virtual for declaring destructors are replaced by the
appropriate override declaration through these changes.

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

--HG--
extra : moz-landing-system : lando
2020-02-20 11:40:14 +00:00
Dorel Luca d5f9df8ee1 Backed out 2 changesets (bug 1613985) for Build bustage on Windows2012. CLOSED TREE
Backed out changeset fd177b40b561 (bug 1613985)
Backed out changeset fb6d62b7f28d (bug 1613985)
2020-02-19 22:22:41 +02:00
Simon Giesecke 59b23375c0 Bug 1613985 - Use MOZ_COUNTED_DEFAULT_CTOR_*/MOZ_COUNTED_DTOR_* macros. r=froydnj
This removes the need for explicit #ifdef NS_BUILD_REFCNT_LOGGING without
introducing user-defined destructors when it is not defined.

Also, some uses of virtual for declaring destructors are replaced by the
appropriate override declaration through these changes.

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

--HG--
extra : moz-landing-system : lando
2020-02-19 18:05:38 +00:00
Tim Nguyen a2e4d99a50 Bug 1610597 - Re-introduce display: -moz-stack; as <legacy-stack>. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D62758

--HG--
extra : moz-landing-system : lando
2020-02-14 16:32:38 +00:00
Emilio Cobos Álvarez b9fdc9d59d Bug 1613524 - Remove workaround in nsImageBoxFrame::UpdateImage. r=bzbarsky
Depends on D62149

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

--HG--
extra : moz-landing-system : lando
2020-02-10 21:20:25 +00:00
Simon Giesecke b50347f917 Bug 1611415 - Prefer using std::move over forget. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D60980

--HG--
extra : moz-landing-system : lando
2020-02-13 14:38:48 +00:00
shindli 91aa0518dd Backed out changeset 0c982bc69cb3 (bug 1611415) for causing build bustages in /builds/worker/workspace/build/src/obj-firefox/dist/include/nsCOMPtr CLOSED TREE 2020-02-12 20:13:29 +02:00
Simon Giesecke f604a47fa5 Bug 1611415 - Applied FixItHints from mozilla-non-std-move. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D60980

--HG--
extra : moz-landing-system : lando
2020-02-12 17:24:41 +00:00
Emilio Cobos Álvarez 5830b68d25 No bug - Fix non-unified build in nsImageBoxFrame.cpp
Differential Revision: https://phabricator.services.mozilla.com/D62147

--HG--
extra : moz-landing-system : lando
2020-02-08 16:52:51 +00:00
Ting-Yu Lin bb0d044a16 Bug 1613732 Part 2 - Remove unused ReflowChildFlags::NoVisibility. r=dholbert
This bit is set, but no function uses it.

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

--HG--
extra : moz-landing-system : lando
2020-02-07 04:17:33 +00:00
Emilio Cobos Álvarez 69c87f6cb2 Bug 1613349 - Rename nsINode::DeleteProperty to RemoveProperty. r=smaug
And the related methods as well.

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

--HG--
extra : moz-landing-system : lando
2020-02-06 16:06:49 +00:00
Emilio Cobos Álvarez c5c0ef9787 Bug 1613349 - Rename nsIFrame::DeleteProperty to RemoveProperty. r=dholbert
As it doesn't necessarily call delete and that may be confusing.

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

--HG--
extra : moz-landing-system : lando
2020-02-06 16:06:49 +00:00
Emilio Cobos Álvarez bba367ec8f Bug 1613349 - Rename nsIFrame::RemoveProperty to nsIFrame::TakeProperty. r=dholbert
This is hopefully clearer naming.

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

--HG--
extra : moz-landing-system : lando
2020-02-06 00:13:38 +00:00
Boris Zbarsky 4c46b448a8 Bug 1611993. nsImageBoxFrame should not UpdateImage when it's not safe to run script. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D61718

--HG--
extra : moz-landing-system : lando
2020-02-05 23:14:37 +00:00
Boris Zbarsky c8713bf40a Bug 1612444. Improve some error messages for exceptions in layout. r=emilio
I used ThrowNotSupportedError for the not-implemented case.

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

--HG--
extra : moz-landing-system : lando
2020-02-03 20:35:54 +00:00
Tim Nguyen 3b6875eeb1 Bug 1610404 - Remove nsGroupBoxFrame (display: -moz-groupbox). r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D61422

--HG--
extra : moz-landing-system : lando
2020-02-03 09:55:51 +00:00
Tetsuharu OHZEKI 77e9510fb3 Bug 1597486 - Fix uses of nsIDocShellTreeItem in nsMenuPopupFrame::Init(). r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D61426

--HG--
extra : moz-landing-system : lando
2020-02-03 08:00:45 +00:00
Eric Rahm 7b7fc1c992 Bug 1610387 - Remove nsAutoPtr usage from layout/. r=dbaron
Differential Revision: https://phabricator.services.mozilla.com/D60455

--HG--
extra : moz-landing-system : lando
2020-02-01 09:40:36 +00:00
Emilio Cobos Álvarez a25126cd0d Bug 1611181 - Make direction use an enum class. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D60857

--HG--
extra : moz-landing-system : lando
2020-01-24 11:46:14 +00:00
Kirk Steuber 44aeb05573 Bug 1607575 - Change consumers of XUL ordinal attribute to use the -moz-box-ordinal-group style instead r=bgrins
Differential Revision: https://phabricator.services.mozilla.com/D59762

--HG--
extra : rebase_source : e70a0b95e3f878fa57d4af134e5ed7d16200467c
2020-01-22 17:23:47 +01:00
Kirk Steuber dc99689ced Bug 1607575 - Remove support for the XUL ordinal attribute r=bgrins,bz
This removes nsTreeColumns::RestoreNaturalOrder, which requires the ordinal attribute to function. It only has one consumer: toolkit/content/widgets/tree.js. The call is removed from that consumer in this patch. This will break column ordering in MozTree's, which is fixed by a later changeset in this stack.

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

--HG--
extra : rebase_source : 88c0b1dda44dc64eedbb73f7902e6cc61faeee1b
2020-01-21 18:46:13 +01:00
Emilio Cobos Álvarez 256c124f94 Bug 1609996 - Reorder some includes affected by the previous patches. r=froydnj
This was done by:

This was done by applying:

```
diff --git a/python/mozbuild/mozbuild/code-analysis/mach_commands.py b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
index 789affde7bbf..fe33c4c7d4d1 100644
--- a/python/mozbuild/mozbuild/code-analysis/mach_commands.py
+++ b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
@@ -2007,7 +2007,7 @@ class StaticAnalysis(MachCommandBase):
         from subprocess import Popen, PIPE, check_output, CalledProcessError

         diff_process = Popen(self._get_clang_format_diff_command(commit), stdout=PIPE)
-        args = [sys.executable, clang_format_diff, "-p1", "-binary=%s" % clang_format]
+        args = [sys.executable, clang_format_diff, "-p1", "-binary=%s" % clang_format, '-sort-includes']

         if not output_file:
             args.append("-i")
```

Then running `./mach clang-format -c <commit-hash>`

Then undoing that patch.

Then running check_spidermonkey_style.py --fixup

Then running `./mach clang-format`

I had to fix four things:

 * I needed to move <utility> back down in GuardObjects.h because I was hitting
   obscure problems with our system include wrappers like this:

0:03.94 /usr/include/stdlib.h:550:14: error: exception specification in declaration does not match previous declaration
0:03.94 extern void *realloc (void *__ptr, size_t __size)
0:03.94              ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/malloc_decls.h:53:1: note: previous declaration is here
0:03.94 MALLOC_DECL(realloc, void*, void*, size_t)
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/mozilla/mozalloc.h:22:32: note: expanded from macro 'MALLOC_DECL'
0:03.94     MOZ_MEMORY_API return_type name##_impl(__VA_ARGS__);
0:03.94                                ^
0:03.94 <scratch space>:178:1: note: expanded from here
0:03.94 realloc_impl
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/mozmemory_wrap.h:142:41: note: expanded from macro 'realloc_impl'
0:03.94 #define realloc_impl mozmem_malloc_impl(realloc)

   Which I really didn't feel like digging into.

 * I had to restore the order of TrustOverrideUtils.h and related files in nss
   because the .inc files depend on TrustOverrideUtils.h being included earlier.

 * I had to add a missing include to RollingNumber.h

 * Also had to partially restore include order in JsepSessionImpl.cpp to avoid
   some -WError issues due to some static inline functions being defined in a
   header but not used in the rest of the compilation unit.

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

--HG--
extra : moz-landing-system : lando
2020-01-20 16:19:48 +00:00
Emilio Cobos Álvarez aa3a695712 Bug 1609996 - Remove mozilla/Move.h. r=froydnj
rg -l 'mozilla/Move.h' | xargs sed -i 's/#include "mozilla\/Move.h"/#include <utility>/g'

Further manual fixups and cleanups to the include order incoming.

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

--HG--
extra : moz-landing-system : lando
2020-01-20 16:18:20 +00:00
Emilio Cobos Álvarez 5cd5e6f148 Bug 1609996 - Remove mozilla::Swap in favor of std::swap. r=froydnj
Now mfbt/Move.h is empty except for that excellent comment about move
semantics... Should we put it somewhere else and delete the header as a
follow-up? Or just delete the header and carry on?

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

--HG--
extra : moz-landing-system : lando
2020-01-20 16:17:06 +00:00
Masayuki Nakano 527b3ff65b Bug 1609338 - Optimize usage and implementation of `UIEvent::GetRangeParent()` and `UIEvent::RangeOffset()` r=smaug
`UIEvent::GetRangeParent()` retrieves `nsIContent` instance but it needs to
return `already_AddRefed<nsINode>` because of a WebIDL method.  However,
`nsIContent` is better type in C++ code.  Therefore, this patch renames it
to `UIEvent::GetRangeParentContent()` and makes new `UIEvent::GetRangeParent()`
and just call it.

Additionally, some callers call `UIEvent::RangeOffset()` too, but that means
that they compute same things twice because both of them use
`nsLayoutUtils::GetContainerAndOffsetAtEvent()` with same input arguments.
Thus, `UIEvent::GetRangeParentContent()` should also return offset with optional
out argument.  (Note that this does not make `RangeOffset()` use
`GetRangeParentContent()` because using out parameter for range parent causes
unnecessary computation cost for `RangeOffset()`.)

Therefore, finally, `UIEvent::GetRangeParentContent()` becomes also an alias of
raw method `UIEvent::GetRangeParentContentAndOffset()` which also returns offset
with out argument.

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

--HG--
extra : moz-landing-system : lando
2020-01-17 01:23:12 +00:00
Sylvestre Ledru c521758c5e Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2020-01-09 21:50:11 +00:00
Tetsuharu OHZEKI 790460c47c Bug 1597489 - followup: formatting. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D59295

--HG--
extra : moz-landing-system : lando
2020-01-09 09:58:56 +00:00
Tetsuharu OHZEKI 826da87e18 Bug 1597489 - Fix uses of nsIDocShellTreeItem in nsTitleBarFrame::HandleEvent. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D59288

--HG--
extra : moz-landing-system : lando
2020-01-09 09:27:02 +00:00
Kirk Steuber 55bdd37f7c Bug 1603830 - Replace XULElement.ordinal with el.style.MozBoxOrdinalGroup r=bgrins
Depends on D58670

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

--HG--
extra : moz-landing-system : lando
2020-01-06 20:02:43 +00:00
Tetsuharu OHZEKI b3d907498a Bug 1597488 - Fix uses of nsResizerFrame::GetContentToResize in layout/xul/nsResizerFrame.cpp. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D58483

--HG--
extra : moz-landing-system : lando
2020-01-04 19:35:50 +00:00
Emilio Cobos Álvarez bc36653df5 Bug 1449861 - Use UTF8String for some CSSOM APIs. r=bzbarsky
In particular, the ones where we transcode unconditionally atm (property names
and such).

There are others like cssText getters and setters which are a bit harder,
because I either need to rewrite all our serialization code to work with UTF8
(which is fine, but a lot of work), or teach webidl to have a setter that takes
UTF8String as input but returns DOMString as output (which is at best hacky).

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

--HG--
extra : moz-landing-system : lando
2020-01-04 10:36:49 +00:00
Jonathan Kingston 27ca040dfd Bug 1606774 - Change GetAttribute to GetAttr where possible r=baku
Differential Revision: https://phabricator.services.mozilla.com/D58585

--HG--
extra : moz-landing-system : lando
2020-01-03 23:40:53 +00:00
Coroiu Cristina bb687ca476 Backed out changeset 7da82c2eea17 (bug 1597488) for chrome failures at layout/xul/test/test_resizer.xhtml on a CLOSED TREE 2020-01-03 17:14:49 +02:00
Tetsuharu OHZEKI ddb1860966 Bug 1597488 - Fix uses of nsResizerFrame::GetContentToResize in layout/xul/nsResizerFrame.cpp. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D58483

--HG--
extra : moz-landing-system : lando
2020-01-03 13:45:46 +00:00
Masayuki Nakano ec5524e832 Bug 1600191 - Make test_bug159346.xhtml specify `min-height` and `min-width` of scrollbar button to avoid native theme difference r=NeilDeakin
test_bug159346.xhtml modifies UA stylesheet to show scrollbar button.
However, on Ubuntu 18.04, its width is 0.  Therefore, the following
script fails to test click on the button.

This patch specifies its `min-width` and `min-height` to make it
clickable on any platforms.

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

--HG--
extra : moz-landing-system : lando
2019-12-27 15:24:48 +00:00
Masayuki Nakano 87ca855ece Bug 1603074 - part 1: Make `synthesizePlainDragAndDrop()` synthesize drag events without `DataTransfer` object r=smaug
`synthesizePlainDragAndDrop()` synthesizes drag events with `DataTransfer`
object which is set to `DragEvent.dataTransfer` of `dragstart` after starting
drag session explicitly.  However, this causes
`EventStateManager::DoDefaltDragStart()` does not initialize `nsIDragService`
instance.  Therefore, synthesized drag events cannot work with editor because
`DragEvent::GetMozSourceNode()` returns `nullptr` due to
`nsIDragSession::GetSourceNode()` returning `nullptr`.

On the other hand, synthesized drag events cannot use
`nsIDragService::InvodeDragSession()` normally because of hitting an assertion.
https://searchfox.org/mozilla-central/rev/690e903ef689a4eca335b96bd903580394864a1c/widget/nsBaseDragService.cpp#230-233

This patch does:
- mark drag events caused by synthesized mouse events as "synthesized for tests"
- make `synthesizePlainDragAndDrop()` stop using
  `nsIDragService.startDragSession()`
- make `nsBaseDragService` initialize and start session even for synthesized
  `dragstart` event
- make `synthesizePlainDragAndDrop()` stop synthesizing drag events with
  `DataTransfer` object since it's normal behavior and it'll be initialized
  with `nsIDragService::GetDataTransfer()`
- make `nsBaseDragService` store `effectAllowed` for the session only when
  it's synthesized session because it's required at initializing synthesized
  default `dropEffect` value of `dragenter`, `dragover`, `dragexit` and `drop`
  events' `dataTransfer`
- make all tests which use `nsIDragService.startDragSession()` use new
  API, `nsIDragService.startDragSessionForTests()` to initialize session's
  `effectAllowed` value
- make `EventStateManager::PostHandleEvent()` set drag end point of the test
  session to `eDrop` event's screen point
- make `synthesizePlainDragAndDrop()` set drag end point of the session if
  it does not synthesize `drop` event because following `endDragSession()`
  use it at dispatching `dragend` event on the source element

Additionally, this adds `dumpFunc` new param to `synthesizePlainDragAndDrop()`
because it's really useful to investigate the reason why requesting DnD isn't
performed as expected.

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

--HG--
extra : moz-landing-system : lando
2019-12-21 12:27:06 +00:00
Chris Peterson 406763af7f Bug 1570499 - Part 1: Replace MOZ_FALLTHROUGH macro with C++17's [[fallthrough]] attribute. r=froydnj
This changeset is a simple find and replace of `MOZ_FALLTHROUGH` and `[[fallthrough]]`.

Unfortunately, the MOZ_FALLTHROUGH_ASSERT macro (to assert on case fallthrough in debug builds) is still necessary after switching from [[clang::fallthrough]] to [[fallthrough]] because:

* MOZ_ASSERT(false) followed by [[fallthrough]] triggers a -Wunreachable-code warning in DEBUG builds
* but MOZ_ASSERT(false) without [[fallthrough]] triggers a -Wimplicit-fallthrough warning in NDEBUG builds.

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

--HG--
extra : moz-landing-system : lando
2019-12-20 07:16:43 +00:00
Kirk Steuber 634d236f08 Bug 1603826 - Replace XULElement.dir with getAttribute/setAttribute r=bgrins
Differential Revision: https://phabricator.services.mozilla.com/D57577

--HG--
extra : moz-landing-system : lando
2019-12-18 18:17:15 +00:00