Commit Graph
76 Commits
Author SHA1 Message Date
cku 0beb51be12 Bug 1361180 - Part 1. Return error DrawResult to the caller when the mask url can not be resolved. r=mstange
Precondition:
In an SVG doc, giving an invalid local-ref mask, e.g. mask="url"#foo"", and
clipState.mDirtyRectInDevPx be empty. e.g. apply mask onto a path object which
the size of area is zero(Please refers to the reftest in Part 2)
1. PaintStyleImageLayerWithSC early continue at [1], and the value of result is
still the initial value, DrawResult::SUCCESS.
2. The caller is not aware of that the  mask image was left unresolved since it get
DrawResult::SUCCESS from #1.

This patch fixed this problem by calling PrepareImageLayer before early return
for updating correct drawing result.

[1]
https://hg.mozilla.org/mozilla-central/file/ebf68ba9b098/layout/painting/nsCSSRendering.cpp#l2682

MozReview-Commit-ID: DjJ0Nni1gDl
2017-05-03 10:39:05 +08:00
Kartikaya Gupta 30355f64ab Merge m-c to graphics
MozReview-Commit-ID: DVUE3Wys3HV
2017-05-03 08:52:43 -04:00
Kartikaya Gupta bb8dee32df Bug 1360246 - Propagate the StackingContextHelper to the rest of the displaylist-building code. r=nical
This propagates the StackingContextHelper to the rest of the code that
builds WR display items, because we will need it in future patches to
stop using RelativeToParent.

MozReview-Commit-ID: 3PlQrJRhH36
2017-05-03 08:48:08 -04:00
Ethan Lin e78c57ff45 Bug 1360127 - If the background image doesn't have a image container, we shouldn't create a layer for it. r=mchang 2017-05-03 18:27:10 +08:00
Emilio Cobos Álvarez 643f3f8618 Bug 1361051: rename mozilla::FrameType to mozilla::LayoutFrameType. r=xidorn
This avoids conflicts with mozilla::dom::FrameType.

MozReview-Commit-ID: 7aEMbHRaTFk
2017-05-01 19:32:52 +02:00
Emilio Cobos Álvarez 3731858edf Bug 1360241: Devirtualize nsIFrame::GetType. r=heycam
MozReview-Commit-ID: 5Nzhyta5Hle
2017-04-30 17:30:08 +02:00
Wes Kocher 05341df9bd Merge autoland to central, a=merge
MozReview-Commit-ID: 2pgVZdnDKno
2017-04-27 12:44:03 -07:00
Ethan Lin c4d20e93ee Bug 1359360 - Handle draw result for webrender background image layer. r=mattwoodrow 2017-04-26 15:31:49 +08:00
Ethan Lin c3bd8aa1bc Bug 1351242 - Add webrender support for nsDisplayBackgroundImage image type. r=mchang 2017-04-07 14:53:16 +08:00
cku 222c45e4de Bug 1359844 - Ensure full decode be triggered after style-image was downloaded, r=mstange
In nsCSSRendering::PaintBorderWithStyleBorder:
DrawResult
nsCSSRendering::PaintBorderWithStyleBorder()
{
  if (aStyleBorder.IsBorderImageLoaded()) {
    (1)
  }

  (2)
}

At (1), we create a nsCSSBorderImageRenderer object. While creating it, we call
imgRenderer.PrepareImage() to ensure a full image decode at [1]. PrepareImage is
used in both bg-image/mask-image and border-image. The difference is, in
bg-image/mask-image painting path, we unconditionally use PrepareImage(in
nsCSSRendering::PrepareImageLayer), whereas in border-image painting path we
use it only after border-image was downloaded. This difference does cause a
problem. After border image was downloaded, the decoder will not do full decoding
since we did not ask for it, so there will be no repaint notification and no
chance to paint border-image again.

In this patch, I try to align the behavior between bg-image/mask-image and
border-image: always call nsImageRenderer::PrepareImage.

This is a generic fix for both stylo-enable and stylo-disable build. We do not
find this problem in reftest is because we use SYNC_DECODE in reftest harness, which
hides this race condition. When daily using firefox, if
nsCSSRendering::PaintBorderWithStyleBorder is called after border-image was
loaded, your program run into (1), border-image will be drawn correctly; In the
case that nsCSSRendering::PaintBorderWithStyleBorder is called before
border-image is loaded, your program run into (2), and you can only see
border-color.

[1]
https://hg.mozilla.org/mozilla-central/file/a6f35285bd1e/layout/painting/nsCSSRenderingBorders.cpp#l3598

MozReview-Commit-ID: 6pidHJdPG8I
2017-04-17 15:10:52 +08:00
Markus Stange e7ae3324d6 Bug 1352234 - Make nsImageRenderer.cpp and nsCSSRenderingGradients.h compile independent of build unification. r=rhunt
A few includes and namespace annotations are missing. And
nsImageRenderer.cpp is calling two functions that are static functions in
nsCSSRendering.cpp.

