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

108 Коммитов

Автор SHA1 Сообщение Дата
Andrew Osmond 91b071ed14 Bug 1618345 - Enforce proper color management by splitting gfx::Color into sRGBColor and DeviceColor types. r=jrmuizel
gfx::Color is currently misused in many places. The DrawTargets expect
the color space to be in device space, e.g. what we are actually going
to draw using. Everything sitting above generally deals with sRGB, as
specified in CSS. Sometimes we missed the conversion from sRGB to device
space when issuing draw calls, and similarly sometimes we converted the
color to device space twice.

This patch splits the type in two. sRGBColor and DeviceColor now
represent sRGB and device color spaces respectively. DrawTarget only
accepts DeviceColor, and one can get a DeviceColor from an sRGBColor via
the ToDeviceColor helper API. The reftests now pass with color
management enabled for everything (e.g. CSS) instead of just tagged
raster images.

There will be a follow up patch to enable color management everywhere by
default on all supported platforms.

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

--HG--
extra : moz-landing-system : lando
2020-03-09 14:16:17 +00:00
Nika Layzell 143941e2d4 Bug 1523638 - Part 9: Use provided 'WindowGlobalChild' actors to create the initial about:blank document, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D37656

--HG--
extra : moz-landing-system : lando
2019-08-08 16:07:12 +00:00
Ciure Andrei c0756f3389 Backed out 10 changesets (bug 1523638) for causing high frequency Android 7.0 mochitests failures CLOSED TREE
Backed out changeset 644ceb2fe568 (bug 1523638)
Backed out changeset 27647ee7a927 (bug 1523638)
Backed out changeset 96f1ccb95570 (bug 1523638)
Backed out changeset b60a17ea716a (bug 1523638)
Backed out changeset 507e63186c5f (bug 1523638)
Backed out changeset 33255408ca61 (bug 1523638)
Backed out changeset d97b2d223616 (bug 1523638)
Backed out changeset eba2a0514cde (bug 1523638)
Backed out changeset d7065174c5c4 (bug 1523638)
Backed out changeset c21b361e175d (bug 1523638)
2019-07-23 05:13:32 +03:00
Nika Layzell 83236ff0f4 Bug 1523638 - Part 9: Use provided 'WindowGlobalChild' actors to create the initial about:blank document, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D37656

--HG--
extra : moz-landing-system : lando
2019-07-18 19:38:22 +00:00
Bogdan Tara ca45889546 Backed out 9 changesets (bug 1523638) for browser_contextmenu.js failures CLOSED TREE
Backed out changeset 0a584a07b696 (bug 1523638)
Backed out changeset 8c5af2289900 (bug 1523638)
Backed out changeset 40ed1bd64b09 (bug 1523638)
Backed out changeset 9a99a0391979 (bug 1523638)
Backed out changeset 07fb4748b91a (bug 1523638)
Backed out changeset 49047c3ebae9 (bug 1523638)
Backed out changeset d606d072126c (bug 1523638)
Backed out changeset 76dc1937fc77 (bug 1523638)
Backed out changeset c784c14b5d5d (bug 1523638)
2019-07-16 23:40:47 +03:00
Nika Layzell 89d26ca7eb Bug 1523638 - Part 9: Use provided 'WindowGlobalChild' actors to create the initial about:blank document, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D37656

--HG--
extra : moz-landing-system : lando
2019-07-16 18:47:56 +00:00
Jonathan Kew 4675bb945a Bug 1359240 - When loading an SVG glyph, check if the SVG document is gz-compressed, and decompress before attempting to parse. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D31107

--HG--
extra : moz-landing-system : lando
2019-05-20 21:01:18 +00:00
Mihai Alexandru Michis d0cbcbfaf1 Backed out 2 changesets (bug 1359240) for causing reftest failures. CLOSED TREE
Backed out changeset 10cac54d1bb9 (bug 1359240)
Backed out changeset 50ef8f8c6558 (bug 1359240)
2019-05-20 18:31:21 +03:00
Jonathan Kew e82acf4503 Bug 1359240 - When loading an SVG glyph, check if the SVG document is gz-compressed, and decompress before attempting to parse. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D31107

