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

419 Коммитов

Автор SHA1 Сообщение Дата
Henri Sivonen 3d387ac082 Bug 483155 - Put content creator function pointers onto nsHtml5ElementName. r=smaug
MozReview-Commit-ID: E2AAx7Zz2UF

--HG--
extra : rebase_source : 1b85ba3b1c699e71e6ecacf4d1dc4271f3416b08
2017-07-04 11:00:03 +03:00
Sebastian Hengst 56587adeab Backed out changeset 5b706cd241cb (bug 483155) for Valgrind failure on Linux x64 opt. r=backout 2017-08-11 10:48:10 +02:00
Henri Sivonen dacb0e05f1 Bug 483155 - Put content creator function pointers onto nsHtml5ElementName. r=smaug
MozReview-Commit-ID: E2AAx7Zz2UF

--HG--
extra : rebase_source : 989c11459e16076a043aa7311c95941686e86ef7
2017-07-04 11:00:03 +03:00
Daniel Holbert 1607723a71 Bug 1384561: Null-check pointer before deleting it (rather than after), in SVG ClearPreserveAspectRatioProperty() function. r=jwatt
In practice, this shouldn't make a difference -- but C++ allows compilers to
make pointer-usage-after-delete trigger a runtime fault.

MozReview-Commit-ID: J1tZ3TxXR80

--HG--
extra : rebase_source : 046407c3c034b85a5b5d41e4c1a87e4a79c6833e
2017-07-26 18:03:43 -07:00
Ehsan Akhgari 50fd0b7a62 Bug 1385533 - Reserve space for one pointer in the mMutationObservers array on node slots; r=smaug
This helps avoid allocations for the first mutation observer (for example, Range)
created by a caller.
2017-07-31 17:12:38 -04:00
Nicholas Nethercote d4f9aa5530 Bug 1384835 (part 2, attempt 2) - Remove the Preferences::Get*String() variants that return nsAdoptingString. r=froydnj.
--HG--
extra : rebase_source : 6c24fbacb03d4adebe5f22b5e7fc60b069913f20
2017-07-31 14:23:50 +10:00
Nicholas Nethercote 49eb219ff5 Bug 1383982 (attempt 2) - Introduce a general mechanism for measuring memory usage of graph-like structures. r=erahm.
--HG--
extra : rebase_source : 7075f9570a4262158351ce9ac3ca8360ea4d5394
2017-07-28 20:10:04 +10:00
Sebastian Hengst 1d708511f0 Backed out changeset 5df4d8778602 (bug 1384835) 2017-07-28 10:29:29 +02:00
Sebastian Hengst 9077ac8886 Backed out changeset a57d8f30d1bf (bug 1383982) for build bustage at nsGlobalWindow.cpp:13826: 'class nsWindowSizes' has no member named 'mMallocSizeOf'. r=backout 2017-07-28 09:50:48 +02:00
Nicholas Nethercote 5c3abe8aab Bug 1383982 - Introduce a general mechanism for measuring memory usage of graph-like structures. r=erahm.
All the SizeOf{In,Ex}cludingThis() functions take a MallocSizeOf function
which measures memory blocks. This patch introduces a new type, SizeOfState,
which includes a MallocSizeOf function *and* a table of already-measured
pointers, called SeenPtrs. This gives us a general mechanism to measure
graph-like data structures, by recording which nodes have already been
measured. (This approach is used in a number of existing reporters, but not in
a uniform fashion.)

The patch also converts the window memory reporting to use SizeOfState in a lot
of places, all the way through to the measurement of Elements. This is a
precursor for bug 1383977 which will measure Stylo elements, which involve
Arcs.

The patch also converts the existing mAlreadyMeasuredOrphanTrees table in the
OrphanReporter to use the new mechanism.

