Commit Graph

1639 Commits

Author SHA1 Message Date
Cosmin Sabou
ce9ff94ffe Merge inbound to mozilla-central. a=merge 2018-05-02 17:58:43 +03:00
Mike Ratcliffe
6e8faf3f57 Bug 1454103 - Correct display of local and sessionStorage in DevTools r=nchevobbe
Take into account node offsets in browser_webconsole_object_inspector_local_session_storage.js.

MozReview-Commit-ID: 73waFejjsF0

--HG--
extra : rebase_source : d34e26c280f777e266ab7f014cfb9b41e07c9a5e
2018-04-14 00:29:59 +01:00
Razvan Caliman
b1dd705200 Bug 1451264 - Refactor shape editor to reuse render code for shape update and shape transform. r=pbro
MozReview-Commit-ID: GfURyGeJ17a

--HG--
extra : rebase_source : 4709583e614006c895ceed28b430db4639e2d9dc
2018-04-27 18:07:29 +02:00
Razvan Caliman
c4c977cedd Bug 1457838 - Shape editor: account for scrollbars when dragging markers to the edges of the viewport. r=pbro
MozReview-Commit-ID: HsoLfpxZWrh

--HG--
extra : rebase_source : 488df8cfcfdf82ffe76dc566e99030bc16288a89
2018-04-27 15:22:00 +02:00
Xidorn Quan
5050b395ae Bug 1434130 part 13 - Use Servo code to back GetCSSValuesForProperty. r=emilio,gl
This causes various changes to properties-db.js and also many devtools
tests get updated.

There are two changes affect multiple tests:

