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

586 Коммитов

Автор SHA1 Сообщение Дата
Brindusan Cristian 40a5b04ab5 Backed out 3 changesets (bug 1552708, bug 1552878) for build bustages and compiler issues. CLOSED TREE
Backed out changeset 9d4f178bfcbd (bug 1552878)
Backed out changeset 80db9f845237 (bug 1552708)
Backed out changeset 1bdbfbb5b342 (bug 1552708)
2019-05-27 17:00:03 +03:00
Emilio Cobos Álvarez f2190857bb Bug 1552708 - Use cbindgen for URIs. r=heycam
This doesn't clean up as much as a whole, but it's a step in the right
direction. In particular, it allows us to start using simple bindings for:

 * Filters
 * Shapes and images, almost. Need to:
   * Get rid of the complex -moz- gradient parsing (let
     layout.css.simple-moz-gradient.enabled get to release).
 * Counters, almost. Need to:
   * Share the Attr representation with Gecko, by not using Option<>.
     * Just another variant should be enough (ContentItem::{Attr,Prefixedattr},
       maybe).

Which in turn allows us to remove a whole lot of bindings in followups to this.

The setup changes a bit. This also removes the double pointer I complained about
while reviewing the shared UA sheet patches. The old setup is:

```
SpecifiedUrl
 * CssUrl
   * Arc<CssUrlData>
     * String
     * UrlExtraData
 * UrlValueSource
   * Arc<CssUrlData>
   * load id
   * resolved uri
   * CORS mode.
   * ...
```

The new one removes the double reference to the url data via URLValue, and looks
like:

```
SpecifiedUrl
 * CssUrl
   * Arc<CssUrlData>
     * String
     * UrlExtraData
     * CorsMode
     * LoadData
       * load id
       * resolved URI
```

The LoadData is the only mutable bit that C++ can change, and is not used from
Rust. Ideally, in the future, we could just use rust-url to resolve the URL
after parsing or something, and make it all immutable. Maybe.

I've verified that this approach still works with the UA sheet patches (via the
LoadDataSource::Lazy).

The reordering of mWillChange is to avoid nsStyleDisplay from going over the
size limit. We want to split it up anyway in bug 1552587, but mBinding gains a
tag member, which means that we were having a bit of extra padding.

One thing I want to explore is to see if we can abuse rustc's non-zero
optimizations to predict the layout from C++, but that's something to explore at
some other point in time and with a lot of care and help from Michael (who sits
next to me and works on rustc ;)).

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

--HG--
extra : moz-landing-system : lando
2019-05-27 11:45:12 +00:00
Paul Zuehlcke 4bccc4cede Bug 1428913 - Deny full-screen on right or middle mouse button. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D31481

--HG--
extra : moz-landing-system : lando
2019-05-22 19:16:31 +00:00
Brian Birtles 5ca0980aea Bug 1553021 - Update naming of parameter to getAnimations to match spec; r=bzbarsky
As per spec text added here:

  cf3a00ee5c

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

--HG--
extra : moz-landing-system : lando
2019-05-22 05:40:36 +00:00
alwu 119f85db3a Bug 1536762 - part2 : use first line box's size as positioning basic unit. r=heycam,baku
According to the spec [1] 7.2.10.2, we should use the first line box's height or width as positioning unit to adjust box's position.

We will also use this value to adjust box when `snap-to-line` is false.

There, we implement a new chrome-only API to acquire this information, which would return the first line box's size in the `block` frame.

[1] https://www.w3.org/TR/webvtt1/#ref-for-webvtt-cue-snap-to-lines-flag-12

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

--HG--
extra : moz-landing-system : lando
2019-05-09 19:22:33 +00:00
Masayuki Nakano 41c520d31f Bug 1543315 - part 16: Mark PresShell::HandleEventWithTarget() as MOZ_CAN_RUN_SCRIPT r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D30011

--HG--
extra : moz-landing-system : lando
2019-05-06 13:15:05 +00:00
Boris Zbarsky 672a92c434 Bug 1548305. Fix incorrect Maybe<JSAutoRealm> use in Element::Animate. r=jandem
We just want to enter the Realm unconditionally.  Also, we can get the global
from our GlobalObject.

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