--HG--
extra : rebase_source : 2c23285f8b6c3b667560a9d14014efc4633aed51
2017-07-28 15:03:44 +10:00
Nicholas Nethercote 0574a6b496 Bug 1384835 (part 2) - Remove the Preferences::Get*String() variants that return nsAdoptingString. r=froydnj.
Because we want to remove nsAdoptingString. We have other variants that don't
use nsAdoptingString, which can be used instead. There are three basic
patterns.

1. The easiest case is when we don't check for success.

> nsAdoptingString s = Preferences::GetString("foo");
> foo(s);

becomes:

> nsAutoString s;
> Preferences::GetString("foo", s);
> foo(s);

2. The next case is when we check if the result is empty.

> nsAdoptingString s = Preferences::GetString("foo");
> if (s.IsEmpty()) { ... }

becomes:

> nsAutoString s;
> Preferences::GetString("foo", s);
> if (s.IsEmpty()) { ... }

3. The final case is when we null check the result.

> nsAdoptingString s = Preferences::GetString("foo");
> if (s) { ... }

becomes:

> nsAutoString s;
> nsresult rv = Preferences::GetString("foo", s);
> if (NS_SUCCEEDED(rv)) { ... }

The patch also avoids some UTF8/UTF16 conversions in a few places.

--HG--
extra : rebase_source : f339b1a3dda4dc93979d38c30c001fbe77485b55
2017-07-25 20:36:14 +10:00
Sylvestre Ledru 7c0ae251cd Bug 1381253 - Remove redundant control flow declarations rs=ehsan
MozReview-Commit-ID: FFxP4aMCbOL

--HG--
extra : amend_source : 3aec108430b11048f47ffe19d5da7ac5034770a9
2017-07-15 19:03:04 +02:00
Josh Matthews e0c37f0ed3 Bug 1352669 - Hook up Stylo CSS parser to Gecko error reporter. r=emilio
MozReview-Commit-ID: 3r5Z6KiPgRM
2017-07-10 17:52:00 -04:00
Sylvestre Ledru 4e9cf83ee8 Bug 1378712 - Remove all trailing whitespaces r=Ehsan
MozReview-Commit-ID: Kdz2xtTF9EG

--HG--
extra : rebase_source : 7235b3802f25bab29a8c6ba40a181a722f3df0ce
2017-07-06 14:00:35 +02:00
Wes Kocher a9eb08898f Backed out changeset f220d8060c14 (bug 1352669) for build bustage CLOSED TREE a=bustage
MozReview-Commit-ID: INYGT4WT1pO
2017-07-06 14:56:06 -07:00
Josh Matthews 723b20d420 Bug 1352669 - Hook up Stylo CSS parser to Gecko error reporter.
MozReview-Commit-ID: 3r5Z6KiPgRM
2017-07-06 13:15:08 -07:00
Kartikaya Gupta cad9534e69 Bug 1377090 - Turn gfxMatrix into a typedef for MatrixDouble. r=jrmuizel
Most of this patch is updating a few places that use gfxMatrix to use
the equivalent-but-differently-named functions on MatrixDouble:
- Translate/Rotate/Scale get turned into PreTranslate/PreRotate/PreScale
- Transform(Point) gets turned into TransformPoint(Point)
- gfxMatrix::TransformBounds(gfxRect) gets turned into
  gfxRect::TransformBoundsBy(gfxMatrix).
- gfxMatrix::Transform(gfxRect) gets turned into
  gfxRect::TransformBy(gfxMatrix).
The last two functions are added in this patch as convenience wrappers
to gfxRect instead of Matrix.h because we don't want Matrix.h to "know"
about gfxRect (to avoid adding gecko dependencies on Moz2D). Once we
turn gfxRect into a typedef for RectDouble these will be eliminated
anyway.

MozReview-Commit-ID: BnOjHzmOSKn

