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

1769 Коммитов

Автор SHA1 Сообщение Дата
Frederic Wang 8957655bf3 Bug 1579602 - Rename nsMathMLElement to dom::MathMLElement. r=bzbarsky
This commit renames nsMathMLElement/nsMathMLElementFactory classes into
MathMLElement/MathMLElementFactory and moves the former into the mozilla::dom
namespace. This is a preliminary step to introduce MathML DOM (bug 1579602).
Code behavior is not changed.

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

--HG--
rename : dom/mathml/nsMathMLElement.cpp => dom/mathml/MathMLElement.cpp
rename : dom/mathml/nsMathMLElement.h => dom/mathml/MathMLElement.h
rename : dom/mathml/nsMathMLElementFactory.cpp => dom/mathml/MathMLElementFactory.cpp
extra : moz-landing-system : lando
2019-09-13 16:27:54 +00:00
Andreea Pavel f652361ce2 Backed out changeset f20ce5c7a25c (bug 1575870) for assertion failure at nsNavHistory.cpp on a CLOSED TREE 2019-08-29 13:45:54 +03:00
Frederic Wang ea067f91f0 Bug 1575870. Remove support for XLink on MathML elements. r=emilio
See https://groups.google.com/forum/#!topic/mozilla.dev.platform/70NFnet82cU

This commit introduces a new mathml.xlink.disabled option to disable support
for XLink attributes on MathML elements together with a use counter and
deprecation warning when support is enabled. For now, support is only disabled
in Nighly.

In the past, we relied on custom MathML deprecation warnings but those are
removed here. Corresponding tests for these legacy warning messages are
also removed from test_bug553917.html.

link-1.xhtml is run with XLink support enabled (since it check xlink:href)
while browser_contentAltClick.js is updated to check whether XLink has any
effect on MathML, depending on whether the option is enabled.

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

--HG--
extra : moz-landing-system : lando
2019-08-29 08:20:01 +00:00
Frederic Wang 3f8a2878fa Bug 1548524 - Remove attributes deprecated from MathML3. r=emilio
See https://github.com/mathml-refresh/mathml/issues/5#issuecomment-475506856
and https://groups.google.com/forum/#!topic/mozilla.dev.platform/kl5c87mBlO0

This patch introduces a new preference
mathml.deprecated_style_attributes.disabled in order to disable legacy support
for attributes background, color, fontfamily, fontsize, fontstyle and
fontweight. Note that xlink:href will be handled separately in bug 1575870.

* A new counter and deprecation message is introduced for these attributes.
  In nsMathMLElement, the old WarnDeprecated calls are replaced with a single
  call to WarnOnceAbout for the deprecate attributes. Notice that for some
  reason, the color attribute used to send warning in both ParseAttribute and
  MapMathMLAttributesInto.
* sMtableStyles is removed and replaced with a simple comparison.
* sMathML3Attributes is split into two tables: one for script attributes which
  will be handled in bug 1548471 and one for style attributes, handled here.
  The attributes in this second table is now ignored when the feature flag is
  disabled.
* test_bug553917.html is updated so that it no longer checks the old warning
  messages for these attributes. New warning messages have been verified
  manually.
* Reftests checking support for these attributes are run with the support
  enabled.
* Finally, WPT tests are run with the support disabled and a new test
  is added to verify that these attributes are no longer mapped to CSS.

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

--HG--
extra : moz-landing-system : lando
2019-08-28 14:59:55 +00:00
Frédéric Wang 8f3b2a9292 Bug 1575542 - Add counter and warnings for deprecated MathML lengths. r=emilio
This commit introduces new counters and deprecation warnings for the following
MathML features:
* mathspace names (bug 1575542)
* mathsize names (bug 1548527)
* linethickness names (bug 1548529)

Note: helper parsing functions for mfrac and mpadded are changed to non-static
in order to pass the document parameter needed to log warnings to the console.

Change manually tested with
    <math>
      <mspace width="thinmathspace"></mspace>
      <mpadded width="2thickmathspace"></mpadded>
      <mfrac linethickness="thin"><mn>1</mn><mn>2</mn></mfrac>
      <mtext mathsize="big">3</mtext>
    </math>

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

--HG--
extra : moz-landing-system : lando
2019-08-22 06:29:26 +00:00
Frédéric Wang 90172bae44 Bug 1575596 - MathML Lengths: Do not accept numbers ending with a dot. r=emilio
See https://github.com/mathml-refresh/mathml/issues/23
and https://groups.google.com/forum/#!topic/mozilla.dev.platform/wIjm9JjVHNg

This commit introduces a new preference option
mathml.legacy_number_syntax.disabled to disable legacy MathML numbers
(e.g. "1234.") that are not supported by CSS. This feature is now disabled by
default.

* test_bug553917.html is updated to check that such legacy values now cause an
  error message to be logged into the console when the feature is disabled.
* Legacy MathML features are now disabled for WPT mathml test in a global
  __dir__.ini file. Removing legacy numbers allow to pass
  mathml/relations/css-styling/lengths-2.html

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

--HG--
extra : moz-landing-system : lando
2019-08-21 23:49:36 +00:00
Jonathan Kew 129e7436f7 Bug 1573249 - patch 2 - Don't apply skip-ink to runs of CJK text, because it looks bad with many fonts. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D42529

--HG--
extra : moz-landing-system : lando
2019-08-21 15:07:20 +00:00
Frédéric Wang 7a6019b9e2 Bug 1574750 - Remove support for MathML length values thinmathspace, mediummathspace, thickmathspace, etc. r=emilio
See https://github.com/mathml-refresh/mathml/issues/75
and https://groups.google.com/forum/#!topic/mozilla.dev.platform/yEMdIOo4i-0

This commit introduces a new preference option
mathml.mathspace_names.disabled to disable *mathspace names for MathML lengths.
For now, these are only disabled in Nightly builds.

* test_bug553917.html is updated to check that these values now cause an
  error message to be logged into the console when mathsize names are used
  and the feature disabled.
* mathml-negativespace-ref.html and positive-namedspace.html verify support for
  mathspace names, so force running them with the support enabled.
* The reference files for mo-lspace-rspace-2.html, mo-lspace-rspace-3.html,
  mo-lspace-rspace.html, op-dict-8.html and op-dict-9.html use explicit
  lspace/rspace attributes corresponding to the one read from the operator
  dictionary. Instead of running them with mathspace names enabled, use the
  equivalent em values from core
  https://mathml-refresh.github.io/mathml-core/#operator-dictionary
  See https://github.com/mathml-refresh/mathml/issues/75#issuecomment-523016332
* Force WPT tests
  mathml/presentation-markup/fractions/frac-linethickness-002.html and
  mathml/relations/css-styling/lengths-2.html to be run with the features
  disabled and remove corresponding failure expectation.

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

--HG--
extra : moz-landing-system : lando
2019-08-21 12:56:30 +00:00
Coroiu Cristina f2e9770b54 Backed out 3 changesets (bug 1573249) for chrome failures at layout/inspector/tests/chrome/test_fontFaceGeneric.xul on a CLOSED TREE
Backed out changeset bdba80dae6e2 (bug 1573249)
Backed out changeset 21306e3f8d31 (bug 1573249)
Backed out changeset 3576d5b9f2db (bug 1573249)
2019-08-21 14:01:11 +03:00
Jonathan Kew 2898eb876f Bug 1573249 - patch 2 - Don't apply skip-ink to runs of CJK text, because it looks bad with many fonts. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D42529

--HG--
extra : moz-landing-system : lando
2019-08-21 09:39:02 +00:00
Frédéric Wang 675225dd5a Bug 1574749 - Remove support for nonzero unitless lengths. r=emilio
See https://github.com/mathml-refresh/mathml/issues/24
and https://groups.google.com/forum/#!topic/mozilla.dev.platform/-yV6wb3klSA

This commit introduces a new preference option
mathml.nonzero_unitless_lengths.disabled to disable MathML nonzero unitless
values like "5" for 500%. MathML nonzero unitless are now disabled by default
but it could be easily enabled again later if we decide otherwise.

