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

177 Коммитов

Автор SHA1 Сообщение Дата
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
Jeff Muizelaar 5624b1e36e Bug 1507021. Use SnappedRectangle in more places. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D11840

--HG--
extra : moz-landing-system : lando
2018-11-19 23:03:32 +00: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
Jeff Muizelaar 1d2422df54 Bug 1507021. Use SnappedRectangle in more places. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D11840

--HG--
extra : moz-landing-system : lando
2018-11-14 22:47:35 +00:00
Emilio Cobos Álvarez 0cf08372ac Bug 1382896 - Align Gecko and WebRender code for 3d border colors. r=mstange
See the discussion in https://github.com/servo/webrender/issues/1280. I think we
should do this sooner rather than later.

Need to update a couple reftests to hardcode the new colors, waiting on try for
that but should be trivial.

This makes a few more tests pass which are just marked as failure in bug 1487407,
because I implementing the border-collapsing reusing a bunch of Gecko code,
including the table 3d border stuff.

Differential Revision: https://phabricator.services.mozilla.com/D6565
2018-09-26 15:28:01 +02:00
Emilio Cobos Álvarez 2afc706839 Bug 1487407 - Properly support beveling bc borders in WR. r=Gankro
The previous border-collapse beveling implementation assumed that there would
only be one beveled border per side in the whole table, which is... not true at all.

So a bunch of borders ended up clobbering other values in mBevelBorders and
never getting painted.

I'm actually somewhat scarily surprised that only this reftest seems to fail
without this patch...

Here we reuse most of the existing one-off beveling / border rendering support
in nsCSSRendering, and convert the Gecko bevels into a WebRender display list
using rects and borders. This is only remotely possible thanks to Gecko not
supporting dotted / dashed beveled borders :)

This would slightly easier and presumably also more efficient with a triangle
display item in WR instead of (ab)using the border display item to render the
bevel, but this is probably relatively edge-casey so maybe not worth it... In
any case I've left a TODO comment there, that can be a nice followup if we deem
it worth it.

Anyway, I'm _so_ sorry for the border trick, I was this (||) close to go and
rewrite our border collapsing code, but after a few tries I realized it'd take
me a whole lot of time (instead of the day that this has taken me).

Differential Revision: https://phabricator.services.mozilla.com/D4793
2018-09-26 15:27:59 +02:00
Andrew Osmond 29af4ed6a2 Bug 1446309 - Part 3. Properly handle ImgDrawResult for WebRender display list generation. r=tnikkel
When generating display lists for WebRender, we were not caching the
draw result via nsDisplayItemGenericImageGeometry::UpdateDrawResult (or
similar) after completing CreateWebRenderCommands. This is important
because reftests use this to force sync decoding for images; it may be a
reason for image-related intermittent failures on *-qr builds.

Additionally, we may have been requesting fallback in cases where fallback
could not do anything more than WebRender could. For example, if we can't
get an image container yet, there is no point in requesting fallback
because it might just be we haven't started decoding yet. We should just
return the actual draw result in such cases.
2018-09-13 19:48:27 -04:00
Miko Mynttinen b7eaedb6ea Bug 1484966 - Part 3: Clang format layout/painting/ r=mattwoodrow
Depends on D3870

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

--HG--
extra : moz-landing-system : lando
2018-09-04 20:46:21 +00:00
Csoregi Natalia 5984db0879 Backed out 2 changesets (bug 1484966) for bustage on RefPtr.h:42. CLOSED TREE
Backed out changeset 7b246c8f9de8 (bug 1484966)
Backed out changeset 399158a0a9b3 (bug 1484966)
2018-09-04 23:42:36 +03:00
Miko Mynttinen bb2d78e17e Bug 1484966 - Part 3: Clang format layout/painting/ r=mattwoodrow
Depends on D3870

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

--HG--
extra : moz-landing-system : lando
2018-09-04 17:21:36 +00:00
Miko Mynttinen 2f3ec8cc90 Bug 1484966 - Part 1: Fix most clang-tidy warnings for layout/painting/ r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D3869

--HG--
extra : moz-landing-system : lando
2018-09-04 17:19:36 +00:00
Andrew Osmond c4053ead28 Bug 1486962 - Ensure frame is associated with background images with WebRender. r=mstange
The frame for a background image should be associated with the image
request. This was done on the non-WebRender path in
nsCSSRendering::PaintStyleImageLayerWithSC but otherwise missing for the
WebRender path. This is important because the association is what allows
the FRAME_UPDATE from imagelib to cause a repaint. Without it, it will
manifest as incomplete or missing background images, in particular after
the background image SourceSurface has been released to save memory.
2018-08-30 18:19:59 -04:00
Xidorn Quan ee8b85324b Bug 1469741 part 1 - Apply scrollbar colors to background of some scrollbar parts when theme doesn't support them. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D3578

