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

987 Коммитов

Автор SHA1 Сообщение Дата
Cameron McCormack 99d9013b12 Bug 1482782 - Part 5: Move CSS anonymous box atoms to nsGkAtoms. r=njn,emilio
Summary: Depends On D3283

Reviewers: njn!, emilio!

Tags: #secure-revision

Bug #: 1482782

Differential Revision: https://phabricator.services.mozilla.com/D3284
2018-08-15 15:46:39 +10:00
Narcis Beleuzu d20e8e7674 Backed out 8 changesets (bug 1483121, bug 1482782) for build bustages on nsDirectoryService.cpp. CLOSED TREE
Backed out changeset 0a8334bbcf45 (bug 1483121)
Backed out changeset cb2dcb859071 (bug 1482782)
Backed out changeset c834d4ca2eef (bug 1482782)
Backed out changeset 887de0efbb67 (bug 1482782)
Backed out changeset 018fdb50a6be (bug 1482782)
Backed out changeset 33a8aa8096c9 (bug 1482782)
Backed out changeset e3632354f16e (bug 1482782)
Backed out changeset 46f8319bee82 (bug 1482782)
2018-08-15 09:14:41 +03:00
Cameron McCormack d9edae8bde Bug 1482782 - Part 5: Move CSS anonymous box atoms to nsGkAtoms. r=njn,emilio
Summary: Depends On D3283

Reviewers: njn!, emilio!

Tags: #secure-revision

Bug #: 1482782

Differential Revision: https://phabricator.services.mozilla.com/D3284
2018-08-15 15:46:39 +10:00
Xidorn Quan 33b8a6dacd Bug 1483090 - Rename StyleUserInterface to StyleUI. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D3276

--HG--
extra : moz-landing-system : lando
2018-08-14 08:37:37 +00:00
Emilio Cobos Álvarez 26b508d03c Bug 1478069: Trivial frame constructor cleanup. r=TYLin
Using references helps to see when stuff can and cannot be null.

I removed useless aTag / aNamespaceId arguments which are useless now that XBL
can't override them (bug 1450617), so FindXULData is the only one that keeps
them alive.

Also, I took the liberty of renaming a few fooComputedStyle variables to just
fooStyle, and clarify naming in some pseudo-element-related functions to say
originating element (the spec term) and avoid confusing it with the generated
_moz_generated_content_before / _moz_generated_content_after element.

Note that this is a partial state, more stuff will come in the future.

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

MozReview-Commit-ID: 39B30doREUH
2018-07-25 11:31:18 +02:00
Emilio Cobos Álvarez 0da3dae9c9 Bug 1472403: Simplify generated image content. r=bz,dholbert
This way we reuse the same machinery everywhere for the content property.

The only difference is that we need to look at the parent style for content
instead of just our style, and at a given index.

Again, this is fine because changing content reframes, so no chance to mess up.

This allows the generated content stuff to not implement nsImageLoadingContent
and all that stuff, nor deal with events, which makes it much simpler IMO.

Now it just tracks an index. We may not even need for it to be an HTML element,
but I've kept that for now.

I added a crashtest that used to crash because of the bogus
nsCSSFrameConstructor code which trusted the node name without checking it was
native anonymous.

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

MozReview-Commit-ID: 1pAzIvRRVnL
2018-07-16 18:06:38 +02:00
shindli ba72001f71 Backed out 2 changesets (bug 1473813, bug 1472403) for bustages in /builds/worker/workspace/build/src/dom/base/MessageSender.cpp:24:19 on a CLOSED TREE
Backed out changeset 93e4dff7e346 (bug 1473813)
Backed out changeset 365a0841117a (bug 1472403)
2018-07-16 18:45:33 +03:00
Emilio Cobos Álvarez 966f1a9206 Bug 1472403: Simplify generated image content. r=bz,dholbert
This way we reuse the same machinery everywhere for the content property.

The only difference is that we need to look at the parent style for content
instead of just our style, and at a given index.

Again, this is fine because changing content reframes, so no chance to mess up.

This allows the generated content stuff to not implement nsImageLoadingContent
and all that stuff, nor deal with events, which makes it much simpler IMO.

Now it just tracks an index. We may not even need for it to be an HTML element,
but I've kept that for now.

I added a crashtest that used to crash because of the bogus
nsCSSFrameConstructor code which trusted the node name without checking it was
native anonymous.

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