* test_bug553917.html is updated to check that these values now cause an error
  message to be logged into the console rather than a deprecated warning
  when nonzero unitless lengths are disabled.
  Additionally, the test checking invalid double dots "2..0" is updated not
  to use unitless syntax.
* The old test 355548-3.xml checks support for mathsize names and also uses
  several features that are going to be deprecated. So it is just run with
  the proper preference adjustment.
* mfrac-linethickness-2.xhtml and number-size-1.xhtml check support for
  unitless lengths so they are now run with that support enabled.
* WPT tests frac-linethickness-001.html and lengths-1.html are executed with
  the some MathML features disabled in order to make them pass.
  We get more assertion passing for the "Legacy numbers" test of
  lengths-2.html ; however there are still some issues to address
  (see bug 1574751).

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

--HG--
extra : moz-landing-system : lando
2019-08-19 17:10:58 +00:00
Frédéric Wang 526e469d17 Bug 1548527 - Remove values "small", "normal", "big" values of the mathsize attribute. r=emilio
See https://github.com/mathml-refresh/mathml/issues/7
    and https://groups.google.com/forum/#!topic/mozilla.dev.platform/kyB34PjYXek

    This commit introduces a new preference option
    mathml.mathsize_names.disabled to disable mathsize keyword values. For
    now, these are only disabled in Nightly builds.

    * test_bug553917.html is updated to check that these values now cause an
      error message to be logged into the console when mathsize names are used
      and the feature disabled.
    * The old test 355548-3.xml checks support for mathsize names and also uses
      several features that are going to be deprecated. So it is just run with
      the proper preference adjustment.
    * mathml/relations/css-styling/mathsize-attribute-legacy-values.html passes
      after this change so the test is run with the mathsize names disabled too
      and the failure expectation is removed.
    * mathml/relations/css-styling/mathsize-attribute-css-keywords.html is added
      to check that CSS keywords won't be supported when we switch to using the
      CSS parser in the future. This test passes now when the "small" keyword
      is not accepted so it is run with the mathsize names disabled too.

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

--HG--
extra : moz-landing-system : lando
2019-08-19 18:28:03 +00:00
Frédéric Wang 5f76ecca6e Bug 1574773 - Permafailing layout/mathml/tests/test_bug553917.html. r=emilio
Update test_bug553917 so that it does not expect invalid lengths
for "thin", "thick", "medium" when mfrac linethickness names are
allowed. This fixes failure in non-nightly builds where these
names are not disabled yet.

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

--HG--
extra : moz-landing-system : lando
2019-08-19 07:37:08 +00:00
Frédéric Wang 7175f01408 Bug 1548529 - Remove values "thin", "thick", "medium" values of mfrac@linethickness. r=emilio
See https://github.com/mathml-refresh/mathml/issues/4
and https://groups.google.com/forum/#!topic/mozilla.dev.platform/G91-vBeC3Rw

This commit introduces a new preference option
mathml.mfrac_linethickness_names.disabled to disable linethickness names. For
now, these names are only disabled in Nightly builds. Announcements and actual
disabling of this and other MathML features will be considered later.

* test_bug553917.html is updated to check that these values now cause an error
  message to be logged into the console.
* mstyle-1.xhtml is updated to use a numeric linethickness since the point of
  the test is just to check that the attribute is not supported on mstyle, not
  about the actual attribute value.
* Other fractions tests relying on linethickness names are executed with the
  proper preference adjustment.
* mathml/presentation-markup/fractions/frac-linethickness-001.html is now
  closer to its expectation ; however the test still fails because nonzero
  unitless values are not removed yet. See
  https://github.com/mathml-refresh/mathml/issues/24

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

--HG--
extra : moz-landing-system : lando
2019-08-16 17:41:59 +00:00
Frédéric Wang 3aec893f88 Bug 1574087. Make MathML length, dir, display, displaystyle and mathvariant case insensitive. r=emilio
See https://github.com/mathml-refresh/mathml/issues/22

* mathml/relations/css-styling/attribute-mapping-001.html (length, dir)
* mathml/relations/html5-tree/display-1.html (display)
* mathml/relations/css-styling/displaystyle-1.html (displaystyle)
* mathml/relations/css-styling/displaystyle-2.html (displaystyle)
* mathml/relations/css-styling/mathvariant-case-sensitivity.html (mathvariant)

layout/reftests/bugs/355548-3.xml has been updated now that units are case
insensitive.

Note:
* mathml/relations/css-styling/attribute-mapping-002.html also checks
  case insensitiveness of mathvariant and displaystyle but for now we map
  these attributes to internal -moz-* CSS properties.
* mathcolor and mathbackground values are already case insensitive, this
  is verified by mathml/relations/css-styling/attribute-mapping-001.html

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

--HG--
extra : moz-landing-system : lando
2019-08-15 18:44:36 +00:00
Mihai Alexandru Michis 356b38ead4 Backed out changeset 1dccb45167d3 (bug 1574087) for causing reftest failures in 355548-3.xml 2019-08-15 15:29:09 +03:00
Frédéric Wang 673c1a7a72 Bug 1574087. Make MathML length, dir, display, displaystyle and mathvariant case insensitive. r=emilio
See https://github.com/mathml-refresh/mathml/issues/22

* mathml/relations/css-styling/attribute-mapping-001.html (length, dir)
* mathml/relations/html5-tree/display-1.html (display)
* mathml/relations/css-styling/displaystyle-1.html (displaystyle)
* mathml/relations/css-styling/displaystyle-2.html (displaystyle)
* mathml/relations/css-styling/mathvariant-case-sensitivity.html (mathvariant)

Note:
* mathml/relations/css-styling/attribute-mapping-002.html also checks
  case insensitiveness of mathvariant and displaystyle but for now we map
  these attributes to internal -moz-* CSS properties.
* mathcolor and mathbackground values are already case insensitive, this
  is verified by mathml/relations/css-styling/attribute-mapping-001.html

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

--HG--
extra : moz-landing-system : lando
2019-08-15 09:09:33 +00:00
Frédéric Wang ac812c706e Bug 1573438 - Remove <math>'s mode attribute. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D41742

--HG--
extra : moz-landing-system : lando
2019-08-13 19:26:27 +00:00
Frédéric Wang 0359ecb2de Bug 1572211 - Remove MathML imported mochitests. r=emilio
These are duplicate and out-of-date version of the following web platform tests:

testing/web-platform/tests/mathml/presentation-markup/fractions/frac-parameters-1.html
testing/web-platform/tests/mathml/presentation-markup/fractions/frac-parameters-2.html
testing/web-platform/tests/mathml/relations/css-styling/lengths-2.html

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

--HG--
extra : moz-landing-system : lando
2019-08-13 19:28:01 +00:00
Frédéric Wang 74a90f08e6 Bug 1572211 - Do not rely on AxisHeight for the layout of mfrac elements without bar. r=emilio
AxisHeight is not involved in the layout of <mfrac> with zero linethickness:
https://mathml-refresh.github.io/mathml-core/#fraction-with-zero-line-thickness

Confirmed by Microsoft:
https://lists.w3.org/Archives/Public/public-mathml4/2019Aug/0019.html

See https://github.com/mathml-refresh/mathml/issues/123

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

--HG--
extra : moz-landing-system : lando
2019-08-13 15:05:26 +00:00
Frédéric Wang a8ca8b2301 Bug 1573575 - Remove duplicate MathML tests for OpenType parameters. r=emilio
* All but the last parameter of test_opentype-limits.html are verified by
  mathml/presentation-markup/scripts/underover-parameters-1.html
* test_opentype-fraction.html is equivalent to
  mathml/presentation-markup/fractions/frac-parameters-1.html
  (however, fraction-1.otf is used by other tests).
* mathml/tests/test_opentype-radical.html is equivalent to
  mathml/presentation-markup/radicals/root-parameters-1.html
* test_opentype-scripts.html is equivalent to
  mathml/presentation-markup/scripts/subsup-parameters-1.html
