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

470 Коммитов

Автор SHA1 Сообщение Дата
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
Emilio Cobos Álvarez f5de4cd5ee Bug 1359384: Check for display: contents on nsXBLResourceLoader::NotifyBoundElements. r=bz
MozReview-Commit-ID: KVARvE6dO54

--HG--
extra : rebase_source : 31293b7284b56d80312bb2f9f2e526a2214ea45b
2017-04-27 23:35:32 +02:00
Boris Zbarsky 77a2c8f1f2 Bug 1359859. Use the right entry global for XBL constructor/destructor/field execution. r=bholley
The test doesn't verify that the exceptions are reported to the browser console,
but I manually checked that they are.  Adding a test for that part could be
pretty annoying.
2017-04-26 13:57:55 -04:00
Iris Hsiao 27dd75df0c Backed out changeset d19a04e55bef (bug 1359859) for mochitest failure. a=backout
CLOSED TREE
2017-04-27 11:46:12 +08:00
Boris Zbarsky d91dc284ca Bug 1359859. Use the right entry global for XBL constructor/destructor/field execution. r=bholley
The test doesn't verify that the exceptions are reported to the browser console,
but I manually checked that they are.  Adding a test for that part could be
pretty annoying.
2017-04-26 13:57:55 -04:00
Emilio Cobos Álvarez d2f3dc13ec Bug 1357142: Kill PresShell::RecreateFramesFor. r=bz
It's not only inefficient, but also prone to buggyness. Since styles may not be
up-to-date when it happens.

Post a reconstruct instead, which ensures a style flush happens before running
frame construction.

MozReview-Commit-ID: DrakHsJv5fY
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>

--HG--
extra : rebase_source : 11900af908654336cc2391ab9480542c5474e38f
2017-04-17 18:01:37 +02:00
Emilio Cobos Álvarez 75493877fc Bug 1350147: Remove -moz-bound-element pseudo-class. r=xidorn
MozReview-Commit-ID: GySVYOfoL1A
2017-03-27 23:03:38 +02:00
Nicolas B. Pierron 39741d711a Bug 1331662 part 2 - Replace nsJSUtils::EvaluateString calls by ExecutionContext scopes. r=bz 2017-03-22 13:42:27 +00:00
Cameron McCormack 96685b05f7 Bug 1348746 - stylo: Only eagerly style newly appended children from bindings when the pres shell has been initialized. r=bholley
MozReview-Commit-ID: 9kxbgiw78AB

--HG--
extra : rebase_source : e3b05c4cc79d8b7d3026030d5514b4e18d954a9b
2017-03-20 17:08:15 +08:00
Masatoshi Kimura 7be7b11a1c Bug 1342144 - Remove version parameter from the type attribute of script elements. r=jmaher
This patch is generated by the following sed script:
find . ! -wholename '*/.hg*' -type f \( -iname '*.html' -o -iname '*.xhtml' -o -iname '*.xul' -o -iname '*.js' \) -exec sed -i -e 's/\(\(text\|application\)\/javascript\);version=1.[0-9]/\1/g' {} \;

MozReview-Commit-ID: AzhtdwJwVNg

--HG--
extra : rebase_source : e8f90249454c0779d926f87777f457352961748d
2017-02-23 06:10:07 +09:00
Tom Tromey f8ab4ddf02 Bug 1060419 - remove unneeded includes of prprf.h, r=froydnj
MozReview-Commit-ID: JifhpA3oOeH