--HG--
extra : moz-landing-system : lando
2019-05-20 14:32:00 +00:00
Bogdan Tara 6150afdc54 Backed out 2 changesets (bug 1359240) for gfxSVGGlyphs.cpp bustages CLOSED TREE
Backed out changeset 02eea6ec83db (bug 1359240)
Backed out changeset a31ec848a1ef (bug 1359240)
2019-05-20 15:21:39 +03:00
Jonathan Kew cf263b7081 Bug 1359240 - When loading an SVG glyph, check if the SVG document is gz-compressed, and decompress before attempting to parse. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D31107

--HG--
extra : moz-landing-system : lando
2019-05-16 18:12:33 +00:00
Sylvestre Ledru e226046cb8 Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan
# ignore-this-changeset

Depends on D28954

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

--HG--
extra : moz-landing-system : lando
2019-05-01 08:47:10 +00:00
Masayuki Nakano 60e014c55e Bug 1544215 - Make nsIContentVewer::GetPresShell() return mozilla::PresShell instead of nsIPresShell r=bzbarsky
Additionally, this patch makes `nsDocumentViewer` which is the only
implementation of `nsIContentViewer` use `mozilla::PresShell` directly
rather than via `nsIPresShell`.

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

--HG--
extra : moz-landing-system : lando
2019-04-16 02:47:26 +00:00
Sylvestre Ledru 4aa92e3091 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D22514
2019-03-13 10:19:06 +01:00
Ryan Hunt 85ff4bdc33 Bug 1523969 part 8 - Move method definition inline comments to new line in 'gfx/'. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D21108

--HG--
extra : rebase_source : 48a4586f507891f3a2f0f970e9b9a0b15f0f3d61
2019-02-25 16:07:19 -06:00
Jonathan Kingston f6680698bd Bug 1525319 - Removing context from OnDataAvailable r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D20881

--HG--
extra : moz-landing-system : lando
2019-02-27 23:42:27 +00:00
Jonathan Kingston c4853316e7 Bug 1525319 - Removing context from OnStopRequest r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D20770

--HG--
extra : moz-landing-system : lando
2019-02-27 23:41:31 +00:00
Jonathan Kingston f7e35ae39e Bug 1525319 - Removing context from OnStartRequest r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D20769

--HG--
extra : moz-landing-system : lando
2019-02-27 23:41:04 +00:00
Alex Gaynor 0e903787da Bug 1415508 - use Span in constructing a byte input stream; r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D20687

--HG--
extra : moz-landing-system : lando
2019-02-25 19:11:20 +00:00
Dorel Luca 4a4dcd57fa Backed out 4 changesets (bug 1525319) for Android failures in dom/base/test/test_progress_events_for_gzip_data.html
Backed out changeset b73f033efb41 (bug 1525319)
Backed out changeset 1d318d5c6b98 (bug 1525319)
Backed out changeset 6d73418988d4 (bug 1525319)
Backed out changeset 84ca79bd2dc3 (bug 1525319)
2019-02-25 04:06:11 +02:00
Jonathan Kingston 63ab2bd8aa Bug 1525319 - Removing context from OnDataAvailable r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D20881

--HG--
extra : moz-landing-system : lando
2019-02-24 20:27:55 +00:00
Jonathan Kingston 332531fa9c Bug 1525319 - Removing context from OnStopRequest r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D20770

--HG--
extra : moz-landing-system : lando
2019-02-24 20:26:59 +00:00
Jonathan Kingston 2441197975 Bug 1525319 - Removing context from OnStartRequest r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D20769

--HG--
extra : moz-landing-system : lando
2019-02-24 20:26:16 +00:00
Emilio Cobos Álvarez d2ed260822 Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug
Summary: Really sorry for the size of the patch. It's mostly automatic
s/nsIDocument/Document/ but I had to fix up in a bunch of places manually to
add the right namespacing and such.

Overall it's not a very interesting patch I think.

nsDocument.cpp turns into Document.cpp, nsIDocument.h into Document.h and
nsIDocumentInlines.h into DocumentInlines.h.