* mathml/tests/test_opentype-stack.html is equivalent to
  mathml/presentation-markup/fractions/frac-parameters-2.html

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

--HG--
extra : moz-landing-system : lando
2019-08-13 19:29:26 +00:00
Oana Pop Rus b3b192eb95 Backed out 2 changesets (bug 1572211) for mochitests failures on test_stack-parameters.html on a CLOSED TREE
Backed out changeset 48fa8b517d7b (bug 1572211)
Backed out changeset a5d589b74745 (bug 1572211)
2019-08-13 18:01:33 +03:00
Frédéric Wang 4272da6a80 Bug 1572211 - Do not rely on AxisHeight for the layout of mfrac elements without bar. r=emilio
AxisHeight is not involved in the layout of <mfrac> with zero linethickness:
https://mathml-refresh.github.io/mathml-core/#fraction-with-zero-line-thickness

Confirmed by Microsoft:
https://lists.w3.org/Archives/Public/public-mathml4/2019Aug/0019.html

See https://github.com/mathml-refresh/mathml/issues/123

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

--HG--
extra : moz-landing-system : lando
2019-08-13 09:51:58 +00:00
L. David Baron 1488be9417 Bug 1571250 - Convert flags passed to ReflowChild, FinishReflowChild, SyncFrameViewAfterReflow and from GetXULLayoutFlags / GetLayoutFlags into an enum class. r=TYLin
It seems better to convert this before adding a new flag (in bug
1547759) and risking replacing the wrong 0 with a flag.

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

--HG--
extra : moz-landing-system : lando
2019-08-08 19:48:19 +00:00
L. David Baron 85d61d1a95 Bug 1571249 - Remove the IsTableCell() function. r=TYLin
It was made pointless by the previous patch.

This replaces callers that had a frame type for another reason with the
frame type check that IsTableCell did, and callers that needed to call
Type() with an IsTableCellFrame call.

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

--HG--
extra : moz-landing-system : lando
2019-08-08 19:48:12 +00:00
RuchikaGosain 6b0bf3bb0e Bug 1564555 - Enable some more ESLint rules for layout. r=Standard8,dholbert
Differential Revision: https://phabricator.services.mozilla.com/D38007

--HG--
extra : moz-landing-system : lando
2019-07-18 21:00:21 +00:00
Brindusan Cristian 6e6b2f7568 Backed out 2 changesets (bug 1554499) for mochitest failures at test_restyles.html.
Backed out changeset 1a6a6a38c987 (bug 1554499)
Backed out changeset 789e5d3fcf18 (bug 1554499)
2019-07-18 21:36:22 +03:00
Alexis Beingessner bf3ef8ab03 Bug 1554499 - Rename PerFrameKey -> PerFrameIndex for most methods r=mattwoodrow
This distinguishes better between the overloaded aspect of the PerFrameKey and the
actual mixed value.

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

--HG--
extra : moz-landing-system : lando
2019-07-17 20:13:20 +00:00
Alexis Beingessner f6d109ce74 Bug 1554499 - change ComputePerFrameKey to be a static method. r=mattwoodrow
This static method is assumed to have the same signature as the type's constructor,
and so we must have an implementation of ComputePerFrameKey for each constructor
a display item provides that is called by MakeDisplayItem. Notably this excludes
the MakeClone constructor for a lot of items.

There is a default varargs implementation on nsDisplayItem which everyone
inherits by default, so types which previously didn't overload this method
still don't need to.

Providing an implementation of ComputePerFrameKey on some display item type
shadows the varargs implementation, so one doesn't need to worry about overloading
one constructor but forgetting about another -- if you do, the compiler will only
see the overload and complain that the signature doesn't match.

One slightly annoying result of this is that display items which previously
inherited an overloaded implementation from a superclass now must provide
their own manual implementations. Although as far as I could tell, all of
those cases had a trivial implementation of key=0 (the super class supported
custom keys but the subclasses didn't make use of it).

In those cases I just hardcoded key=0, but it's possible that it would be
better to call into the superclass' implementation to be more robust to changes.

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

--HG--
extra : moz-landing-system : lando
2019-07-17 20:24:30 +00:00
L. David Baron ce547cd6f5 Bug 1566945 - Add a parameter to nsContainerFrame::InsertFrames for aPrevFrame's line box. r=dholbert
For now, always pass null, except when passing it through from one
overload to another.

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

--HG--
extra : moz-landing-system : lando
2019-07-17 23:34:45 +00:00
Victor Porof 6a261b9e77 Bug 1561435 - Format layout/, a=automatic-formatting
# ignore-this-changeset

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

--HG--
extra : source : b9cc96337c05dbb9a9f811c63dcc5fd63588d652
2019-07-05 10:50:41 +02:00
Boris Zbarsky d5a8a4a595 Bug 1557793 part 3. Change the signatures of various nsContentUtils localization methods to play nicer with the new stringbundle API. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D34201

--HG--
extra : moz-landing-system : lando
2019-06-08 21:26:12 +00:00
Boris Zbarsky 9de72a3ac6 Bug 1557793 part 2. Stop using [array] in nsIStringBundle. r=Pike
Differential Revision: https://phabricator.services.mozilla.com/D34196

--HG--
extra : moz-landing-system : lando
2019-06-11 15:51:51 +00:00
Emilio Cobos Álvarez 810916db16 Bug 1554433 - Move system colors to values::specified::color. r=xidorn
This should be an idempotent patch. The way to come up with this patch has been:

 * Run the first script attached to the bug and pipe it to xclip, then paste it
   in color.rs
 * Add the relevant #[derive] annotations and remove the color.mako.rs
   definition.
 * Reorder the values to match the ColorID definition, on which some widget
   prefs and caching stuff relies on.
 * Manually port some documentation from nsLookAndFeel.h
 * Run `rg 'eColorID_' | cut -d : -f 1 | sort | uniq >files`
 * Run the second script attached to the bug.
 * Manually fix usage of `LAST_COLOR` (adding the `End` variant), and adding
   casts to integer as needed.
 * Add an static assert so that people remember to update the prefs, rather than
   a comment on the definition :)

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

--HG--
extra : moz-landing-system : lando
2019-05-26 13:10:00 +00:00
Emilio Cobos Álvarez 980074a5b2 Bug 1544242 - Cleanup selector-matching for nested pseudo-elements, match ::slotted correctly when there's no selector before it, and add tests. r=heycam,mats
D29542 fixed the bogus checks that was making nested pseudo-elements match
author rules. This adds tests and ends up being just a cleanup, though as it
turns out we it also fixes an issue with ::slotted() matched from
Element.matches.

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

--HG--
extra : moz-landing-system : lando
2019-05-24 01:09:15 +00:00
Matt Woodrow 1f9adb1ed4 Bug 1409114 - Part 7: Pass rects in display list coordinates to AppendBackgroundItemsToTop. r=miko
This helps for the next patch, since some of the table backgrounds items want to compute this without position:relative taken into account.

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

--HG--
extra : moz-landing-system : lando
2019-05-20 23:15:54 +00:00
Cameron McCormack d4d63edb8f Bug 1133175 - Remove SVGTests.hasExtension. r=bz,longsonr 2019-05-09 14:39:28 +10:00
Miko Mynttinen 2c5cb1519c Bug 1549751 - Part 2: Add nsPaintedDisplayItem r=mattwoodrow
Move ApplyOpacity(), CanApplyOpacity(), Paint() and PaintWithClip() methods to nsPaintedDisplayItem

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

--HG--
extra : moz-landing-system : lando
2019-05-08 13:49:56 +00:00
Ting-Yu Lin 63457d2b61 Bug 1548673 Part 1 - Rename NS_INTRINSIC_WIDTH_UNKNOWN to NS_INTRINSIC_ISIZE_UNKNOWN. r=jfkthame
This patch is generated by running the following script under layout/,
and then manually delete the FIXME comment in LayoutConstants.h

  #!/bin/bash
  function rename() {
      find .\
           -type f\
           ! -path "./obj*"\
           ! -path "./.git"\
           ! -path "./.hg"\
           \( -name "*.cpp" -or\
              -name "*.h" \)\
              -exec sed -i -e "s/$1/$2/g" "{}" \;
  }
  rename NS_INTRINSIC_WIDTH_UNKNOWN NS_INTRINSIC_ISIZE_UNKNOWN

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

