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
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
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
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
nsXBLProtoImpl.h
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
nsXBLProtoImplProperty.cpp
nsXBLProtoImplProperty.h
nsXBLPrototypeBinding.cpp
nsXBLPrototypeBinding.h
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
nsXBLPrototypeResources.h
nsXBLResourceLoader.cpp Bug 1359384: Check for display: contents on nsXBLResourceLoader::NotifyBoundElements. r=bz 2017-04-27 23:35:32 +02:00
nsXBLResourceLoader.h
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