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

3822 Коммитов

Автор SHA1 Сообщение Дата
longsonr 93e54c5e35 Bug 1678947 - check placeholder frame is not null r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D97914
2020-11-24 13:31:06 +00:00
Simon Giesecke f15895390e Bug 1673931 - Avoid including Element.h from header files.
Differential Revision: https://phabricator.services.mozilla.com/D96535

Depends on D96534
2020-11-23 16:08:40 +00:00
Simon Giesecke 971b645fe3 Bug 1660470 - Add missing include directives/forward declarations. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87865
2020-11-23 16:21:38 +00:00
Tim Nguyen 082c712f75 Bug 1525737 - Remove/replace usages of XUL grid display values. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D53300
2020-11-17 01:20:34 +00:00
coderboncuk c8b12f5aa2 Bug 1676299 - Removed the xMajor parameter from BaseMatrix::ScaleFactors() r=botond
Differential Revision: https://phabricator.services.mozilla.com/D97449
2020-11-18 18:53:01 +00:00
Ting-Yu Lin 545a6376cd Bug 1677635 Part 4 - Rename nsOverflowAreas to OverflowAreas, and move it into mozilla namespace. r=layout-reviewers,emilio
This patch is generated via the rename functionality in my editor; add
`mozilla::` prefix to `OverflowAreas` in headers; and remove the
`OverflowType` alias added in Part 1.

Differential Revision: https://phabricator.services.mozilla.com/D97235
2020-11-18 00:08:12 +00:00
longsonr f1fb147667 Bug 1677187 - ignore x values for vertical and y values for horizontal text in textPaths r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D97086
2020-11-16 10:54:56 +00:00
Sunita Sen c2d86c3479 Bug 1669027 - SVGUseFrame.cpp: namespace alias decl 'SVGT' is unused r=longsonr
Differential Revision: https://phabricator.services.mozilla.com/D96581
2020-11-10 17:56:44 +00:00
sanketh 8ed468300c Bug 1673237 - Always allow SVGs on about: pages r=acat,tjr,emilio
- Updated layout/svg/tests/test_disabled.html to ensure that this doesn't allow
  rendering SVGs on about:blank and about:srcdoc.

Differential Revision: https://phabricator.services.mozilla.com/D95139
2020-11-03 17:34:20 +00:00
Ricky Stewart 02a7b4ebdf Bug 1654103: Standardize on Black for Python code in `mozilla-central`.
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-26 18:34:53 +00:00
Bogdan Tara da1098d4aa Backed out 10 changesets (bug 1654103, bug 1672023, bug 1518999) for PanZoomControllerTest.touchEventForResult gv-junit failures CLOSED TREE
Backed out changeset ff3fb0b4a512 (bug 1672023)
Backed out changeset e7834b600201 (bug 1654103)
Backed out changeset 807893ca8069 (bug 1518999)
Backed out changeset 13e6b92440e9 (bug 1518999)
Backed out changeset 8b2ac5a6c98a (bug 1518999)
Backed out changeset 575748295752 (bug 1518999)
Backed out changeset 65f07ce7b39b (bug 1518999)
Backed out changeset 4bb80556158d (bug 1518999)
Backed out changeset 8ac8461d7bd7 (bug 1518999)
Backed out changeset e8ba13ee17f5 (bug 1518999)
2020-10-24 03:36:18 +03:00
Ricky Stewart c0cea3b0fa Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-23 20:40:42 +00:00
longsonr c252c0be62 Bug 1671950 - Fix assert in SVGSwitchFrame r=emilio
We need to be consistent with the expectations of SVGContainerFrame::ReflowSVGNonDisplayText calling itself recursively on non-SVG content.

Differential Revision: https://phabricator.services.mozilla.com/D94048
2020-10-22 08:28:45 +00:00
Dorel Luca 1ff59cb7a3 Backed out changeset 7558c8821a07 (bug 1654103) for multiple failures. CLOSED TREE 2020-10-22 03:51:06 +03:00
Ricky Stewart 50762dacab Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-21 21:27:27 +00:00
longsonr dce2ec6840 Bug 1660347 - downscaling a filtered image in a pattern results in the image being incorrectly scaled r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D93710
2020-10-16 01:17:47 +00:00
longsonr 936918cf44 Bug 1670454 - Use GetImageDecodeFlags more r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D93159
2020-10-11 09:05:20 +00:00
longsonr da8bcd93da Bug 1668844 - Fix markerUnits=strokeWidth combined with non-scaling-stroke r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D92242
2020-10-03 04:32:21 +00:00
longsonr 7ef5cefd04 Bug 1667641 - map SVG use element x and y to style r=emilio
matches current Chrome per 5a1cdd7a0e