* `calc` gets removed from everywhere. We never have it listed in all
  properties which deserve it, and doing so without much false positive
  (i.e. properties don't deserve but get it) can be pretty tricky.
  So they are just removed for now.

* The complete color keyword list is no longer included, and instead,
  "COLOR" is prepended to the list directly. We can probably remove
  the related code which replaces color keywords with "COLOR" from
  devtools. Note that, with stylo enabled, the list is already unrelated
  to what the parsing code uses. We should eventually re-enable the
  disabled test here after we can get the color list from cssparser
  in bug 1456715.

Other changes to properties-db.js seem to be valid, some of them also
affect tests:

* `{-webkit-,}align-{content,items,self}` get `first baseline`, `safe`,
  `unsafe`, and lose `left` and `right`.

* `{-moz-,-webkit-,}{animation,transition}{,-timing-function}` has a
  new `frame` keyword which is a function value in `<timing-function>`.

* `{background,{-webkit-,}mask}-position-x` lose `top` and `bottom`, and
  correspondingly `{background,{-webkit-,}mask}-position-y` lose `left`
  and `right`.  They don't deserve those values.

* `{background,{-webkit-,}mask}{,-size}` get `auto`.

* `border` shorthand loses `<image>` values as well as other keyword
  values for `border-image-*` subproperties, because they aren't parsed
  on the shorthand.

* `{-moz-,}border-image{,-width}` get `auto`.

* `-moz-context-properties` gets `none`.

* `cursor` get some -moz-prefixed values as well as `url`.

* `fill` and `stroke` get the color keywords.

* `{-webkit-,}filter` get the keywords and function names.

* `font` shorthand loses values from many of `font-variant-*` properties
  because they are not parsed there.

* `font-variant` and `font-variant-alternates` get function values of
  the longhand.

* `font-variant-{east-asian,ligatures,numeric}` get `normal`, and
  `font-variant-ligatures` in addition gets `none`.
  `font-{feature,variation}-settings` also get `normal`.

* `grid` and `grid-template-{areas,columns,rows}` get `none`.

* `grid`, `grid-template`, and `grid-template-{columns,rows}` get
  `auto`, `fit-content`, `minmax`, and `repeat`.

* `grid-auto-{columns,rows}` get `auto`, `fit-content` and `minmax`.

* `-moz-image-region` gets `auto` and `rect`.

* `{-webkit-,}justify-content` lose `baseline`, `last baseline`, and
  get `safe` and `unsafe`.

* `{justify,place}-items` get `first baseline`, `legacy`, `safe`,
  `unsafe` and lose `auto`.

* `{justify,place}-self` and `place-content` get `first baseline`,
  `safe`, and `unsafe`.

* `outline{,-style}` get `hidden`.

* `scroll-snap-coordinate` gets `none`, and `scroll-snap-points-{x,y}`
  gets `none` and `repeat`.

* `shape-outside`, `text-emphasis{,-style}` get all the keyword values
  and function names they deserve.

* `stroke-dasharray` gets `none`.

* `text-combine-upright` drops `digits` which we never implemented.

* `{-moz-,-webkit-,}transform` and `-moz-window-transform` get their
  transform function list. `accumulatematrix` and `interpolatematrix`
  aren't real CSS value but they have `#[css(function)]` specified.
  We should probably remove them at some point.

* `will-change` gets `auto`.

* All properties accept `<image>` value now gets -webkit-prefixed
  gradient function names, including
  * `background{,-image}`,
  * `{-moz-,-webkit-,}border-image{,-source}`, and
  * `{-webkit-,}mask{,-image}`.

MozReview-Commit-ID: E7Y0CFUFYgW

--HG--
extra : source : bab732c8c531cfca1bcd233f769c25bb2e373773
2018-04-29 09:03:31 +10:00
Kris Maglione
a259026c9d Bug 1456035: Part 4 - Convert callers of XPCOMUtils.generateQI to ChromeUtils.generateQI. r=mccr8
This also removes any redundant Ci.nsISupports elements in the interface
lists.

This was done using the following script:

acecb401b7/processors/chromeutils-generateQI.jsm

MozReview-Commit-ID: AIx10P8GpZY

--HG--
extra : rebase_source : a29c07530586dc18ba040f19215475ac20fcfb3b
2018-04-22 20:55:06 -07:00
Csoregi Natalia
96dbf29680 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-04-28 00:56:47 +03:00
Csoregi Natalia
12af4303ff Merge inbound to mozilla-central. a=merge 2018-04-28 00:53:15 +03:00
Gabriel Luong
b90a845dd3 Bug 1452503 - Remove closePath call to fix the implicit and explicit lines drawn on the grid highlighter. r=jdescottes 2018-04-27 10:14:46 -04:00
Cosmin Sabou
68fdb6cf4f Merge inbound to mozilla-central. a=merge 2018-04-27 13:04:36 +03:00
Boris Zbarsky
76ead58490 Bug 1455674 part 19. Get rid of JS uses of nsIDOMElement. r=qdot
In nsBlocklistService.js we know we're dealing with actual nodes, so .nodeType
checks should be fine.
2018-04-26 23:37:34 -04:00
yulia
318a381a6e Bug 1450948 - Convert ChromeActor to protocol.js r=ochameau
MozReview-Commit-ID: 1pwYUXGiEdT
* fix types in tab.js

MozReview-Commit-ID: 2PAU8IeEKDV

--HG--
extra : rebase_source : 4003f1c84108aed4f37bca2d3c8cfb32d5ac40e9
2018-04-24 15:30:38 +02:00
Michael Ratcliffe
2d9c74daf9 Bug 1456772 - Fix web console message_count reporting r=yulia
MozReview-Commit-ID: 4DoChJ5AtCG

--HG--
extra : rebase_source : 956f44b42c3146cda36c196ae63decaf0a5ea166
2018-04-25 10:20:30 +01:00
Cosmin Sabou
6b8c87c819 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-04-27 13:12:22 +03:00
Razvan Caliman
a49dc964fe Bug 1450685 - Ensure correct cursor is shown when rotating a polygon. r=pbro
MozReview-Commit-ID: Jv6uD6T0HmP

--HG--
extra : rebase_source : 4eca32c001f69513c4c53eaa2064f423f8bd7ed0
2018-04-12 17:10:05 +02:00
Razvan Caliman
927ffd73a1 Bug 1457206 - Round values for all shape coordinates. r=pbro
MozReview-Commit-ID: H2fspzF5mYz

--HG--
extra : rebase_source : 7ee5ceebaed1d420d1cd0c97a330cac3ebd45664
2018-04-26 18:17:37 +02:00
Nicolas Chevobbe
6ff34d6d14 Bug 1451018 - Convert SymbolActor to protocol.js; r=yulia.
MozReview-Commit-ID: AW2uxeN1tpM

--HG--
extra : rebase_source : 4dc7656798af9ab0227318758a9b4e653ddf77f4
2018-04-18 15:04:03 +02:00
Neil Deakin
ef5f9b4b23 Bug 1446961, move PopupBoxObject to XULPopupElement, a new subclass of XULElement. Remove popup.xml methods, r=paolo,bz
Test changes for removal of PopupBoxObject and popup.xml methods, some reflow tests now have different stacks now that they are not going through popup.xml binding methods, test_popupanchor.xul changes due to need to wait for popuppositioned event after resizing. The old code would just adjust the arrow directly when sizeTo was called, but the new code does this through an asynchronous popuppositioned event. Changes to some places that check for XULElement class.

--HG--
rename : dom/webidl/PopupBoxObject.webidl => dom/webidl/XULPopupElement.webidl
rename : layout/xul/PopupBoxObject.cpp => dom/xul/XULPopupElement.cpp
rename : layout/xul/PopupBoxObject.h => dom/xul/XULPopupElement.h
2018-04-27 11:04:38 -04:00
Alexandre Poirot
f44b62f9b3 Bug 1454899 - Prevent request arguments duplication on each request call. r=jryans
MozReview-Commit-ID: GaLM6LsCoWp

--HG--
extra : rebase_source : cd2d5a9cf756ebf29050490145851f1b9afc8aa1
2018-04-05 10:00:02 -07:00
David McCurry
771befd505 Bug 859051 - Implement cache panel; r=Honza
--HG--
extra : histedit_source : 48d73a800ca6a9d09d70a5b80e7c86caf912c560
2018-05-01 05:42:00 +03:00
Adrian Wielgosik
b3c501adc4 Bug 1447389 - Remove nsIDOMNodeList. r=bz
MozReview-Commit-ID: 11szZP6dS6V

--HG--
extra : rebase_source : 9acfb352750e53d3b36684fa945a18e817c9b82e
2018-04-25 23:01:30 +02:00
Andreea Pavel
a21531022b Merge mozilla-inbound to mozilla-central. a=merge
--HG--
rename : toolkit/components/extensions/test/xpcshell/test_ext_browserSettings.js => toolkit/components/extensions/test/xpcshell/test_ext_proxy_config.js
2018-04-26 09:04:59 +03:00
J. Ryan Stinnett
3245e468de Bug 1456274 - Add target.makeRemote in several tests. r=ochameau
Navigation events now require a "remoted" target.  Add `makeRemote` calls to a
tests which make use of these features.

MozReview-Commit-ID: GJsleBWryCd

--HG--
extra : rebase_source : 37ffaac7215b2458a82b8a7a2a59fa4321e370b8
2018-04-23 19:18:59 -05:00
Dorel Luca
399538631e Backed out 3 changesets (bug 1456274) for Linting failure. CLOSED TREE
Backed out changeset 707d5e397407 (bug 1456274)
Backed out changeset 97e8882d0343 (bug 1456274)
Backed out changeset 7cf34fe2036e (bug 1456274)

--HG--
extra : amend_source : 08e399334a2662d2e80a2c37b8c7f34c45a40af6
2018-04-26 01:28:33 +03:00
J. Ryan Stinnett
f4ca801391 Bug 1456274 - Add target.makeRemote in several tests. r=ochameau
Navigation events now require a "remoted" target.  Add `makeRemote` calls to a
tests which make use of these features.

MozReview-Commit-ID: GJsleBWryCd

--HG--
extra : rebase_source : 2319d43ea29cfa33850295ff2d4c902e22ae3727
2018-04-23 19:18:59 -05:00
Kris Maglione
a7b308c3a2 Bug 1456686: Part 1 - Fix unused and shadowed explicit imports. r=standard8
These issues were previously ignored due to the nature of our global import
rules. They need to be fixed before that rule can be updated.

MozReview-Commit-ID: DCChktTc5TW

--HG--
extra : rebase_source : cffb1c9762191c579d1397c8169e6e7635d229da
extra : histedit_source : dea59ddd2daaae52069c5faceae9149a4f08dd73
2018-04-24 20:18:09 -07:00
Yura Zenevich
a7bb930a24 Bug 1450927 - use new getBoundsInCSSPixels method for accessible bounds in accessible highlighter. r=jryans
MozReview-Commit-ID: 4Ixj2ksuDrP
2018-04-25 14:51:18 -04:00
Yura Zenevich
dbc919795a Bug 1451241 - check text children of non-accessible nodes when retrieving accessible objects. r=jdescottes
MozReview-Commit-ID: 2SFe6g3hOCc
2018-04-25 14:06:16 -04:00
Tiberius Oros
2fffa00bb3 Backed out 2 changesets (bug 1450927) for failing on ProxyAccessible.cpp(247) on a CLOSED TREE
Backed out changeset ca285aed3926 (bug 1450927)
Backed out changeset d7dd8b0d2473 (bug 1450927)
2018-04-25 19:31:50 +03:00
Yura Zenevich
6a4f0426d6 Bug 1450927 - use new getBoundsInCSSPixels method for accessible bounds in accessible highlighter. r=jryans
MozReview-Commit-ID: 4Ixj2ksuDrP
2018-04-25 11:45:46 -04:00
Brad Werth
ab7e20d492 Bug 1265342 Part 1: Add shape-margin to style system (Gecko bindings). r=xidorn
MozReview-Commit-ID: 3G0ZpWDrumg

--HG--
extra : rebase_source : da38e002a62212757adf276413aebbf58aa7d9b6
2018-02-07 17:27:04 -08:00
Razvan Caliman
0b89a66cc4 Bug 1455588 - Allow dragging Shape Editor markers outside of iframe viewport. r=pbro
MozReview-Commit-ID: 4JZYDa8FUJg

--HG--
extra : rebase_source : e84122ee6751f8d30a755af840745e35c9d58da6
2018-04-24 17:51:31 +02:00
Margareta Eliza Balazs
fa0ffa186e Merge mozilla-central to autoland. a=merge CLOSED TREE
--HG--
rename : toolkit/mozapps/extensions/internal/XPIProviderUtils.js => toolkit/mozapps/extensions/internal/XPIDatabase.jsm
2018-04-24 14:51:28 +03:00
Ciure Andrei
1940af33ec Merge mozilla-central to mozilla-inbound. a=merge CLOSED TREE 2018-04-24 04:29:20 +03:00
Ciure Andrei
33e644e1da Merge inbound to mozilla-central. a=merge 2018-04-24 04:14:21 +03:00
Mats Palmgren
9acb0f48fc Bug 1398482 part 6 - Update devtools with the renamed longhands. r=me 2018-04-24 01:52:51 +02:00
Michael Ratcliffe
b23784ee71 Bug 1441070 - Instrument toolbox panel navigation with event telemetry r=yulia
This is pretty simple... finding the best locations for the probes was the
struggle here.

In order to land these probes before the freeze the test for these events will
be created as part of bug 1456073.

MozReview-Commit-ID: 7hIfbD3wQ1I

--HG--
extra : rebase_source : 990e69e0816742fc306b9313bd113f2d71f00b72
2018-04-19 12:09:28 +01:00
Razvan Caliman
ef0592fd09 Bug 1455535 - Add support for vmin/vmax units. Ensure vh/vw are computed against actual host window. r=pbro
MozReview-Commit-ID: 1ifVJu1OW5L

--HG--
extra : rebase_source : 876f9adf2cac9fbff3965f26452f4239b18d0ee4
2018-04-20 17:31:39 +02:00
Kris Maglione
877eae8863 Bug 1454202: Part 1 - Update legacy callers to use Promise-based AddonManager APIs. r=aswan
***
Bug 1454202: Part 1a - Auto-replace uses of callback-based AddonManager APIs with Promise-based versions. r=aswan

This was done using the following script:

4cd5ae9597/processors/aom-api-generators.jsm

MozReview-Commit-ID: 8hobLz15a66
***
Bug 1454202: Part 1b - Manually fix eslint errors after auto-rewrite. r=aswan

This also deletes an obsolete test whose xpcshell variant was already deleted.

MozReview-Commit-ID: DM9W9Q2SVIE
***
Bug 1454202: Part 1c - Manually fix non-eslint issues after auto-rewrite. r=aswan

MozReview-Commit-ID: DtMscWZuExc

--HG--
extra : rebase_source : d4c2f80bdf02ec4a07e3713a9ae1823145d25942
2018-04-14 19:38:18 -07:00
Boris Zbarsky
17995a441f Bug 1453869 part 9. Stop creating DOMParser by contract in devtools. r=tromey
There are some extra hoops here because devtools has a lint to prevent Cu.importGlobalProperties, which is the normal way one would import a WebIDL constructor.

MozReview-Commit-ID: 2mdNI6N1z5B
2018-04-20 23:04:40 -04:00
Dorel Luca
65669dae30 Merge mozilla-inbound to mozilla-central. a=merge 2018-04-21 02:00:04 +03:00
Boris Zbarsky
45a3faf8f6 Bug 1455052 part 12. Remove JS uses of nsIDOMEvent. r=masayuki,kmag
MozReview-Commit-ID: 5g0H3rzxTXt
2018-04-20 12:55:31 -04:00
Xidorn Quan
def50aae9b Bug 1448757 part 2 - Move longhand animation type table into devtools. r=daisuke
After switching to Stylo, animation is handled by Servo, and thus it no
longer relies on the animation type recorded in nsCSSPropList.h, and
devtools become the only consumer of that information.

This patch puts a map of longhands to animation types into devtools
instead. The map is extracted from nsCSSPropList.h by the script below
based on the logic of nsDOMWindowUtils::GetAnimationTypeForLonghand.

There are two reasons that I don't port this into Servo:

First, Servo doesn't have a concept of property-level animation type.
Animation change in Servo is directly encoded into value types. It means
porting this to Servo would require creating a new concept purely for
devtools. It's not great because that data doesn't reflect how animation
is handled in the engine, and people may keep forgetting to give proper
animation type to new animatable types they add.

Second, the handling of animation type in devtools also looks rather
arbitrary to me. For example, eStyleAnimType_Corner_* types are actually
two coordinate values, bug GetAnimationTypeForLonghand returns "coord"
for them, and devtools just parses the first value and uses it. This
means the animation type here is really more closely related to how
devtools handles the value, rather than how the style engine does so.

Given above, I decided to put the list into devtools rather than encode
the information into Servo code. To encourage people to think about
animation handling in devtools for new properties, there is also a new
test added to ensure every property has a devtools animation type.

The content of ANIMATION_TYPE_FOR_LONGHANDS is generated via running
the following script in layout/style:

```python
#!/usr/bin/env python3

import subprocess
from collections import defaultdict

ANIMTYPE_MAPPING = {
    "Custom": "custom",
    "Coord": "coord",
    "Sides_Top": "coord",
    "Sides_Right": "coord",
    "Sides_Bottom": "coord",
    "Sides_Left": "coord",
    "Corner_TopLeft": "coord",
    "Corner_TopRight": "coord",
    "Corner_BottomRight": "coord",
    "Corner_BottomLeft": "coord",
    "nscoord": "length",
    "float": "float",
    "Color": "color",
    "ComplexColor": "color",
    "PaintServer": "paintServer",
    "Shadow": "shadow",
    "Discrete": "discrete",
    "None": "none",
}

input = b"""
#define CSS_PROP(name, id, method, flags, pref, \\
                 variant, kwtable, animtype) name, flags, animtype
#include "nsCSSPropList.h"
"""
props = subprocess.check_output(["clang", "-E", "-P", "-"], input=input)
props = props.decode("ascii")
result = defaultdict(list)
for line in props.splitlines():
    line = line.strip()
    if not line:
        continue
    name, flags, animtype = line.split(", ")
    assert animtype.startswith("eStyleAnimType_")
    if "CSS_PROPERTY_PARSE_INACCESSIBLE" in flags:
        continue
    animtype = ANIMTYPE_MAPPING[animtype[15:]]
    result[animtype].append(name)
print("[")
for animtype, names in result.items():
    print('  ["{}", new Set(['.format(animtype))
    for name in names:
        print('    "{}",'.format(name))
    print("  ])],")
print("]")
```

MozReview-Commit-ID: BGiGq0jUgG5

--HG--
extra : rebase_source : 54fc15b9ccdb6c11d06160d63b8f4b911b754d5a
2018-04-20 14:06:47 +10:00
Mike Ratcliffe
38773abdb6 Bug 1451991 - Devtools: Localstorage didn't list item whose key names "key" r=nchevobbe
MozReview-Commit-ID: 3AQC47GKud0

--HG--
extra : rebase_source : 0bbcebab0aeb97b51f078673d151eab263080c62
2018-04-14 00:33:42 +01:00
Bogdan Tara
9bf1554768 Merge inbound to mozilla-central. a=merge 2018-04-19 01:36:28 +03:00
Razvan Caliman
1a12edd85d Bug 1450650 - Clamp x/y values to current viewport when dragging a marker in the shape editor. r=gl
- Compute constraints so that a dragged marker stays visible with the viewport.
- Constrain dragging of marker to the viewport of the node's host window.
- If the marker is visible outside of the node host's viewport (ex:
shapes within a smaller iframe nested in a larger document), do not
constrain that marker and allow dragging it outside the viewport.
If dragging starts while the marker is within its intended viewport,
do constrain it to that viewport.

