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

125 Коммитов

Автор SHA1 Сообщение Дата
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
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
Cameron McCormack f804c8ca6b Bug 1498755 - Part 6: Move some C++ types from ServoBindingTypes.h to ServoTypes.h r=emilio
Depends on D8647

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

--HG--
extra : moz-landing-system : lando
2018-10-14 00:05:56 +00:00
Olli Pettay abf54817b9 Bug 1428246 - The attributeChangedCallback is fired twice for the *first* style attribute change, r=peterv
The idea with this patch is that style code will first call
InlineStyleDeclarationWillChange before style declaration has changed, and SetInlineStyleDeclaration once it has changed.

In order to be able to report old attribute value, InlineStyleDeclarationWillChange reads the value and also calls AttributeWillChange (so that DOMMutationObserser can grab the old value). Later SetInlineStyleDeclaration passes the old value to
SetAttrAndNotify so that mutation events and attributeChanged callbacks are handled correctly.

Because of performance, declaration can't be cloned for reading the old value. And that is why the recently-added callback is used to detect when declaration is about to change (bug 1466963 and followup bug 1468665).

To keep the expected existing behavior, even if declaration isn't changed, but just a new declaration was created (since there wasn't any), we need to still run all these
willchange/set calls. That is when the code has 'if (created)' checks.

Since there are several declaration implementation and only nsDOMCSSAttributeDeclaration needs the about-to-change callback, GetPropertyChangeClosure is the one to initialize the callback closure, and the struct which is then passes as data to the closure.

Apparently we lost mutation event testing on style attribute when the pref was added, so test_style_attr_listener.html is modified to test both pref values.

--HG--
extra : rebase_source : 9e605d43f22e650ac3912fbfb41abb8d5a2a0c8f
2018-06-26 12:54:00 +03:00
bobslept 705b29c214 Bug 1459111 - Rename ServoCSSParsingEnvironment to ParsingEnvironment. r=emilio
MozReview-Commit-ID: Jl5aoarH0aU
2018-05-14 20:20:20 +02:00
Emilio Cobos Álvarez 5aab8db970 Bug 1408301: Remove getPropertyCSSValue. r=bz
It's been removed for a while on Nightly without any known regressions. This
gives us a full beta cycle of telemetry and two nightly cycles without the API
before shipping.

This only removes the API, followup work will replace serialization by Servo's,
and remove the remaining DOM interfaces.

MozReview-Commit-ID: 2m1taYg5xEr
2018-05-12 11:23:47 +02:00
Emilio Cobos Álvarez 825625678d Bug 1458928: Remove GetCSSParsingEnvironment. r=xidorn
MozReview-Commit-ID: KXGM7JiUZAt

--HG--
extra : rebase_source : 7a3223488e13ddd453298b8f74e9c07a12bf0044
2018-05-03 17:41:48 +02:00
Emilio Cobos Álvarez fbc8297c7c Bug 1458458: Remove dead code from nsDOMCSSAttributeDeclaration. r=hiro
MozReview-Commit-ID: 67r8s3zDZMA
2018-05-02 18:05:13 +02:00
Xidorn Quan e3471c9169 Bug 1452542 part 7 - Replace some uses of nsCSSPropList.h and nsCSSPropAliasList.h with ServoCSSPropList.h. r=emilio
MozReview-Commit-ID: 5TVYITjAYy7

--HG--
extra : rebase_source : a45a6b42a9847e6f2437e23dd841aafea12f647c
2018-04-17 16:57:04 +10:00
Andreea Pavel 1b610a02c9 Backed out 7 changesets (bug 1452542) for failing toolkit/content/tests/chrome/test_arrowpanel.xul on a CLOSED TREE
Backed out changeset f206acff283f (bug 1452542)
Backed out changeset be97e652391f (bug 1452542)
Backed out changeset 4d3a028edaed (bug 1452542)
Backed out changeset 5619bba37cdd (bug 1452542)
Backed out changeset e83a797bdc61 (bug 1452542)
Backed out changeset 255e2feff19f (bug 1452542)
Backed out changeset fac55b1a0706 (bug 1452542)
2018-04-18 20:10:35 +03:00
Xidorn Quan 018214f00b Bug 1452542 part 7 - Replace some uses of nsCSSPropList.h and nsCSSPropAliasList.h with ServoCSSPropList.h. r=emilio
MozReview-Commit-ID: 5TVYITjAYy7

