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

638 Коммитов

Автор SHA1 Сообщение Дата
Eric Rahm 38563e186d Bug 1442480 - Switch nsNodeInfoHash to a nsDataHashTable. r=smaug
This switches `nsNodeInfoHash` to a nsDataHashTable. The hash function and
equality operator are moved to NodeInfoInner so that they can be easily reused.

--HG--
extra : rebase_source : d2e42447a77ffdde620508da28554528ebd78bf8
2018-03-01 15:33:52 -08:00
Emilio Cobos Álvarez 73a6a2096e Bug 1443797: Remove SVGTests::IsInChromeDoc. r=dholbert
Summary: It's effectively the same as AsSVGElement()->IsInChromeDocument().

Reviewers: dholbert

Bug #: 1443797

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

MozReview-Commit-ID: 8f8fUsPfdnm
2018-03-08 09:26:04 +01:00
Emilio Cobos Álvarez 2988d4e66d Bug 1442207: Remove unneeded arguments to nsIMutationObserver. r=smaug
aDocument is always content->OwnerDoc().
aContainer is always content->GetParent().

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

MozReview-Commit-ID: 4xwPCOnhyIL
2018-03-01 22:45:17 +01:00
Emilio Cobos Álvarez 9f26540cc4 Bug 1441547: Make character data change notifications use a const reference for the info parameter. r=smaug
It's not intended to be mutated.

MozReview-Commit-ID: 5nkD1YkidlV

--HG--
extra : rebase_source : 810d429208fa3eaf30e220e77a7d27107cb77346
2018-02-27 15:30:27 +01:00
Emilio Cobos Álvarez 0ad7abf15e Bug 1441009: Don't null-check OwnerDoc. r=smaug
Can't return null.

MozReview-Commit-ID: JzcNwmsCxIu
2018-02-26 00:31:42 +01:00
Emilio Cobos Álvarez 7dffe29d8f Bug 1432490: Make nsComputedDOMStyle::GetStyleContext / GetStyleContextNoFlush not take a presShell. r=bz
Everyone calls them with the shell of the current composed document, and this
allows the multi-presShell stuff to just be in UpdateCurrentStyleSources /
DoGetStyleContextNoFlush.

The only reason we need to use OwnerDoc()->GetShell() instead of the composed
doc in GetStyleContext / GetStyleContextNoFlush is Element::GetBindingURL, which
does expect to get the binding URL for stuff outside of the composed doc (and
changing that gave me a useless browser).

That's technically a behavior change on the cases that used to pass nullptr, but
I think all callers are fine with that. I could also just add a special function
for that particular case, it may be worth it.

MozReview-Commit-ID: 2XlnkgdgDCK
2018-02-25 02:23:59 +01:00
Hiroyuki Ikezoe 1b0cba9367 Bug 1417354 - Introduce nsIDocument::GetPresContext(). r=smaug
It would be convenient to get nsPresContext from nsIDocument.

MozReview-Commit-ID: Ei6V3UE8XGr

--HG--
extra : rebase_source : 8d2a917eb62cf341e4e1810451fd01c01dbc3bad
2018-02-21 07:00:10 +09:00
Dorel Luca f41b03eca9 Backed out changeset 38577c007450 (bug 1424371) for Marionett test failure on testing/marionette/harness/marionette_harness/tests/unit/test_window_maximize.py. CLOSED TREE 2018-02-19 22:15:23 +02:00
Milan Sreckovic 7571df7e7c Bug 1424371: Use BaseRect access methods instead of member variables in dom/ r=qdot
MozReview-Commit-ID: HXWhggOMIEK

--HG--
extra : rebase_source : 9c9eacf80d2b7f78faa82a1549170b98d12cdaa8
2018-02-19 12:56:10 -05:00
Cosmin Sabou 6e3859bfa5 Merge mozilla-central to autoland. a=merge on a CLOSED TREE 2018-02-19 00:00:43 +02:00
Robert Longson 728a3f36fc Bug 1435477 - Make the SVG dom code use the WebIDL constants from the bindings r=jwatt 2018-02-18 15:53:13 +00:00
Masayuki Nakano cf83ee7bb4 Bug 1438157 - part 2: Remove unnecessary second argument of EventUtils.synthesizeKey() r=smaug
Note that this patch also replaces legacy VK_* with KEY_*, and replaces
synthesizeKey() for inputting some characters with sendString() because
it's better and clearer what it does and it sets shiftKey state properly.

MozReview-Commit-ID: De4enbjux3T

--HG--
extra : rebase_source : 2296b84bff8e22f01eeb48cd8614fac5db11136a
2018-02-15 04:15:39 +09:00
Chris Peterson fe5cd3d5d9 Bug 1436263 - Part 3: Remove `virtual` from final virtual function declarations. r=froydnj
MozReview-Commit-ID: 8pjYjEvQF42

--HG--
extra : rebase_source : 5eb0bea2ef5f06a811b4f3daf57ce8720f12dd07
2018-02-08 21:22:43 -08:00
Chris Peterson 0129d900f3 Bug 1436263 - Part 2: Replace `override final` virtual function specifiers with just `final`. r=froydnj
MozReview-Commit-ID: 70gt5SUu4Dv

--HG--
extra : rebase_source : 71912c6bde22aaed01e70615a4ee794a36e70d0e
extra : source : 1c22d4c65d70b797ee3e963ec426c90e1f89b5e3
2018-02-05 22:50:00 -08:00
Chris Peterson d09123f248 Bug 1436263 - Part 1: Replace `final override` virtual function specifiers with just `final`. r=froydnj
MozReview-Commit-ID: DE5HkIhsZ6D

