Commit Graph

69981 Commits

Author SHA1 Message Date
Frédéric Wang
926e8f6c74 Bug 1575167 - Export MathML mathcolor, mathbackground and displaystyle reftests to WPT. r=emilio
These are only file renaming, metadata/comments addition, changing the way
Ahem is included and other minor formatting changes. The MathML tests itself
are not modified.

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

--HG--
rename : layout/reftests/mathml/displaystyle-1-ref.html => testing/web-platform/tests/mathml/relations/css-styling/displaystyle-011-ref.html
rename : layout/reftests/mathml/displaystyle-1.html => testing/web-platform/tests/mathml/relations/css-styling/displaystyle-011.html
rename : layout/reftests/mathml/displaystyle-2-ref.html => testing/web-platform/tests/mathml/relations/css-styling/displaystyle-012-ref.html
rename : layout/reftests/mathml/displaystyle-2.html => testing/web-platform/tests/mathml/relations/css-styling/displaystyle-012.html
rename : layout/reftests/mathml/displaystyle-3-ref.html => testing/web-platform/tests/mathml/relations/css-styling/displaystyle-013-ref.html
rename : layout/reftests/mathml/displaystyle-3.html => testing/web-platform/tests/mathml/relations/css-styling/displaystyle-013.html
rename : layout/reftests/mathml/displaystyle-4-ref.html => testing/web-platform/tests/mathml/relations/css-styling/displaystyle-014-ref.html
rename : layout/reftests/mathml/math-display-ref.html => testing/web-platform/tests/mathml/relations/css-styling/displaystyle-015-ref.html
rename : layout/reftests/mathml/math-display.html => testing/web-platform/tests/mathml/relations/css-styling/displaystyle-015.html
rename : layout/reftests/mathml/mathbackground-1-ref.xml => testing/web-platform/tests/mathml/relations/css-styling/mathbackground-001-notref.html
rename : layout/reftests/mathml/mathbackground-2-ref.xml => testing/web-platform/tests/mathml/relations/css-styling/mathbackground-002-notref.html
rename : layout/reftests/mathml/mathbackground-3-ref.xml => testing/web-platform/tests/mathml/relations/css-styling/mathbackground-003-notref.html
rename : layout/reftests/mathml/mathbackground-4-ref.xml => testing/web-platform/tests/mathml/relations/css-styling/mathbackground-004-notref.html
rename : layout/reftests/mathml/mathcolor-1-ref.xml => testing/web-platform/tests/mathml/relations/css-styling/mathcolor-001-notref.html
rename : layout/reftests/mathml/mathcolor-2-ref.xml => testing/web-platform/tests/mathml/relations/css-styling/mathcolor-002-notref.html
rename : layout/reftests/mathml/mathcolor-3-ref.xml => testing/web-platform/tests/mathml/relations/css-styling/mathcolor-003-notref.html
rename : layout/reftests/mathml/mathcolor-4-ref.xml => testing/web-platform/tests/mathml/relations/css-styling/mathcolor-004-notref.html
extra : moz-landing-system : lando
2019-08-20 11:26:44 +00:00
Frédéric Wang
9374c0be36 Bug 1574391 - Move old MathML reftests into layout/reftests/mathml. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D42276