--HG--
extra : moz-landing-system : lando
2019-05-03 17:34:36 +00:00
Noemi Erli f1ef21cbc7 Backed out changeset 8c89fd37b79d (bug 1544242) for failures in browser_rules_shadowdom_slot_rules.js CLOSED TREE 2019-05-01 22:03:06 +03:00
Emilio Cobos Álvarez fb5b637f4f Bug 1544242 - Fix selector-matching for nested pseudo-elements. r=heycam,mats
We always include the combinator for pseudo-elements now (not including it was
just an optimization) in order to not match when nested pseudo-elements are
involved.

We could add a more generic check in `matches_simple_selector` like:

```
if element.is_pseudo_element() {
    match *selector {
        Component::PseudoElement(..) |
        Component::NonTSPseudoClass(..) => {},
        _ => return false,
    }
}
```

But even that wouldn't be enough to make selectors like `:hover::marker` not
match on the `::before::marker` pseudo-element, plus that code is really hot.

So for now do the check on the `next_element_for_combinator` function. It's a
bit hacky but it's the best I could came up with...

While at it, simplify some checks to use is_pseudo_element() instead of
implemented_pseudo_element() directly.

Only the Rust patch as-is would make markers for ::before and ::after on list
items not show up, so we also need to switch ::marker to use ProbeMarkerStyle()
rather than ProbePseudoElementStyle(), since the marker should exist even if it
matches no rules.

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

--HG--
extra : moz-landing-system : lando
2019-05-01 17:19:08 +00:00
Emilio Cobos Álvarez edde08a7cb Bug 1547985 - Use rust types for vertical-align. r=mats
The previous commit removed the dependence on the discriminant value, so we
don't need to keep discriminants different from text-align anymore.

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

--HG--
extra : moz-landing-system : lando
2019-05-01 13:08:34 +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
Miko Mynttinen 84624b4a42 Bug 1540785 - Part 2: Devirtualize nsDisplayItemBase::GetPerFrameKey() r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D27580

--HG--
extra : moz-landing-system : lando
2019-04-22 19:58:01 +00:00
Brian Grinstead 381332c51e Bug 1544051 - Part 3 - Scripted change to remove references to AddTask.js r=ahal
This was generated with the script at https://bug1544051.bmoattachments.org/attachment.cgi?id=9058672

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

--HG--
extra : moz-landing-system : lando
2019-04-18 16:51:01 +00:00
Brian Grinstead c4fa4cfc0c Bug 1544322 - Part 4 - Remove the [type] attribute for multiline <script> tags loading files in /tests/SimpleTest/ r=bzbarsky
This is an autogenerated commit to handle scripts loading mochitest harness files, in
the case where the script src is on the line below the script tag.

This was generated with https://bug1544322.bmoattachments.org/attachment.cgi?id=9058170
using the `--part 4` argument.

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

--HG--
extra : moz-landing-system : lando
2019-04-16 04:01:46 +00:00
Brian Grinstead ede8c44ef2 Bug 1544322 - Part 2.1 - Remove the [type] attribute for one-liner <script> tags loading files in /tests/SimpleTest/ in everything except for dom/ r=bzbarsky
This excludes dom/, otherwise the file size is too large for phabricator to handle.

This is an autogenerated commit to handle scripts loading mochitest harness files, in
the simple case where the script src is on the same line as the tag.

This was generated with https://bug1544322.bmoattachments.org/attachment.cgi?id=9058170
using the `--part 2` argument.

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

--HG--
extra : moz-landing-system : lando
2019-04-16 03:50:44 +00:00
Brian Grinstead 6515f97bcb Bug 1544322 - Part 1 - Remove the [type] attribute for one-liner <script> tags loading files in chrome://mochikit/content/ r=bzbarsky
This is an autogenerated commit to handle scripts loading mochitest harness files, in
the simple case where the script src is on the same line as the tag.

This was generated with https://bug1544322.bmoattachments.org/attachment.cgi?id=9058170
using the `--part 1` argument.

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

--HG--
extra : moz-landing-system : lando
2019-04-15 20:56:58 +00:00
Masayuki Nakano 2f9688c14e Bug 1544343 - part 2: Make factory methods take mozilla::PresShell instead of nsIPresShell r=emilio
Additionally, this patch makes `nsFrame.h` stop including `nsIPresShell.h`
and makes each users include `mozilla/PresShell.h` instead.  So, this improves
rebuild performance of `nsIPresShell.h` (and `mozilla/PresShell.h` in the
future).

Note that due to `nsIFrame::PresShell()`, `mozilla::` prefix is necessary for
`PresShell` in a lot of classes which are derived from `nsIFrame` even in
`.cpp` files.

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

--HG--
extra : moz-landing-system : lando
2019-04-16 07:24:49 +00:00
Masayuki Nakano e8446480e1 Bug 1542407 - Make nsIFrame use mozilla::PresShell directly rather than via nsIPresShell r=emilio
Except retrieving from weak reference, `nsIFrame` should treat
`mozilla::PresShell` directly rather than via `nsIPresShell`.

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

--HG--
extra : moz-landing-system : lando
2019-04-06 06:02:28 +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
Matt Woodrow d99a15fae2 Bug 1539673 - Support fallible display item construction. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D25167

--HG--
extra : moz-landing-system : lando
2019-04-01 16:53:11 +00:00
Emilio Cobos Álvarez 19c116ce06 Bug 1537575 - Cleanup generic font-family handling. r=jfkthame
To be more similar between Rust and C++. This introduces GenericFontFamily and
exposes that plus FontFamilyNameSyntax to C++, using that where appropriate
instead of plain uint8_t as we were doing.

As a follow-up, as discussed on IRC with Jonathan, we can remove the -moz-fixed
family, and turn it just into an alias of Monospace.

The only non-trivial change is the MatchType changes, but they're ok I think.
The code already assumed at most one CSS generic, and the struct still takes 8
bits. I've verified that the relevant tests are passing (though try is closed).

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

--HG--
extra : moz-landing-system : lando
2019-04-01 21:47:59 +00:00
arthur.iakab cd473e09f4 Backed out 3 changesets (bug 1537594, bug 1537575) for causing build bustages on mathml/nsMathMLChar.cpp CLOSED TREE
Backed out changeset 7375a830b5ef (bug 1537594)
Backed out changeset 0cd1411e2fb3 (bug 1537575)
Backed out changeset c7565f50239a (bug 1537575)
2019-04-01 23:41:04 +03:00
Emilio Cobos Álvarez 2188b25101 Bug 1537575 - Cleanup generic font-family handling. r=jfkthame
To be more similar between Rust and C++. This introduces GenericFontFamily and
exposes that plus FontFamilyNameSyntax to C++, using that where appropriate
instead of plain uint8_t as we were doing.

As a follow-up, as discussed on IRC with Jonathan, we can remove the -moz-fixed
family, and turn it just into an alias of Monospace.

The only non-trivial change is the MatchType changes, but they're ok I think.
The code already assumed at most one CSS generic, and the struct still takes 8
bits. I've verified that the relevant tests are passing (though try is closed).

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

--HG--
extra : moz-landing-system : lando
2019-04-01 18:48:10 +00:00
Jonathan Kew f5e8791f61 Bug 1533428 - patch 4 - Include chromium-config.mozbuild in the moz.build for a bunch more directories, so that IPC-related headers are available. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D22922

--HG--
extra : moz-landing-system : lando
2019-04-01 14:32:44 +00:00
Jonathan Kew a978a2a32d Bug 1533428 - patch 2 - Move the Orientation enum from gfxFont to nsFontMetrics to enable some #include-elimination, in particular to avoid including gfxTextRun.h in nsFontMetrics.h. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D22913