MozReview-Commit-ID: 1pAzIvRRVnL
2018-07-16 17:30:14 +02:00
Dan Glastonbury c9c954a337 Bug 1467622 - P1: nsStyleSVGPaint - Change nscolor to StyleComplexColor. r=xidorn
MozReview-Commit-ID: 1bbQzOoOuBe

--HG--
extra : rebase_source : 1631a71a78b0e6fbc4842ee14e11e946a5063afa
2018-06-27 17:07:37 +10:00
Brindusan Cristian 232d35f4b9 Backed out 5 changesets (bug 1467622) for reftest failures on layout/reftests/svg/smil/style/anim-css-fill-1-from-by-curcol-hex.svg. CLOSED TREE
Backed out changeset 8694fe928b04 (bug 1467622)
Backed out changeset 74533cad9479 (bug 1467622)
Backed out changeset e1dbee410e98 (bug 1467622)
Backed out changeset 56142038cc7f (bug 1467622)
Backed out changeset 90cede21bad1 (bug 1467622)
2018-07-11 09:37:26 +03:00
Dan Glastonbury 0a83cfb70f Bug 1467622 - P1: nsStyleSVGPaint - Change nscolor to StyleComplexColor. r=xidorn
MozReview-Commit-ID: 1bbQzOoOuBe

--HG--
extra : rebase_source : 879e7d644f1dc3873cdfb352fce21e3d085db55a
2018-06-27 17:07:37 +10:00
Cameron McCormack 8d5efb0c93 Bug 1473450 - Remove angle values from image-orientation. r=emilio
MozReview-Commit-ID: FB74ILJM6Fm

--HG--
extra : rebase_source : 0902aff63e0db070d2fdda3568453975f752b988
2018-07-05 12:04:58 +10:00
Andreea Pavel 721e84c658 Backed out changeset 641b02da5961 (bug 1473450) for failing xpchsell and mochitest on a CLOSED TREE 2018-07-10 09:28:59 +03:00
Cameron McCormack e2ce31efc1 Bug 1473450 - Remove angle values from image-orientation. r=emilio
MozReview-Commit-ID: FB74ILJM6Fm

--HG--
extra : rebase_source : 8c13a67086aedad73a642b5125bbb44f48068f5d
2018-07-05 12:04:58 +10:00
Emilio Cobos Álvarez 141a5774ca Bug 1473651: Track animated image status for generated content and content: url(). r=tnikkel
I thought of just moving the tracking to nsImageFrame instead of
nsImageLoadingContent entirely, though that would mean I need to handle it also
in nsImageBoxFrame and nsSVGImageFrame, which was even more duplicated code.

Ideas for testing this welcome, though all our animated image test-cases are
borked (all reftests in image/test/reftest/apng are disabled, and all the ones
for gifs that have animations as well).

I'll cross-ref this bug and bug 1473651 so that we can write a test for this
once that's fixed.

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

--HG--
extra : moz-landing-system : lando
2018-07-06 10:22:09 +00:00
Olli Pettay 34620de771 bug 1472427, <img usemap> should work in shadow DOM, r=baku 2018-07-04 20:26:09 +03:00
Emilio Cobos Álvarez 766cc497e9 Bug 215083: Account for subclasses in the next-in-flow assertion. r=me
MozReview-Commit-ID: 2E8Fm4Lxnf8
2018-06-30 04:42:22 +02:00
Emilio Cobos Álvarez c4900d4847 Bug 215083: Fix CreateContinuingFrame to account for non-nsImageLoadingContent image frames. r=heycam
MozReview-Commit-ID: CLx3siPe4Cx
2018-06-30 03:45:12 +02:00
Emilio Cobos Álvarez df24c5fda6 Bug 215083: Remove sync image request clone. r=tnikkel
MozReview-Commit-ID: 59bXcnxfJTC
2018-06-30 03:45:12 +02:00
Emilio Cobos Álvarez 6d73d28803 Bug 215083: Implement content: url(..) for elements. r=tnikkel,dholbert
Dynamic changes are handled correctly because content property changes already
cause a reframe.

This implements the same bits as Blink / WebKit do (single content item which is
an image, otherwise gets ignored), except for the edge cases where you use this
on an image.

In order to handle the edge cases right, we completely isolate the
nsImageLoadingContent usage based on `mKind`.