--HG--
extra : rebase_source : cf1692d1f0d44a4b05d684a66678739181a426d5
2017-07-05 11:18:49 -04:00
Kartikaya Gupta 1c54bb2347 Bug 1377090 - Make the Matrix class templated so we can instantiate it with a double type. r=bas
This extracts a BaseMatrix template of which Matrix is now a particular
specialization. The BaseMatrix allows us to reuse the same code for
floats and doubles, much like the other "base" classes (BasePoint,
BaseRect, etc.).

MozReview-Commit-ID: HO7bA83S9E0

--HG--
extra : rebase_source : dcd84d9a978cdea00bb54eb11eefcca9c6635901
2017-07-05 11:18:48 -04:00
Olli Pettay 21b0ca3bbf Bug 1378196, Make IsEventAttributeName non-virtual in common case, r=ehsan
--HG--
extra : rebase_source : 9daf46de13698348b7ab6b68f8da13ffb338c0a0
2017-07-04 23:54:30 +03:00
Ehsan Akhgari 42cecdc81e Bug 1378044 - Switch the SVGImageContext::Hash() hashing code to use PLDHashNumber; r=dholbert 2017-07-04 11:08:28 -04:00
Brian Birtles f6eddc29f3 Bug 1365472 - Use animated class names when doing selector matching in Servo; r=heycam
Using SVG SMIL it is possible to animate the class attribute of an element using
markup such as the following:

  <style>
    .red {
      fill: red;
    }
  </style>
  <svg>
    <circle cx="50" cy="50" r="30" fill="blue">
      <set attributeName="class" to="red" begin="1s"/>
    </circle>
  </svg>

In Gecko, Element::GetClasses handles this case by looking for an animated class
string when the element in question is an SVG element.

This patch causes our Servo bindings to use GetClasses when querying attribute
values for selector matching.

Note that animating the class attribute is *not* expected to affect attribute
selectors such as `circle[class="red"]`. It does in Chrome, but that is due to
a Blink bug where animating attributes using SMIL affects the result of
getAttribute:

  https://bugs.chromium.org/p/chromium/issues/detail?id=735820

This patch adjusts the behavior for both the GeckoElement case and the
ServoElementSnapshot case.

MozReview-Commit-ID: DAFWHSH1aYB

--HG--
extra : rebase_source : 292c4e2fb419818ea851aca12790ff7e70f2e1d4
2017-06-27 10:55:03 -07:00
Bill McCloskey f115503a0b Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-26 14:19:58 -07:00
Cameron McCormack fab1072b7f Bug 1291515 - Part 1: Introduce a pref for <style scoped>. r=bholley,dbaron
MozReview-Commit-ID: 1J9IvPrC0xh

--HG--
extra : rebase_source : 4a3da0dc41ec71d2804e6f8a778613e8749940be
2017-06-21 09:25:43 +08:00
Wes Kocher 913ce205d2 Backed out 2 changesets (bug 1291515) for reftest assertions in textarea-fieldset-legend-ref-2.html a=backout CLOSED TREE
Backed out changeset 4fac24cc0437 (bug 1291515)
Backed out changeset 4e8b918dc410 (bug 1291515)

MozReview-Commit-ID: F4yQK5ujqLP
2017-06-25 05:18:22 -07:00
Cameron McCormack deae2413d6 Bug 1291515 - Part 1: Introduce a pref for <style scoped>. r=bholley,dbaron
MozReview-Commit-ID: 1J9IvPrC0xh

--HG--
extra : rebase_source : 2c3a139cc5e4e223e5b9b7892020c96df2cf264c
2017-06-21 09:25:43 +08:00
Carsten "Tomcat" Book 5f51e5596e merge mozilla-inbound to mozilla-central a=merge 2017-06-23 11:28:19 +02:00
Nicholas Nethercote f1364a75ea Bug 1374580 (part 3) - Remove ns{,C}Substring typedefs. r=froydnj.
All the instances are converted as follows.

- nsSubstring  --> nsAString
- nsCSubstring --> nsACString