--HG--
extra : moz-landing-system : lando
2019-04-01 14:32:19 +00:00
Jonathan Kew c671cf4509 Bug 1533395 - Refactor gfxTextRange struct, moving the MatchType enum to gfxTypes.h as FontMatchType, and the struct inside gfxFontGroup as a local type. r=jwatt
This allows us to reduce #include usage of the massive gfxFont.h header,
and keeps this specialized kind of TextRange struct local to where it's used.

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

--HG--
extra : moz-landing-system : lando
2019-04-01 14:32:06 +00:00
Masayuki Nakano b7fbcf781f Bug 1540015 - part 2: Make nsPresContext.h stop including nsIPresShel.h and nsIPresShellInlines.h r=smaug
`*Inlines.h` shouldn't be included by another header file, but `nsPresContext.h`
does it.  This causes include-hell which blocks the following fix.

Additionally, it causes an include hell between `PresShell.h` vs.
`nsIPresShell.h` and `nsPresContext.h if `Document.h` includes `PresShell.h`.
Therefore, this patch also solves this include hell with adding
`nsPresContextInlines.h`.

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

--HG--
extra : moz-landing-system : lando
2019-03-29 15:11:22 +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 2137fa4b14 Bug 1540015 - part 2: Make nsPresContext.h stop including nsIPresShel.h and nsIPresShellInlines.h r=smaug
`*Inlines.h` shouldn't be included by another header file, but `nsPresContext.h`
does it.  This causes include-hell which blocks the following fix.

Additionally, it causes an include hell between `PresShell.h` vs.
`nsIPresShell.h` and `nsPresContext.h if `Document.h` includes `PresShell.h`.
Therefore, this patch also solves this include hell with adding
`nsPresContextInlines.h`.

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

--HG--
extra : moz-landing-system : lando
2019-03-29 12:13:08 +00:00
Dan Glastonbury bf3ac981c9 Bug 1429605 - Use single-param version of rect.Inflate when x == y. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D24467

--HG--
extra : moz-landing-system : lando
2019-03-22 15:52:07 +00: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 b936c00a65 Bug 1523969 part 14 - Move method definition inline comments to new line in 'layout/'. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D21115

--HG--
extra : rebase_source : 4d65c07d8822f3a54ac881b5d0f55468ce884554
2019-02-25 16:09:24 -06:00
Emilio Cobos Álvarez d2cbf071d5 Bug 1528712 - Remove nsFont::featureValueLookup. r=jfkthame
It's a global object, it doesn't have to be stored in nsFont. Pass it from the
caller like the user font set and co.

Depends on D20141

Differential Revision: https://phabricator.services.mozilla.com/D20142
2019-02-19 14:54:04 +01: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
Ciure Andrei 965d533ca4 Backed out 2 changesets (bug 1528712) for Linux spcshell and reftest failures (test_ext_browserSettings.js, 1022481-1.html) CLOSED TREE
Backed out changeset 2d5c4e71e258 (bug 1528712)
Backed out changeset d981515b874b (bug 1528712)
2019-02-19 14:25:57 +02:00
Emilio Cobos Álvarez f97a9f50a2 Bug 1528712 - Remove nsFont::featureValueLookup. r=jfkthame
It's a global object, it doesn't have to be stored in nsFont. Pass it from the
caller like the user font set and co.

Depends on D20141

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

--HG--
extra : moz-landing-system : lando
2019-02-18 14:03:47 +00:00
Ting-Yu Lin 646fb37989 Bug 1527519 Part 1 - Make do_QueryFrame more const-friendly, and mark nsIFrame::IsBlockFrameOrSubclass() as a const method. r=mats
This patch makes do_QueryFrame() accept const frame pointer e.g.
"const nsIFrame*", and also helps eliminate a few const_cast in Part 3.

Note that the fast path of do_QueryFrame is const-correct, but the slow
path is not (due to nsIFrame::QueryFrame() returns void*).

For example:

```
const nsIFrame* f;
nsBlockFrame* a = do_QueryFrame(f); // fast path, compile error.
nsIAnonymousContentCreator* b = do_QueryFrame(f); // slow path, still compiles.
```

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

--HG--
extra : moz-landing-system : lando
2019-02-15 01:38:04 +00:00
Emilio Cobos Álvarez 12867b1a3f Bug 1525371 - Kill ComputedStyle::mPresContext, move the pointer to the frame instead. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D18734
2019-02-07 11:15:36 +01:00
Kris Maglione e930b89c34 Bug 1514594: Part 3 - Change ChromeUtils.import API.
***
Bug 1514594: Part 3a - Change ChromeUtils.import to return an exports object; not pollute global. r=mccr8

This changes the behavior of ChromeUtils.import() to return an exports object,
rather than a module global, in all cases except when `null` is passed as a
second argument, and changes the default behavior not to pollute the global
scope with the module's exports. Thus, the following code written for the old
model:

  ChromeUtils.import("resource://gre/modules/Services.jsm");

is approximately the same as the following, in the new model:

  var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");

Since the two behaviors are mutually incompatible, this patch will land with a
scripted rewrite to update all existing callers to use the new model rather
than the old.
***
Bug 1514594: Part 3b - Mass rewrite all JS code to use the new ChromeUtils.import API. rs=Gijs

This was done using the followng script:

https://bitbucket.org/kmaglione/m-c-rewrites/src/tip/processors/cu-import-exports.jsm
***
Bug 1514594: Part 3c - Update ESLint plugin for ChromeUtils.import API changes. r=Standard8

Differential Revision: https://phabricator.services.mozilla.com/D16747
***
Bug 1514594: Part 3d - Remove/fix hundreds of duplicate imports from sync tests. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16748
***
Bug 1514594: Part 3e - Remove no-op ChromeUtils.import() calls. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16749
***
Bug 1514594: Part 3f.1 - Cleanup various test corner cases after mass rewrite. r=Gijs
***
Bug 1514594: Part 3f.2 - Cleanup various non-test corner cases after mass rewrite. r=Gijs

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

--HG--
extra : rebase_source : 359574ee3064c90f33bf36c2ebe3159a24cc8895
extra : histedit_source : b93c8f42808b1599f9122d7842d2c0b3e656a594%2C64a3a4e3359dc889e2ab2b49461bab9e27fc10a7
2019-01-17 10:18:31 -08:00
Ehsan Akhgari e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
Doug Thayer a848222b53 Bug 1441308 - Split out document pieces of WebRenderLayerManager r=jrmuizel
Per our discussion, this patch splits out the state management bits of
WebRenderLayerManager, allowing for them to be maintained per-document.

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

--HG--
extra : moz-landing-system : lando
2019-01-07 21:33:10 +00:00
Sylvestre Ledru ext:(%20and%20Karl%20Tomlinson%20%3Ckarlt%2B%40karlt.net%3E) c7b59395f2 Bug 1515556 comment fix-ups for the tree reformat (layout/) r=Ehsan,heycam
Differential Revision: https://phabricator.services.mozilla.com/D13125

--HG--
extra : moz-landing-system : lando
2018-12-21 03:07:05 +00:00
Mark Banner 8c00ef3f30 Bug 1512052 - Add more .eslintrc.js files for test directories. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D13746

--HG--
extra : moz-landing-system : lando
2018-12-11 13:15:08 +00:00
Cameron McCormack 1db3f9da78 Bug 1512716 - Re-indent NS_QUERYFRAME macros after clang-format. r=TYLin
Differential Revision: https://phabricator.services.mozilla.com/D13995

--HG--
extra : moz-landing-system : lando
2018-12-07 20:00:18 +00:00
Miko Mynttinen aafa85ee9d Bug 1512251 - Remove unused render only selection code r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D13829

--HG--
extra : moz-landing-system : lando
2018-12-06 19:40:50 +00:00
Cameron McCormack 1ea7c3efc9 Bug 1511854 - Part 2: Fix some more formatting oddities in layout/ after the clang-format. r=TYLin
Depends on D13686

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