Differential Revision: https://phabricator.services.mozilla.com/D91528
2020-10-02 04:50:16 +00:00
Ting-Yu Lin 6ef06ff583 Bug 1660122 Part 7 - Implement GetAspectRatio(). r=emilio
This patch moves the preferred aspect-ratio calculation from each
replaced elements' GetIntrinicRatio() into GetAspectRatio(), because
they share the same logic.

For nsImageFrame, the cached mIntrinsicRatio now stores only the image's
intrinsic ratio, not considering the aspect-ratio property.

This patch fixed "object-fit:contain" for canvas, image because
GetIntrinicRatio() no longer considers aspect-ratio. This also fixed
replaced elements' size when both "aspect-ratio:<ratio>" and
"contain:size" is specified.

This also makes us pass some of the aspect-ratio tests because we change
GetIntrinicRatio() into GetAspectRatio() in
nsLayoutUtils::IntrinsicForAxis() in Part5, which is used by nsBlockFrame
(via nsLayoutUtils::IntrinsicForContainer) to implement GetMinISize().

Differential Revision: https://phabricator.services.mozilla.com/D91229
2020-09-29 22:33:05 +00:00
Ting-Yu Lin e0c2b95d53 Bug 1660122 Part 5 - Add nsIFrame::GetAspectRatio() skeleton, and adapt existing callers. r=emilio
For now, GetAspectRatio() is just an alias for GetIntrinicRatio(). In
Part 7, we're going to have GetAspectRatio() consider aspect-ratio
property so that each replaced elements only need to report their
intrinsic ratio via GetIntrinicRatio(). Non-replaced element can also
call GetAspectRatio() to get the ratio suitable to calculate layout
size.

As of this patch, all the replaced elements'
GetIntrinsicRatio() (including nsImageFrame::mIntrinsicRatio) consider
aspect-ratio properties (added in bug 1639963). This is wrong, because
it affects replaced element's content ratio. So we adapt only callers
[1] involving the computation of the frame's external sizes to retain
the behavior after Part 7.

This change shouldn't change behavior.

[1] Exceptions include 1) a caller in nsIFrame::ComputeSize() checking
the frame has no intrinsic ratio; 2) other frame classes implementing
nsIFrame::GetIntrinsicRatio() by calling their parent's
GetIntrinicRatio(). nsSubDocumentFrame::GetIntrinicRatio() is an
example.

Differential Revision: https://phabricator.services.mozilla.com/D91227
2020-09-29 22:32:50 +00:00
Ting-Yu Lin cd2eb87c21 Bug 1660122 Part 3 - Make nsIFrame::GetIntrinsicRatio() a const method. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D91225
2020-09-29 22:32:40 +00:00
Botond Ballo 948cec1b06 Bug 1667594 - Avoid including nsLayoutUtils.h in nsContainerFrame.h. r=emilio
nsContainerFrame.h was only using the enum nsLayoutUtils::IntrinsicISizeType,
which this patch moves to LayoutConstants.h instead.

Depends on D91505

Differential Revision: https://phabricator.services.mozilla.com/D91506
2020-09-26 18:19:14 +00:00
Botond Ballo 1976364433 Bug 1667594 - Avoid including nsLayoutUtils.h from various headers. r=kats
This patch covers thw low-hanging fruit: headers that either don't use
nsLayoutUtils.h at all, or where only method implementations that can
easily be moved to the .cpp file use it.

Differential Revision: https://phabricator.services.mozilla.com/D91504
2020-09-26 17:55:00 +00:00
Simon Giesecke de7bab0f06 Bug 1650145 - Replace all value uses of Empty[C]String by 0-length _ns literals. r=froydnj,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D82325
2020-09-23 15:17:15 +00:00
Cameron McCormack a9b6211496 Bug 1658343 - Propagate intrinsic sizes from SVG documents in embed/object to parent using IPC. r=kmag,dholbert
Differential Revision: https://phabricator.services.mozilla.com/D90055
2020-09-21 02:09:57 +00:00
Ting-Yu Lin ecca275fc4 Bug 1168478 Part 2 - Combine the border and padding arguments for nsIFrame::ComputeSize(). r=dholbert
Also combine the border and padding arguments for
nsContainerFrame::ComputeSizeWithIntrinsicDimensions(), too. This method
is used as a helper to implement ComputeSize() for various replaced
elements. Its callers are all within nsIFrame's derived classes'
overridden methods, so I'm not bothering to convert them in a separate
patch.