I also changed a bunch of nsCOMPtr usage to RefPtr, but not all of it.

While fixing up some of the bits I also removed some unneeded OwnerDoc() null
checks and such, but I didn't do anything riskier than that.
2019-01-03 17:48:33 +01:00
longsonr ade1b15610 Bug 1517108 - Move nsSMILTimeContainer, nsSMILMilestone and nsSMILTargetIdentifier to the mozilla namespace r=bbirtles
--HG--
rename : dom/smil/nsSMILMilestone.h => dom/smil/SMILMilestone.h
rename : dom/smil/nsSMILTargetIdentifier.h => dom/smil/SMILTargetIdentifier.h
rename : dom/smil/nsSMILTimeContainer.cpp => dom/smil/SMILTimeContainer.cpp
rename : dom/smil/nsSMILTimeContainer.h => dom/smil/SMILTimeContainer.h
2019-01-02 07:21:13 +00:00
longsonr 028d7ef9fa Bug 1516411 - Move nsSMILAnimationController into the mozilla namespace and rename it as SMILAnimationController r=birtles
--HG--
rename : dom/smil/nsSMILAnimationController.cpp => dom/smil/SMILAnimationController.cpp
rename : dom/smil/nsSMILAnimationController.h => dom/smil/SMILAnimationController.h
2018-12-28 11:47:58 +00:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Boris Zbarsky 71db58cf83 Bug 1507540 part 2. Use more notxpcom attributes in docshell/. r=smaug 2018-11-19 20:17:53 -05:00
David Major a9e8069a9b Bug 1479456: Fix some non-unified bustage in gfx/thebes. r=jrmuizel 2018-08-01 13:02:18 -04:00
Kris Maglione 7aa3564a28 Bug 1477579: Part 3 - Avoid duplicating static strings in category manager entries. r=froydnj
Much like the component manager, many of the strings that we use for category
manager entries are statically allocated. There's no need to duplicate these
strings.

This patch changes the category manager APIs to take nsACStrings rather than
raw pointers, and to pass literal nsCStrings when we know we have a literal
string to begin with. When adding the category entry, it then skips making
copies of any strings with the LITERAL flag.

MozReview-Commit-ID: EJEcYSdNMWs
***
amend-catman

--HG--
extra : source : aa9a8f18e98f930a3d8359565eef02f3f6efc5f9
extra : absorb_source : 81a22ab26ee8017ac43321ff2c987d8096182d37
2018-07-23 17:41:06 -07:00
Brindusan Cristian 91a3707d5f Backed out 3 changesets (bug 1477579) for build bustages on xpcshell\selftest.py and crashtest failures on /components/nsComponentManager.cpp. CLOSED TREE
Backed out changeset aa9a8f18e98f (bug 1477579)
Backed out changeset 5fb0b7746a5d (bug 1477579)
Backed out changeset 8359f8fe4184 (bug 1477579)
2018-07-24 04:55:03 +03:00
Kris Maglione dfd38a6ac3 Bug 1477579: Part 3 - Avoid duplicating static strings in category manager entries. r=froydnj
Much like the component manager, many of the strings that we use for category
manager entries are statically allocated. There's no need to duplicate these
strings.

This patch changes the category manager APIs to take nsACStrings rather than
raw pointers, and to pass literal nsCStrings when we know we have a literal
string to begin with. When adding the category entry, it then skips making
copies of any strings with the LITERAL flag.

MozReview-Commit-ID: EJEcYSdNMWs
***
amend-catman

--HG--
extra : rebase_source : 4f70e7b296ecf3b52a4892c92155c7c163d424d2
2018-07-23 17:41:06 -07:00
Andrea Marchesini a053cf1c15 Bug 1476306 - Moving NullPrincipal/ContentPrincipal/SystemPrincipal under mozilla namespace - part 1 - NullPrincipal, r=ckerschb 2018-07-17 21:37:48 +02:00
Andrea Marchesini 7ba8b77e07 Bug 1466023 - Separate FontTableURI and BlobURL, r=qdot
This patch splits FontTableURI and BlobURL in 2 classes:
FontTableURIProtocolHandler and BlobURLProtocolHandler
both under mozilla::dom.