--HG--
extra : moz-landing-system : lando
2018-12-05 18:44:05 +00:00
Cameron McCormack a9c935c355 Bug 1511854 - Part 1: Fix some formatting oddities in layout/ after the clang-format. r=TYLin
Differential Revision: https://phabricator.services.mozilla.com/D13686

--HG--
extra : moz-landing-system : lando
2018-12-05 18:44:03 +00:00
Ciure Andrei ed617be144 Backed out 2 changesets (bug 1512052)for causing build bustages CLOSED TREE
Backed out changeset 4773a3f46c22 (bug 1512052)
Backed out changeset 2f48c5afbe57 (bug 1512052)

--HG--
rename : browser/components/attribution/test/xpcshell/.eslintrc.js => browser/components/attribution/test/.eslintrc.js
2018-12-05 05:47:39 +02:00
Mark Banner 8256078237 Bug 1512052 - Add more .eslintrc.js files for test directories. r=mossop
Depends on D13745

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

--HG--
extra : moz-landing-system : lando
2018-12-04 22:27:35 +00:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Emilio Cobos Álvarez 9670d54612 Bug 1509718 - Get rid of mBorderWidthTable. r=jwatt
It has little to no use these days.

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

--HG--
extra : moz-landing-system : lando
2018-11-27 19:52:13 +00:00
Cosmin Sabou 0afa5aa670 Backed out 2 changesets (bug 1508472) for causing build bustages on JobScheduler_posix.cpp. CLOSED TREE
Backed out changeset af951294cf96 (bug 1508472)
Backed out changeset 2320933cb7bc (bug 1508472)
2018-11-28 00:08:11 +02:00
Sylvestre Ledru 9ea4a3d5c0 Bug 1508472 - Part 3: Third batch of comment fix-ups in preparation for the tree reformat (layout/) r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D13125

--HG--
extra : moz-landing-system : lando
2018-11-27 21:39:24 +00:00
Jonathan Watt 4c1b207664 Bug 1510116. Fix some unified build issues in layout code. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D13039

--HG--
extra : rebase_source : f0b6516484ed97ed52b92e04617f89e4ee8189ff
2018-11-12 22:20:52 +00:00
Kristen Wright f22175b197 Bug 1460439 - Conversion from NS_STYLE_BORDER_STYLE_* macro to StyleBorderStyle::* enum class r=emilio
Converted NS_STYLE_BORDER_STYLE_* consts to enum class. Updated corresponding values to enum class. reduced BCCornerInfo struct values to fit StyleBorderStyle values inside struct. Added defaults to switches that do not fully cover all instances of StyleBorderStyle.
2018-11-07 11:56:17 -08:00
Jeff Muizelaar eb4806b6a3 Bug 1507021. Add a SnappedClip function to gfxContext. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D11839
2018-11-20 08:56:35 -05:00
Andreea Pavel 6a58f5fcea Backed out 2 changesets (bug 1507021) for android build bustages on a CLOSED TREE
Backed out changeset 026f135a667f (bug 1507021)
Backed out changeset 1b87eb56e462 (bug 1507021)

--HG--
extra : amend_source : 4d51378a27f24f3d87d9b7a206c78ff962e3b663
2018-11-15 06:35:54 +02:00
Jeff Muizelaar 9ad890c762 Bug 1507021. Add a SnappedClip function to gfxContext. r=mattwoodrow
Depends on D11840

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

--HG--
extra : moz-landing-system : lando
2018-11-14 22:47:10 +00:00
Emilio Cobos Álvarez e39bf77494 Bug 1492567 - Back out bug 1481866. r=dbaron
Summary:
The behavior the WG proposed is way more subtle than what that bug implements,
including:

 * Implementing two logical overflow longhands.
 * Expanding the overflow shorthand to different longhands depending on the
   syntax of that.

Meanwhile, Blink hasn't done the swap and will ship the same behavior that we
shipped in Firefox 61 (bug 1453148), that is, overflow-x, then overflow-y.

So I think lacking a clear way forward we should revert this change and preserve
our shipped behavior.

Reviewers: dbaron!

Tags: #secure-revision

Bug #: 1492567

Differential Revision: https://phabricator.services.mozilla.com/D6317
2018-09-20 01:27:55 +02:00
Margareta Eliza Balazs fdb780335d Merge inbound to mozilla-central. a=merge 2018-09-18 17:33:09 +03:00
Jonathan Kew ec73ee3318 Bug 1491860 - Use utf-8 rather than utf-16 strings to read/store font family names from preferences, as they're almost entirely ASCII. r=lsalzman 2018-09-18 09:34:24 +01:00
Jonathan Kew 0d4dbd1e37 Bug 1490997 - Use nsAtom instead of nsString for font family name in the FontFamilyName struct, and switch its methods from 16-bit to 8-bit strings. r=lsalzman 2018-09-18 09:34:21 +01:00
Jean-Luc Bonnafoux 31f0693d4a Bug 1491639 - rename function IS_TABLE_CELL r=dbaron
rename function IS_TABLE_CELL

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

--HG--
extra : moz-landing-system : lando
2018-09-18 01:29:19 +00:00
Zhang Junzhi e081858ecc Bug 1490611 - physical to logical name refactor: DISPLAY_*_WIDTH to DISPLAY_*_INLINE_SIZE(as well as the relevant struct in the macro contents) r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D5657

--HG--
extra : moz-landing-system : lando
2018-09-12 12:35:47 +00:00
Gerald Squelart b099eab802 Bug 1488684 - Made nsIFrame-derived classes and some others 'final' where possible - r=dbaron
All classes deriving from nsIFrame that did not have any subclasses themselves
(at the time of writing this patch) have been marked with `final`.
Some other Layout classes have also been made final, but this was opportunistic
while working on nsIFrame subclasses, and is definitely not exhaustive, further
patches welcome; refer to bug 1332680.

Advantages of marking a class final include:
- Allowing the compiler to devirtualize some method calls (i.e., calling
  virtual functions directly instead of going through the vtable),
- Indicating that the class is not currently subclassed,
- Preventing subclassing without being aware that this would remove the
  finalization benefits of the parent class.
`final` does not signify that these classes should *never* be subclassed, this
is left for developers to decide.

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

--HG--
extra : moz-landing-system : lando
2018-09-06 01:23:14 +00:00
Daniel Holbert 0878eb4d7e Bug 1483394: Remove unneeded #includes of nsContentUtils.h in /layout. r=TYLin
For each file touched in this patch, the file had an #include for nsContentUtils.h, but no other mentions of the string "nsContentUtils", nor any mention of its "ScriptBlocker"-related types. So these files likely don't need their nsContentUtils.h include anymore, and we can remove it to get a marginal win on build time/complexity.

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

--HG--
extra : moz-landing-system : lando
2018-08-15 07:04:43 +00:00
L. David Baron 09f62c0e05 Bug 1481866: Swap order of values in 'overflow' shorthand property. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D3069

--HG--
extra : moz-landing-system : lando
2018-08-10 02:20:53 +00:00
Csoregi Natalia 0f4d50ff52 Merge inbound to mozilla-central. a=merge 2018-08-08 12:58:36 +03:00
Xidorn Quan 346661e6fd Bug 1481125 - Put overflow: -moz-scrollbar-* behind pref. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D2845

--HG--
extra : moz-landing-system : lando
2018-08-07 13:57:45 +00:00
L. David Baron aad8d26078 Bug 1479859 patch 3 - Add an nsIFrame::IsFrameOfType bit to say whether frames support contain:layout and contain:paint. r=dholbert
This is needed for patch 4.

This is based both on the wording in the spec and the discussion in
https://github.com/w3c/csswg-drafts/issues/2987, and also doesn't
support them for nsMathMLContainerFrame, which is similar to inlines and
ruby.

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