MozReview-Commit-ID: 9JyEfseSLXW
2018-04-18 15:00:48 -04:00
Nicolas Chevobbe
9e1fe9b067 Bug 1451021 - Migrate PropertyIteratorActor to protocol.js; r=ochameau.
MozReview-Commit-ID: 1yTtcO92HWU

--HG--
extra : rebase_source : 0822c4d3033ab3cd97f7b4793f77565ea17f9706
2018-04-10 09:44:38 +02:00
Dorel Luca
0eedeeda32 Merge mozilla-central to autoland. CLOSED TREE 2018-04-18 14:07:45 +03:00
Boris Zbarsky
0ac1ce2e6b Bug 1452183 part 2. Stop using nsIDOMDocumentFragment in JS. r=mccr8 2018-04-17 21:13:03 -04:00
Razvan Caliman
83db553688 Bug 1453428 - Handle cases for shape coordinates like 0%, 0em, 0rem, etc. without overwriting to pixels. r=gl
The previous implementation treated any zero coordinate as pixels,
regardless of its unit type. For example, 0% would be converted to 0px.
This changed the shape value resulting in unintentional unit mismatch
after editing a coordinate which started off as 0% or 0em or 0vh, etc.

This patch fixes that and preserves the unit type for zero coordinates.

It changes the implementation of isUnitless() to return false for values
like 0%, 0px, 0em, 0.00000%, etc.

It introduces getUnitToPixelRatio() to get the ratio by which to
multiply a pixel value to convert it to the given unit during shape
editing operations (point move, scale, translate, rotate, etc.)

The ratio is constant by unit type. Previously, this ratio was
calculated in-place for each unit value. Values which started as zero,
always resulted in a ratio equal to zero. This multiplied with a pixel
value resulted zero. So the previous code defaulted to ratio of 1 when
the ratio was zero, but this meant that a 1:1 ratio between pixels and
another unit type (%, em, vh) would result in disproportionate
shape changes (1px of mouse travel would result in 1em). This is why
isUnitless() originally discarded the original unit from a zero
coordinate and replaced it with pixels; to account for this fallback
ratio of 1.

MozReview-Commit-ID: 49tyLfYjkLO
2018-04-11 22:21:18 +02:00