This change shouldn't change behavior.

Differential Revision: https://phabricator.services.mozilla.com/D90064
2020-09-14 20:42:22 +00:00
Jamie Nicol cd2e26699d Bug 1654723 - Skip building DisplaySVGGeometry items if fill, stroke and markers are none. r=jwatt
Except for SVGImageFrames, where the fill property should be ignored.

Differential Revision: https://phabricator.services.mozilla.com/D88644
2020-09-10 13:52:31 +00:00
longsonr 1d904c3e45 Bug 1603629 - fix dominant-baseline hanging and mathematical r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D88877
2020-09-04 11:00:40 +00:00
longsonr 226b57059c Bug 1661912 - Convert remaining typedefs in SVG code to 'using' r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D88718
2020-08-29 14:24:37 +00:00
longsonr 61fc7b177e Bug 1648550 - Fix getBoundingClientRect for use element position r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D83256
2020-08-25 23:36:18 +00:00
longsonr 4f8808ae6f Bug 1459905 - Merge DOMSVGTranslatePoint and DOMSVGPoint and fix updates r=emilio
SVGSVGElement::SetCurrentScaleTranslate checks that things have changed but if we
manage to update both translate values before we get here then we'll skip the screen update
that we need.

Also
- introduces a tear off for SVGSVGElement.currentTranslate so we hand out the same object as required by the SVG idl
- removes SVGSVGElement::SetCurrentTranslate as dead code
- removes mPreviousScale and mPreviousTranslate from SVGSVGElement as they are no longer necessary

Differential Revision: https://phabricator.services.mozilla.com/D84796
2020-08-25 14:38:32 +00:00
Timothy Nikkel 69aaaddd9c Bug 1656711. Support hardware accelerated <feGaussianBlur> SVG filters if the x and y radius are not equal with webrender. r=gw
Pretty straight forward, mostly just plumbing stuff through.

Differential Revision: https://phabricator.services.mozilla.com/D85666
2020-08-25 07:26:21 +00:00
Sonia Singla 5f5c9fd7f2 Bug 1659267 - Remove usages of -moz-user-select across the Firefox codebase. r=emilio,marionette-reviewers,geckoview-reviewers,preferences-reviewers,whimboo,agi
Differential Revision: https://phabricator.services.mozilla.com/D87499
2020-08-18 23:37:51 +00:00
Nika Layzell 482d731e3a Bug 1614524 - Part 1: Add support for process-switching object/embed loads, r=mattwoodrow,smaug,kamidphish
By passing a weak reference back to the DocumentChannelParent into
DocumentLoadListener for object loads, we are able to handle process switching
loads by asking the content process to create a BrowsingContext, and delaying
the real process switch until it becomes available.

The load then completes as it would before, acting as a normal process-switching
subframe load.

Differential Revision: https://phabricator.services.mozilla.com/D86580
2020-08-18 16:49:34 +00:00
Boris Chiou 33a43f7fc9 Bug 1639963 - Support aspect-ratio for svg frames. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D79363
2020-08-17 07:14:19 +00:00
Boris Chiou dd3c20ccd8 Bug 1639963 - Update the API of nsIFrame::ComputeSize for aspect-ratio. r=emilio
In order to apply Automatic content-based minimum sizes, we have to know
the content size on the block axis. We cannot get the content size until
we finish the reflow of the child frames. So we have to keep a flag
which indicates the size of the ratio-dependent axis is overrideen by
aspect-ratio in ReflowInput.

We will set the correct return value in the next patch, For now, we
always return AspectRatioUsage::None.

Differential Revision: https://phabricator.services.mozilla.com/D79335
2020-08-17 06:57:56 +00:00
longsonr 09a2a0f739 Bug 1658455 - Remove eANIMATION and eFILTER from IsNodeOfType r=dholbert
- eANIMATION is the same as testing for SVGAnimationElement
- eFILTER is the same as testing for SVGFE