It also removes a memory reporter because that report is already covered by the
BlobURL one.

--HG--
rename : dom/file/nsHostObjectProtocolHandler.cpp => dom/file/BlobURLProtocolHandler.cpp
rename : dom/file/nsHostObjectProtocolHandler.h => dom/file/BlobURLProtocolHandler.h
2018-06-02 15:51:42 +02:00
Adrian Wielgosik 4fca802957 Bug 1460940 - Convert NS_NewDOMDocument to use nsIDocument. r=bz
MozReview-Commit-ID: GoJ30YZGRhq

--HG--
extra : rebase_source : 0995705c2c31c1a779c22c8336482d4c7e89e319
2018-05-11 19:46:15 +02:00
Emilio Cobos Álvarez 0faef276ec Bug 1455885: Make the SVG context paint not use a node property, but a member in SVGDocument. r=jwatt
MozReview-Commit-ID: H6SRTsDL5Rh
2018-04-26 17:07:39 +02:00
Tom Ritter 449237fc51 Bug 1378552 - Reduce the liklihood of inadvertently misusing NullPrincipal::Create(). r=ckerschb
NullPrincipal::Create() (will null OA) may cause an OriginAttributes bypass.
We change Create() so OriginAttributes is no longer optional, and rename
Create() with no arguments to make it more explicit about what the caller is doing.

MozReview-Commit-ID: 7DQGlgh1tgJ
2018-03-22 13:36:20 -05:00
Emilio Cobos Álvarez c03ffd9c62 Bug 1425759: Simplify the style backend type setup. r=bholley
Now that what we use to decide whether a document is styled by Servo are only
prefs and the doc principal, we don't need to inherit the style backend type,
since unless the pref has changed, the result will be the same.

MozReview-Commit-ID: KBmeBn1cRne
2018-02-27 12:39:20 +01:00
Emilio Cobos Álvarez 432d45b460 Bug 1439027: Simplify PresShell::Initialize. r=bz
Most of the callers pass the already-existing pres-context visible area. The few
that don't can set it themselves.

MozReview-Commit-ID: KRi4ShrgOrE
2018-02-21 12:42:17 +01:00
Emilio Cobos Álvarez 141792488a Bug 1430608: Make nsMediaFeatures work with a document, not a pres context. r=heycam
Returning a zero-sized viewport in the case there's no shell / pres context.

For now, no other change yet. After this we can start tweaking the ShadowRoot
Stylist setup, and even try to return computed styles without a document \o/.

MozReview-Commit-ID: 3cT2PKQISri
2018-01-17 21:51:47 +01:00
Milan Sreckovic 099cfc4242 Bug 1423570: Use BaseRect access methods instead of member variables in gfx/ r=bas.schouten
MozReview-Commit-ID: ZGySgc9oP3

--HG--
extra : rebase_source : 23aadc10e9885002290155684b2c495780d979ce
2017-12-19 15:48:39 -05:00
Andrea Marchesini 6626e900f9 Bug 1409327 - NS_NewBufferedInputStream should take the ownership of the inputStream, r=smaug 2017-10-19 11:39:30 +02:00
Brian Birtles 670dfc03bf Bug 1395452 - Call HasAnimationController() before GetAnimationController(); r=hiro
nsDocument::GetAnimationController() will lazily create an animation controller
which, in some call sites, is unnecessary.

This patch first calls HasAnimationController() and only calls
GetAnimationController() if it returns true. This avoids creating an animation
controller in situations where one is not necessarily required.

MozReview-Commit-ID: 4cdpLRvMVJU

--HG--
extra : rebase_source : 125a59c0b0535d5df9a9964538b3784ddb1212c7
2017-08-31 15:00:39 +09:00
Nicholas Nethercote 8a72cf2251 Bug 1390428 (part 2, attempt 2) - Remove more nsXPIDLCString local variables. r=erahm.
--HG--
extra : rebase_source : 69d58b0cfb56efc6b03d8e2d7be2ce3c3e6cd843
2017-08-21 20:01:27 +10:00
Bobby Holley d42f0733ac Bug 1389300 - Inherit style backend into NS_NewDOMDocument. r=smaug,r=heycam
Our current machinery for enabling stylo requires a docshell - if there isn't
one, we default to the Gecko style system.