--HG--
extra : rebase_source : 94831c1e13a840dd2ea0600f64bcf70c2bf938d9
extra : source : cf9283bf1b0bca3a6311c98e227329d451f80ecb
2018-02-05 22:46:57 -08:00
Boris Zbarsky 25715415a1 Bug 1436902 part 2. Use NS_INLINE_DECL_REFCOUNTING_INHERITED for some classes that have otherwise-empty QI impls. r=mccr8
MozReview-Commit-ID: 95xACATqz7p
2018-02-12 15:43:55 -05:00
Boris Zbarsky 3660ff5632 Bug 1436508 part 13. Remove nsIDOMMutationEvent constants. r=masayuki
MozReview-Commit-ID: Anl5QJZknJL
2018-02-09 11:17:10 -05:00
Jonathan Watt 843da70a1a Bug 1436438 part 1 - Remove the tests that test SVG path data DOM interfaces. r=longsonr
MozReview-Commit-ID: 78yzAb6Khf1
2018-01-26 10:39:11 +00:00
Dorel Luca 890eb016d9 Merge mozilla-central to autoland. r=merge
--HG--
extra : rebase_source : f28e015c1411d7185cd69a272fea28620af062d9
2018-02-07 12:18:35 +02:00
Cameron McCormack a3eee241b4 Bug 1435666 - Part 1: Remove nsIDOMSVGElement. r=bz
MozReview-Commit-ID: Hlfnu3pXC0n

--HG--
extra : rebase_source : b50343bbebe2044442af4491f7c97209ad8d4fc0
2018-02-04 17:40:57 +08:00
Ryan Hunt 0b29c49678 Remove implicit fuzzy operator== from BaseMatrix (bug 1435406, r=mattwoodrow)
--HG--
extra : rebase_source : 2635f386b96644922a345cea3a8fca6e3614253f
extra : histedit_source : b7cc3424492f88cbd32f3f945c5af86ff43ca0d0
2018-02-02 15:14:08 -06:00
Robert Longson c4391552bc Bug 1435568 - Remove SVGUnitTypes values from elements r=jwatt r=bkelly (DOM Peer) 2018-02-06 21:35:34 +00:00
Boris Zbarsky 13dda50f75 Bug 1435138 part 4. Remove nsIDOMSVGLength. r=qdot
MozReview-Commit-ID: HwKT9Bdby6F
2018-02-02 08:21:33 -05:00
Boris Zbarsky 3afbe4d699 Bug 1435138 part 3. Remove nsIDOMSVGLength's SVG_LENGTHTYPE_* constants. r=qdot
MozReview-Commit-ID: GvzWbe6cr5r
2018-02-02 08:21:33 -05:00
Boris Zbarsky c79197d0df Bug 1435138 part 2. Remove nsIDOMSVGLength's valueAsString attribute. r=qdot
MozReview-Commit-ID: DLIIV93REFx
2018-02-02 08:21:32 -05:00
Boris Zbarsky a77e01b899 Bug 1435138 part 1. Remove unused nsIDOMSVGLength bits. r=qdot
MozReview-Commit-ID: ADZly4KLD0x
2018-02-02 08:21:32 -05:00
Boris Zbarsky 478687c2e8 Bug 1434686 part 4. Use IgnoreErrors() in dom/. r=mystor
MozReview-Commit-ID: GwVDrTLPTOb
2018-02-01 14:21:14 -05:00
Cameron McCormack d02e54b79b Bug 1430014 - Part 5: Stop building old style system classes when MOZ_OLD_STYLE is not defined. r=xidorn
MozReview-Commit-ID: CIHyPdF7Exl

--HG--
extra : source : 78a2fc781eead47af3923efcde58569c5d882ab1
2018-02-01 15:04:04 +11:00
Cameron McCormack cc7db5c40c Bug 1430014 - Part 4: #ifdef out unnecessary code when the old style system is not built. r=xidorn
MozReview-Commit-ID: 1FZ9VzjcPzN

--HG--
extra : source : de22d220635f8c059834b76f769d5215ab1a8b5b
2018-02-01 15:04:04 +11:00
Boris Zbarsky 248a8c7b00 Bug 1432944 part 13. Remove the NS_FORWARD_NSIDOMELEMENT_TO_GENERIC macro. r=mccr8
MozReview-Commit-ID: 8A1VcWArVcP
2018-01-29 23:29:11 -05:00
Boris Zbarsky b6b8acada6 Bug 1432186 part 18. Remove no-longer-needed nsIDOMNode-forwarding defines. r=mccr8
MozReview-Commit-ID: FbP5fVQ3c6m
2018-01-29 23:10:52 -05:00
Robert Longson 5b2f441cf2 Bug 1419764 - change mHadTransformBeforeLastBaseValChange to mRequiresFrameReconstruction in order to better reflect its purpose r=dholbert 2018-01-27 21:39:08 +00:00
Robert Longson 4e0dcdc8da Bug 1419764 - Improve performance where a transform is set by direct matrix manipulation. r=dholbert
MozReview-Commit-ID: zzDTSXtRiU
2018-01-26 10:21:34 -08:00
Andrea Marchesini 35c2c8122a Bug 1431000 - Introduce nsINode::InsertChildBefore, r=catalinb 2018-01-25 15:59:42 +01:00
Csoregi Natalia f9dc75cd65 Backed out changeset 640595d09e90 (bug 1419764) for reftest failures. a=backout 2018-01-25 12:23:02 +02:00
Robert Longson d339da0191 Bug 1419764 - Improve performance where a transform is set by direct matrix manipulation. r=dholbert 2018-01-24 07:07:02 +00:00
Andrea Marchesini 85b163bc38 Bug 1430998 - Rename nsINode::InsertChildAt to InsertChildAt_Deprecated, r=catalinb 2018-01-23 14:30:18 +01:00
Andrea Marchesini 41d4da5cef Bug 1425440 - Introduce nsINode::RemoveChildNode, r=catalinb 2018-01-15 17:18:38 +01:00
Chris Peterson 37efe4d0e6 Bug 1428535 - Add missing override specifiers to overridden virtual functions. r=froydnj
MozReview-Commit-ID: DCPTnyBooIe