Differential Revision: https://phabricator.services.mozilla.com/D86695
2020-08-15 10:38:17 +00:00
Brindusan Cristian dc4df79ab1 Backed out changeset 0da3036d0890 (bug 1656711) as requested by tnikkel on irc to test if it caused bug 1657558 or not. CLOSED TREE 2020-08-07 02:27:01 +03:00
Simon Giesecke 96f3e7e019 Bug 1654992 - Use std::move instead of SwapElements where possible. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D84807
2020-08-04 11:27:07 +00:00
Noemi Erli 381fca9783 Backed out 4 changesets (bug 1654992, bug 1654991) for causing timeous in mask-opacity-1e.html
Backed out changeset 11f0f54c6e0a (bug 1654992)
Backed out changeset a353dd5b3f08 (bug 1654991)
Backed out changeset 6a7964ba549f (bug 1654991)
Backed out changeset cf3bfb91d98c (bug 1654991)
2020-08-03 22:09:36 +03:00
Simon Giesecke 032d2ac9d3 Bug 1654992 - Use std::move instead of SwapElements where possible. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D84807
2020-08-03 14:54:18 +00:00
Timothy Nikkel 78199a16a4 Bug 1656711. Support hardware accelerated <feGaussianBlur> SVG filters if the x and y radius are not equal with webrender. r=gw
Pretty straight forward, mostly just plumbing stuff through.

Differential Revision: https://phabricator.services.mozilla.com/D85666
2020-08-03 00:48:04 +00:00
Dorel Luca eb411c9e05 Backed out changeset fed45fbadc26 (bug 1656711) for webrender build bustage 2020-08-03 00:59:31 +03:00
Timothy Nikkel 9db06357a1 Bug 1656711. Support hardware accelerated <feGaussianBlur> SVG filters if the x and y radius are not equal with webrender. r=gw
Pretty straight forward, mostly just plumbing stuff through.

Differential Revision: https://phabricator.services.mozilla.com/D85666
2020-08-02 21:33:50 +00:00
Dorel Luca e210ecd37e Backed out changeset 26ff1a25028d (bug 1656711) for Webrender build bustages 2020-08-03 00:07:39 +03:00
Timothy Nikkel 9b76156d6b Bug 1656711. Support hardware accelerated <feGaussianBlur> SVG filters if the x and y radius are not equal with webrender. r=gw
Pretty straight forward, mostly just plumbing stuff through.

Differential Revision: https://phabricator.services.mozilla.com/D85666
2020-08-02 20:45:02 +00:00
Nathan Froyd e3ebda1914 Bug 1223932 - delete guard object uses from the tree; r=jwalden
CLOSED TREE

We don't need these macros anymore, for two reasons:

1. We have static analysis to provide the same sort of checks via `MOZ_RAII`
   and friends.
2. clang now warns for the "temporary that should have been a declaration" case.

The extra requirements on class construction also show up during debug tests
as performance problems.

This change was automated by using the following sed script:

```
# Remove declarations in classes.
/MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER/d
/MOZ_GUARD_OBJECT_NOTIFIER_INIT/d

# Remove individual macros, carefully.
{
  # We don't have to worry about substrings here because the closing
  # parenthesis "anchors" the match.
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM_TO_PARENT)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_IN_IMPL)/)/g;

  # Remove the longer identifier first.
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_TO_PARENT//g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM//g;
}

# Remove the actual include.
\@# *include "mozilla/GuardObjects.h"@d
```

and running:

```
find . -name \*.cpp -o -name \*.h | grep -v 'GuardObjects.h' |xargs sed -i -f script 2>/dev/null
mach clang-format
```

Differential Revision: https://phabricator.services.mozilla.com/D85168
2020-07-30 14:22:38 +00:00
Mihai Alexandru Michis a911a108d0 Backed out changeset ac9c811bc427 (bug 1223932) for causing spidermonkey rust failures.
CLOSED TREE
2020-07-30 18:23:21 +03:00
Nathan Froyd bec9f9b93a Bug 1223932 - delete guard object uses from the tree; r=jwalden
We don't need these macros anymore, for two reasons:

1. We have static analysis to provide the same sort of checks via `MOZ_RAII`
   and friends.
2. clang now warns for the "temporary that should have been a declaration" case.

The extra requirements on class construction also show up during debug tests
as performance problems.

This change was automated by using the following sed script:

```
# Remove declarations in classes.
/MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER/d
/MOZ_GUARD_OBJECT_NOTIFIER_INIT/d

# Remove individual macros, carefully.
{
  # We don't have to worry about substrings here because the closing
  # parenthesis "anchors" the match.
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM_TO_PARENT)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_IN_IMPL)/)/g;

  # Remove the longer identifier first.
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_TO_PARENT//g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM//g;
}

# Remove the actual include.
\@# *include "mozilla/GuardObjects.h"@d
```

and running:

```
find . -name \*.cpp -o -name \*.h | grep -v 'GuardObjects.h' |xargs sed -i -f script 2>/dev/null
mach clang-format
```

Differential Revision: https://phabricator.services.mozilla.com/D85168
2020-07-30 14:22:38 +00:00