--HG--
extra : rebase_source : 08460997dc3fd91f3065c718e17b41bb4acf8bae
2016-12-09 10:00:01 -10:00
Bill McCloskey 194043ae97 Bug 1339289 - Give names to a lot of common runnables (r=ehsan)
MozReview-Commit-ID: 5IdvK6kgoAW
2017-02-15 12:30:01 -08:00
Cameron McCormack b2ee81223c Bug 1334735 - Part 1: Move need style/flush flags from document to pres shell. r=bz
MozReview-Commit-ID: 2Amf9yGRiJA
2017-02-10 10:42:27 +08:00
Joel Maher c203f27827 Bug 1335099 - add BUG_COMPONENT to many dom/* subdir files. r=overholt
MozReview-Commit-ID: CyIIs98hnUI
2017-02-06 09:45:55 -05:00
Sebastian Hengst 7225ec6170 Backed out changeset 9a332af74af5 (bug 1335099) for build bustage (moz.build rule matches no files). r=backout on a CLOSED TREE 2017-02-06 16:21:20 +01:00
Joel Maher 60e61eed48 Bug 1335099 - add BUG_COMPONENT to many dom/* subdir files. r=overholt
MozReview-Commit-ID: CyIIs98hnUI
2017-02-06 09:45:55 -05:00
Boris Zbarsky ac6be6fde3 Bug 835981 part 6. Change nsIDOMXULElement::GetControllers consumers to nsXULElement. r=peterv 2017-02-02 10:32:58 -05:00
Florian Quèze bdc1ffa608 Bug 1334831 - script-generated patch to use .remove() instead of .parentNode.removeChild, r=jaws. 2017-01-30 08:10:22 +01:00
Florian Quèze 0e0865f4fc Bug 1331599 - script-generated patch to replace removeEventListener calls with the once option when possible, r=jaws. 2017-01-25 07:01:52 +01:00
Julian Seward 6f7fcae338 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
Neil Deakin 61da00566d Bug 1297342, reserved attribute should be on key element not on the command, r=felipe 2017-01-19 13:57:11 -05:00
Florian Quèze 85611a7b6d Bug 1331081 - script generated patch to omit addEventListener/removeEventListener's third parameter when it's false, r=jaws.
--HG--
extra : rebase_source : a22344ee1569f58f1f0a01017bfe0d46a6a14602
2017-01-17 11:50:25 +01:00
Jon Coppeard ca898ea355 Bug 1325406 - Refactor rooting base class templates r=sfink r=mccr8 2017-01-10 10:12:14 +00:00
Bobby Holley b32f310e62 Bug 1323649 - Reenable some crashtests. r=me 2017-01-09 11:50:23 -08:00
Cameron McCormack babad063ff Bug 1328832 - Part 2: Rename mozFlushType to mozilla::FlushType and make it an enum class. r=bzbarsky
MozReview-Commit-ID: D3fIngSHSsl
2017-01-05 15:31:56 +08:00
Bobby Holley 3ae99d4463 Bug 1323655 - Handle unstyled elements when applying XBL bindings. r=heycam 2017-01-04 19:08:37 -08: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
Cameron McCormack e686107ee8 Bug 1324983 - Don't persist styles on elements not in the document. r=emilio
MozReview-Commit-ID: 4Z8IxPS6rfE
2016-12-29 15:04:32 +08:00
Cameron McCormack 366f6eb24d Bug 1323892 - Disable currently crashing stylo crashtests. r=xidorn
MozReview-Commit-ID: 2BNjdBWdT5V
2016-12-16 18:54:41 +08:00
Bobby Holley 6871a9416e Bug 1294572 - Drop Servo data in SetXBLInsertionParent, and call StyleNewSubtree after all bindings have been removed and applied. r=heycam
MozReview-Commit-ID: Iv7uyq4uQye
2016-12-14 10:14:46 -08:00
Phil Ringnalda 5297375b79 Backed out changeset 62ad968c5c5d (bug 1294572) for mass crashes in mozilla::dom::FragmentOrElement::SetXBLInsertionParent
CLOSED TREE

MozReview-Commit-ID: Fw9sxk3lnML
2016-12-13 22:15:48 -08:00
Bobby Holley 9cf9854ad6 Bug 1294572 - Drop Servo data in SetXBLInsertionParent, and call StyleNewSubtree after all bindings have been removed and applied. r=heycam
MozReview-Commit-ID: Iv7uyq4uQye
2016-12-13 21:32:56 -08:00
Bobby Holley 2207c01808 Bug 1322945 - Change skip_root to unstyled_children_only and use StyleNewChildren in more places. r=heycam
I noticed that our current behavior in ContentRangeInserted is incorrect. Unlike
ContentInserted (where this code lived originally), ContentRangeInserted takes a
start and end element. I'm not sure if we ever take that path for new content that
needs style, but it seemed sketchy. And generally, it seems nice to just always
style new content the same way (though we still need to style NAC by the subtree
root, since it hasn't been attached to the parent yet).

For situations where there is indeed only one unstyled child, the traversal
overhead should be neglible, since we special-case the single-element in
parallel.rs to avoid calling into rayon.

Being more explicit about what we want here also makes us more robust against
the other handful of callpaths that can take us into
nsCSSFrameConstructor::{ContentRangeInserted,ContentAppended}. Currently we
can call StyleNewSubtree on an already-styled element via RecreateFramesForContent,
which triggers an assertion in the servo traversal.

MozReview-Commit-ID: DqCGh90deHH
2016-12-12 18:39:33 -08:00
Andrew McCreight fccb0645ed Bug 1323042 - forbid MOZ_COUNT_{CTOR,DTOR} for nsISupports classes; r=froydnj 2016-12-12 09:27:58 -05:00
Nathan Froyd 826598caba Backout aba6c73511a2 (bug 1307961) for massive test bustage resulting in a CLOSED TREE; r=alltheorange 2016-12-12 08:45:46 -05:00
Andrew McCreight e31b5489da Bug 1307961 - require consistent bloatview reporting for nsISupports classes; r=froydnj 2016-12-12 07:58:33 -05:00
Cameron McCormack 91631cac25 Bug 1320000 - Part 2: Make XBLChildrenElement::ParseAttribute delegate to its superclass. r=mrbkap
MozReview-Commit-ID: 8qXryZXKi4m
2016-12-01 09:25:21 +08:00
Tooru Fujisawa 515ef9ba45 Bug 1321218 - Remove legacy generator from dom/. r=smaug 2016-12-01 18:11:32 +09:00
Bobby Holley f8c9d884fc Bug 1317016 - Basic infrastructure for RestyleHint-driven traversal. r=emilio
MozReview-Commit-ID: 7wH5XcILVmX
2016-11-25 10:06:39 -08:00
Michelangelo De Simone 1c12c5271d Bug 1313788 - Remove DOM/wifi and related code. r=jst
MozReview-Commit-ID: BRT6bSvPpT

--HG--
extra : rebase_source : c5ae9e88e80ae1a9c46bf80439388bd9ef2ba4df
2016-11-08 15:02:45 -08:00
Sebastian Hengst d35f739e98 Bug 1310297 - Remove test annotations using b2g, mulet or gonk: dom/xbl. r=RyanVM
MozReview-Commit-ID: EqoZrlHQFNG

--HG--
extra : rebase_source : dfb4efc7e998c0e55ef86f1201245aa3fb7f9e44
2016-11-05 11:29:18 +01:00
Xidorn Quan 1cbd4cb699 Bug 1309868 part 1 - Use const nsIContent pointer in some DOM utils. r=bholley
MozReview-Commit-ID: H4g2VbWJUba

--HG--
extra : source : 77e67e5163ac9c450e18d4c4e5b690cee5d3f1a3
2016-10-18 15:29:03 +11:00
Jon Coppeard 6ca64e3652 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
Phil Ringnalda 400813c30b Merge m-i to m-c, a=merge 2016-09-30 23:24:52 -07:00
cku 818c1c0974 Bug 1302779 - Part 1. Resolve a local fragment against the current document that relative URLs are resolved against. r=heycam
MozReview-Commit-ID: 2vJDnfzoPiC

--HG--
extra : rebase_source : 3c43bd335caa918ac32f3ba1979f822db5319b11
2016-09-20 14:13:13 +08:00
Xidorn Quan 2f49a48a09 Bug 1304302 part 10 - Replace all uses of StyleSheetHandle. r=heycam
This commit is generated by the following commands with some minor
manual adjustment:

find . \( -name '*.h' -or -name '*.cpp' \) -not -path './layout/style/StyleSheet*' -exec sed -i -b \
  -e '/^\(#include\|using\)/s/StyleSheetHandle/StyleSheet/g' \
  -e 's/\(mozilla::\)\?StyleSheetHandle::RefPtr/RefPtr<\1StyleSheet>/g' \
  -e 's/StyleSheetHandle()/nullptr/g' \
  -e 's/->AsStyleSheet()//g' \
  -e 's/StyleSheetHandle/StyleSheet*/g' {} +