--HG--
extra : rebase_source : b7e23fb248fa34957ca2d539134e872f5a03f5a8
2018-08-07 15:02:07 -07:00
Boris Zbarsky 754087a992 Bug 1446940 part 5. Stop getting docshells from windows via getInterface in dom/editor/etc code. r=kmag 2018-08-01 13:07:11 -04:00
Jeff Gilbert 5b753da289 Bug 1470325 - s/FooBinding/Foo_Binding/g - r=qdot
MozReview-Commit-ID: JtTcLL5OPF0
2018-06-26 17:05:01 -07:00
Chris Peterson 2afd829d0f Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj
This patch is an automatic replacement of s/NS_NOTREACHED/MOZ_ASSERT_UNREACHABLE/. Reindenting long lines and whitespace fixups follow in patch 6b.

MozReview-Commit-ID: 5UQVHElSpCr

--HG--
extra : rebase_source : 4c1b2fc32b269342f07639266b64941e2270e9c4
extra : source : 907543f6eae716f23a6de52b1ffb1c82908d158a
2018-06-17 22:43:11 -07:00
Emilio Cobos Álvarez 88831b3bc5 Bug 1470163: Move test_disabled to an iframe. r=heycam
MozReview-Commit-ID: Ks4bEVNxs82
2018-06-25 10:55:57 +02:00
Andi-Bogdan Postelnicu 41c873c7c1 Bug 1453795 - Layout/MatchML - Initialize member fields in classes/ structures. r=karlt 2018-06-14 08:54:18 +03:00
Jeff Walden 799a518e22 Bug 745089 - Replace nscoord-specific positive-infinity/is-nan primitives with FloatingPoint.h uses. r=dbaron
--HG--
extra : rebase_source : bcc17dc96be6449116cf26c772a020d3eddd2bd3
2018-06-06 16:03:48 -07:00
Cameron McCormack 3cd117ed4f Bug 1466448 - Part 2: Remove unused ReflowOutput::mFlags. r=mats
--HG--
extra : rebase_source : 41f141ad1f9830c45a4a11cab825ea3d956051ea
2018-06-04 16:22:10 +10:00
Cameron McCormack 51296f8f27 Bug 1466448 - Part 1: Remove unused NS_REFLOW_CALC_BOUNDING_METRICS flag. r=jfkthame
--HG--
extra : rebase_source : 1b870acd70ff8a7334a1184635718493bd3303d2
2018-06-04 16:14:09 +10:00
Emilio Cobos Álvarez fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Matt Woodrow 0d65266918 Bug 1460491 - Part 1: Split nsDisplayItem::mVisibleRect into two members, one for each stated purpose. Gets rid of the save/restore since we no longer modify the building rect. r=jnicol
MozReview-Commit-ID: 5wcsSoZRN44

--HG--
extra : rebase_source : 1bf7d655b048a972e392514542aee171e20afe82
2018-05-16 15:56:32 +12:00
Jonathan Kew 288d62fe84 Bug 1427660 - patch 1 - Make gfxTextRange::MatchType an enum class for stronger type checking (no functional change). r=lsalzman 2018-05-11 08:56:12 +01:00
Chris Peterson 71422dcaa9 Bug 1457813 - Part 2: Replace non-asserting NS_PRECONDITIONs with MOZ_ASSERTs. r=froydnj
s/NS_PRECONDITION/MOZ_ASSERT/ and reindent

MozReview-Commit-ID: KuUsnVe2h8L

--HG--
extra : source : c14655ab3df2c9b1465dd8102b9d25683359a37b
2018-04-28 12:50:58 -07:00
Jonathan Watt 156c4af1ec Bug 1436048: Use user defined types for font-stretch / font-style. r=jfkthame,jwatt
Co-authored-by: Emilio Cobos Álvarez <emilio@crisal.io>

MozReview-Commit-ID: 7ONYtICeAqb
2018-04-23 18:22:05 +02:00
Boris Zbarsky 2b6097ae6d Bug 1455055 part 1. Convert nsIDOMEventListener to taking an Event, not an nsIDOMEvent. r=masayuki
This does no cleanup other than what's needed to compile.  Cleanup coming up in
later patches.

MozReview-Commit-ID: 3sOnkj71n09
2018-04-20 00:49:29 -04:00
Kris Maglione 219ed0cc06 Bug 1454813: Part 2b - Rename SpawnTask.js to AddTask.js. r=florian
The old name no longer makes sense, since it no longer exports an spawn_task
symbol, and add_task is what we really care about.

MozReview-Commit-ID: IE7B8Czv8DH

--HG--
rename : testing/mochitest/tests/SimpleTest/SpawnTask.js => testing/mochitest/tests/SimpleTest/AddTask.js
extra : rebase_source : 03bca5aa69a7625a49b4455a6c96ce4c59de3a5a
2018-04-18 11:43:45 -07:00
Jeff Walden 821db93ccc Bug 1453456 - Replace nsCRT::IsAscii{Alpha,Digit} with mfbt/TextUtils.h versions. r=froydnj
--HG--
extra : rebase_source : b31986c0e6828be79442cfb0cf369eb80c232139
2018-04-12 20:19:30 -07:00
Sebastian Hengst 0819f35e51 Backed out 4 changesets (bug 525063) on request from Andi. a=backout
Backed out changeset 516c4fb1e4b8 (bug 525063)
Backed out changeset 6ff8aaef2866 (bug 525063)
Backed out changeset bf13e4103150 (bug 525063)
Backed out changeset d7d2f08e051c (bug 525063)
2018-04-13 16:01:28 +03:00
Tristan Bourvon a3a77c0312 Bug 525063 - Initialize uninitialized class attributes in m-c. r=ehsan 2018-04-10 21:11:02 +02:00
Emilio Cobos Álvarez f39eaa5d48 Bug 1452080: Remove ComputedStyle::PresContext usage from layout and canvas code. r=xidorn
Couldn't find an easy way of splitting these up :(

MozReview-Commit-ID: 2kTZ5McREUT
2018-04-09 11:19:49 +02:00
Noemi Erli 5d9588e156 Backed out 3 changesets (bug 1452080) for bustage in /builds/worker/workspace/build/src/layout/base/nsCSSFrameConstructor.cpp on a CLOSED TREE
Backed out changeset 7f5104c7a242 (bug 1452080)
Backed out changeset 806a9c95a243 (bug 1452080)
Backed out changeset bffebe8aa254 (bug 1452080)
2018-04-09 11:18:12 +03:00
Emilio Cobos Álvarez 2a427429ff Bug 1452080: Remove ComputedStyle::PresContext usage from layout and canvas code. r=xidorn
Couldn't find an easy way of splitting these up :(

MozReview-Commit-ID: 2kTZ5McREUT
2018-04-09 09:57:55 +02:00
Emilio Cobos Álvarez e128bf7b1a Bug 1447827: Remove ServoRestyleManager. r=xidorn
MozReview-Commit-ID: CFafQsb4rQn
2018-04-07 15:50:06 +02:00
Xidorn Quan 4cf9aed667 Bug 1449400 part 5 - Remove StyleSetHandle. r=emilio
This patch basically does:
* remove StyleSetHandle and its corresponding files
* revisit #includes of related header files and change correspondingly
* change nsIPresShell::mStyleSet to be UniquePtr<ServoStyleSet>
* change the creating path of ServoStyleSet to pass UniquePtr
* change other mentions of StyleSetHandle to ServoStyleSet*
* remove AsServo() calls on ServoStyleSet

Some unfortunate bits:
* some methods of (Servo)StyleSet only accepts ServoStyleSheet while
  many places call into the methods with StyleSheet, so there are many
  ->AsServo() added to sheets

MozReview-Commit-ID: K4zYnuhOurA

--HG--
extra : rebase_source : 459e8efeb171adad089d94272e143e8c244bd279
extra : source : 65ba2f174fcf7dba4e59c00ee8908b1bd0820a48
2018-03-29 22:15:46 +11:00
Xidorn Quan d72e78d526 Bug 1448535 part 1 - Make nsMathMLmtdInnerFrame use UniquePtr for its StyleText. r=dholbert
MozReview-Commit-ID: 6tuA3JC1FDV