--HG--
extra : rebase_source : 66b132aed72fa58ba8be1fa7aacd1c9035845458
2018-04-17 16:57:04 +10:00
Xidorn Quan 9b466fa2d1 Bug 1454297 - Remove CSS_PROP_LOGICAL and friends. r=emilio
MozReview-Commit-ID: Euzbjf9qkmO

--HG--
extra : rebase_source : 9b76e8b303d89f65e28ced8cb15b7422f6d31775
2018-04-16 16:23:33 +10:00
Xidorn Quan 32f4a411bc Bug 1449039 part 12 - Keep only necessary params for CSS_PROP definitions. r=emilio
MozReview-Commit-ID: 6LG9WjXemno

--HG--
extra : rebase_source : 47c0512e0c87f7875419740f45d1c9ea83c8286f
2018-03-27 09:54:20 +11:00
Boris Zbarsky 4c01bdc27f Bug 1428610 part 7. Make the nsICSSDeclaration length API nicer. r=emilio
MozReview-Commit-ID: 2gs8npBJFJY
2018-01-30 14:48:27 -05:00
Boris Zbarsky c49370b74a Bug 1428610 part 6. Give nsICSSDeclaration::GetPropertyPriority a nicer signature. r=emilio
MozReview-Commit-ID: 4H2zADwdo5L
2018-01-30 14:48:27 -05:00
Boris Zbarsky 4278814e5c Bug 1428610 part 5. Make nsICSSDeclaration::Get/SetCSSText have nicer signatures. r=emilio
MozReview-Commit-ID: B25qvxKj9CW
2018-01-30 14:48:26 -05:00
Boris Zbarsky 59d4896eb6 Bug 1428610 part 4. Move the nsCSSPropertyID overload of nsICSSDeclaration::SetPropertyValue to nsDOMCSSDeclaration. r=emilio
MozReview-Commit-ID: 8BzCHahJjwv
2018-01-30 14:48:26 -05:00
Boris Zbarsky 335a24f297 Bug 1428610 part 3. Move the nsCSSPropertyID overload of nsICSSDeclaration::GetPropertyValue down to nsDOMCSSDeclaration. r=emilio
MozReview-Commit-ID: FHrkptqa2hZ
2018-01-30 14:48:26 -05:00
Cameron McCormack 55dcbea002 Bug 1427512 - Part 16: Remove nsIDOMCSSRule. r=xidorn,jryans,bz
MozReview-Commit-ID: GvVdW9w5Cc4
2018-01-11 16:17:56 +08:00
Boris Zbarsky 04324f18ad Bug 1424474 part 3. Make sure that we only pass non-system subject principals to setters/methods that later use that principal for loading security checks. r=kmag
MozReview-Commit-ID: IjUEG5xwn5
2017-12-20 17:43:18 -05:00
Narcis Beleuzu edb8ba34eb Backed out 2 changesets (bug 1424474) for mochitest failures on test_bug494328.html r=backout on a CLOSED TREE
Backed out changeset 39d5991f02ba (bug 1424474)
Backed out changeset da3dec2fce06 (bug 1424474)
2017-12-21 02:55:27 +02:00
Boris Zbarsky a2696c3c8a Bug 1424474 part 2. Make sure that we only pass non-system subject principals to setters/methods that later use that principal for loading security checks. r=kmag 2017-12-20 17:43:18 -05:00
Narcis Beleuzu 1f7fdd5826 Merge mozilla-central to inbound. r=merge a=merge on a CLOSED TREE 2017-12-06 01:49:19 +02:00
Boris Zbarsky 887ce3941a Bug 1419270 part 2. Use getter or setter specific NeedsSubjectPrincipal annotations more. r=qdot
MozReview-Commit-ID: KBwjFh3TMUg
2017-12-05 16:03:18 -05:00
Boris Chiou 570057e075 Bug 1408303 - Part 3: Move several Servo parsers into ServoCSSParser helper class. r=heycam
We have ServoCSSParser class, and I think it's better to move those
Servo FFI into this class to avoid including ServoBindings.h everywhere.