--HG--
extra : rebase_source : cfec2d96faeb11656d86d760a34e0a04cacddb13
extra : intermediate-source : 6176724d63788b0fe8caa3f91607c2d93dbaa7ec
extra : source : eebbb0600447f9b64aae3bcd47b4be66c02a51ea
2017-11-05 19:37:28 -08:00
Boris Zbarsky 02eaa145e7 Bug 1429531. Add MOZ_CAN_RUN_SCRIPT annotations to SVG methods that can call GetPrimaryFrame. r=mystor
MozReview-Commit-ID: KoXEBUa2OjR
2018-01-11 23:01:20 -05:00
Cameron McCormack 8731df3c34 Bug 1427512 - Part 29: Remove nsIDOMCSSDeclaration. r=xidorn,jryans,bz
This removes the .style attribute from nsIDOMSVGElement, but there
shouldn't be any users of that.

MozReview-Commit-ID: LOBSFo85Utn
2018-01-11 16:17:57 +08:00
Robert Longson 14221de940 (no bug): Fix typo in code-comment, in nsSVGElement.cpp. r=dholbert
DONTBUILD because comment-only
2018-01-08 14:17:25 -08:00
Jon Coppeard bc9a97d964 Bug 1361369 - Allow async attribute on inline module scripts r=smaug 2018-01-08 15:17:34 +00:00
Boris Zbarsky 9874643dc6 Bug 1423492 part 4. Stop overring UnsetAttr in SVGElement. r=bytesized
There are now no more overrides of UnsetAttr, so it can stop being virtual.

MozReview-Commit-ID: 4QzAKCkRfgs
2018-01-03 21:03:50 -05:00
Boris Zbarsky 834c47ec08 Bug 1423492 part 3. Stop overring UnsetAttr in SVGMarkerElement. r=bytesized,qdot
This changes behavior some, by moving the code involved from "before we remove
the attribute" to AfterSetAttr.  But I think it should be OK, and SVG elements
can't sanely implement BeforeSetAttr right now...

MozReview-Commit-ID: KQGIDQOMGne
2018-01-03 21:03:45 -05:00
Boris Zbarsky 95e7db08f7 Bug 1423492 part 2. Stop overring UnsetAttr in SVGMPathElement. r=bytesized
MozReview-Commit-ID: JdjEuESAsD9
2018-01-03 21:03:29 -05:00
Boris Zbarsky fc8179478c Bug 1423492 part 1. Stop overring UnsetAttr in SVGAnimationElement. r=bytesized
MozReview-Commit-ID: Ih8QmVkoOFZ
2018-01-03 21:03:27 -05:00
Boris Zbarsky 2414b4dea3 Bug 1423490 part 2. Stop overriding SetAttr in SVGStyleElement. r=bytesized
This aligns the behavior with HTMLStyleElement.

There are no more overrides, so SetAttr can become non-virtual.

MozReview-Commit-ID: 9PFrHg7x0nY
2018-01-03 14:21:23 -05:00
Boris Zbarsky 39d7ed06f0 Bug 1423490 part 1. Stop overriding SetAttr in SVGAElement. r=bytesized
This aligns SVGAElement with HTMLAnchorElement in terms of how they handle
attribute changes.

MozReview-Commit-ID: Azr6tTBaxTT
2018-01-03 14:21:22 -05:00
Andrea Marchesini 6ee7f4e6f3 Bug 1425321 - Renaming nsINode::RemoveChildAt to RemoveChildAt_Deprecated, r=catalinb 2018-01-03 14:01:03 +01:00
Robert Longson 018c97b584 Bug 1419250 - check for division by zero in length conversions and fail the conversion in such cases r=dholbert 2017-12-30 17:07:27 +00:00
Emilio Cobos Álvarez c8eb630ebe Bug 1423990: Move the last few attribute-related methods outside of nsIContent. r=bz
MozReview-Commit-ID: 8JZuS6O8f8W
2017-12-25 17:50:10 +01:00
Emilio Cobos Álvarez ffdf5d2cb5 Backout changeset e43f568b3e9a (bug 1423990) because some OSX-only code still doesn't build. r=me 2017-12-25 12:55:45 +01:00
Emilio Cobos Álvarez c0959b2955 Bug 1423990: Move the last few attribute-related methods outside of nsIContent. r=bz
MozReview-Commit-ID: 8JZuS6O8f8W

--HG--
extra : rebase_source : 09b82acb4f3d69e8a4345457ab217443bc28d6e2
2017-12-07 19:13:50 +01:00
Hiroyuki Ikezoe 8c0001196d Bug 1415787 - Wait for focus before proceeding test. r=daoshengmu
To process focus handling deterministic, we need to wait for focus before
proceeding test.

MozReview-Commit-ID: 78EWlA3QuWM

--HG--
extra : rebase_source : 6473b0e1d364f9d3f8a5c43f82ee25be54a478bf
2017-12-21 10:49:06 +09:00
Hiroyuki Ikezoe 1f9e96c9dc Bug 1415787 - Add two extra elements in the SVG element to avoid losing focus. r=daoshengmu
On MacOSX, more precisely if full keyboard access is not enabled on MacOSX,
we skip focusing link elements in SVG with tab key, so if there is no more
elements to be focused in the SVG, the focus will be moved outside the SVG.
To prevent this situation, there needs more focusable elements in the SVG.

MozReview-Commit-ID: HGGMjA0Asfw