--HG--
extra : rebase_source : 363ba54fa953abd7708a451524500e2270ffecb1
extra : source : e910fff5e10cc12854936d91585ce4a5b73fde90
2018-03-29 03:45:18 +11:00
Jonathan Watt 82ebebe276 Bug 1448714 - Fix up comments referring to 'style context' after the rename of nsStyleContext. r=emilio 2018-03-23 13:49:21 +00:00
Jonathan Watt 384c345f21 Bug 1448294 - Clean up naming of 'styleContext' variables after the big nsStyleContext rename. r=emilio
Reviewers: emilio

Bug #: 1448294

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

MozReview-Commit-ID: KJq2i9nrg7y
2018-03-25 20:49:58 +02:00
Narcis Beleuzu 47581f78e2 Backed out 2 changesets (bug 1448294, bug 1448337) for wpt and reftest failures on /mathml
Backed out changeset 180051cfe357 (bug 1448294)
Backed out changeset c188176f3289 (bug 1448337)
2018-03-25 21:31:08 +03:00
Jonathan Watt 21bff4e120 Summary: Bug 1448294 - Clean up naming of 'styleContext' variables after the big nsStyleContext rename. r=emilio
Reviewers: emilio

Bug #: 1448294

Differential Revision: https://phabricator.services.mozilla.com/D796
2018-03-22 13:49:21 +00:00
Emilio Cobos Álvarez e341b20ec4 Bug 1447483: Merge nsStyleContext and ServoStyleContext, rename to ComputedStyle. r=jwatt on a CLOSED TREE
MozReview-Commit-ID: JPopq0LudD
2018-03-22 20:06:24 +01:00
Emilio Cobos Álvarez 5dd797f154 Back out changeset b683bb3f22a1 (Bug 1447483) for not landing with all the files. r=me on a CLOSED TREE
This reverts commit 1808914126bb9f9e4a82d2c3d7ac961885fe7d62.

MozReview-Commit-ID: 5skESBseEvo
2018-03-22 20:05:22 +01:00
Emilio Cobos Álvarez ca5ac79cca Bug 1447483: Merge nsStyleContext and ServoStyleContext, rename to ComputedStyle. r=jwatt
MozReview-Commit-ID: JPopq0LudD
2018-03-22 19:48:42 +01:00
Emilio Cobos Álvarez f7522ae728 Bug 1447358: Unifdef the old style system code. r=jwatt
Summary:
This has been automatically generated using:

  http://dotat.at/prog/unifdef/

And:

find $OBJDIR -type f -name '*.h' |
while read FILE; do
  echo "$FILE"
  unifdef -m -DMOZ_STYLO -UMOZ_OLD_STYLE "$FILE";
done

find $OBJDIR -type f -name '*.cpp' |
while read FILE; do
  echo "$FILE"
  unifdef -m -DMOZ_STYLO -UMOZ_OLD_STYLE "$FILE";
done

MozReview-Commit-ID: I4NdKqbMXzJ

Reviewers: jwatt

Bug #: 1447358

Differential Revision: https://phabricator.services.mozilla.com/D779
2018-03-21 10:20:34 +01:00
Sylvestre Ledru fa45a3c670 Bug 1443080 - Use the static call for static methods (not instance) r=Ehsan
MozReview-Commit-ID: JwHh4bzxuTR

--HG--
extra : rebase_source : 5f5e37517aa80c2e7b5933962178d761074886e7
2018-03-16 14:29:15 +01:00
Coroiu Cristina 0f6841e0d2 Backed out 2 changesets (bug 1443080) for spidermonkey build bustage at build/src/js/src/jit/BaselineCacheIRCompiler.cpp
Backed out changeset 7d509bb8a35d (bug 1443080)
Backed out changeset 53bdcd5937cd (bug 1443080)

--HG--
extra : rebase_source : 59b5350d2959c0b065aedd34bfe8337216c0ea4b
2018-03-14 11:13:21 +02:00
Sylvestre Ledru c07eb73986 Bug 1443080 - Use the static call for static methods (not instance) r=Ehsan
MozReview-Commit-ID: JwHh4bzxuTR

--HG--
extra : rebase_source : 17c91bfd7241e3e522b1413b6e544df74f5361a0
2018-03-05 13:43:54 +01:00
Chris Peterson 73675ec9f2 Bug 1443402 - Fix some -Wmissing-prototypes warnings in layout. r=dholbert
-Wmissing-prototypes is a new optional warning available in clang ToT. It warns about global functions that have no previous function declaration (e.g. from an #included header file). These functions can probably be made static (allowing the compiler to better optimize them) or they may be unused.

Confusingly, clang's -Wmissing-prototypes is equivalent to gcc's -Wmissing-declarations, not gcc's -Wmissing-prototypes. A function prototype is a function declaration that specifies the function's argument types. C++ requires that all function declarations specify their argument types, but C does not. As such, gcc's -Wmissing-prototypes is a C-only warning about C functions that have no previous function *prototypes* (with argument types), even if a previous function *declaration* (without argument types) was seen.

MozReview-Commit-ID: FGKVLzeQ2oK

--HG--
extra : rebase_source : 81e62163bf41a5d5dd87abf5397e6e8c62ed4096
extra : source : 653a9fc279e2f6a6d066474a94a70d65ac703d6b
2018-02-22 21:03:45 -08:00
Matt Woodrow 4183152e2d Bug 1436904 - Part 1: Add a static constructor function for display items. r=Bas 2018-02-13 13:43:28 +13:00
Dorel Luca bd05e3853c Backed out 3 changesets (bug 1436904) for many crashes see bugs: 1440281, 1440302, 1440303, 1440313. a=backout
Backed out changeset 27f0762d4472 (bug 1436904)
Backed out changeset 27640f52e188 (bug 1436904)
Backed out changeset 2b4d117c27dc (bug 1436904)
2018-02-22 17:28:59 +02:00
Matt Woodrow e485bba27f Bug 1436904 - Part 1: Add a static constructor function for display items. r=Bas 2018-02-13 13:43:28 +13:00
Boris Zbarsky 3660ff5632 Bug 1436508 part 13. Remove nsIDOMMutationEvent constants. r=masayuki
MozReview-Commit-ID: Anl5QJZknJL
2018-02-09 11:17:10 -05:00
Cameron McCormack d02e54b79b Bug 1430014 - Part 5: Stop building old style system classes when MOZ_OLD_STYLE is not defined. r=xidorn
MozReview-Commit-ID: CIHyPdF7Exl

--HG--
extra : source : 78a2fc781eead47af3923efcde58569c5d882ab1
2018-02-01 15:04:04 +11:00
Kris Maglione 918ed6c474 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
extra : intermediate-source : 34c999fa006bffe8705cf50c54708aa21a962e62
extra : histedit_source : b2be2c5e5d226e6c347312456a6ae339c1e634b0
2018-01-29 15:20:18 -08:00
Cosmin Sabou 9a65a40178 Backed out 3 changesets (bug 1431533) for Android mochitest failures on testEventDispatcher on a CLOSED TREE
Backed out changeset a1eca62826a1 (bug 1431533)
Backed out changeset 34c999fa006b (bug 1431533)
Backed out changeset e2674287e57f (bug 1431533)
2018-01-30 07:17:48 +02:00
Kris Maglione 6476f95b13 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
2018-01-29 15:20:18 -08:00
Brindusan Cristian af8879d1eb Backed out 2 changesets (bug 1431533) for ESlint failures on a CLOSED TREE
Backed out changeset 6e56f4c8843e (bug 1431533)
Backed out changeset 12fc4dee861c (bug 1431533)
2018-01-30 02:32:43 +02:00
Kris Maglione c276bb9375 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : rebase_source : c004a023389f1f6bf3d2f3efe93c13d423b23ccd
2018-01-29 15:20:18 -08:00
Mats Palmgren 151539c1e0 Bug 1427221 part 1 - Do nsMathMLmfencedFrame cleanup in DestroyFrom, not in the dtor. r=mattwoodrow 2018-01-10 20:09:18 +01:00