--HG--
extra : moz-landing-system : lando
2018-08-20 01:33:54 +00:00
Emilio Cobos Álvarez 517256e365 Bug 1478391: Autogenerate StyleAppearance. r=jwatt
This builds on bug 1428676 and introduces StyleAppearance, which replaces the
NS_THEME_* constants.

Really sorry for the size of the patch.

There's a non-trivial change in the gtk theme, which I submitted separately as
bug 1478385.

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

MozReview-Commit-ID: DiSmMWK7Krp
2018-07-26 17:06:17 +02:00
Olli Pettay 50136cf862 Bug 1472650 - nsCSSRendering::ShouldPaintBoxShadowInner should use GetComposedDoc, r=emilio
--HG--
extra : rebase_source : 2d484667820757943eae22543770409df27f0027
2018-07-03 17:57:11 +03:00
Chris Peterson 74dea2596b Bug 1469769 - Part 3: css: Replace failing NS_NOTREACHED with NS_ERROR. r=heycam
I'm replacing non-failing calls to NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE, but this SelectionManager assertion fails when running the Linux debug Web platform tests with e10s test-linux32/debug-web-platform-tests-reftests-e10s-6 W-e10s(Wr6). This assertion failure is bug 1221888.

Marionette  INFO    Testing http://web-platform.test:8000/css/CSS2/ui/outline-applies-to-005.xht == http://web-platform.test:8000/css/CSS2/reference/no-red-on-blank-page-ref.xht
###!!! ASSERTION: we should have saved a frame property: 'Error', file /builds/worker/workspace/build/src/layout/painting/nsCSSRendering.cpp, line 1038

This patch DOES NOT fix the cause of the assertion failure (a missing HyperTextAccessible). It just replaces this failing NS_NOTREACHED with NS_ERROR because I can't replace with a fatal MOZ_ASSERT_UNREACHABLE.

MozReview-Commit-ID: L26bu4agM6y

--HG--
extra : rebase_source : 9a4188719fe5069cfbec47ae5fae0632ae1d5ee8
extra : intermediate-source : 0a3f719dce16fa80d6ae1bb20a41570050847731
extra : source : aadc67658e679893808256f60c480efeed426bc1
2018-06-04 01:41:20 -07:00
Dan Glastonbury 334258d77f Bug 1467621 - P1: nsCSSShadowItem - Change nscolor to StyleComplexColor. r=xidorn
MozReview-Commit-ID: moE2CI7fT8

--HG--
extra : rebase_source : 7b64beccbd4c499d93567d62b913257dfa53c9fe
2018-06-19 14:18:33 +10:00
Andi-Bogdan Postelnicu 163724eccf Bug 1453795 - Layout/Painting - Initialize member fields in classes/ structures. r=stange
--HG--
extra : amend_source : 11dc03533fdbc3924f0145481733d46293d528e2
2018-06-15 19:13:05 +03: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
Dan Glastonbury 7811112058 Bug 1465307 - P1: Extend StyleComplexColor to support additive blending. r=hiro,xidorn
Refactored StyleComplexColor to support "complex" blending between
background (numeric) color and foreground color (currentColor).
Made explicit the distinction between numeric, currentColor and a
complex blend in Gecko and Stylo.

This is to support SMIL animation, for example, of the form:

     <animate from="rgb(10,20,30)" by="currentColor" ... />

MozReview-Commit-ID: IUAK8P07gtm

--HG--
extra : rebase_source : d3648101c6f65479b21e6f02945731cd5bb57663
2018-05-23 15:23:26 +10:00
Matt Woodrow 58713b3583 Bug 1462477 - Always initialize the value of aOutIsTransformedFixed, even we don't have an image to paint. r=mstange
This value is used to determine whether we should create nsDisplayFixedPosition, and if the result changes without an invalidation, then retained-dl gets confused with the insertion/removal of a wrap list.

MozReview-Commit-ID: JuXwCzKOxec