--HG--
extra : moz-landing-system : lando
2019-05-02 07:14:35 +00:00
Emilio Cobos Álvarez 27fc6a03c9 Bug 1545430 - Implement selector-matching for ::part(). r=heycam
Also fairly straight-forward. This may get more complicated when we do part
forwarding, if any.

I've opened https://github.com/w3c/csswg-drafts/issues/3841 in what I think
would be a cleaner model for forwarding.

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

--HG--
extra : moz-landing-system : lando
2019-05-01 17:28:23 +00:00
Masayuki Nakano bad5d5bfe9 Bug 1547416 - Move nsIPresShell::ScrollAxis to PresShellForwards.h r=smaug
`nsIPresShell::ScrollAxis` can be used anywhere and it's used by some
utils actually. So, it should be in `mozilla` namespace and perhaps,
 `PresShellForwards.h` is a good place to move it rather than creating
new header file.

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

--HG--
extra : moz-landing-system : lando
2019-04-30 00:07:49 +00:00
Emilio Cobos Álvarez 11ea945833 Bug 1546697 - Use a consistent style for enum classes in layout. r=dholbert
Per the discussion in:

  https://groups.google.com/d/msg/mozilla.dev.platform/P79pwa9z5m8/iPYPAWPHCAAJ

They should be CamelCase, and that's what most of them already do. This converts
the rest, which are a few.

For the ones that already used `e` or `k` prefixes, I've mostly done:

 for file in $(rg Type::e layout | cut -d : -f 1 | sort | uniq); do sed -i 's#Type::e#Type::#g' $file; done

For the ones that used uppercase, I've removed the prefix if it was already in
the type name, and turn them into CamelCase.

Depends on D28680

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

--HG--
extra : moz-landing-system : lando
2019-04-25 23:03:04 +00:00
Masayuki Nakano 3622509485 Bug 1545342 - part 2: Make some public enum of nsIPresShell move to mozilla namespace and defined as enum class in PresShellForwards.h r=smaug
This patch moves some `enum` in `nsIPresShell` which are in public scope into
`mozilla` namespace and change them as `enum class`es.

Unfortunately, only "where to scroll" enum is just defines constants of
percentages of scroll destination.  Therefore, this patch makes only them
as `static const`.

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

--HG--
extra : moz-landing-system : lando
2019-04-25 05:04:15 +00:00
Emilio Cobos Álvarez 88a1b27597 Bug 1546046 - Remove support for XBL resources. r=TYLin
So much unsound code going away :-)

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

--HG--
extra : moz-landing-system : lando
2019-04-23 16:43:15 +00:00
Bogdan Tara ec489aa170 Backed out changeset e85cb54e5944 (bug 1546046) complementary backout after 1470880 was backed out CLOSED TREE 2019-04-23 06:55:29 +03:00
Emilio Cobos Álvarez daef6a8b67 Bug 1546046 - Remove support for XBL resources. r=TYLin
So much unsound code going away :-)

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

--HG--
extra : moz-landing-system : lando
2019-04-22 21:57:22 +00:00
Emilio Cobos Álvarez 95d5d947ba Bug 874811 - Outer svg is a replaced box with CSS layout, and CSSOM should reflect that accordingly. r=dholbert,violet
Co-authored-by: violet <violet.bugreport@gmail.com>

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

--HG--
extra : moz-landing-system : lando
2019-04-22 17:01:10 +00:00
Srujana Peddinti b44e48bff4 Bug 1259660 - Moved mozilla::WidgetMosueEventBase::buttonType in MouseEvents.h to mozilla::MouseButton in EventForwards.h, and mozilla::WidgetMouseEventBase::buttonsFlag to mozilla::MouseButtonsFlag r=masayuki
Moved mozilla::WidgetMosueEventBase::buttonType in MouseEvents.h to mozilla::MouseButton in EventForwards.h, and mozilla::WidgetMouseEventBase::buttonsFlag to mozilla::MouseButtonsFlag so that any referer in header files do not need to include MouseEvents.h only for referring them. Instead, they just need to include EventForwards.h. Now when MouseEvents.h is changed, the rebuild speed becomes faster.

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

--HG--
extra : moz-landing-system : lando
2019-04-21 20:13:34 +00:00
Srujana Peddinti 0260a4f6e1 Bug 1259660 - Cleaned up WidgetMouseEventBase by renaming WidgetMouseEventBase::inputSource to WidgetMouseEventBase::mInputSource r=masayuki
Renamed all class member instances from WidgetMouseEventBase::inputSource to WidgetMouseEventBase::mInputSource

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

