gecko-dev/dom/xbl
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
..
builtin Bug 1286877 - do not set c-basic-offset for python-mode; r=gps 2016-07-14 10:16:42 -06:00
crashtests Bug 1334831 - script-generated patch to use .remove() instead of .parentNode.removeChild, r=jaws. 2017-01-30 08:10:22 +01:00
test Bug 1359859. Use the right entry global for XBL constructor/destructor/field execution. r=bholley 2017-04-26 13:57:55 -04:00
XBLChildrenElement.cpp Bug 1320000 - Part 2: Make XBLChildrenElement::ParseAttribute delegate to its superclass. r=mrbkap 2016-12-01 09:25:21 +08:00
XBLChildrenElement.h Bug 1359556 - Optimize cloneNode by preinitializing attribute and child arrays r=bz 2017-04-20 12:57:48 -07:00
moz.build Bug 1335099 - add BUG_COMPONENT to many dom/* subdir files. r=overholt 2017-02-06 09:45:55 -05:00
nsBindingManager.cpp Bug 1357142: Kill PresShell::RecreateFramesFor. r=bz 2017-04-17 18:01:37 +02:00
nsBindingManager.h Bug 1357142: Kill PresShell::RecreateFramesFor. r=bz 2017-04-17 18:01:37 +02:00
nsXBLBinding.cpp Bug 1060419 - remove unneeded includes of prprf.h, r=froydnj 2016-12-09 10:00:01 -10:00
nsXBLBinding.h Bug 1302779 - Part 1. Resolve a local fragment against the current document that relative URLs are resolved against. r=heycam 2016-09-20 14:13:13 +08:00
nsXBLContentSink.cpp
nsXBLContentSink.h Bug 1232696 - Remove NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW as it causes segfaulting for GCC 6 builds (2 of 5, fixes for dom/). r=bkelly. 2017-01-24 17:10:39 +01:00
nsXBLDocumentInfo.cpp Bug 1326507, remove NS_IMPL_CYCLE_COLLECTION_TRAVERSE_SCRIPT_OBJECTS, r=mccr8 2017-01-03 21:47:55 +02:00
nsXBLDocumentInfo.h
nsXBLEventHandler.cpp Bug 1154183 part.1 Move shortcut/access key candidate list creators from nsContentUtils to WidgetKeyboardEvent r=smaug 2016-03-18 11:22:37 +09:00
nsXBLEventHandler.h
nsXBLMaybeCompiled.h Bug 1325406 - Refactor rooting base class templates r=sfink r=mccr8 2017-01-10 10:12:14 +00:00
nsXBLProtoImpl.cpp Bug 1297300 - Add missing checks to GetSpec() calls in dom/xbl/. r=bz. 2016-09-08 14:19:01 +10:00
nsXBLProtoImpl.h Bug 1297300 - Add missing checks to GetSpec() calls in dom/xbl/. r=bz. 2016-09-08 14:19:01 +10:00
nsXBLProtoImplField.cpp Bug 1359859. Use the right entry global for XBL constructor/destructor/field execution. r=bholley 2017-04-26 13:57:55 -04:00
nsXBLProtoImplField.h
nsXBLProtoImplMember.h
nsXBLProtoImplMethod.cpp Bug 1359859. Use the right entry global for XBL constructor/destructor/field execution. r=bholley 2017-04-26 13:57:55 -04:00
nsXBLProtoImplMethod.h Bug 1297558 - Use a read barrier on Heap to ExposeToActiveJS r=sfink r=mccr8 2016-02-07 09:08:55 -08:00
nsXBLProtoImplProperty.cpp Bug 1308919 - Don't make Handles to Heap<T> as it avoids the read barrier r=bz 2016-10-14 09:45:28 +01:00
nsXBLProtoImplProperty.h
nsXBLPrototypeBinding.cpp Bug 1304302 part 10 - Replace all uses of StyleSheetHandle. r=heycam 2016-09-26 22:03:25 +10:00
nsXBLPrototypeBinding.h Bug 1304302 part 10 - Replace all uses of StyleSheetHandle. r=heycam 2016-09-26 22:03:25 +10:00
nsXBLPrototypeHandler.cpp Bug 835981 part 6. Change nsIDOMXULElement::GetControllers consumers to nsXULElement. r=peterv 2017-02-02 10:32:58 -05:00
nsXBLPrototypeHandler.h Bug 1297342, reserved attribute should be on key element not on the command, r=felipe 2017-01-19 13:57:11 -05:00
nsXBLPrototypeResources.cpp Bug 1304302 part 10 - Replace all uses of StyleSheetHandle. r=heycam 2016-09-26 22:03:25 +10:00
nsXBLPrototypeResources.h Bug 1304302 part 10 - Replace all uses of StyleSheetHandle. r=heycam 2016-09-26 22:03:25 +10:00
nsXBLResourceLoader.cpp Bug 1359384: Check for display: contents on nsXBLResourceLoader::NotifyBoundElements. r=bz 2017-04-27 23:35:32 +02:00
nsXBLResourceLoader.h Bug 1304302 part 10 - Replace all uses of StyleSheetHandle. r=heycam 2016-09-26 22:03:25 +10:00
nsXBLSerialize.cpp
nsXBLSerialize.h
nsXBLService.cpp Bug 1348746 - stylo: Only eagerly style newly appended children from bindings when the pres shell has been initialized. r=bholley 2017-03-20 17:08:15 +08:00
nsXBLService.h
nsXBLWindowKeyHandler.cpp Bug 1297342, reserved attribute should be on key element not on the command, r=felipe 2017-01-19 13:57:11 -05:00
nsXBLWindowKeyHandler.h Bug 1257759 part.8 nsXBLWindowKeyHandler should handle eKeyDownOnPlugin and eKeyUpOnPlugin events only with reserved shortcut key handlers r=smaug 2016-04-23 02:12:54 +09:00