Blink's and WebKit's behavior there makes no sense and it's erratic, what I
implemented is consistent (we apply to images as long as they don't generate a
box, and we don't look at alt text or broken icons), though I'll update to
whatever the WG decides in https://github.com/w3c/csswg-drafts/issues/2831 /
https://github.com/w3c/csswg-drafts/issues/2832.

I don't think it matters in terms of web compat in any case.

MozReview-Commit-ID: JUurhC60hWr
2018-06-30 03:45:13 +02:00
Tiberius Oros 705b995848 Merge inbound to mozilla-central. a=merge 2018-06-28 01:07:30 +03:00
Emilio Cobos Álvarez 0004f1c6ae No bug - Remove some useless intermediate variables. r=me
MozReview-Commit-ID: LFGpL7JImwK
2018-06-27 11:50:13 +02:00
Emilio Cobos Álvarez 4e021661e1 Bug 1469000: Fix image to layout transform for invalidation. r=aosmond
When computing image to layout transforms for invalidation, use the actual
intrinsic size of the source image, instead of the layout intrinsic size, which
may be scaled by ResponsiveImageSelector since bug 1149357.

I have absolutely no idea how to write a test for this, suggestions welcome.

MozReview-Commit-ID: LP6C9fSvMi2

--HG--
extra : rebase_source : c7c7b70dff3ba1c7514fceb58d0bb6f26374c8a8
2018-06-19 17:51:53 +02:00
Valentin Gosu a8e3a8c349 Bug 1448330 - Make nsIURI.clone a private method r=mayhemer
MozReview-Commit-ID: 1efpeaEPaXP

--HG--
extra : rebase_source : e660f1e5bcae9b7119bc5b37713691069272b375
2018-06-14 13:05:43 +02:00
Dan Glastonbury 81d488f721 Bug 1465307 - P2: Fix nsStyleBorder::mBorderColor for GCC. r=xidorn
GCC doesn't like StyleComplexColor with constructor in an anonymous
struct in an anonymous union.  Replace the use of a union to access
`mBorder[..]Color` fields as an array with an accessor methods.

MozReview-Commit-ID: 1Wulh1qKYCZ

--HG--
extra : rebase_source : 390b8f852d144a54d9d374bcf3ae70ab6d145d50
2018-06-05 11:24:12 +10:00
Emilio Cobos Álvarez ea25d05826 Bug 1464363: Remove IMAGE_GOTINITIALREFLOW. r=dholbert
The methods where it's used don't run from reflow (they're image notifications
that run off runnables and such), so should be an idempotent change.

MozReview-Commit-ID: LdmSOcKDdw1

--HG--
extra : rebase_source : 273ed355a9bfb8aefdf92a85802a47ac39373d19
2018-05-25 12:23:06 +02:00
Emilio Cobos Álvarez 3aea548f0f Bug 1462272: Minor cleanup of nsImageListener's ctor / dtors. r=dholbert
MozReview-Commit-ID: BHipMKnFQvA
2018-05-25 12:09:56 +02:00
Emilio Cobos Álvarez ac48d4a2a8 Bug 1462272: Remove handling for an impossible condition. r=asuth
The frame is notified via its mListener, which is an observer of the
nsImageLoadingContent (mContent).

This last one only notifies for the current and pending requests, otherwise it's
a bug we need to fix there, not wallpaper here, since that'd mean that we forgot
to cancel the previous request. Added assertions to that effect.

Notify() is only called with the this object as a first argument from
imgRequestProxy, so it'd better be non-null, too.

MozReview-Commit-ID: DHaOLph2EAo
2018-05-25 12:09:23 +02:00
Emilio Cobos Álvarez 9520790e72 Bug 1462272: Remove an unneeded and ugly reinterpret_cast. r=dholbert
MozReview-Commit-ID: Evip43nwNii
2018-05-25 12:09:49 +02:00
Emilio Cobos Álvarez f981370133 Bug 1462272: Introduce nsImageFrame::GetCurrentRequest. r=dholbert
MozReview-Commit-ID: IXXtYClyY2z
2018-05-25 12:09:42 +02:00
Emilio Cobos Álvarez 6332002ac0 Bug 1462272: Remove a weirdly named variable, and call LoadIcons sooner. r=dholbert
So that the imageLoader code is all grouped together. LoadIcons should probably
be a static, and the change shouldn't have any observable behavior.

MozReview-Commit-ID: Anxe8c5OfLe
2018-05-25 12:09:35 +02:00
Emilio Cobos Álvarez f09824aad6 Bug 1149357: Properly update responsive images for density changes. r=dholbert
Before that we were not notifying the image frame in any way if we ended up not
doing a load, and we were instead relying on the reflow the viewport resize
caused to get the new density in ComputeSize from the content node (but nowhere
else, since that's the bug part 1 fixes).

This was generally unsound, since you can stash random media in a sizes=
attribute, which don't necessarily needs to cause a reflow.

Now we need to notify necessarily because nsImageFrame stores the adjusted
intrinsic size.

mCurrentDensity could also get out of sync as well, when the selected image
density changed, but we ended up returning early because our source hadn't
change in the first early exit.

This patch moves us to a model where we don't re-trigger loads for density
changes if the source doesn't change (unless we pass aAlwaysLoad when we need
to, per spec).

This matches our previous behavior (without the bugginess of not updating the
intrinsic size), and also Chromium, at least.

This changes behavior in one case, which is when we don't load the same source
node, but we have the same source URL, and the density does change. This could
happen with <picture> and two <source>s with same source and different media and
sizes. This makes our behavior consistent with the behavior we have when both
the source and the density doesn't change.

Blink and WebKit do trigger a second image load both when the source changes
without changing density and when density changes. I'll file a spec issue, since
per:

  https://html.spec.whatwg.org/#reacting-to-environment-changes

We should be triggering the load when the density changes but the source
doesn't as well, but no UA does that.

I filed https://github.com/whatwg/html/issues/3709 with a little summary of the
situation and what I think the behavior should be (which is what this patch
implements). That being said, I'll update the impl if the spec people think
otherwise :).