MozReview-Commit-ID: 6orXtddp9ZU

--HG--
extra : rebase_source : 6da4158c4fec606aaee49fddee3192f94d6c85a3
2017-12-01 17:35:47 +08:00
Kris Maglione 96722433e6 Bug 1415352: Part 1d - Use correct subject principal in CSS environment when modifying attr declarations. r=bz
MozReview-Commit-ID: AnurVwl65fX

--HG--
extra : rebase_source : 05d3820aab2c86b010728b5d2882a7a2e75e0617
2017-11-05 13:23:49 -08:00
Kris Maglione 58662abbfe Bug 1415352: Part 1c - Store the subject principal when setting Element.style properties. r=bz
This causes the subject principal that was responsible for setting a CSS
property, or the full cssText of an attribute, to be threaded through the call
chain to the point where CSS parsing happens, so that it can be used as the
triggering principal when loading URLs for that property.

Note that this allows for different properties defined in the same style
attribute to have different triggering principals, depending on the caller
which originally set them, as long as the cssText of that attribute is not
modified. Once it is, all properties revert to the principal of the caller
that modified the CSS text.

MozReview-Commit-ID: ISUyxbqAZMX

--HG--
extra : rebase_source : d4173d76d9afed74889269e3bf029abca54a4abb
2017-11-03 21:44:03 -07:00
Daniel Holbert 680815cd6e Bug 1412346 part 5: (automated patch) Switch a bunch of C++ files in layout to use our standard mode lines. r=jfkthame
This patch was generated automatically by the "modeline.py" script, available
here: https://github.com/amccreight/moz-source-tools/blob/master/modeline.py

For every file that is modified in this patch, the changes are as follows:
 (1) The patch changes the file to use the exact C++ mode lines from the
     Mozilla coding style guide, available here:
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Mode_Line

 (2) The patch deletes any blank lines between the mode line & the MPL
     boilerplate comment.

 (3) If the file previously had the mode lines and MPL boilerplate in a
     single contiguous C++ comment, then the patch splits them into
     separate C++ comments, to match the boilerplate in the coding style.

MozReview-Commit-ID: EuRsDue63tK

--HG--
extra : rebase_source : 3356d4b80ff6213935192e87cdbc9103fec6084c
2017-10-27 10:33:53 -07:00
Nazım Can Altınova 1112f60fcc Bug 1344314 - stylo: Add an aliasid field to CSS_PROP_ALIAS macro and include them to bindings r=manishearth
This field will be needed for servo side alias pref handling on the
next patch.

MozReview-Commit-ID: LyH2UwZEvMy

--HG--
extra : rebase_source : f3f921581a0cdcc9c63520b528bd0f1e12568958
2017-08-12 14:37:19 -07: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
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
Emilio Cobos Álvarez c9a6e119b0 Bug 1365629: minor cleanup in ServoCSSParsingEnvironment code. r=canaltinova
At first I thought that the problem was related to this bug, so I wrote this.

I think it's worth landing.

MozReview-Commit-ID: G6UKp5l5STm

--HG--
extra : rebase_source : 576c2add36e822d3adf281d91cde44303aa5c051
2017-05-21 15:06:27 +02:00
Xidorn Quan 8d534d8df5 Bug 1345697 part 1 - Various fix for adding new files. r=heycam
MozReview-Commit-ID: 33Ssd7tNZ2K

--HG--
extra : source : 407e3aa3f1b84931b5808861aa9160ce9a733ab9
2017-05-19 16:12:34 +10:00
Nazım Can Altınova ce383280c3 Bug 1360488 - Part 1: stylo: Add ServoCSSParsingEnvironment and pass this instead of URLExtraData r=bholley
It was inconsistent with gecko side and also we needed to pass nsCompatibility enum along with URLExtraData.