--HG--
rename : layout/reftests/bugs/345563-sub.xhtml => layout/reftests/mathml/345563-sub.xhtml
rename : layout/reftests/bugs/345563-sup.xhtml => layout/reftests/mathml/345563-sup.xhtml
rename : layout/reftests/bugs/347348-1-ref.xhtml => layout/reftests/mathml/347348-1-ref.xhtml
rename : layout/reftests/bugs/347348-1.xhtml => layout/reftests/mathml/347348-1.xhtml
rename : layout/reftests/bugs/347496-1-ref.xhtml => layout/reftests/mathml/347496-1-ref.xhtml
rename : layout/reftests/bugs/347496-1.xhtml => layout/reftests/mathml/347496-1.xhtml
rename : layout/reftests/bugs/355548-1-ref.xml => layout/reftests/mathml/355548-1-ref.xml
rename : layout/reftests/bugs/355548-1.xml => layout/reftests/mathml/355548-1.xml
rename : layout/reftests/bugs/355548-2-ref.xml => layout/reftests/mathml/355548-2-ref.xml
rename : layout/reftests/bugs/355548-2.xml => layout/reftests/mathml/355548-2.xml
rename : layout/reftests/bugs/355548-3-ref.xml => layout/reftests/mathml/355548-3-ref.xml
rename : layout/reftests/bugs/355548-3.xml => layout/reftests/mathml/355548-3.xml
rename : layout/reftests/bugs/355548-4-ref.xml => layout/reftests/mathml/355548-4-ref.xml
rename : layout/reftests/bugs/355548-4.xml => layout/reftests/mathml/355548-4.xml
rename : layout/reftests/bugs/355548-5-ref.xml => layout/reftests/mathml/355548-5-ref.xml
rename : layout/reftests/bugs/355548-5.xml => layout/reftests/mathml/355548-5.xml
rename : layout/reftests/bugs/370692-1-ref.xhtml => layout/reftests/mathml/370692-1-ref.xhtml
rename : layout/reftests/bugs/370692-1.xhtml => layout/reftests/mathml/370692-1.xhtml
rename : layout/reftests/bugs/373533-1.xhtml => layout/reftests/mathml/373533-1.xhtml
rename : layout/reftests/bugs/373533-2.xhtml => layout/reftests/mathml/373533-2.xhtml
rename : layout/reftests/bugs/373533-3.xhtml => layout/reftests/mathml/373533-3.xhtml
rename : layout/reftests/bugs/393760-1-ref.xml => layout/reftests/mathml/393760-1-ref.xml
rename : layout/reftests/bugs/393760-1.xml => layout/reftests/mathml/393760-1.xml
rename : layout/reftests/bugs/393760-2-ref.xml => layout/reftests/mathml/393760-2-ref.xml
rename : layout/reftests/bugs/393760-2.xml => layout/reftests/mathml/393760-2.xml
rename : layout/reftests/bugs/414123-ref.xhtml => layout/reftests/mathml/414123-ref.xhtml
rename : layout/reftests/bugs/414123.xhtml => layout/reftests/mathml/414123.xhtml
extra : moz-landing-system : lando
2019-08-20 04:13:25 +00:00
Nicolas Silva
043a970708 Bug 1562091 - Add a reftest. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D42467

--HG--
extra : moz-landing-system : lando
2019-08-19 11:16:34 +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
Emilio Cobos Álvarez
f1008a9300 Bug 1480146 - Add memory reporting for the inline style cache. r=heycam
MANUAL PUSH: Splitting a stack after the fact to avoid getting the main patch backed out due to talos timeouts.

Differential Revision: https://phabricator.services.mozilla.com/D41731
2019-08-19 14:55:01 +02:00
Emilio Cobos Álvarez
b726907ec7 Bug 1480146 - Add a cache for inline stylesheets without @import rules. r=heycam
Supporting @import was much more annoying (I had a patch but it became much more
complex than this), and seems other browsers don't do it either:

  https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/css/style_sheet_contents.cc?l=149&rcl=1999822baf4dc673088e65997fa07ad158f2e166
  https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/css/StyleSheetContents.cpp?rev=246490#L111

Also added a singleton perf test for <link> caching.

Maybe we should add some cache eviction here, but I'm not sure what'd be the
best policy here.

Differential Revision: https://phabricator.services.mozilla.com/D41564
2019-08-19 14:53:50 +02:00
Emilio Cobos Álvarez
bfcf9b881b Bug 1574544 - Remove now-unnecessary condition that makes the frame constructor get confused with editor anonymous nodes. r=mats
This condition was needed when FindInsertionPrevSibling and co didn't understand
display: contents.

Editor is pretty broken (and calls into PresShell::ContentRemoved directly, and
incorrectly, using anonymous nodes).

In this case we were taking the XBL path because of display: contents, which
means that we tried to seek to the editor anonymous node, and crash (since it's
not an explicit kid).

Editor needs to get fixed, but this is technically more correct and fixes the
crash, so we may as well take it in the interim.

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

