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

971 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez e45edf9ebc Bug 215083: Account for subclasses in the next-in-flow assertion. r=me a=fix-uplift
MozReview-Commit-ID: 2E8Fm4Lxnf8

--HG--
extra : source : c3983769db6d28b2af6f4f7d1dee2f4ed4aa887a
extra : amend_source : 94001c14b0f333814e099fc0a8c57d120bb6feaf
2018-06-30 04:40:31 +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
Jeff Muizelaar b0c6c75854 Bug 1439006. Allow multiple kinds of WebRenderUserData on a DisplayItem. r=mstange
Currently we can only have one type of WebRenderUserData on an Item. We already
have a hash table of WebRenderUserData so it's not hard to include type in the
hash to support one per type.

MozReview-Commit-ID: geJ0BeWv8b
2018-03-16 19:15:27 -04:00
Andrew Osmond fcec47e7bd Bug 1444387 - Part 1. Avoid using fallback if an image is not ready. r=jrmuizel
If an image container is empty, it will not produce an image key for use
with WebRender. This is generally not a sign of failure because the
producer likely has yet to populate the container with data. As such, we
should not immediately attempt to fallback. In fact, fallback can make
things worse in this situation, as we will create an image client to
send over the data, but then find that there is no data to share (or
find that there is, due to a race with the producer thread, and use
image clients when we could use shared surfaces).
2018-03-13 09:16:04 -04:00
Cosmin Sabou e997286c08 Backed out 3 changesets (bug 1439960) for build bustages on APZInputBridgeChild.cpp and FrameBuilder.cpp. CLOSED TREE
Backed out changeset b8057c06fc4c (bug 1439960)
Backed out changeset c8d6b0fa1447 (bug 1439960)
Backed out changeset e6bd6ebc8597 (bug 1439960)
2018-03-20 23:18:44 +02:00
Ryan Hunt 1fe1a843f9 Remove DisplayItemLayer and corresponding layers.advanced prefs. (bug 1439960, r=mstange)
MozReview-Commit-ID: FAWTC1Llu31

--HG--
extra : rebase_source : 447e835dc664549a8bdbd4097d42773acf523f08
extra : histedit_source : d98b0f0654c2214a368313de84f11160a3fa7030
2018-02-21 09:29:49 -06: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
Andrea Marchesini b8bb98af8c Bug 1430997 - Rename nsINode::IndexOf to nsINode::ComputeIndexOf, r=catalinb 2018-01-23 14:30:18 +01:00
Daniel Holbert a6a50738be Bug 1430312: Use StaticRefPtr instead of raw pointer for nsImageFrame::gIconLoad. r=tnikkel
MozReview-Commit-ID: HvkQEaZS1OG

--HG--
extra : rebase_source : 2a0da7c49741224c9c4fb8bcb9da3e17d957b253
2018-01-12 16:49:48 -08:00
Valentin Gosu 0203cc4abd Bug 1426501 - Change C++ code to use NS_MutateURI when changing URI r=mayhemer
MozReview-Commit-ID: 4VzZlhWrtSJ

--HG--
extra : rebase_source : 9c872dc14c8e5f03e6354ab76c8bf750a7e10260
2018-01-08 15:20:35 +01:00
Emilio Cobos Álvarez c8eb630ebe Bug 1423990: Move the last few attribute-related methods outside of nsIContent. r=bz
MozReview-Commit-ID: 8JZuS6O8f8W
2017-12-25 17:50:10 +01:00
Emilio Cobos Álvarez ffdf5d2cb5 Backout changeset e43f568b3e9a (bug 1423990) because some OSX-only code still doesn't build. r=me 2017-12-25 12:55:45 +01:00
Emilio Cobos Álvarez c0959b2955 Bug 1423990: Move the last few attribute-related methods outside of nsIContent. r=bz
MozReview-Commit-ID: 8JZuS6O8f8W

--HG--
extra : rebase_source : 09b82acb4f3d69e8a4345457ab217443bc28d6e2
2017-12-07 19:13:50 +01:00
Andrew Osmond 990c86e27e Bug 1423424 - Don't use empty image containers in image layers. r=tnikkel
Prior to bug 1368776, when no surface was obtained for the container, no
container was returned. Since we prefer an empty image container with
WebRender to avoid fallback, this was changed, but regressed
non-WebRender behaviour. Now on the non-WebRender path, we check if
there is anything in the container before accepting it.
2017-12-15 16:20:22 -06:00
Matt Woodrow 1571d5e823 Bug 1419021 - Part 1: Invalidate display items when we get a size for decoded images since this can change the display items we build. r=tnikkel
This breaks rendering when we try do a sync decode paint since we might not have created the nsDisplayImage/nsDisplayBackgroundImage yet (or cached the empty size) and so we never get to the actual paint call.
2017-12-14 17:37:56 -06:00
Miko Mynttinen 2fc0722497 Bug 1425078 - Remove nsDisplayList::AppendNewToTop and nsDisplayList::AppendNewToBottom r=mattwoodrow
MozReview-Commit-ID: E3neKT2sV4Q

--HG--
extra : rebase_source : 98b65e4c82f8a965df211e828bc68d46e7a6716e
2017-12-13 11:23:04 -06:00