--HG--
extra : rebase_source : 5f4b951f6dfcb7572cc947744365b0609d6c92f1
2017-12-21 10:49:05 +09:00
Robert Longson de99e463ac Bug 1420492 - avoid division by zero when constructing an nsSVGArcConverter r=dholbert 2017-12-10 22:43:23 +00:00
Sylvestre Ledru 9bfe27d903 Bug 1394734 - Replace CONFIG['GNU_C*'] by CONFIG['CC_TYPE'] r=glandium
MozReview-Commit-ID: 7duJk2gSd4m

--HG--
extra : rebase_source : 7312fe276e561e8c034a5f6749774ae812727f9c
2017-12-07 22:09:15 +01:00
Eric Rahm 07c97a5afe Bug 1423773 - Part 1: Remove usage of nsStringGlue.h. r=glandium
This removes an unnecessary level of indirection by replacing all
nsStringGlue.h instances with just nsString.h.

--HG--
extra : rebase_source : 340989240af4018f3ebfd92826ae11b0cb46d019
2017-12-06 16:52:51 -08:00
Emilio Cobos Álvarez 74b31155f7 Bug 1423167: Move most attribute-related methods from nsIContent to Element. r=bz
MozReview-Commit-ID: 6WXqNiODttD
2017-12-06 16:05:59 +01:00
Kris Maglione 9f27533bfc Bug 1415352: Part 1b - Store the subject principal when parsing style attributes. r=bz
This change stores the subject principal in the URLExtraData when parsing
style attributes, which causes it to be used as the triggering principal for
those loads rather than defaulting to the document principal.

MozReview-Commit-ID: 22tmNRRCgaj

--HG--
extra : rebase_source : d025870431a457a417523ff57bd8eac3b41d65d0
2017-11-02 13:36:14 -07:00
Kris Maglione 1c66345e09 Bug 1415352: Part 1a - Pass subject principal through to ParseAttribute. r=bz
This is necessary in order to parse style attributes using the subject
principal of the caller, rather than defaulting to the page principal.

MozReview-Commit-ID: GIshajQ28la

--HG--
extra : rebase_source : 5dba46f61d70ec647cae16383b62961ac72d2f47
2017-11-01 20:35:52 -07:00
Kyle Machulis f25f505bc5 Bug 1415747 - Remove nsIDOMHTMLScriptElement; r=bz
MozReview-Commit-ID: 3I7qVTsKFJC
2017-11-10 13:10:00 -08:00
Botond Ballo 9b9daf3f62 Bug 1382534 - Only reuse the cached path in SVGGeometryElement::GetOrBuildPath() if it has the fill rule we want. r=longsonr
MozReview-Commit-ID: 7G99pnifbTv