sed -i -b 's/sheet->AsVoidPtr()/sheet.get()/' layout/style/Loader.cpp
sed -i -b 's/AsHandle()/this/' layout/style/StyleSheet.cpp

MozReview-Commit-ID: 7abdvlKHukd

--HG--
extra : source : e5682242db07203b5a91810fe1e243c955310588
2016-09-26 22:03:25 +10:00
Terrence Cole 0edc10380c Bug 1297558 - Use a read barrier on Heap to ExposeToActiveJS r=sfink r=mccr8 2016-02-07 09:08:55 -08:00
Masayuki Nakano 97735168f1 Bug 1297013 part.2 Implement some helper methods to log constants related to event handling r=smaug
This patch implements some helper methods to log constants related to event handling.

ToString(KeyNameIndex) and ToString(CodeNameIndex) converts the enum itmes to human readable string.  They use WidgetKeyboardEvent's helper class which returns Unicode text.  Therefore, this need to convert from UTF16 to UTF8.  That's the reason why these methods don't return |const char*|.

GetDOMKeyCodeName(uint32_t) returns DOM keycode name if it's defined.  Otherwise, returns hexadecimal value.  For generating switch-case statement, VirtualKeyCodeList.h shouldn't include ",".  Therefore, this patch removes "," from VirtualKeyCodeList.h and append it at defining NS_DEFINE_VK.  Additionally, the last item of enum and array should not end with ",".  Therefore, this adds dummy last item at each of them.  Finally, some of the keyCode values are shared between 2 keys.  Therefore, it needs to support NS_DISALLOW_SAME_KEYCODE for switch-case generator.  See the comment in the file for more detail.

GetModifiersName(Modifiers) returns all modifier names included in the given value.

MozReview-Commit-ID: 9i2ftFOTpDn

--HG--
extra : rebase_source : 458a4d28624dc10dd4454f2e7708d746d1fcb045
2016-09-15 00:48:47 +09:00
Andrea Marchesini 5994c71158 Bug 1301251 - Handle GetSpec() failure in nsContentUtils::GetWrapperSafeScriptFilename(), r=smaug 2016-09-19 15:50:22 +02:00
Nicholas Nethercote 5622a00748 Bug 1297300 - Add missing checks to GetSpec() calls in dom/xbl/. r=bz.
--HG--
extra : rebase_source : b7279c4ce02ac111c39dc099652fe0837b98f30b
2016-09-08 14:19:01 +10:00