--HG--
extra : moz-landing-system : lando
2019-08-19 12:16:28 +00:00
Ciure Andrei
bf0253640d Backed out 2 changesets (bug 1480146) for causing inline-style-cache-1.html timeouts CLOSED TREE
Backed out changeset 8e3a8dd3189d (bug 1480146)
Backed out changeset 2bcd5ea241cd (bug 1480146)
2019-08-19 14:29:28 +03: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
Masayuki Nakano
cf0604278c Bug 1564639 - Make BrowserParent use nsPresContext::GetRootWidget() when handling IME related messages r=hsivonen
When contents notify IME or requests something to IME, they need to use
an `nsIWidget` instance which may have focus if active, and handles
native keyboard/IME events since that knows correct native IME context.

Currently, such widget exactly matches with the result of
`nsPresContext::GetRootWidget()`.  However, this is unclear for most developers.
Therefore, this patch creates a wrapper method of it named
`nsPresContext::GetTextInputHandlingWidget()`.  Then, also adds
`BrowserParent::GetTextInputHandlingWidget()` wraps it.  Finally, makes
`IMEStateManager` call `GetTextInputHandlingWidget()` of them.

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

--HG--
extra : moz-landing-system : lando
2019-08-19 08:27:32 +00:00
Emilio Cobos Álvarez
bc820a05a2 Bug 1480146 - Add memory reporting for the inline style cache. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D41731

--HG--
extra : moz-landing-system : lando
2019-08-17 03:13:20 +00:00
Emilio Cobos Álvarez
957c241479 Bug 1480146 - Add a cache for inline stylesheets without @import rules. r=heycam
Supporting @import was much more annoying (I had a patch but it became much more
complex than this), and seems other browsers don't do it either:

  https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/css/style_sheet_contents.cc?l=149&rcl=1999822baf4dc673088e65997fa07ad158f2e166
  https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/css/StyleSheetContents.cpp?rev=246490#L111

Maybe we should add some cache eviction here, but I'm not sure what'd be the
best policy here.

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

--HG--
extra : moz-landing-system : lando
2019-08-19 07:52:09 +00:00
Ciure Andrei
7a76528da4 Backed out 2 changesets (bug 1533569) for causing Android and Win AArch raptors to perma fail and automation.py tier 2 perma fails CLOSED TREE
Backed out changeset 9c5be5540874 (bug 1533569)
Backed out changeset 06da212d37f5 (bug 1533569)
2019-08-17 07:40:54 +03:00
Mihai Alexandru Michis
891d20f850 Backed out 2 changesets (bug 1480146) for causing talos perf reftest to timeout in link-style-cache-1.html
Backed out changeset ff3ba7a16c21 (bug 1480146)
Backed out changeset f47314ec33ff (bug 1480146)
2019-08-17 04:48:35 +03:00
Cameron McCormack
810131e403 Bug 1533569 - Part 1: Freeze UA sheet shared memory. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D36254

--HG--
extra : moz-landing-system : lando
2019-08-16 23:45:20 +00:00
Charlie Marlow
c483e30486 Bug 1573922: Part 2: adding firefox specific reftests for skip-ink r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D42241

--HG--
extra : moz-landing-system : lando
2019-08-16 22:34:18 +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
Charlie Marlow
c762d7b259 Bug 1574392: fix for crash caused by a zero length textblob r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D42347

--HG--
extra : moz-landing-system : lando
2019-08-16 20:57:45 +00:00
Emilio Cobos Álvarez
ac2f80304e Bug 1568536 - Don't propagate viewport styles from display: none or display: contents elements. r=dholbert
Resolution is at:

 * https://github.com/w3c/csswg-drafts/issues/3779#issuecomment-481762912

Tests are at https://chromium-review.googlesource.com/c/chromium/src/+/1547974,
I'll make sure to wait until they're in the tree and ensure they're passing.

Note that we need to ensure in the frame constructor that the document element
is styled _before_ calling UpdateViewportScrollStylesOverride(). This saves
duplicated work (since ResolveStyleLazily throws away the style).

ResolveStyleLazily already returns out of date styles, unless the element is not
styled yet, or is in a `display: none` subtree, in which case it computes and
returns a new (up-to-date) style.

So the switch to the FFI call only should change behavior for the display: none
subtree case (since we ensure the unstyled case isn't hit by styling the
document earlier). But that case is one of the cases we're interested in
changing, conveniently.

Depends on D40080

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