MozReview-Commit-ID: 2ceutBfqBrg

--HG--
extra : rebase_source : f342774ed349c65f377cf85865f5905520784ca5
2017-05-11 19:06:43 +03:00
Xidorn Quan 987754e4dc Bug 1343964 part 7 - Use URLExtraData for declaration modification directly for Servo backend. r=heycam
MozReview-Commit-ID: 78JRYKk9hgV

--HG--
extra : rebase_source : 1a86db507451637379e35ea17d9dbd88e8dc6902
2017-04-04 16:09:20 +10:00
Xidorn Quan 04c1637bb1 Bug 1343964 part 5 - Factor out common part of nsDOMCSSDeclaration::Parse{,Custom}PropertyValue. r=heycam
MozReview-Commit-ID: 6IX8sWF4Vhn

--HG--
extra : rebase_source : 197c9ccf51e8bb86f7335a5a72b370c89a23d7ea
2017-04-04 15:28:07 +10:00
Xidorn Quan 5e29805363 Bug 1294299 part 8 - Refactor interface provided by css::Declaration. r=heycam
The main targets of this refactor are:
1. Move most of the logic of distinguishing properties and custom
   properties from nsDOMCSSDeclaration into css::Declaration, which
   gives ServoDeclarationBlock more flexibility to implement.
2. Rename those methods of css::Declaration to provide a clear interface
   which makes sense for implementing in ServoDeclarationBlock, and also
   avoid method overload, which can impede the forward macro, on them.

MozReview-Commit-ID: 2cCqF855TVK

--HG--
extra : source : 3837e1e558caac4f2901e838371e97c17821530e
2016-11-03 14:41:02 +11:00
Xidorn Quan df85c99c08 Bug 1294299 part 1 - Make nsDOMCSSDeclaration use DeclarationBlock. r=heycam
MozReview-Commit-ID: B2eHrpxOMJ8

--HG--
extra : source : 1fb048c40e848189bc31f5309d4f85b6101975c2
2016-11-03 14:41:02 +11:00
Jonathan Chan 4b87f11bd9 Bug 1293739 - Part 1: Rename nsCSSProperty to nsCSSPropertyID. r=dholbert
This patch is generated by the following commands (note: if you're running
using OS X's sed, which accepts slightly different flags, you'll have to
specify an actual backup suffix in -i, or use gsed from Homebrew):

  hg stat -c \
  | cut -c 3-  \
  | tr '\n' '\0' \
  | xargs -0 -P 8 gsed --follow-symlinks 's/\bnsCSSProperty\b/nsCSSPropertyID/g' -i''

Then:

  hg mv layout/style/nsCSSProperty.h layout/style/nsCSSPropertyID.h

... and finally, manually renaming nsCSSProperty in the include guard in
nsCSSProperty.h.

MozReview-Commit-ID: ZV6jyvmLfA

--HG--
rename : layout/style/nsCSSProperty.h => layout/style/nsCSSPropertyID.h
2016-08-16 18:37:48 -07:00
Gregory Szorc 1794619188 Backed out changesets dcdb85fc5517, 702bca0deee2, 9cKX8gC1ATA (bug 1293739) for build bustage; a=bustage
The merge from inbound to central conflicted with the merge from
autoland to central, it appears. Per tree rules, the commit from the
autoland repo wins and the inbound commit gets backed out.

CLOSED TREE

--HG--
extra : amend_source : 927e1cdfa8e55ccbd873d404d905caf6871c8c4f
extra : histedit_source : 07095868c3f767258e1d7d2645193bf4811b13bb%2Ca49ae5a28bf6e67298b6208ee9254c25a2539712
2016-08-16 17:50:40 -07:00
Jonathan Chan 9c62a2c11c Bug 1293739 - Part 1: Rename nsCSSProperty to nsCSSPropertyID. r=dholbert
This patch is generated by the following commands (note: if you're running
using OS X's sed, which accepts slightly different flags, you'll have to
specify an actual backup suffix in -i, or use gsed from Homebrew):

  hg stat -c \
  | cut -c 3-  \
  | tr '\n' '\0' \
  | xargs -0 -P 8 gsed --follow-symlinks 's/\bnsCSSProperty\b/nsCSSPropertyID/g' -i''