When getComputedStyle operates on an element without a presshell, it uses the
caller's presshell instead. If the element has previously been styled with
one style system (but no longer has a presshell), and the caller uses a
different style backend, using the caller's style system can cause crashes when
we pull bits of cached data off the DOM (like cached style attributes).

So we want to throw when window.getComputedStyle(element) is called for a
(window, element) pair with different style backends (which is what the next
patch in this bug does).

However, that causes a few failures where stylo-backed documents try to do
getComputedStyle on an XHR document (which, without a docshell, will use the
gecko style system).

So this patch does some work to propagate the creator's style backend into
various docshell-less documents. This should allow both chrome (which uses gecko)
and content (which uses stylo) to use getComputedStyle on the response document
for XHRs they create.

Note that the second patch in this bug will make
chromeWin.getComputedStyle(contentObj) throw. If we discover code that does
that, we can just make it invoke the content's getComputedStyle method over Xrays.

MozReview-Commit-ID: 5OsmHJKq5Ui
2017-08-15 19:10:43 -07:00
cku d85d3ab378 Bug 1351440 - Part 2. Encapsulate DrawResult and imgIContainer::FLAG_* into imgDrawingParams, and pass it to PaintSVG. r=jwatt
The DrawResult return was not in fact anything to do with the success or
failure of that method, but was actually passing out a very specific piece of information
about the success or failure of any imagelib drawing that may not have occurred
under the various PaintSVG calls.

The signature of PaintSVG is changed from
  DrawResult PaintSVG(...., uint32 flags);
to
  void PaintSVG(...., imgDrawingParams& aPackage);

imgDrawingParams wraps DrawResult and imgIContainer::FLAG_* as a pack, pass through
PaintSVG to imagelib draw calls under beneath.

MozReview-Commit-ID: IOq2evUAOQF
2017-05-18 22:03:41 +02:00
Sebastian Hengst 41f1727bf4 Backed out changeset f3460d42d23c (bug 1351440) 2017-05-18 21:15:35 +02:00
cku eaa4406688 Bug 1351440 - Part 2. Encapsulate DrawResult and imgIContainer::FLAG_* into imgDrawingParams, and pass it to PaintSVG. r=jwatt
The DrawResult return was not in fact anything to do with the success or
failure of that method, but was actually passing out a very specific piece of information
about the success or failure of any imagelib drawing that may not have occurred
under the various PaintSVG calls.

The signature of PaintSVG is changed from
  DrawResult PaintSVG(...., uint32 flags);
to
  void PaintSVG(...., imgDrawingParams& aPackage);

imgDrawingParams wraps DrawResult and imgIContainer::FLAG_* as a pack, pass through
PaintSVG to imagelib draw calls under beneath.

MozReview-Commit-ID: IOq2evUAOQF

--HG--
extra : rebase_source : 66c9a9e391c2f9e142575f42fd47b37334ec5752
extra : source : 97a08873177c0f18edffdb1b5589c77843a50553
2017-05-05 17:19:43 +08:00
Andrea Marchesini 1fd1bc3935 Bug 1343933 - Renaming Principal classes - part 2 - NullPrincipal, r=qdot
--HG--
rename : caps/nsNullPrincipal.cpp => caps/NullPrincipal.cpp
rename : caps/nsNullPrincipal.h => caps/NullPrincipal.h
rename : caps/nsNullPrincipalURI.cpp => caps/NullPrincipalURI.cpp
rename : caps/nsNullPrincipalURI.h => caps/NullPrincipalURI.h
2017-03-22 11:38:40 +01:00
Cameron McCormack babad063ff Bug 1328832 - Part 2: Rename mozFlushType to mozilla::FlushType and make it an enum class. r=bzbarsky
MozReview-Commit-ID: D3fIngSHSsl
2017-01-05 15:31:56 +08:00