--HG--
extra : moz-landing-system : lando
2019-08-16 11:43:36 +00:00
Emilio Cobos Álvarez
a03875ef63 Bug 1568536 - Simplify some style system APIs. r=heycam
Return a raw pointer instead of a strong reference to a ComputedStyle, and
handle the case of the style not being present by returning null rather than
requiring an extra function to check it and crashing if the precondition is not
met.

Also, name them so that it's clear they just return outdated styles and don't
make any extra effort.

This is just cleanup that makes the next patch easier / more obvious.

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

--HG--
extra : moz-landing-system : lando
2019-08-16 05:59:03 +00:00
Emilio Cobos Álvarez
479f277399 Bug 1480146 - Add memory reporting for the inline style cache. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D41731

--HG--
extra : moz-landing-system : lando
2019-08-16 10:56:25 +00:00
Emilio Cobos Álvarez
c24f17aee9 Bug 1480146 - Add a cache for inline stylesheets without @import rules. r=heycam
Supporting @import was much more annoying (I had a patch but it became much more
complex than this), and seems other browsers don't do it either:

  https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/css/style_sheet_contents.cc?l=149&rcl=1999822baf4dc673088e65997fa07ad158f2e166
  https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/css/StyleSheetContents.cpp?rev=246490#L111

Also added a singleton perf test for <link> caching.

Maybe we should add some cache eviction here, but I'm not sure what'd be the
best policy here.

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

--HG--
extra : moz-landing-system : lando
2019-08-16 10:56:23 +00:00
Emilio Cobos Álvarez
a61410f8ae Bug 1571530 - Remove sheets from the <link> cache when they have been touched by CSS OM. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D41563

--HG--
extra : moz-landing-system : lando
2019-08-16 10:56:22 +00:00
Emilio Cobos Álvarez
b9e6e577b3 Bug 1571530 - Move a bit of code around in Loader::LoadInlineSheet. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D41562

--HG--
extra : moz-landing-system : lando
2019-08-16 10:56:20 +00:00
Emilio Cobos Álvarez
86651be7e1 Bug 1571530 - Make PrepareSheet take a reference. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D41561

--HG--
extra : moz-landing-system : lando
2019-08-16 10:56:18 +00:00
Emilio Cobos Álvarez
919bb7ded3 Bug 1571530 - Cleanup slightly SheetComplete, and use the right boolean to notify. r=heycam
This is mostly straight-forward cleanup, but there's a behavior change which
was an oversight from bug 1386840, the regular mObservers stuff didn't pass the
right thing (was passing only mWasAlternate rather than whether it was
deferred).

I think that as a result, only in XML documents (since nsXMLContentSink is the
only thing that adds itself as a global CSS loader observer that ever looks at
this boolean), we may end up breaking this assert:

https://searchfox.org/mozilla-central/rev/9ae20497229225cb3fa729a787791f424ff8087b/dom/base/nsContentSink.cpp#183

(If there are any sheets with non-matching media queries and such).

But I couldn't find a test-case that broke it (tried SVG / XHTML), and in other
documents like pure XML you cannot specify a media query...

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

--HG--
extra : moz-landing-system : lando
2019-08-16 10:56:16 +00:00
Emilio Cobos Álvarez
36d3f1e1b9 Bug 1571530 - Cleanup confusing lifetime of SheetLoadData. r=heycam
Saving a refcount bump is not worth the churn. Use a proper RefPtr<>
everywhere instead of manual refcounting, and don't make DoSheetComplete call
NS_RELEASE unconditionally.

Also, make clear by using references where null is expected or not.

Also, properly use a RefPtr in mPendingDatas, since they are strong pointers,
in fact.

Finally, remove some unused macros from nsCSSValue of which this code was the
last consumer.

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

--HG--
extra : moz-landing-system : lando
2019-08-16 10:56:09 +00:00
Emilio Cobos Álvarez
588365a846 Bug 1571530 - Don't use nsBaseHashtable in the CSS loader. r=heycam
It's a refptr hashtable, really.

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

--HG--
extra : moz-landing-system : lando
2019-08-16 10:56:07 +00:00
Emilio Cobos Álvarez
6779b66f01 Bug 1571530 - Remove various bool arguments in sheet loader APIs. r=heycam
They're bad, specially if they do vastly different thing in overloaded
functions, like aUseSystemPrincipal and aIsPreload. :)

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