--HG--
extra : rebase_source : cfd2238c52e3cb4d13e3bd5ddb80ba6584ab6d91
2017-06-20 19:19:52 +10:00
Nicholas Nethercote fe9268c4cd Bug 1374580 (part 2) - Remove nsAFlat{,C}String typedefs. r=froydnj.
All the instances are converted as follows.

- nsAFlatString  --> nsString
- nsAFlatCString --> nsCString

--HG--
extra : rebase_source : b37350642c58a85a08363df2e7c610873faa6e41
2017-06-20 19:19:05 +10:00
Kirk Steuber e967f9a6c1 Bug 1375189 - Don't use aNodesWithProperties in nsNodeUtils::CloneAndAdopt if it is not needed r=bz
MozReview-Commit-ID: 9vu3HCQkDKf

--HG--
extra : rebase_source : eb6231c88732133ee6d90e621a5833b9be1e81ce
2017-06-21 11:55:04 -07:00
Carsten "Tomcat" Book 8a1350b5a6 Backed out changeset 4f6302a98ae4 (bug 1372405)
--HG--
extra : rebase_source : 41632f3158e88e692809731394a683d065a73dfb
2017-06-21 13:59:26 +02:00
cku 817dcdd225 Bug 265894 - (followup) Remove SVGSVGElement::HasPreserveAspectRatio declaration. r=me
MozReview-Commit-ID: BqH35waTSUk

--HG--
extra : rebase_source : ec6ac64abb87cd9e1b4657d951c72c3e2cfdd33d
2017-06-21 12:59:39 +08:00
Bill McCloskey 6b3e84ed5f Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-20 21:44:11 -07:00
cku 37aeebd4f3 Bug 265894 - Part 10. Remove SVGSVGElement::HasPreserveAspectRatio. r=heycam
Since no callee of this funciton anymore.

MozReview-Commit-ID: 6tQdFA6e7U4

--HG--
extra : rebase_source : a39b65387c893adba7bde4161a1e2385ef5cd582
2017-06-16 14:09:09 +08:00
cku 5719863244 Bug 265894 - Part 7. Do not convert symbol element into svg element. r=heycam
Since we already have nsSVGSymbolFrame, there is no need to leverage svg element
for rendering symbol element in use-element shadow tree, remove conversion code.

MozReview-Commit-ID: GmGLZ7Az6Gb

--HG--
extra : rebase_source : 897a1fb7b34bb3aa3babe99b7199e7f002d59e6b
2017-06-14 21:57:09 +08:00
cku 08937e7d33 Bug 265894 - Part 4. Let SVGSymbolElement inherit from SVGViewportElementBase. r=heycam
MozReview-Commit-ID: CnNTuXTFWC6

--HG--
extra : rebase_source : 516c9d81a8e4e9fd9cc7bcacf04472a4820198c2
2017-06-20 15:18:25 +08:00
cku e6c91df011 Bug 265894 - Part 3. Implement nsSVGViewportFrame, and let nsSVGInnerFrame inherit from it. r=heycam
MozReview-Commit-ID: 9lME1xiNhhY

--HG--
extra : rebase_source : 11fdaa7b21f4647a7ce6b8834b43504977bc58a8
2017-06-14 21:05:37 +08:00
cku f9701e84eb Bug 265894 - Part 2. Implement SVGViewportElementBase, and let SVGSVGElement inherit from it. r=heycam
MozReview-Commit-ID: I6BIgEMhN6Q

--HG--
extra : rebase_source : 8e0e18914fc061532e853d2d3347e924d244b212
2017-06-14 20:38:10 +08:00
cku 67b6f80c35 Bug 265894 - Part 1. Implement NS_IMPL_ELEMENT_CLONE_WITH_INIT_AND_PARSER. r=heycam
Implement this new macro to reuse clone code in SVGSymbolElement in the
following patch.

MozReview-Commit-ID: 4vobWVrcbn2

