Commit Graph

52 Commits

Author SHA1 Message Date
Sean Feng
28bbd32a07 Bug 1377999 - Make Attribute to adapt the DOMArena changes r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D57700

--HG--
extra : moz-landing-system : lando
2020-03-17 14:53:13 +00:00
Simon Giesecke
aaf6cb4e75 Bug 1617628 - Hide nsBaseHashtable Put overloads in nsRefPtrHashtable subclass. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D63899

--HG--
extra : moz-landing-system : lando
2020-02-25 17:03:36 +00:00
Ryan Hunt
00e98538aa Bug 1523969 part 6 - Move method definition inline comments to new line in 'dom/'. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D21106

--HG--
extra : rebase_source : ea3f51c2c11247114deccbc86e90fb02b8a97257
2019-02-25 16:05:29 -06:00
Emilio Cobos Álvarez
d2ed260822 Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug
Summary: Really sorry for the size of the patch. It's mostly automatic
s/nsIDocument/Document/ but I had to fix up in a bunch of places manually to
add the right namespacing and such.

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

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

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

While fixing up some of the bits I also removed some unneeded OwnerDoc() null
checks and such, but I didn't do anything riskier than that.
2019-01-03 17:48:33 +01:00
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
Jeff Gilbert
5b753da289 Bug 1470325 - s/FooBinding/Foo_Binding/g - r=qdot
MozReview-Commit-ID: JtTcLL5OPF0
2018-06-26 17:05:01 -07:00
Boris Zbarsky
f60fd673d6 Bug 1432186 part 19. Remove the nsIDOMNode::*_NODE constants. r=mccr8
MozReview-Commit-ID: KvKjeKIOB9K
2018-01-29 23:10:53 -05:00
Boris Zbarsky
e38dec29f4 Bug 1431964 part 8. Remove nsIDOMMozNamedAttrMap. r=mccr8
MozReview-Commit-ID: C7z0hcjC0Tg
2018-01-20 20:57:26 -05:00
Boris Zbarsky
98002367cb Bug 1431964 part 7. Remove unused nsIDOMMozNamedAttrMap methods. r=mccr8
MozReview-Commit-ID: H8gyGnbqYtf
2018-01-20 18:51:35 -05:00
Boris Zbarsky
0ba39c7972 Bug 1431964 part 6. Remove nsIDOMMozNamedAttrMap::GetLength. r=mccr8
MozReview-Commit-ID: 9GJmiVSI0bs
2018-01-20 18:50:12 -05:00
Boris Zbarsky
ac46271e7c Bug 1431964 part 5. Remove nsIDOMMozNamedAttrMap::Item. r=mccr8
MozReview-Commit-ID: GnrOUhx9nTQ
2018-01-20 18:48:36 -05:00
Boris Zbarsky
79df7d2aec Bug 1431964 part 4. Remove nsIDOMMozNamedAttrMap::GetNamedItemNS. r=mccr8
MozReview-Commit-ID: 7l8CcT1ntL7
2018-01-20 18:33:06 -05:00
Boris Zbarsky
6d32b469ca Bug 1431964 part 3. Remove nsIDOMMozNamedAttrMap::GetNamedItem. r=mccr8
MozReview-Commit-ID: 8eXx6IdmZ4W
2018-01-20 18:26:41 -05:00
Edgar Chen
5fedbb92b8 Bug 1422197 - Add fast path to get DocGroup in binding code for [CEReactions]; r=smaug
MozReview-Commit-ID: HgbFo9ddr0o