--HG--
extra : moz-landing-system : lando
2019-08-16 10:56:05 +00:00
Emilio Cobos Álvarez
2353359865 Bug 1571530 - Make Loader APIs return a Result. r=heycam
On the fence on this one, but I do think it's nicer.

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

--HG--
extra : moz-landing-system : lando
2019-08-16 10:56:03 +00:00
Emilio Cobos Álvarez
353176ffe4 Bug 1571530 - Move inline sheet creation somewhere else that isn't CreateSheet. r=heycam
It doesn't do much for them.

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

--HG--
extra : moz-landing-system : lando
2019-08-16 10:55:56 +00:00
Emilio Cobos Álvarez
70e10752be Bug 1571530 - Cleanup CreateSheet so that it returns its arguments rather than having outparams. r=heycam
Also, it's infallible, so no need to have an error state.

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

--HG--
extra : moz-landing-system : lando
2019-08-16 10:55:54 +00:00
Emilio Cobos Álvarez
6c780690be Bug 1571530 - Factor out the stylesheet cache bits. r=heycam
Just moving code around but hopefully the new code is nicer :)

Also fix a regression I introduced in D40691 where the parsing mode wouldn't be
checked for XUL sheets.

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

--HG--
extra : moz-landing-system : lando
2019-08-16 10:55:50 +00:00
Emilio Cobos Álvarez
b8a075dada Bug 1554777 - Use SIZE_AVAILABLE rather than loaded to figure out whether to try to draw a border image. r=tnikkel
The current code needs to handle incomplete draws already due to async decoding,
and this prevents the race condition where we paint between the size-available
and load notifications, as the CSS image loader only invalidates for the first.

Once we try to decode the image at least once, then we'd repaint properly from
ImageLoader::OnFrameComplete.

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

--HG--
extra : moz-landing-system : lando
2019-08-15 19:03:06 +00:00
Emilio Cobos Álvarez
4b2cd8f291 Bug 1554777 - Call SchedulePaint() rather than MarkNeedsDisplayItemRebuild() when we get the size available notification for a style image. r=mattwoodrow,tnikkel
So the issue here is that this test-case has a zero-sized border, but still with
a border-image (which we should paint).

So the first time we get here, the image is not loaded, and thus we don't get
here:

  https://searchfox.org/mozilla-central/rev/e0b0c38ee83f99d3cf868bad525ace4a395039f1/layout/painting/nsDisplayList.h#4254

Which means that we end up with zero bounds and thus we don't even get to the
border painting code.

However, when the image loads, we get to MarkNeedsDisplayItemRebuild(), but that
doesn't schedule any paint, only marks the frames as modified in order for
display items to be rebuilt _eventually_.

Thus eventually, where we force a repaint by other means, we paint correctly.

This only works in more general cases because we get to the nsImageRenderer code
which does vastly different stuff.

InvalidateFrame() seems to do the right thing and schedule a paint, so use it.
It's not clear to me which one of nsIFrame::InvalidateFrame() or
nsIFrame::SchedulePaint() we should use...

If I understand correctly, InvalidateFrame() will only do something iff there
are display items for the frame, so that should make the IsVisible() check
redundant.

Note however that I think there's still a race condition, if we get to paint in
between the SIZE_AVAILABLE notification (the one where we actually invalidate
the display items), and the LOAD notification (the one the border-image code
checks).

I'll send a separate patch for that, I think SIZE_AVAILABLE should be a
strong-enough hint and that allows us to remove nsStyleImage::IsLoaded()...

The RequestReflow stuff also looks highly suspicious... shape-outside
sync-decodes, and it seems we could end up invalidating reflow from the reflow
code...

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

--HG--
extra : moz-landing-system : lando
2019-08-15 19:03:18 +00:00
Emilio Cobos Álvarez
bb6b92b5f7 Bug 1574179 - Simplify <img align> rules in quirks.css. r=jfkthame
It seems to me that it should be equivalent, and we don't need to do
directionality-dependent stuff. align=right and align=left map to the physical
values anyway:

  https://searchfox.org/mozilla-central/rev/3366c3d24f1c3818df37ec0818833bf085e41a53/dom/html/nsGenericHTMLElement.cpp#1165