--HG--
extra : rebase_source : a62a2ce003eb57582c8a11bffb6c0cb766c6db15
2018-05-18 13:16:42 +12: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
Kristen Wright 031610cc8e Bug 1459367 - Convert NS_STYLE_IMAGELAYER_ATTACHMENT_* to enum class. r=manishearth
Converted NS_STYLE_IMAGELAYER_ATTATCHMENT_* vals to enum class, StyleImageLayerAttachment.
2018-05-08 15:05:33 -07:00
Dan Glastonbury ee3d63760a Bug 1457810: Move CalcComplexColor to StyleComplexColor. r=xidorn
Move from nsStyleColor::CalcComplexColor to StyleComplexColor::CalcColor.

MozReview-Commit-ID: FkYovvPZLc8

--HG--
extra : rebase_source : 54f1966e0ef9258f20e954cd6250774008eca04c
2018-05-09 17:03:02 +10: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
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
Ting-Yu Lin ext:(%2C%20Brad%20Werth%20%3Cbwerth%40mozilla.com%3E) cf9bd1c885 Bug 1404222 Part 3: Block onload when shape-outside images are requested for a frame, and keep it blocked until the frame is removed, the image fails to load, or reflow is complete. r=dbaron,dholbert
When we finish decoding an image frame, we need to trigger reflow for the
frame containing a float with shape-outside: <image>, and delay the firing
of the document's onload event until that reflow is complete.
2018-01-25 14:56:43 +08:00
Ryan VanderMeulen e5ec40f40c Backed out 11 changesets (bug 1404222) for static analysis failures on a CLOSED TREE.
Backed out changeset a6a99136300c (bug 1404222)
Backed out changeset 7183b8104399 (bug 1404222)
Backed out changeset a1e4294c1c59 (bug 1404222)
Backed out changeset b79d6e8318db (bug 1404222)
Backed out changeset 0450620fdabd (bug 1404222)
Backed out changeset 026c74a92d04 (bug 1404222)
Backed out changeset 50ac4167f702 (bug 1404222)
Backed out changeset 59038f2db68a (bug 1404222)
Backed out changeset f6b9096da915 (bug 1404222)
Backed out changeset 4e0baffdd79b (bug 1404222)
Backed out changeset 57eeb849ab88 (bug 1404222)
2018-04-02 17:57:27 -04:00
Ting-Yu Lin ext:(%2C%20Brad%20Werth%20%3Cbwerth%40mozilla.com%3E) fe87490f1a Bug 1404222 Part 3: Block onload when shape-outside images are requested for a frame, and keep it blocked until the frame is removed or reflow is complete. r=dbaron,dholbert
When we finish decoding an image frame, we need to trigger reflow for the
frame containing a float with shape-outside: <image>, and delay the firing
of the document's onload event until that reflow is complete.
2018-01-25 14:56:43 +08: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
Ryan Hunt aae4eeb5a2 Respect SYNC_DECODE when deciding to use Webrender for nsDisplayBackgroundImage. (bug 1439960, r=mstange)
Previously CreateWebrenderCommands would use GetLayerState to determine whether to use Webrender or
take the fallback path. GetLayerState would then under some cases call CanOptimizeToImageLayer()
which would get the image container using the appropriate flags for sync decoding.

Now nsDisplayBackgroundImage only uses CanCreateWebrenderCommands, which doesn't pass the correct
flags to image container, leading to reftest failures in some cases. This commit fixes that.

MozReview-Commit-ID: KlslXVHlRi5

--HG--
extra : rebase_source : aacb5fcae966cb9af8d8607e6c10e4c0822ea88d
2018-03-20 13:42:05 -05: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 5f40f9b2b1 Respect SYNC_DECODE when deciding to use Webrender for nsDisplayBackgroundImage. (bug 1439960, r=mstange)
Previously CreateWebrenderCommands would use GetLayerState to determine whether to use Webrender or
take the fallback path. GetLayerState would then under some cases call CanOptimizeToImageLayer()
which would get the image container using the appropriate flags for sync decoding.

Now nsDisplayBackgroundImage only uses CanCreateWebrenderCommands, which doesn't pass the correct
flags to image container, leading to reftest failures in some cases. This commit fixes that.

MozReview-Commit-ID: KlslXVHlRi5

--HG--
extra : rebase_source : e81ed40aab34bd48cbabb6e80f1529fc8b8ecc0e
extra : amend_source : 7a78ed9fa3076b3c9e5155a6e0908fcd2ab4a91b
extra : histedit_source : c4f1fb112bb19e7be5696eb31d88dbf3190139be
2018-03-20 13:42:05 -05:00
Emilio Cobos Álvarez 043503a6d4 Bug 1024082: Remove most of the nsIPresShell::FrameManager calls. r=dholbert
Most of them just want GetRootFrame(), and there's no need to explicitly go
through the frame manager for that, we have a handy alias in the shell.