--HG--
extra : rebase_source : 04989782fc7c7ce79e0e65b3dc907c9e174a0809
2017-11-27 16:10:27 +08: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
Mats Palmgren
5b7c81e34b Bug 1372317 part 2 - Replace LookupRemoveIf() calls with Lookup() + entry.Remove() where needed. r=froydnj
MozReview-Commit-ID: AoRNdbzh66c
2017-06-18 17:07:54 +02:00
Mats Palmgren
4ab8b6f8bc Bug 1370700 part 2 - Use mAttributeCache.GetOrInsert() to avoid a second hashtable lookup for Put(). r=froydnj
MozReview-Commit-ID: BE6vztn6ljl
2017-06-07 20:03:19 +02:00
Mats Palmgren
6cdee8c35e Bug 1370700 part 1 - Use mAttributeCache.LookupRemoveIf() to avoid a second hashtable lookup for Remove(). r=froydnj
MozReview-Commit-ID: CrIb6DcE1D7
2017-06-07 20:03:19 +02:00
Michael Layzell
befc7b0924 Bug 1331434 - Part 9: Return after ErrorResult::Throw in /dom, r=ehsan
MozReview-Commit-ID: CWjx4L8LTr9
2017-03-07 19:06:48 -05:00
Boris Zbarsky
28dabea2ec Bug 1332322 part 3. Rename nsWrapperCache::IsBlackAndDoesNotNeedTracing to nsWrapperCache::HasKnownLiveWrapperAndDoesNotNeedTracing. r=mccr8 2017-01-24 20:39:37 -05:00
Boris Zbarsky
cce1668e68 Bug 1332322 part 2. Rename nsWrapperCache::IsBlack to nsWrapperCache::HasKnownLiveWrapper. r=mccr8 2017-01-24 20:38:58 -05:00
Olli Pettay
0364dbc792 Bug 1326507, remove NS_IMPL_CYCLE_COLLECTION_TRAVERSE_SCRIPT_OBJECTS, r=mccr8
--HG--
extra : rebase_source : 3ae1207308de120b7299b13ecaa95dd1612b3459
2017-01-03 21:47:55 +02:00
Michael Layzell
e12728495c Bug 1018486 - Part 9: Changes to account for modifications to clang plugin, r=ehsan
MozReview-Commit-ID: EPQMbfHYxUK
2016-09-07 10:50:47 -04:00
Jonathan Kingston
556ed99119 Bug 1173199 - Create preference to disable MathML. r=heycam, r=huseby, r=smaug
If the mathml.disabled preference is true, treat <math> and other MathML
elements as generic XML elements.

This patch disables the rendering code of MathML however preserves the
namespace so to reduce the breakage.

Original patch by: Kathy Brade <brade@pearlcrescent.com>

MozReview-Commit-ID: A2f2Q2b4eqR

--HG--
extra : rebase_source : 3c8530816727c01b68a831d560bfe16e7b02bd9d
2016-06-28 15:24:48 +01:00
Boris Zbarsky
59de5a530f Bug 1270349 part 5. Use LegacyUnenumerableNamedProperties instead of passing flags to GetSupportedNames to determine whether named props on DOM proxies should be reflected in ownPropertyKeys. r=peterv 2016-05-09 22:25:40 -04:00
Boris Zbarsky
76180fb5a7 Bug 1270349 part 4. Use LegacyUnenumerableNamedProperties instead of NameIsEnumerable() calls to determine whether named props on DOM proxies should be enumerable. r=peterv 2016-05-09 22:25:40 -04:00
Nicholas Nethercote
203b187881 Bug 1187151 (part 17) - Replace nsBaseHashtable::Enumerate() calls in dom/ with iterators. r=mccr8.
~nsDOMAttributeMap() and DropReference() are similar enough that the former can
just call the latter.

--HG--
extra : rebase_source : 4e570cbcf67927b60cc053fbebc3508842ec0cfd
2016-01-28 14:44:46 -08:00
Boris Zbarsky
bb3116b03d Bug 1237580. NamedNodeMap should only claim to support a name if that name has no uppercase ASCII chars, for HTML elements in HTML documents. r=bkelly 2016-01-15 13:29:58 -05:00
Boris Zbarsky
405b7c4204 Bug 1236258 part 4. Change nsDOMAttributeMap::SetNamedItemNS to not remove the existing attribute when there is one. r=smaug 2016-01-11 13:01:35 -05:00
Boris Zbarsky
de5ab5f04f Bug 1236258 part 3. Remove the unused aNsAware argument of nsDOMAttributeMap::GetAttribute. r=smaug 2016-01-11 13:01:33 -05:00
Boris Zbarsky
0ea951e98c Bug 1236258 part 2. Remove the unused mNsAware member of nsIAttribute. r=smaug 2016-01-11 13:01:31 -05:00
Boris Zbarsky
257a42c64e Bug 1236258 part 1. Remove the unused nsDOMAttributeMap::RemoveAttribute. r=smaug 2016-01-11 13:01:29 -05:00
Salah
158db1411f Bug 1222079. Fix the behavior of Object.getOwnPropertyNames for nsDOMAttributeMap. r=bzbarsky 2015-12-07 18:42:36 -05:00
Boris Zbarsky
4bbfb08573 Bug 1227458. Make setAttributeNode be an alias for setAttributeNodeNS and setNamedItem on the attribute map be an alias for setNamedItemNS. r=smaug 2015-12-04 09:51:04 -05:00
Nicholas Nethercote
2db3c3035a Bug 1187151 (part 1) - Replace nsBaseHashtable::Enumerate() calls in dom/base/ with iterators. r=khuey.
--HG--
extra : rebase_source : 42667c5006bf67e705d026bb3ba8c9b3db6b20c9
2015-11-03 16:00:38 -08:00
Nicholas Nethercote
4ea9c77760 Bug 1187782 (part 5) - Replace nsBaseHashtable::EnumerateRead() calls in dom/base/ with iterators. r=khuey.
--HG--
extra : rebase_source : 127ca38615a41d92b492b73b693e0ff781f29b86
2015-10-27 15:13:04 -07:00
Nathan Froyd
01583602a9 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi

--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 01:24:48 -04:00
Boris Zbarsky
9fe6d747e1 Bug 1176313. Reland the changes to make Attr handling follow the spec again. This is a relanding of bug 1075702, effectively. r=smaug 2015-09-22 13:13:26 -04:00
Boris Zbarsky
a622de6a84 Bug 1205364 part 2. Back out the telemetry we added in bug 1175031. r=smaug 2015-09-18 13:36:29 -04:00
Nicholas Nethercote
d98d14fa1e Bug 1189156 (part 4) - Don't use enumeration style for nsBaseHashtable::SizeOf{In,Ex}cludingThis(). r=erahm,jfkthame.
After this change, we have ShallowSizeOf{In,Ex}cludingThis(), which don't do
anything to measure children. (They can be combined with iteration to measure
children.)

--HG--
extra : rebase_source : f98420176f50990bbc5a25e35788328154cfeb00
2015-07-30 21:19:57 -07:00
Boris Zbarsky
4ca3b13712 Bug 1175031. Add telemetry for an Attr with a non-lowercase name that was created from an HTML document being added to a non-HTML element. r=smaug,froydnj 2015-06-24 00:44:02 -07:00
Boris Zbarsky
75de7c95ec Bug 1165851 part 1. Back out bug 1060938 and bug 1075702 pending spec changes because they are implementing a spec that's not web compatible. r=smaug 2015-06-16 12:17:57 -04:00
Boris Zbarsky
1540774b0c Bug 1157898 part 1. Make code of the form "return rv.ErrorCode();" where rv is an ErrorResult use StealNSResult instead. r=peterv
This patch was generated with the following command:

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 's/return ([a-zA-Z0-9]+)\.ErrorCode\(\);/return \1.StealNSResult();/'
2015-04-27 09:18:51 -04:00
Nicholas Nethercote
ff39241b4e Bug 1129786 (part 2) - Instantiate nsDOMAttributeMap::mAttributeCache eagerly. r=bz.
Now that empty PLDHashTables don't allocate any entry storage, we can undo the
lazification of nsDOMAttributeMap::mAttributeCache from bug 1059056.

--HG--
extra : rebase_source : ba010d16baa34f0ad1eb3909d72f2e3b13d12ff0
2015-02-03 00:03:28 -08: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
Kyle Machulis
de83978693 Bug 782751 - User Timing API Implementation; r=baku 2015-02-03 21:46:23 -08:00
Ryan VanderMeulen
455452e433 Backed out 4 changesets (bug 782751, bug 1127948) for Gaia UI test failures.
Backed out changeset 4d8735e0cc30 (bug 1127948)
Backed out changeset de498dd4e303 (bug 782751)
Backed out changeset fe9436f5474c (bug 782751)
Backed out changeset fff8f6c32743 (bug 782751)
2015-01-30 14:16:40 -05:00
Kyle Machulis
ae8ab23c5c Bug 782751 - User Timing API Implementation; r=baku 2015-01-30 09:29:36 -08:00
Phil Ringnalda
bc4488b3ef Backed out 3 changesets (bug 782751) for various timing failures
Backed out changeset 14594507ec55 (bug 782751)
Backed out changeset e8659e5122e1 (bug 782751)
Backed out changeset c47168517080 (bug 782751)
2015-01-29 22:30:26 -08:00
Kyle Machulis
97099e2d9e Bug 782751 - User Timing API Implementation; r=baku
--HG--
extra : rebase_source : dfd5ab7e34913d50c892aad1efd3dae2aa9c46b7
2015-01-29 18:04:27 -08:00