MozReview-Commit-ID: BLVPwpKB7On
2017-03-30 17:50:47 -04:00
Ryan Hunt 980bc886fe Bug 1341101 part 5 - Support building WR DisplayItems for BackgroundImageLayers that are gradients r=mattwoodrow
MozReview-Commit-ID: BNLT8Wbp672
2017-03-20 19:31:39 -04:00
Ryan Hunt 8f14654ec4 Bug 1341101 part 4 - Specify a nsRenderingContext for nsCSSRendering::PaintStyleImageLayer r=mattwoodrow
MozReview-Commit-ID: 5TX6IXLSC8r
2017-03-15 00:25:09 -04:00
Ryan Hunt a494b1eb3b Bug 1341101 part 1 - Move nsCSSRendering::PaintGradient into its own file r=jrmuizel
MozReview-Commit-ID: 1DyZ8TpcA3m
2017-03-14 01:05:41 -05:00
Mason Chang 923ba01e43 Bug 1350182 - Enable button border display items by default. r=ethlin 2017-03-27 13:09:55 -07:00
Emilio Cobos Álvarez 2200cacce9 Bug 1350401: Cleanup outline-painting-related logic. r=mats
MozReview-Commit-ID: ggDzDRrPIm
2017-03-24 19:38:15 +01:00
Mats Palmgren 4729a520a5 Bug 1333482 part 2 - [css-ui] Change all consumers of StyleDisplay::mAppearance to use the accessor UsedAppearance() instead, and make mAppearance/mMozAppearance private. r=dholbert
MozReview-Commit-ID: 8JwLsY1CLDJ
2017-03-23 22:11:18 -07:00
cku 5fb6d53b9e Bug 1349115 - Remove gfxPattern::CairoStatus r=mstange
This function is not a virtual function and always returns CAIRO_STATUS_SUCCESS
after the patch in bug 1054838 landed. There is no reason to keep it anymore.

MozReview-Commit-ID: EadrrFQyjfY
2017-03-21 14:32:22 +08:00
cku 14c0f9ceb9 Bug 1340044 - Part 2. Rename value in StyleGeometryBox. r=heycam
This change is to use gecko_enum_prefix in helpers.mako.rs, so that we do not
need to manually write code for nsStyleDisplay::mTransformBox.

MozReview-Commit-ID: 7UAL0iUcSIO
2017-03-16 15:18:10 +08:00
cku ef3fd1b084 Bug 1346265 - Part 1. Pass gfxContext to nsCSSRendering::PaintGradient. r=mstange
If mask-mode is luminace, we will create a temporary context at [1]. It's
obvious we do not use this gfxContext at all in PaintGradient path. This patch is
trying to fix this problem by pass gfxContext, instead of RenderingContext,
directly to PaintGraident.

[1] https://hg.mozilla.org/mozilla-central/file/991f5724e58f/layout/painting/nsCSSRendering.cpp#l5811
MozReview-Commit-ID: LLmg4k6IEm3
2017-03-13 12:26:21 +08:00
Kartikaya Gupta 7b5ea6384e Merge m-c to graphics
MozReview-Commit-ID: GpqewOAwje8
2017-03-13 13:13:37 -04:00
Carsten "Tomcat" Book 49ba5a00dc Backed out changeset a035c2b6ae72 (bug 1325940) 2017-03-13 11:38:36 +01:00
Gajanan e77aeeba6f Bug 1325940 part 2 - Converted NS_STYLE_BORDER_IMAGE_REPEAT_* to an enum class. r=xidorn
MozReview-Commit-ID: 4Y30dMHsFgj
2017-03-13 21:19:19 +11:00
Morris Tseng 77e5b9269c Bug 1341156 - Create nsCSSBorderImageRenderer. r=mattwoodrow
Basiclly refactor DrawBorderImage function for later re-use.