MozReview-Commit-ID: GriEqkasidY
2018-03-07 10:17:49 +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
Daniel Holbert c27a38f524 Bug 1437625: Promote a few nsCSSRendering.cpp static functions into exposed static methods, since another .cpp file is already using them. r=mattwoodrow
In partiuclar: nsCSSRenderingBorders.cpp is already using IsBoxDecorationSlice
and BoxDecorationRectForBorder. This would be compile error, except that we
happen to unify the two .cpp files together.  This patch promotes these two
functions (along with a closely-related function, for consistency).

MozReview-Commit-ID: 4sWj5Rb9QSw

--HG--
extra : rebase_source : 542f0200a82121f13626c9c2d129fcb5c441ff45
2018-02-12 11:38:53 -08:00
L. David Baron 0394689130 Bug 1432341 - Draw column-rules with border-code in box-decoration-break: clone mode, rather than slice. r=mattwoodrow
This fixes the bug.  The underlying problem was that we were hitting the
case where ConstructBorderRenderer sets aNeedsClip to true, but nothing
in the column-rule drawing path was honoring that.

(Choosing clone rather than slice may make a difference for dotted and
dashed column-rules, but I think the clone behavior is preferable.)

MozReview-Commit-ID: 7YYzyxYjhsV

--HG--
extra : rebase_source : da488a54642d7900c2c36a9dc14e9f694b1ae244
2018-01-31 07:18:49 +00:00
Emilio Cobos Álvarez 7063cec276 Bug 1429723: Graphics cleanup. r=jrmuizel
MozReview-Commit-ID: LHo9K4lLtah
2018-01-22 18:14:19 +01:00
Xidorn Quan e2d3edd426 Bug 1325940 part 2 - Converted NS_STYLE_BORDER_IMAGE_REPEAT_* to an enum class. r=emilio
MozReview-Commit-ID: Kdzm5D8Dpv

--HG--
extra : rebase_source : 7c6ed8d2e777c7fa07b0486147c48bd98cc477a5
2017-12-21 16:16:40 +11:00
Samathy Barratt d8ba79a56b Bug 1351447 - Rename imagelib's DrawResult to ImgDrawResult r+tnikkel r=tnikkel
Renamed to imgDrawResult

MozReview-Commit-ID: 5ESSgIhhU41

--HG--
rename : image/DrawResult.h => image/ImgDrawResult.h
extra : rebase_source : dbf645574aff7eefe65fa81809d6c07cb5800ec6
2017-12-11 15:37:59 +00:00
Ciure Andrei b8d4330b53 Backed out changeset 8e33d0ce108c (bug 1351447) for failing /builds/worker/workspace/build/src/widget/cocoa/nsCocoaUtils on OS X r=backout a=backout on a CLOSED TREE
--HG--
rename : image/ImgDrawResult.h => image/DrawResult.h
2017-12-12 09:49:59 +02:00
Samathy Barratt 0749baf2d8 Bug 1351447 - Rename imagelib's DrawResult to ImgDrawResult r=tnikkel
Renamed to imgDrawResult

MozReview-Commit-ID: 5ESSgIhhU41

--HG--
rename : image/DrawResult.h => image/ImgDrawResult.h
extra : rebase_source : 4fba109b84ef456126d50e0d5e525f29f944a46d
2017-12-11 15:37:59 +00:00
Kartikaya Gupta 00ef028ed3 Bug 1416267 - Update gfxContext matrix functions to avoid flip-flopping between float and double matrices. r=jrmuizel
The core of this change is in gfxContext.*:
- change gfxContext::CurrentMatrix() and gfxContext::SetMatrix() to
  return and take a Matrix respectively, instead of converting to
  and from a gfxMatrix (which uses doubles). These functions therefore
  will now match the native representation of the transform in gfxContext.
- add two new functions CurrentMatrixDouble() and SetMatrixDouble() that
  do what the old CurrentMatrix() and SetMatrix() used to do, i.e.
  convert between the float matrix and the double matrix.

The rest of the change is just updating the call sites to avoid round-
tripping between floats and doubles where possible. Call sites that are
hard to fix are migrated to the new XXXDouble functions which preserves
the existing behaviour.

MozReview-Commit-ID: 5sbBpLUus3U
2017-11-10 21:14:09 -05:00
Mats Palmgren 1c2b8c222e Bug 1414666 part 1 - Add nsIFrame::PresShell() for convenient access to the shell. r=emilio
MozReview-Commit-ID: 8FPTPKWyVtY
2017-11-09 03:00:48 +01:00