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

408 Коммитов

Автор SHA1 Сообщение Дата
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
Tom Tung 0e308b0c4f Bug 1348050 - Part 3: Mark channel as urgent-start for loading image. r=baku,mayhemer
This part is mainly to mark the channel as urgent-start if src related
attributes in HTMLImageElement and HTMLInputElement is set and the channel is
open due to user interaction. Unfortunately, we cannot just check the event
state just after creating channel since some loading image tasks will be queue
and execute in stable state. Thus, I store the event state in elements and
pass it to the place where create the channel.

MozReview-Commit-ID: GBdAkPfVzsn

--HG--
extra : rebase_source : 715352317b4b600f8a7f78b7bc22b894bb272d27
2017-04-25 09:17:38 +08:00
Andrea Marchesini 1981f67eb3 Bug 1362119 - part 1 - Moving dom/base/Script{Loader,Element}.* in dom/script, r=ehsan
This patch does these things:

1. it moves nsScriptElement, nsScriptLoader, ScriptSettings, nsIScriptElement
   and nsIScriptLoaderObserver in dom/script
2. it renames nsScriptElement to mozilla::dom::ScriptElement
3. it renames nsScriptLaoder to mozilla::dom::ScriptLoader

--HG--
rename : dom/base/nsScriptElement.cpp => dom/script/ScriptElement.cpp
rename : dom/base/nsScriptElement.h => dom/script/ScriptElement.h
rename : dom/base/nsScriptLoader.cpp => dom/script/ScriptLoader.cpp
rename : dom/base/nsScriptLoader.h => dom/script/ScriptLoader.h
rename : dom/base/ScriptSettings.cpp => dom/script/ScriptSettings.cpp
rename : dom/base/ScriptSettings.h => dom/script/ScriptSettings.h
rename : dom/base/nsIScriptElement.h => dom/script/nsIScriptElement.h
rename : dom/base/nsIScriptLoaderObserver.idl => dom/script/nsIScriptLoaderObserver.idl
2017-05-08 08:24:22 +02:00
Carsten "Tomcat" Book f0d6de60d7 Backed out changeset 5d77f6b14633 (bug 1362119) for android bustage in nsCCUncollectableMarker.cpp:500:7: error: 'TraceScriptHolder' is not a member of 'mozilla'
--HG--
rename : dom/script/ScriptSettings.cpp => dom/base/ScriptSettings.cpp
rename : dom/script/ScriptSettings.h => dom/base/ScriptSettings.h
rename : dom/script/nsIScriptElement.h => dom/base/nsIScriptElement.h
rename : dom/script/nsIScriptLoaderObserver.idl => dom/base/nsIScriptLoaderObserver.idl
rename : dom/script/ScriptElement.cpp => dom/base/nsScriptElement.cpp
rename : dom/script/ScriptElement.h => dom/base/nsScriptElement.h
rename : dom/script/ScriptLoader.cpp => dom/base/nsScriptLoader.cpp
rename : dom/script/ScriptLoader.h => dom/base/nsScriptLoader.h
2017-05-08 09:54:38 +02:00
Andrea Marchesini 7a4ef797cb Bug 1362119 - part 1 - Moving dom/base/Script{Loader,Element}.* in dom/script, r=ehsan
This patch does these things:

1. it moves nsScriptElement, nsScriptLoader, ScriptSettings, nsIScriptElement
   and nsIScriptLoaderObserver in dom/script
2. it renames nsScriptElement to mozilla::dom::ScriptElement
3. it renames nsScriptLaoder to mozilla::dom::ScriptLoader

--HG--
rename : dom/base/nsScriptElement.cpp => dom/script/ScriptElement.cpp
rename : dom/base/nsScriptElement.h => dom/script/ScriptElement.h
rename : dom/base/nsScriptLoader.cpp => dom/script/ScriptLoader.cpp
rename : dom/base/nsScriptLoader.h => dom/script/ScriptLoader.h
rename : dom/base/ScriptSettings.cpp => dom/script/ScriptSettings.cpp
rename : dom/base/ScriptSettings.h => dom/script/ScriptSettings.h
rename : dom/base/nsIScriptElement.h => dom/script/nsIScriptElement.h
rename : dom/base/nsIScriptLoaderObserver.idl => dom/script/nsIScriptLoaderObserver.idl
2017-05-08 08:24:22 +02:00
Robert Longson ffd7cf91d4 Bug 1362400 part 2 - optimise SMIL image updates r=jwatt 2017-05-06 20:51:59 +01:00
Robert Longson 5bf763e903 Bug 1362400 part 1 - Make it possible for SMIL to change the link state of an SVG anchor element r=jwatt r=smaug (DOM) 2017-05-06 20:32:14 +01:00
Emilio Cobos Álvarez 23bce99ae1 Bug 1361051: rename mozilla::FrameType to mozilla::LayoutFrameType. r=xidorn
This avoids conflicts with mozilla::dom::FrameType.

MozReview-Commit-ID: 7aEMbHRaTFk

--HG--
extra : rebase_source : 2d01321f5ce0ec8c0e3f70984674f82678034b3c
2017-05-01 19:32:52 +02:00
Emilio Cobos Álvarez e44543aad4 Bug 1360241: Devirtualize nsIFrame::GetType. r=heycam
MozReview-Commit-ID: 5Nzhyta5Hle

--HG--
extra : rebase_source : c2e9d4bfb9239f5e851d110cd7dff98c1e1a8d8b
2017-04-30 17:30:08 +02:00
Kirk Steuber 7fdb378650 Bug 1359556 - Optimize cloneNode by preinitializing attribute and child arrays r=bz
Currently, attribute and child arrays (implemented in dom/base/nsAttrAndChildArray.h) start out empty. When cloning, the array ends up being resized multiple times in order to add the attributes and children that are being cloned from the original node. This would be quicker if the array was initialized to the correct size in the first place so that resizes are not necessary.

However, preallocating space for children is only necessary when performing a deep clone. Therefore, an additional parameter is being added to the Clone, CopyInnerTo, and CloneDocHelper methods to indicate whether preallocation of children should happen. Attributes are copied either way, so that part of the array is preallocated in both cases.

MozReview-Commit-ID: 3iVezeAKXnI

--HG--
extra : rebase_source : 9c3deec6d7aafd6411044d623d4863637b45fd58
2017-04-20 12:57:48 -07:00
Jonathan Watt 0ddff2c13d Bug 1360063 - Expose the parsing code for nsSVGViewBoxRect as a method. r=longsonr
MozReview-Commit-ID: J3xv6VyvYgg

--HG--
extra : rebase_source : 007fbb2a151fd1d846fef4522c8ade002267427f
2017-04-10 17:02:34 +01:00
Jonathan Watt a696cd2ae6 Bug 1360063 - Expose the parsing and serializing code for SVGPreserveAspectRatio as methods. r=longsonr
MozReview-Commit-ID: 4fquAs3tgXM

--HG--
extra : rebase_source : ef035a385c5ea01ae83278e475bc4c6c85918b10
2017-04-10 15:58:30 +01:00