--HG--
extra : moz-landing-system : lando
2019-04-21 18:19:43 +00:00
Srujana Peddinti 1f5de9021a Bug 1259660 - Cleaned up WidgetMouseEventBase by renaming WidgetMouseEventBase::pressure to WidgetMouseEventBase::mPressure r=masayuki
Renamed all class member instances from WidgetMouseEventBase::pressure to WidgetMouseEventBase::mPressure

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

--HG--
extra : moz-landing-system : lando
2019-04-21 18:19:18 +00:00
Srujana Peddinti 5f185eb5aa Bug 1259660 - Cleaned up WidgetMouseEventBase by renaming WidgetMouseEventBase::button to WidgetMouseEventBase::mButton. r=masayuki
Renamed all class member instances from WidgetMouseEventBase::button to WidgetMouseEventBase::mButton.

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

--HG--
extra : moz-landing-system : lando
2019-04-21 18:17:10 +00:00
Brian Birtles 173788f3ba Bug 1541767 - Drop animations on an element before removing it from the document; r=hiro
See the previous patch in this series for a detailed explanation of why this is
necessary.

The test included in this patch is from some work I am doing to rewrite the CSS
transitions web-platform-tests. As a result, it includes more than is strictly
related to this issue addressed by this bug. Without the code changes in this
patch the fourth test onwards, "Transitions are canceled when an element is
removed from the document", will timeout waiting for the transitioncancel event.

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

--HG--
extra : moz-landing-system : lando
2019-04-18 06:56:40 +00:00
Mirko Brodesser ed491dbad1 Bug 1374045: add 'preventScroll' option to HTMLElement's, SVGElement's and XULElement's 'focus' method r=smaug
- Remove expectation that 'preventScroll.html' fails.

- Use '[NoInterfaceObject] interface' workaround to simulate missing 'mixin' support.

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

--HG--
extra : moz-landing-system : lando
2019-04-12 08:16:47 +00:00
Hiroyuki Ikezoe 700ec53c21 Bug 1535232 - Take account the scroll-snap-margin and scroll-snap-padding into the position where we scroll to on Element.focus() call. r=masayuki,botond
We also take account those values in the case of `Find in page`.

The corresponding web platform tests will be coming from this PR.
https://github.com/web-platform-tests/wpt/pull/8575

Though some of them will not be passed, the failure reason is not related
to this change, I will take a look when the PR gets merged into mozilla-central.

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

--HG--
extra : moz-landing-system : lando
2019-04-11 06:22:38 +00:00
Hiroyuki Ikezoe a7fb73dd6e Bug 1373835 - Enable scroll snap for Element.scrollIntoView. r=botond
Depends on D21625

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

--HG--
extra : moz-landing-system : lando
2019-04-11 06:20:11 +00:00
Masayuki Nakano 9165a150a1 Bug 1540930 - Make nsPresContext use mozilla::PresShell directly rather than via nsIPresShell r=emilio
`nsPresContext` should use `mozilla::PresShell` directly instead of
`nsIPresShell`.  This patch makes it.

Unfortunately, `nsPresContext` and `nsIFrame` have `PresShell()`.  Therefore,
we cannot use `PresShell*` in its methods so that this patch uses `mozilla::`
namespace prefix.

It might be better to rename them as `PresShellPtr()` in another bug.

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

--HG--
extra : moz-landing-system : lando
2019-04-03 12:40:26 +00:00
Sylvestre Ledru ef0bfc3822 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-03-31 15:12:55 +00:00
Masayuki Nakano de2d589e58 Bug 1540015 - part 3: Rename Document::GetShell() to Document::GetPresShell() and make it return PresShell* rather than nsIPresShell* r=smaug,emilio
This makes `Document::GetShell()` return `PresShell*` instead of `nsIPresShell`.

Additonally, "shell" is unclear ("docshell" vs. "presshell").  Therefore, this
also renames `Document::GetShell()` to `Document::GetPresShell()`.

Similarly, some other method names of `Document` are also renamed from
`*Shell*` to `*PresShell*`.

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