--HG--
extra : rebase_source : 11e7dd9fd11199689ed5dc2a532c6517cf2e21fe
2017-06-14 19:57:40 +08:00
Robert Longson f055bf18d2 Bug 1369904 - Bounding box should not include control points. r=lsalzman 2017-06-14 06:34:01 +01:00
Robert Longson d0467bd4b4 Bug 1361593 - Simplify nsSVGMarkerFrame by storing the transform matrix rather than all the parameters necessary to calculate it. r=jwatt 2017-06-08 06:17:07 +01:00
Robert Longson 00985268d8 Bug 1240275 - Support SVG 2 radialGradient fr attribute. r=cam r=peterv (see comment 16) 2017-05-23 07:15:02 +01:00
Wes Kocher 76ed70ac15 Backed out changeset 6eabcbe4f0a1 (bug 1240275) for win64 reftest failures in radialGradient-fr-02.svg a=backout
MozReview-Commit-ID: 1rJZeqPUykw
2017-05-22 15:26:29 -07:00
Robert Longson 941e4c568e Bug 1240275 - Support SVG 2 radialGradient fr attribute. r=cam r=peterv (see comment 16) 2017-05-22 19:31:37 +01:00
Sebastian Hengst 85e2f2bc08 Backed out changeset 173a14d9e1d2 (bug 1240275) for failing layout/reftests/svg/radialGradient-fr-02.svg on Windows 8 x64. r=backout 2017-05-22 11:16:58 +02:00
Robert Longson a1d45be365 Bug 1240275 - Support SVG 2 radialGradient fr attribute. r=cam r=peterv (see comment 16) 2017-05-22 07:28:30 +01:00
Kirk Steuber e74f1cd513 Bug 1363481 - Add the old attribute value as a parameter to Element::AfterSetAttr r=bz
In order to facilitate the movement of code with side-effects called by Element::SetAttr to Element::BeforeSetAttr and Element::AfterSetAttr, Element::AfterSetAttr should have access to the old value of the attribute. This includes information about whether there was previously a value set or not.

Accomplishing this involved passing an additional argument through functions that find and change the old attribute value in order to ensure that we can differentiate between an empty old value and an absent old value (attribute was not set).

Note that while I tried to ensure that accurate values (and their absence) are reported to Element::AfterSetAttr, I largely ignored SVG. While the old value reported for SVG values should be however accurate the value already being reported to SetAttrAndNotify was, SVG elements do not currently report unset values properly because they will never pass a null pointer to SetAttrAndNotify.

MozReview-Commit-ID: K1mha8CNFZP

--HG--
extra : rebase_source : 42776eb01451d371e4aebcc17fe3dd112c8d268b
2017-05-18 14:09:01 -07:00
Nazım Can Altınova e7316ee8fe Bug 1364746 - stylo: Continue to propagate quirks mode information to Servo r=bholley
I've propagated quirks mode information on some places. But we needed to pass
quirks mode to some other FFI functions to be able to handle that information
properly.

MozReview-Commit-ID: JovQWjN3YJx

--HG--
extra : rebase_source : bd25ba4276ae21ff4feb80e56b311202019268a0
2017-05-14 18:11:18 +03:00
Sebastian Hengst 484d2b7f51 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: Jduo3F6TzgF
2017-05-14 18:04:29 +02:00
Hiroyuki Ikezoe 7cd8cdf2bb Bug 1357295 - Rename LengthParsingMode to ParsingMode and LengthParsingMode::SVG to PasingMode::AllowUnitlessLength. r=emilio
We need another flag that represents allow-negative-number for SMIL, so
this enum will also comprise the another parsing mode that allows negative number.

MozReview-Commit-ID: IDFNppjGeB

--HG--
extra : rebase_source : 456f661b33346ff4a756a66c6accf4ab1a5f2f80
2017-05-13 19:47:38 +09:00
Robert Longson aba283e197 Bug 1364179 - initialise AutoPreserveAspectRatioOverride::mDidOverride r=jseward 2017-05-12 22:16:25 +01:00