Then:

  hg mv layout/style/nsCSSProperty.h layout/style/nsCSSPropertyID.h

... and finally, manually renaming nsCSSProperty in the include guard in
nsCSSProperty.h.

MozReview-Commit-ID: ZV6jyvmLfA

--HG--
rename : layout/style/nsCSSProperty.h => layout/style/nsCSSPropertyID.h
2016-08-09 16:28:19 -07:00
Xidorn Quan e09ca4aedc Bug 1069192 part 2 - Add a flag for chrome-only properties and change semantics of enabling flags. r=dbaron
This patch changes the semantics of enabling flags so that their presence makes
the property default to off when there is no pref, and also removes "ALWAYS"
from their name to match.

--HG--
extra : source : 12d33074485c080dfdffff703b88662baa628b51
2015-10-03 11:12:09 +10:00
Nigel Babu d86528af5e Backed out 3 changesets (bug 1069192) for OS X debug M(oth) crashes
Backed out changeset e86111412050 (bug 1069192)
Backed out changeset a5f11c5c5bcb (bug 1069192)
Backed out changeset a4aaaac8f133 (bug 1069192)
2015-10-02 15:08:43 +05:30
Xidorn Quan 29c0dcbbb3 Bug 1069192 part 2 - Add a flag for chrome-only properties and change semantics of enabling flags. r=dbaron
This patch changes the semantics of enabling flags so that their presence makes
the property default to off when there is no pref, and also removes "ALWAYS"
from their name to match.

--HG--
extra : source : 12d33074485c080dfdffff703b88662baa628b51
2015-10-02 11:01:54 +10:00
Birunthan Mohanathas a8939590de Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07:00
Michael Layzell 29c0d45bbb Bug 1167589 - Mark the members of CSSParsingEnvironment as MOZ_UNSAFE_REF. r=dbaron
--HG--
extra : rebase_source : 932c6dc1502114e3db05d8520143bc36a959de0e
2015-06-16 08:23:00 -04:00
Cameron McCormack acd763f9f6 Bug 1149042 - Call AttributeWillChange before a style="" attribute gets created when touching element.style. r=smaug 2015-04-10 10:41:35 +10:00
Ehsan Akhgari 883849ee32 Bug 1145631 - Part 1: Replace MOZ_OVERRIDE and MOZ_FINAL with override and final in the tree; r=froydnj
This patch was automatically generated using the following script:

function convert() {
echo "Converting $1 to $2..."
find . \
       ! -wholename "*/.git*" \
       ! -wholename "obj-ff-dbg*" \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_OVERRIDE override
convert MOZ_FINAL final
2015-03-21 12:28:04 -04:00
Boris Zbarsky dc24477d79 Bug 1117172 part 3. Change the wrappercached WrapObject methods to allow passing in aGivenProto. r=peterv
The only manual changes here are to BindingUtils.h, BindingUtils.cpp,
Codegen.py, Element.cpp, IDBFileRequest.cpp, IDBObjectStore.cpp,
dom/workers/Navigator.cpp, WorkerPrivate.cpp, DeviceStorageRequestChild.cpp,
Notification.cpp, nsGlobalWindow.cpp, MessagePort.cpp, nsJSEnvironment.cpp,
Sandbox.cpp, XPCConvert.cpp, ExportHelpers.cpp, and DataStoreService.cpp.  The
rest of this diff was generated by running the following commands:

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObject\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(Binding(?:_workers)?::Wrap\((?:aCx|cx|aContext|aCtx|js), [^,)]+)\)/\1, aGivenProto)/g'
2015-03-19 10:13:33 -04:00