--HG--
extra : moz-landing-system : lando
2019-03-29 15:12:47 +00:00
Dorel Luca 5a0fa68b78 Backed out 3 changesets (bug 1540015) for build bustage. CLOSED TREE
Backed out changeset 7b71c9da0214 (bug 1540015)
Backed out changeset 5723ddbc5c44 (bug 1540015)
Backed out changeset 9561d2c36fa5 (bug 1540015)
2019-03-29 16:14:26 +02:00
Masayuki Nakano 9273f25ce2 Bug 1540015 - part 3: Rename Document::GetShell() to Document::GetPresShell() and make it return PresShell* rather than nsIPresShell* r=smaug,emilio
This makes `Document::GetShell()` return `PresShell*` instead of `nsIPresShell`.

Additonally, "shell" is unclear ("docshell" vs. "presshell").  Therefore, this
also renames `Document::GetShell()` to `Document::GetPresShell()`.

Similarly, some other method names of `Document` are also renamed from
`*Shell*` to `*PresShell*`.

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

--HG--
extra : moz-landing-system : lando
2019-03-29 13:09:26 +00:00
Botond Ballo 573a6eaafa Bug 1538511 - Move nsIScrollableFrame::ScrollMode into a separate file. r=kats
This allows this enumeration to be used from nsIPresShell.h without introducing
a circular dependency.

Its new home in layout/base/ScrollTypes.h, included as mozilla/ScrollTypes.h.
Others similar enums can be added to that file if desired.

This patch also makes ScrollMode an enum class (as it's no longer nested
inside a class) and switches its enumerators to the |eName| naming convention.

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

--HG--
extra : moz-landing-system : lando
2019-03-25 23:17:20 +00:00
Botond Ballo 608930e897 Bug 1538511 - Remove non-ASCII characters from comments in Element.cpp. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D24813

--HG--
extra : moz-landing-system : lando
2019-03-26 00:52:19 +00:00
Mats Palmgren 9e5f85edc2 Bug 1538618 - [css-pseudo] implement animation support for ::marker pseudos. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D25003

--HG--
extra : rebase_source : 999373f16c816cdd0dd64b1cc3f9f3f30bb12003
extra : amend_source : 829c0fc25afc55d50b70aebc1f3b9f0e8f06c458
2019-03-26 05:48:26 +01:00
Emilio Cobos Álvarez 5aa8533517 Bug 1533963 - Use a single RestyleHint representation. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D22828

--HG--
extra : moz-landing-system : lando
2019-03-14 11:47:50 +00:00
Ryan Hunt 00e98538aa Bug 1523969 part 6 - Move method definition inline comments to new line in 'dom/'. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D21106

--HG--
extra : rebase_source : ea3f51c2c11247114deccbc86e90fb02b8a97257
2019-02-25 16:05:29 -06:00
Noemi Erli 7e23372938 Merge mozilla-central to autoland. a=merge CLOSED TREE
--HG--
extra : rebase_source : de8796d5d7d7079af1b895a2f537371885f8cc6c
2019-02-26 00:09:40 +02:00
Christoph Kerschbaumer c8bb3d7749 Bug 1529869: Remove the 2 from speculate speculative(Anonymous)Connect2 within nsISpeculativeConnect.idl. r=valentin 2019-02-24 20:26:56 +01:00
Alexander Surkov dd71a0c9fb Bug 1525101 - adjust nsIAutoCompletePopup to make custom element popups working, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D20504

--HG--
extra : moz-landing-system : lando
2019-02-25 20:02:17 +00:00
Brian Birtles 540858a5b1 Bug 1528883 - Rename CSSPseudoElement.parentElement to CSSPseudoElement.element; r=bzbarsky
As per CSSWG resolution:

  https://github.com/w3c/csswg-drafts/issues/2816#issuecomment-454869173

And corresponding spec change:

  2dbf1e44a6

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

--HG--
extra : moz-landing-system : lando
2019-02-22 03:12:19 +00:00
Emilio Cobos Álvarez d073df2e6e Bug 1528675 - Rename NODE_CHROME_ONLY_ACCESS to NODE_HAS_BEEN_IN_UA_WIDGET, and use that to determine our wrapper scope. r=bzbarsky
It won't change then, even when removed from the UA Widget. It also gives us an
extra node bit.

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