--HG--
extra : rebase_source : 7a585b57308eeefe00c2cb5c334bcfa39f11ab93
2017-09-25 16:58:19 -04:00
Andrew Osmond 95ee2e55dc Bug 1404422 - Part 4. Remove imgIOnloadBlocker and related from tree as redundant. r=tnikkel 2017-11-01 06:59:10 -04:00
Nicholas Nethercote 8ad99dd7fa Bug 1411893 - Introduce nsStaticAtom. r=emilio,froydnj.
It's a sub-class of nsAtom, useful for cases where you know you are dealing
exclusively with static atoms. The nice thing about it is that you can use
raw nsStaticAtom pointers instead of RefPtr<>. (In fact, the AddRef/Release
implementations ensure that we'll crash if we use RefPtr<nsStaticAtom>.)

MozReview-Commit-ID: 4Q6QHX5h44V

--HG--
extra : rebase_source : e4237f85b4821b684db0ef84d1f9c5e17cdee428
2017-10-27 10:31:13 +11:00
Andrew McCreight 298aa82710 Bug 1412125, part 2 - Fix dom/ mode lines. r=qdot
This was automatically generated by the script modeline.py.

MozReview-Commit-ID: BgulzkGteAL

--HG--
extra : rebase_source : a4b9d16a4c06c4e85d7d85f485221b1e4ebdfede
2017-10-26 15:08:41 -07:00
Emilio Cobos Álvarez dd634e3981 Bug 1411612: Kill nsINode::eCONTENT. r=bz
MozReview-Commit-ID: ESlOqlwhcHI

--HG--
extra : rebase_source : fe6a02469dca1e50c24ba166e15e39160ab4551b
2017-10-25 17:19:11 +02:00
Tom Schuster d3b457113a Bug 638054 - Remove or fix tests outside JS using watch/unwatch. r=bz,fitzgen 2017-10-24 20:48:14 +02:00
Hiroyuki Ikezoe 22eab18afc Bug 1409633 - Drop mClone in SVGUseElement. r=heycam
It has been moved into nsSVGUseFrame in bug 1393791.

MozReview-Commit-ID: B5ReYZA4AyR

--HG--
extra : rebase_source : 87f01b6dc9fdd3d1f9de39ffdf096ec8c8b6d4dd
2017-10-18 14:28:47 +09:00
Markus Stange 3d6a13ead7 Bug 1409132 - Handle fX == 0 and fY == 0 appropriately when converting the frequency from user space to filter space. r=longsonr
MozReview-Commit-ID: 1kXGaXoE4ss

--HG--
extra : rebase_source : 325312615142e8f917b2a4acc19b8947ee44a805
2017-10-16 15:14:22 -04:00
Robert Longson 0e21ecb9e3 Bug 1398806 - GetCtx and GetNearestViewport should return the nearest svg or symbol element which is now an SVGViewportElement rather than only returning the nearest svg element because a symbol establishes a viewport too. r=dholbert 2017-10-10 07:58:34 +01:00
Kris Maglione 9c145b38f6 Bug 1406278: Part 8b - Use subject principal as triggering principal in style <link> "href" attribute. r=bz
MozReview-Commit-ID: LWMkBcB4WIg

--HG--
extra : rebase_source : fa2daf25c58190cee7e55798347d4eaffa0d5250
extra : histedit_source : f2887c9e53c572aa5e675600cd1aeb6c5a72becc%2Ce7a84ac505319ca24e65c73a4df13014a0a0cdc0
2017-10-05 19:40:48 -07:00
Kris Maglione 4275cd1039 Bug 1406278: Part 1 - Pass subject principal to SetAttribute and friends. r=bz
In order to tailor certain security checks to the caller that is attempting to
load a particular piece of content, we need to be able to attach an
appropriate triggering principal to the corresponding requests. Since most
HTML content is loaded based on attribute values, that means capturing the
subject principal of the caller who sets those attributes, which means making
it available to AfterSetAttr hooks.

MozReview-Commit-ID: BMDL2Uepg0X

--HG--
extra : rebase_source : 25e438c243700a9368c393e40e3a6002d968d6c8
2017-10-09 14:33:38 -07:00
Nicholas Nethercote d225f7151b Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro.
(Path is actually r=froydnj.)

Bug 1400459 devirtualized nsIAtom so that it is no longer a subclass of
nsISupports. This means that nsAtom is now a better name for it than nsIAtom.

MozReview-Commit-ID: 91U22X2NydP

--HG--
rename : xpcom/ds/nsIAtom.h => xpcom/ds/nsAtom.h
extra : rebase_source : ac3e904a21b8b48e74534fff964f1623ee937c67
2017-10-03 09:05:19 +11:00
Sebastian Hengst fd1c572923 merge mozilla-central to mozilla-inbound. r=merge a=merge on a CLOSED TREE 2017-10-05 11:47:25 +02:00
Jonathan Watt e102e14d75 Bug 1403500, part 4 - Document and do some renaming for SVGAnimationElement's TargetReference. r=longsonr
MozReview-Commit-ID: 6vcMQAoJ9em
2017-09-12 20:14:17 +01:00
Jonathan Watt 957895f090 Bug 1403500, part 3 - Document and do some renaming for SVGMPathElement's PathReference. r=longsonr
MozReview-Commit-ID: ILBHXwF4FkR
2017-09-12 14:37:10 +01:00
Jonathan Watt 33a64073fd Bug 1403500, part 2 - Document and do some renaming for SVGUseElement's SourceReference. r=longsonr
MozReview-Commit-ID: EEQzeHoBZP9
2017-09-12 10:43:16 +01:00
Catalin Badea f8162c4bfd Bug 651120 - Remove index argument from content removed/appended/inserted notifications. r=peterv 2017-10-03 11:09:08 +01:00
cku 30669a5437 Bug 1343147 - Part 2. A crash test of painting elements with both perspective and transform in generate text mask for background-clip:text. r=mstange
MozReview-Commit-ID: 6KKo9ap2VZu

--HG--
extra : rebase_source : 8c780d6b95389f8b1ba76655c0562246a11b894d
extra : source : 42907ee02b4c09f29283c330389811df5c8a2570
2017-09-08 14:24:17 +08:00
Robert Longson 7e327c39d3 Bug 1403405 - Don't create a temporary nsAngle object just to parse an angle r=birtles 2017-09-30 11:47:00 +01:00
Wes Kocher 61c098eae7 Merge inbound to m-c a=merge CLOSED TREE
MozReview-Commit-ID: 3pMHYV9oXLm

--HG--
rename : dom/base/nsReferencedElement.cpp => dom/base/IDTracker.cpp
rename : dom/base/nsReferencedElement.h => dom/base/IDTracker.h
2017-09-27 16:51:49 -07:00
Jonathan Watt 862c8e7e8d Bug 1403345, part 4 - Rename nsReferencedElement to dom::IDTracker. r=longsonr
MozReview-Commit-ID: 3cGMHDHEhx0
2017-09-08 10:02:05 +01:00
Jonathan Watt 0d623a1609 Bug 1403345, part 3 - Move nsReferencedElement.h/.cpp to IDTracker.h/.cpp. r=longsonr
MozReview-Commit-ID: Ki6oS79xuhJ

--HG--
rename : dom/base/nsReferencedElement.cpp => dom/base/IDTracker.cpp
rename : dom/base/nsReferencedElement.h => dom/base/IDTracker.h
2017-09-08 10:02:05 +01:00
Sebastian Hengst cdcf3bf44b Backed out changeset 59252e3229f1 (bug 1403345)
--HG--
rename : dom/base/IDTracker.cpp => dom/base/nsReferencedElement.cpp
rename : dom/base/IDTracker.h => dom/base/nsReferencedElement.h
2017-09-27 10:43:54 +02:00
Sebastian Hengst ec33e563cc Backed out changeset 1b5d3684ecfb (bug 1403345) 2017-09-27 10:43:49 +02:00
Jonathan Watt 3c6336aaca Bug 1403345, part 3 - Rename nsReferencedElement to dom::IDTracker. r=longsonr
MozReview-Commit-ID: AkNuXab6xQr
2017-09-05 11:17:50 +01:00
Jonathan Watt 462030153c Bug 1403345, part 2 - Move nsReferencedElement.h/.cpp to IDTracker.h/.cpp. r=longsonr
MozReview-Commit-ID: 7yiAaKnXhCq

--HG--
rename : dom/base/nsReferencedElement.cpp => dom/base/IDTracker.cpp
rename : dom/base/nsReferencedElement.h => dom/base/IDTracker.h
2017-09-05 10:45:18 +01:00
cku e3d9a66b95 Bug 1402798 - Part 2. Add a crash test for applying fill:url() property to an SVG text element. r=longsonr+218550
MozReview-Commit-ID: LqkK3Z5sYTB

--HG--
extra : source : 45a8767bf7af40140c64e6d95946cc710ccb89b9
extra : amend_source : d9995843def1c8d65554fba2d312c8b772339494
2017-09-26 14:56:25 +08:00
Sebastian Hengst 72d1ea4a4b merge mozilla-central to autoland. r=merge a=merge 2017-09-27 11:49:57 +02:00
Nicholas Nethercote dfd3b7e7aa Bug 1400459 (part 2) - Devirtualize nsIAtom. r=heycam.
This patch merges nsAtom into nsIAtom. For the moment, both names can be used
interchangeably due to a typedef. The patch also devirtualizes nsIAtom, by
making it not inherit from nsISupports, removing NS_DECL_NSIATOM, and dropping
the use of NS_IMETHOD_. It also removes nsIAtom's IIDs.

These changes trigger knock-on changes throughout the codebase, changing the
types of lots of things as follows.

- nsCOMPtr<nsIAtom> --> RefPtr<nsIAtom>

- nsCOMArray<nsIAtom> --> nsTArray<RefPtr<nsIAtom>>
  - Count() --> Length()
  - ObjectAt() --> ElementAt()
  - AppendObject() --> AppendElement()
  - RemoveObjectAt() --> RemoveElementAt()

- ns*Hashtable<nsISupportsHashKey, ...> -->
  ns*Hashtable<nsRefPtrHashKey<nsIAtom>, ...>

- nsInterfaceHashtable<T, nsIAtom> --> nsRefPtrHashtable<T, nsIAtom>
  - This requires adding a Get() method to nsRefPtrHashtable that it lacks but
    nsInterfaceHashtable has.

- nsCOMPtr<nsIMutableArray> --> nsTArray<RefPtr<nsIAtom>>
  - nsArrayBase::Create() --> nsTArray()
  - GetLength() --> Length()
  - do_QueryElementAt() --> operator[]

The patch also has some changes to Rust code that manipulates nsIAtom.

MozReview-Commit-ID: DykOl8aEnUJ

--HG--
extra : rebase_source : 254404e318e94b4c93ec8d4081ff0f0fda8aa7d1
2017-09-26 08:33:21 +10:00
vincentliu 6f63ca2743 Bug 1347617 - Add crash tests. r=dholbert 2017-09-25 13:35:14 +08:00
Tom Tromey 971dbd3853 Bug 1388789 - clean up \0 emission in nsTextFormatter; r=froydnj
nsTextFormatter unconditionally emitted a trailing \0, leading some code
elsewhere to have to work around this.  This changes the code to only
emit it in snprintf.

MozReview-Commit-ID: G3CBpAPp9Tn

--HG--
extra : rebase_source : 36666476a4f796e2553c9fa31daa54d245ae3b5f
2017-09-06 09:38:58 -06:00
Tom Tromey 11aef69343 Bug 1388789 - use nsTextFormatter::ssprintf in more places; r=froydnj
A few places were using snprintf where ssprintf would be more
appropriate.

MozReview-Commit-ID: LnBy3IcG98C

--HG--
extra : rebase_source : 0351d27afe451d7a40ac464e0ac62cecc78f73c5
2017-09-06 08:19:05 -06:00
Jonathan Watt 4130888dfd Bug 1342951, part 4 - Add a version of SVGTextFrame::GetSubStringLength that can be used independantly of reflow, to avoid sync reflows. r=heycam
MozReview-Commit-ID: CJqUwF3rXP4
2017-09-02 22:22:54 +01:00
Jonathan Watt 341ea5e4f1 Bug 1401356, part 2 - Rename nsSVGEffects to SVGObserverUtils. r=longsonr 2017-08-30 15:58:31 +01:00
Jonathan Watt 0e4feb75d3 Bug 1401356, part 1 - Rename nsSVGEffects.h/.cpp to SVGObserverUtils.h/.cpp. r=longsonr
--HG--
rename : layout/svg/nsSVGEffects.cpp => layout/svg/SVGObserverUtils.cpp
rename : layout/svg/nsSVGEffects.h => layout/svg/SVGObserverUtils.h
2017-08-30 14:14:46 +01:00
Robert Longson c9b20d2f73 Bug 1399942 - feTurbulence filter should only do nothing if baseFreq is zero in dx and dy r=dholbert
--HG--
rename : layout/reftests/svg/filters/feTurbulence-zero-baseFreq-ref.svg => layout/reftests/svg/filters/feTurbulence-zero-baseFreq-01-ref.svg
rename : layout/reftests/svg/filters/feTurbulence-zero-baseFreq.svg => layout/reftests/svg/filters/feTurbulence-zero-baseFreq-01.svg
2017-09-16 17:04:29 +01:00
Boris Zbarsky f23f66c56c Bug 1393806 part 1. Change nsNodeUtils cloning/adopting stuff to use an ErrorResult for errors. r=peterv
This will allow us to propagate out more informative errors in some cases.

MozReview-Commit-ID: 9FbzV5VRMqN
2017-09-13 13:34:55 -04:00
Jonathan Watt 1c3c1e17ec Bug 1342951 - Revert landing of wrong patch. r=me 2017-08-14 16:01:48 +01:00
Jonathan Watt 3808c49bb5 Bug 1342951 - Limit SVGTextFrame::GetSubStringLength sync reflows to the SVGTextFrame. r=heycam 2017-08-14 16:00:33 +01:00
Andrew McCreight 7f7f149167 Bug 1395636 - Convert code to use NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED. r=peterv
MozReview-Commit-ID: DivJPerL5SF

--HG--
extra : rebase_source : 890df75914906a5d34e8af67f9fc3a4be239d2d6
2017-08-31 16:29:22 -07:00
Sebastian Hengst 2f7f455fa1 Backed out changeset 9306866e8df0 (bug 1395636) for build bustage. r=backout on a CLOSED TREE
--HG--
extra : amend_source : 20d028d6b971cf6a221dc2f1553687d6c074bdcb
2017-09-06 19:18:06 +02:00
Andrew McCreight 4d6e76dfcf Bug 1395636 - Convert code to use NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED. r=peterv
MozReview-Commit-ID: DivJPerL5SF

--HG--
extra : rebase_source : cb952cfc5600a163a5580438e5b0177595689dab
2017-08-31 16:29:22 -07:00
Andrea Marchesini aa2173be5a Bug 1396896 - SVGAElement doesn't need to be cycle collected any more, r=mccr8 2017-09-05 23:12:31 +02:00
cku f21732fadc Bug 1395873 - Append eUseUserSpaceOfUseElement flag after all standard SVGBoundingBoxOptions checked. r=longsonr+218550
MozReview-Commit-ID: 6qjmfL4mGuI

--HG--
extra : rebase_source : e937d3d101e0881549db4582bd7719801af57b7f
2017-09-01 22:37:59 +08:00
Sylvestre Ledru d70c8a2f3c Bug 1395870 - Changes in bug 1361639 caused some deadcode in SVGTransformableElement::GetAnimatedTransformList r=cjku
MozReview-Commit-ID: K97vjkbNMtr

--HG--
extra : rebase_source : 9c12f2a4c6031f6c80f56f8a9b5db01ff69efe59
2017-09-01 10:52:33 +02:00
Sebastian Hengst 444f7c3600 merge mozilla-central to mozilla-inbound. r=merge a=merge 2017-08-31 14:39:13 +02:00
Jonathan Watt f7d98d6559 Bug 1395512 - Make dom/svg/test/test_text_2.html produce useful and non-inverted error messages. r=jfkthame
MozReview-Commit-ID: KJHRBmbbuBq
2017-08-10 12:47:20 +01:00
Andrew McCreight 78807d8776 Bug 1391005 - Eliminate NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED. r=peterv
Replace it with NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION, because it
has been the same for a while.

MozReview-Commit-ID: 5agRGFyUry1

--HG--
extra : rebase_source : 5388c56b2f6905c6ef969150f0c5b77bf247624d
2017-08-29 16:02:48 -07:00
cku db228b8c69 Bug 1361639 - Part 2. Add test cases of calling getBBox on use element in test_bbox.xhtml. r=longsonr+218550
MozReview-Commit-ID: B2DetAVcQM6

--HG--
extra : rebase_source : 04d0eb757f22334def4389af5ffd9908af04d9d1
2017-08-30 11:22:43 +08:00
cku c13c8d4e5e Bug 1361639 - Part 1. Depend on input flag, return bbox of an <use> element in different coordinate system. r=longsonr+218550
When nsSVGUtils::getBBox is called on <use> element:
1. Call from SVGGraphicsElement::getBBox(WebAPI):
   According to the spec, getBBox should return the bbox as the union box of
   children in user space.
2. Call from mask/ clip-path or filter painting:
   Since we want to paint those elements in the coordinate space formed by
   <use>(bug 537623), getBBox should return the bbox as the union box of
   children in coordinate system of <use>.

Depend on the use case, we return the bbox of an <use> element on different
coordinate system. In this patch, I bring in a new
flag(eInUserSpaceOfUseElement) so that nsSVGUtils::getBBox can return bbox on
different coordinate system accordingly.

MozReview-Commit-ID: FfZalTI8J0y

--HG--
extra : rebase_source : c33e980c00c450792b30f60f6aa01b53e1c5595c
2017-08-29 20:41:45 +08:00
Bobby Holley 9631dd3e22 Bug 1393791 - Move SVG Use anonymous content to the frame. r=emilio
This brings it into alignment with what everything else does.

MozReview-Commit-ID: 2A9p8umHnKi
2017-08-27 15:29:32 -07:00
Nicholas Nethercote 7e120ce35e Bug 1393636 (part 3) - Pass nsWindowSizes to more AddSizeOf*() functions. r=heycam.
This is a purely non-functional plumbing change. Instead of passing a
SizeOfState and an nsStyleSizes a bunch of places, we pass an nsWindowSizes,
which contains both of them.

This is a necessary precursor for the next patch.

MozReview-Commit-ID: Ek03wDM50rB

--HG--
extra : rebase_source : 7b05708bd21dc4e3812ea041647fa74bb413d0b9
2017-08-25 14:47:54 +10:00
cku c0dea4d930 Bug 1390088 - Part 1. Change the type of the parameter of nsSVGLength2::GetAnimValue from "SVGSVGElement*" to "SVGViewportElement*" r=jwatt
There are two overloads of nsSVGLength2::GetAnimValue:

1. float nsSVGLength2::GetAnimValue(nsSVGElement*) const;
2. float nsSVGLength2::GetAnimValue(SVGSVGElement*) const;

In Bug 265894, I created SVGViewportElement as a base class of SVGSVGElement.
SVGSVGElement::GetViewBoxTransform was moved to SVGViewportElement in that
refactoring. The local variable 'ctx' in that function was changed from
SVGSVGElement to SVGViewportElement, which when passed to
nsSVGLength2::GetAnimValue caused us to switch from calling the overload that
takes a SVGSVGElement to the overload that takes a nsSVGElement, which is not
what we want.

This patch changes the argument type of the nsSVGLength2::GetAnimValue overload
that takes an SVGSVGElement to take an SVGViewportElement instead, which causes
the GetAnimValue(ctx) calls in SVGViewportElement::GetViewBoxTransform to call
the correct GetAnimValue overload again.

MozReview-Commit-ID: 2cmgIoltYfY

--HG--
extra : rebase_source : b45282cc492cf067ecc3935b03cde243a69ef2b5
2017-08-21 16:19:31 +08:00
Eric Rahm a33f11e0f5 Bug 1391803 - Use nsStringFwd.h for forward declaring string classes. r=froydnj
We should not be declaring forward declarations for nsString classes directly,
instead we should use nsStringFwd.h. This will make changing the underlying
types easier.

--HG--
extra : rebase_source : b2c7554e8632f078167ff2f609392e63a136c299
2017-08-16 16:48:52 -07:00
Nicholas Nethercote 025461bde7 Bug 1390428 (part 1) - Remove many nsXPIDLCString local variables. r=erahm.
These are all easy cases where an nsXPIDLCString local variable is set via
getter_Copies() and then is only used in ways that nsCStrings can also be used
(i.e. no null checks or implicit conversions to |char*|).

In every case the patch trivially replaces the nsXPIDLCString with an
nsCString. (Also, there are a couple of unused nsXPIDLCString variables that
the patch simply removes.)
2017-08-16 13:58:35 +10:00
Nicholas Nethercote 57c26c9834 Bug 1387956 - Overhaul ComputedValues measurement, and add style structs measurement. r=bholley.
This patch moves measurement of ComputedValues objects from Rust to C++.
Measurement now happens (a) via DOM elements and (b) remaining elements via
the frame tree. Likewise for the style structs hanging off ComputedValues
objects.

Here is an example of the output.

> ├──27,600,448 B (26.49%) -- active/window(https://en.wikipedia.org/wiki/Barack_Obama)
> │  ├──12,772,544 B (12.26%) -- layout
> │  │  ├───4,483,744 B (04.30%) -- frames
> │  │  │   ├──1,653,552 B (01.59%) ── nsInlineFrame
> │  │  │   ├──1,415,760 B (01.36%) ── nsTextFrame
> │  │  │   ├────431,376 B (00.41%) ── nsBlockFrame
> │  │  │   ├────340,560 B (00.33%) ── nsHTMLScrollFrame
> │  │  │   ├────302,544 B (00.29%) ── nsContinuingTextFrame
> │  │  │   ├────156,408 B (00.15%) ── nsBulletFrame
> │  │  │   ├─────73,024 B (00.07%) ── nsPlaceholderFrame
> │  │  │   ├─────27,656 B (00.03%) ── sundries
> │  │  │   ├─────23,520 B (00.02%) ── nsTableCellFrame
> │  │  │   ├─────16,704 B (00.02%) ── nsImageFrame
> │  │  │   ├─────15,488 B (00.01%) ── nsTableRowFrame
> │  │  │   ├─────13,776 B (00.01%) ── nsTableColFrame
> │  │  │   └─────13,376 B (00.01%) ── nsTableFrame
> │  │  ├───3,412,192 B (03.28%) -- servo-style-structs
> │  │  │   ├──1,288,224 B (01.24%) ── Display
> │  │  │   ├────742,400 B (00.71%) ── Position
> │  │  │   ├────308,736 B (00.30%) ── Font
> │  │  │   ├────226,512 B (00.22%) ── Background
> │  │  │   ├────218,304 B (00.21%) ── TextReset
> │  │  │   ├────214,896 B (00.21%) ── Text
> │  │  │   ├────130,560 B (00.13%) ── Border
> │  │  │   ├─────81,408 B (00.08%) ── UIReset
> │  │  │   ├─────61,440 B (00.06%) ── Padding
> │  │  │   ├─────38,176 B (00.04%) ── UserInterface
> │  │  │   ├─────29,232 B (00.03%) ── Margin
> │  │  │   ├─────21,824 B (00.02%) ── sundries
> │  │  │   ├─────20,080 B (00.02%) ── Color
> │  │  │   ├─────20,080 B (00.02%) ── Column
> │  │  │   └─────10,320 B (00.01%) ── Effects
> │  │  ├───2,227,680 B (02.14%) -- computed-values
> │  │  │   ├──1,182,928 B (01.14%) ── non-dom
> │  │  │   └──1,044,752 B (01.00%) ── dom
> │  │  ├───1,500,016 B (01.44%) ── text-runs
> │  │  ├─────492,640 B (00.47%) ── line-boxes
> │  │  ├─────326,688 B (00.31%) ── frame-properties
> │  │  ├─────301,760 B (00.29%) ── pres-shell
> │  │  ├──────27,648 B (00.03%) ── pres-contexts
> │  │  └─────────176 B (00.00%) ── style-sets

The 'servo-style-structs' and 'computed-values' sub-trees are new. (Prior to
this patch, ComputedValues under DOM elements were tallied under the the
'dom/element-nodes' sub-tree, and ComputedValues not under DOM element were
ignored.) 'servo-style-structs/sundries' aggregates all the style structs that
are smaller than 8 KiB.

Other notable things done by the patch are as follows.

- It significantly changes the signatures of the methods measuring nsINode and
  its subclasses, in order to handle the tallying of style structs separately
  from element-nodes. Likewise for nsIFrame.

- It renames the 'layout/style-structs' sub-tree as
  'layout/gecko-style-structs', to clearly distinguish it from the new
  'layout/servo-style-structs' sub-tree.

- It adds some FFI functions to access various Rust-side data structures from
  C++ code.

- There is a nasty hack used twice to measure Arcs, by stepping backwards from
  an interior pointer to a base pointer. It works, but I want to replace it
  with something better eventually. The "XXX WARNING" comments have details.

- It makes DMD print a line to the console if it sees a pointer it doesn't
  recognise. This is useful for detecting when we are measuring an interior
  pointer instead of a base pointer, which is bad but easy to do when Arcs are
  involved.

- It removes the Rust code for measuring CVs, because it's now all done on the
  C++ side.

MozReview-Commit-ID: BKebACLKtCi

--HG--
extra : rebase_source : 4d9a8c6b198a0ff025b811759a6bfa9f33a260ba
2017-08-11 16:37:33 +10:00
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