This also matches Chromium:

  https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/html/resources/quirks.css?l=26&rcl=e019448580f331c4c7c756271843d1bcf27e0071

(Modulo the case-insensitivity)

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

--HG--
extra : moz-landing-system : lando
2019-08-15 19:26:02 +00:00
Mats Palmgren
22f32f1001 Bug 1574107 - Remove nsIFrame::IsBlockInside since it's dead code. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D42088

--HG--
extra : moz-landing-system : lando
2019-08-16 06:29:59 +00:00
Mats Palmgren
1f1f009b71 Bug 1574060 - Implement layout for 'display: flow-root list-item'. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D42087

--HG--
extra : moz-landing-system : lando
2019-08-16 06:30:24 +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
Nicholas Nethercote
14e8c9129a Bug 1573720 - Convert layers.force-active to a static pref. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D41916

--HG--
extra : moz-landing-system : lando
2019-08-15 05:30:37 +00:00
Emilio Cobos Álvarez
d8298290d7 Bug 1574101 - Use the right parent frame for block ruby if it's out of flow. r=mats
I should've caught this when reviewing, in fairness.

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

--HG--
extra : moz-landing-system : lando
2019-08-15 22:21:35 +00:00
Daniel Holbert
0a772dbcbb Bug 1574310: clang-reformat the layout directory. (no review, just doing automated reformatting)
This patch is auto-generated by the following command:
./mach clang-format -p layout/

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

--HG--
extra : moz-landing-system : lando
2019-08-15 22:13:49 +00:00
Noemi Erli
7244716bb5 Backed out changeset 4d8eb840fc2e (bug 1574101) so it can reland without unrelated reformatting changes r=dholbert CLOSED TREE 2019-08-16 01:00:14 +03:00
Emilio Cobos Álvarez
ad39790be6 Bug 1574101 - Use the right parent frame for block ruby if it's out of flow. r=mats
I should've caught this when reviewing, in fairness.

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

--HG--
extra : moz-landing-system : lando
2019-08-15 21:14:34 +00:00
Hiroyuki Ikezoe
960b3694fd Bug 1573999 - Add fuzzy-if(Android) to css-ui-invalid/select/select-disabled-fieldset-2.html and remove fuzzy-if(Android) from css-ui-valid/select/select-disabled-fieldset-2.html. r=botond
The fuzzy-if added in bug 1508177 should have added to the test in
css-ui-invalid/ not the test in css-ui-valid/.

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

--HG--
extra : moz-landing-system : lando
2019-08-15 14:58:51 +00:00
Ting-Yu Lin
206960605d Bug 1569701 Part 2 - Use ColumnSetWrapper's effective computed content block-size to impose constraint for ColumnSet. r=dbaron
Run broken-column-rule-1.html with column-span enabled because it was
regressed by Bug 1548100 Part 2, but fixed by this patch.

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

--HG--
extra : moz-landing-system : lando
2019-08-15 16:59:13 +00:00
Ting-Yu Lin
0bc5f5330e Bug 1569701 Part 1 - Make BlockReflowInput::mConsumedBSize a constant, and delete it assessor method. r=dbaron
We always pass consumed block-size into BlockReflowInput's constructor
in nsBlockFrame::Reflow(). By making mConsumedBSize a constant, its
assessor method becomes redundant.

Update the documentation to reflect the reality that ConsumedBSize()
accumulates content block-size from all previous *continuations*, which
was done in Bug 1506293 Part 2.

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

--HG--
extra : moz-landing-system : lando
2019-08-15 16:49:14 +00:00
Ting-Yu Lin
e4c1298151 Bug 1569701 Part 0 - Use nscoord instead of int for contentBEnd in nsColumnSetFrame::ReflowChildren(). r=dbaron
Differential Revision: https://phabricator.services.mozilla.com/D41905

--HG--
extra : moz-landing-system : lando
2019-08-14 23:17:06 +00:00
Emilio Cobos Álvarez
a27b5bf655 Bug 782551 - Remove two quirks that other browsers don't have. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D42148

--HG--
extra : moz-landing-system : lando
2019-08-15 15:57:42 +00:00