--HG--
extra : moz-landing-system : lando
2019-02-21 18:39:28 +00:00
Emilio Cobos Álvarez 1ade5eb59b Bug 1528675 - Remove XBL's chromeOnlyContent stuff. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D20559

--HG--
extra : moz-landing-system : lando
2019-02-21 18:39:28 +00:00
Emilio Cobos Álvarez dad3a20b22 Bug 1525955 - Include anon boxes in CSSPseudoElementType, to remove ComputedStyle::mPseudoTag. r=heycam
This is more consistent with what the Rust bits of the style system do, and
removes a pointer from ComputedStyle which is always nice.

This also aligns the Rust bits with the C++ bits re. not treating xul pseudos as
anonymous boxes. See the comment in nsTreeStyleCache.cpp regarding those.

Can't wait for XUL trees to die.

Depends on D19001

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

--HG--
extra : moz-landing-system : lando
2019-02-19 13:44:33 +00:00
Ryan Hunt 3e190ce1d9 Bug 1520666 - Avoid flushing layout when accessing clientArea for the document scrolling element in certain cases. r=botond
This commit attempts to prevent a layout flush when accessing clientWidth
or clientHeight on an element and the following conditions are met:
  1. The document is not embedded in another document
  2. The element is the scrolling element of the document
  3. We are using overlay scrollbars

This matches a similar optimization in Chromium [1].

[1] https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/dom/element.cc?l=735&rcl=e95660c6c08b9b855ceebaf21a1614bc3df75ff8

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

--HG--
extra : moz-landing-system : lando
2019-02-16 14:16:55 +00:00
Hiroyuki Ikezoe ff820309e3 Bug 1525075 - Use the ICB size for Element.{clientWidth, clientHeight} instead of expanded the layout viewport size. r=botond
This is what Chrome does.

documentElement-clientWidth-on-minimum-scale-size.tentative.html was the test
case for this but unfortunately it was disabled in bug 1515043. And it seems
that the test case failed on Android in the first place.

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

--HG--
extra : moz-landing-system : lando
2019-02-13 23:47:32 +00:00
Hiroyuki Ikezoe e4b8830fe1 Bug 1443320 - Drop |aNotify| argument from Element::SetSMILOverrideStyleDeclaration. r=birtles
The other call site was removed in
https://hg.mozilla.org/mozilla-central/rev/e8c0ffefb34f

Depends on D19570

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

--HG--
extra : moz-landing-system : lando
2019-02-13 04:44:34 +00:00
Hiroyuki Ikezoe 7f39371579 Bug 1526749 - Drop Element.scrollByNoFlush. r=kats,mccr8
It's no longer used since bug 970125.

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

--HG--
extra : moz-landing-system : lando
2019-02-11 23:44:51 +00:00
Timothy Guan-tin Chien 25842090e0 Bug 1514098 - Don't call into UA Widget distructor if the element is being CC'd r=peterv,bgrins
Differential Revision: https://phabricator.services.mozilla.com/D18130

--HG--
extra : moz-landing-system : lando
2019-02-04 13:56:22 +00:00
Brad Werth 5fa35fae72 Bug 1521604 Part 1: Hoist the flushing version of GetPrimaryFrame from Element to nsIContent. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D17713

--HG--
extra : moz-landing-system : lando
2019-02-01 22:28:54 +00:00
Timothy Guan-tin Chien 0e57cd7404 Bug 1523655 - Allow non-HTML elements to attach UA Shadow Root r=emilio
A normal shadow root cannot be attached to a non-HTML element so UA Shadow Root should always be allowed.

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

--HG--
extra : moz-landing-system : lando
2019-01-31 18:33:30 +00:00
Brian Grinstead 6dd3ddfc0f Bug 1523997 - Skip checking for -moz-binding in Element::WrapObject when in the content process r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D18124

--HG--
extra : moz-landing-system : lando
2019-01-31 04:24:14 +00:00
garvitdelhi 6bd950c37a Bug 1519185: Remove AttributeWillChange aNewValue parameter r=emilio,bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D17073
2019-01-29 17:59:38 +01:00
garvitdelhi 1881dd24f8 Bug 1519185: Remove the class attribute preparsing code. r=emilio,bzbarsky
Refactoring code base

Differential Revision: https://phabricator.services.mozilla.com/D17067
2019-01-29 17:56:36 +01:00