MozReview-Commit-ID: 9KIO6jp14M2
2017-03-13 11:46:04 +08:00
Morris Tseng 91189e6100 Bug 1341156 - Move nsImageRenderer to a separate file. r=mattwoodrow
MozReview-Commit-ID: EIEl3Jbtcsi
2017-03-13 11:46:04 +08:00
Mason Chang 23df5bcd3b Bug 1342281 - Convert inset box shadows to a WR display item. r=lsalzman 2017-02-23 20:01:58 -08:00
cku 1fe5506618 Bug 1342302 - Part 4. Fine tune nsCSSRendering::PaintStyleImageLayerWithSC. r=mstange
MozReview-Commit-ID: JB5S86tLvl6
2017-02-24 15:58:55 +08:00
cku 1f41d670f6 Bug 1342302 - Part 3. Rename ImageLayerClipState::mDirtyRectGfx to mDirtyRectInDevPx. r=mstange
MozReview-Commit-ID: 7YyQStU0Seq
2017-02-24 14:56:11 +08:00
cku 0bcc1d8ab2 Bug 1342302 - Part 2. Implement ImageLayerClipState::IsValid. r=mstange
MozReview-Commit-ID: 2Axr7buX1c4
2017-02-24 18:52:53 +08:00
cku e8110945e7 Bug 1342302 - Part 1. Implement RectCornerRadii::IsEmpty. r=mstange
MozReview-Commit-ID: JHaRg4rBHu8
2017-02-24 14:30:19 +08:00
Jonathan Watt 00d12b1b8c Bug 1345908 - Remove nsLayoutUtils::HasCSSBoxLayout. r=cjku 2017-02-07 21:11:53 +00:00
cku 5eaa69854a Bug 1341149 - Implement ImageLayerClipState::ctor. r=mstange
MozReview-Commit-ID: 7MPrjtgz6c7
2017-02-24 11:40:44 +08:00
Carsten "Tomcat" Book b156024e5f merge mozilla-inbound to mozilla-central a=merge 2017-02-24 11:46:38 +01:00
Wes Kocher 95ca6cd368 Merge m-c to inbound, a=merge
MozReview-Commit-ID: BYjLy4wkFjg
2017-02-23 16:57:34 -08:00
Mason Chang c54dd84910 Bug 1340317 - Support box shadow outer offset and spread radius in WebRender box shadows. r=lsalzman 2017-02-16 15:05:34 -08:00
Ethan Lin c3b73ba038 Bug 1340082 - Convert nsDisplayOutline to WebRenderDisplayItemLayer. r=mattwoodrow 2017-02-23 17:34:14 +08:00
Wes Kocher d2ae02e129 Merge m-c to autoland, a=merge
MozReview-Commit-ID: 2xWBiKMAozs
2017-02-23 16:59:01 -08:00
Mantaroh Yoshinaga cd4305cabc Bug 1338042 - Compute a missing width/height from the aspect ratio and the other dimension. r=longsonr+218550
MozReview-Commit-ID: 7mg0xzJWMQs
2017-02-23 17:03:35 +09:00
cku 0846dd2a0a Bug 1287492 - Part 1. Implement nsLayoutUtils::HasCSSBoxLayout. r=mstange
There is no direct relation between this patch and the bug. Read through the code
and think we may reuse some logic.
MozReview-Commit-ID: HGEvDNGoIBS
2017-02-08 20:15:28 +08:00
Sebastian Hengst b64ffd69f6 Bug 1336311 - Change code comments with http://hg.mozilla.org to https://. r=gps
For components also referencing it in code, see the blockers of bug 1336311.

MozReview-Commit-ID: 4tUZ24HKBWy
2017-02-07 17:52:56 +01:00
Jonathan Watt 8b4dac7b4f Bug 1058040, part 11 - Convert DrawImage/DrawImageInternal's SVGImageContext param from pointer to Maybe<>. r=dholbert 2017-01-11 01:48:29 +00:00
Markus Stange 200e9a0410 Bug 1298218 - Add the ability to know whether a background image is fixed before creating the display item. r=mattwoodrow
With the ActiveScrolledRoot changes, we will need to set up different state on
the display list builder prior to creating the nsDisplayBackgroundImage item.

MozReview-Commit-ID: CgeffVPccfj
2016-08-19 19:36:57 -04:00
cku d7db83145e Bug 1329411 - Correct wrong alpha value caused by the sixth patch in bug 1323912, and a test case. r=mstange
MozReview-Commit-ID: 8iSyUxQ1EnM
2017-01-09 10:41:42 +08:00
Ting-Yu Lin af47d31824 Bug 1320014 Part 12 - Convert NS_SIDE_IS_VERTICAL to a constexpr function. r=mats
MozReview-Commit-ID: GFdigJKppuR
2017-01-05 16:07:02 +08:00
Ting-Yu Lin 7d7ef90375 Bug 1320014 Part 7 - Convert half corner indices #define to an enum. r=mats
MozReview-Commit-ID: 8lNtjV14WTN
2017-01-05 11:31:38 +08:00
cku 260b27fad2 Bug 1323912 - Part 3. Pass opacity in gradient-mask painting path. r=mstange
MozReview-Commit-ID: E2RdOHGoia8
2017-01-04 01:05:05 +08:00
cku 45e5563bae Bug 1323912 - Part 2. Pass opacity down to imgIContainer::Draw. r=mstange
Each concrete class of imgIContainer is able to handle opacity already. All we
need to do is pass opacity value to them.

MozReview-Commit-ID: EMkLnG3YXA1
2017-01-03 13:53:22 +08:00
cku 12a995df35 Bug 1323912 - Part 1. Rename PaintBackground to PaintStyleImageLayer. r=mstange
MozReview-Commit-ID: GWuII34t0j7
2017-01-03 11:57:13 +08:00
Phil Ringnalda 659a7d8a80 Merge m-c to autoland 2017-01-04 19:01:49 -08:00
Iris Hsiao 2ded520eac Backed out changeset a44640701558 (bug 1323912) 2017-01-04 21:47:16 -05:00