MozReview-Commit-ID: Eqy16ygHRLo
2018-05-25 12:09:30 +02:00
Emilio Cobos Álvarez 5d4df42dc7 Bug 1149357: Make nsImageFrame::mIntrinsicSize account for density. r=dholbert
Only doing it in ComputeSize (via GetNaturalSize) is unsound, and the rest of
the users of mIntrinsicSize definitely do need scaling accounted for.

Move the adjustment to nsImageFrame for two reasons:

 * Prevents adding more dependencies from nsIImageLoadingContent, which
   otherwise would need to go away anyway in bug 215083.

 * Avoids having to duplicate the image orientation logic, since mImage is
   already an OrientedImage if needed.

MozReview-Commit-ID: EA0n0TctZhN
2018-05-25 12:09:23 +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
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
Eugen Sawin 8bee753352 Bug 1458687 - [1.0] Remove obsolete isUserTriggered argument in nsContentUtils::TriggerLink. r=smaug 2018-05-03 16:05:34 +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
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
Emilio Cobos Álvarez bf0a6ad75c Bug 1449010: Some minor cleanup in selection-related code. r=matwoodrow
MozReview-Commit-ID: AAhHZmOBc3Z
2018-03-29 02:53:01 +02: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
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
Andreea Pavel de5c4376b8 Merge mozilla-inbound to mozilla-central. a=merge 2018-03-22 11:31:19 +02:00
Boris Zbarsky 29d232e53f Bug 1447098 part 1. Rename FromContent on various DOM classes to FromNode. r=mystor
MozReview-Commit-ID: 202nkbmkwfR
2018-03-21 17:39:04 -04:00
arthur.iakab 11989aa12a Merge mozilla-central to autoland 2018-03-22 02:00:17 +02:00
Ryan Hunt e34eeaaa86 Remove DisplayItemLayer and corresponding layers.advanced prefs. (bug 1439960, r=mstange)
MozReview-Commit-ID: FAWTC1Llu31

--HG--
extra : rebase_source : 05bda872389db5cc61e805c3eb48e70eb5d95cbe
2018-02-21 09:29:49 -06:00
Adrian Wielgosik 0138ac9ff0 Bug 1447121 - Clean up ShouldDisplaySelection, convert it to use Selection and nsRange. r=bz
MozReview-Commit-ID: Bo7zIkNLRMh

--HG--
extra : rebase_source : 200ca7847a758e60d1b1de77ab0c5c4acfe886ab
2018-03-18 20:01:09 +01:00