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

136 Коммитов

Автор SHA1 Сообщение Дата
Nicholas Nethercote 7e120ce35e Bug 1393636 (part 3) - Pass nsWindowSizes to more AddSizeOf*() functions. r=heycam.
This is a purely non-functional plumbing change. Instead of passing a
SizeOfState and an nsStyleSizes a bunch of places, we pass an nsWindowSizes,
which contains both of them.

This is a necessary precursor for the next patch.

MozReview-Commit-ID: Ek03wDM50rB

--HG--
extra : rebase_source : 7b05708bd21dc4e3812ea041647fa74bb413d0b9
2017-08-25 14:47:54 +10:00
btian 2683456670 Bug 1384661 - Part 2: Add class nsParentNodeChildContentList. r=smaug 2017-08-21 16:11:56 +08:00
btian 05a1fd9f6a Bug 1384661 - Part 1: Rename class nsChildContentList to nsAttrChildContentList. r=smaug 2017-08-11 10:12:17 +08:00
Olli Pettay 6e1dc494d2 Bug 1391423, add a nursery for purple buffer to allow faster addref/release on the main thread, r=mccr8
--HG--
extra : rebase_source : 4dcb8af2d3f2518ab0fd00b65fbf1d0096d8e810
2017-08-22 00:01:47 +03:00
Masayuki Nakano b11e66f8da Bug 1388004 - part1: Make nsContentUtils::GetHTMLEditor() return HTMLEditor* rather than nsIEditor* r=smaug
nsContentUtils::GetHTMLEditor() currently returns nsIEditor* since editor of doc shell may be any type of editors such as TextEditor or editor object which is implemented by JS.  However, nsIEditor is now a builtin class.  So, it can return HTMLEditor.

MozReview-Commit-ID: 3YoFOplZa7W

--HG--
extra : rebase_source : 46f42d23babd64bf0a5003e66e8fe3b9e0bd7166
2017-08-07 16:33:59 +09:00
Nicholas Nethercote 57c26c9834 Bug 1387956 - Overhaul ComputedValues measurement, and add style structs measurement. r=bholley.
This patch moves measurement of ComputedValues objects from Rust to C++.
Measurement now happens (a) via DOM elements and (b) remaining elements via
the frame tree. Likewise for the style structs hanging off ComputedValues
objects.

Here is an example of the output.

> ├──27,600,448 B (26.49%) -- active/window(https://en.wikipedia.org/wiki/Barack_Obama)
> │  ├──12,772,544 B (12.26%) -- layout
> │  │  ├───4,483,744 B (04.30%) -- frames
> │  │  │   ├──1,653,552 B (01.59%) ── nsInlineFrame
> │  │  │   ├──1,415,760 B (01.36%) ── nsTextFrame
> │  │  │   ├────431,376 B (00.41%) ── nsBlockFrame
> │  │  │   ├────340,560 B (00.33%) ── nsHTMLScrollFrame
> │  │  │   ├────302,544 B (00.29%) ── nsContinuingTextFrame
> │  │  │   ├────156,408 B (00.15%) ── nsBulletFrame
> │  │  │   ├─────73,024 B (00.07%) ── nsPlaceholderFrame
> │  │  │   ├─────27,656 B (00.03%) ── sundries
> │  │  │   ├─────23,520 B (00.02%) ── nsTableCellFrame
> │  │  │   ├─────16,704 B (00.02%) ── nsImageFrame
> │  │  │   ├─────15,488 B (00.01%) ── nsTableRowFrame
> │  │  │   ├─────13,776 B (00.01%) ── nsTableColFrame
> │  │  │   └─────13,376 B (00.01%) ── nsTableFrame
> │  │  ├───3,412,192 B (03.28%) -- servo-style-structs
> │  │  │   ├──1,288,224 B (01.24%) ── Display
> │  │  │   ├────742,400 B (00.71%) ── Position
> │  │  │   ├────308,736 B (00.30%) ── Font
> │  │  │   ├────226,512 B (00.22%) ── Background
> │  │  │   ├────218,304 B (00.21%) ── TextReset
> │  │  │   ├────214,896 B (00.21%) ── Text
> │  │  │   ├────130,560 B (00.13%) ── Border
> │  │  │   ├─────81,408 B (00.08%) ── UIReset
> │  │  │   ├─────61,440 B (00.06%) ── Padding
> │  │  │   ├─────38,176 B (00.04%) ── UserInterface
> │  │  │   ├─────29,232 B (00.03%) ── Margin
> │  │  │   ├─────21,824 B (00.02%) ── sundries
> │  │  │   ├─────20,080 B (00.02%) ── Color
> │  │  │   ├─────20,080 B (00.02%) ── Column
> │  │  │   └─────10,320 B (00.01%) ── Effects
> │  │  ├───2,227,680 B (02.14%) -- computed-values
> │  │  │   ├──1,182,928 B (01.14%) ── non-dom
> │  │  │   └──1,044,752 B (01.00%) ── dom
> │  │  ├───1,500,016 B (01.44%) ── text-runs
> │  │  ├─────492,640 B (00.47%) ── line-boxes
> │  │  ├─────326,688 B (00.31%) ── frame-properties
> │  │  ├─────301,760 B (00.29%) ── pres-shell
> │  │  ├──────27,648 B (00.03%) ── pres-contexts
> │  │  └─────────176 B (00.00%) ── style-sets

The 'servo-style-structs' and 'computed-values' sub-trees are new. (Prior to
this patch, ComputedValues under DOM elements were tallied under the the
'dom/element-nodes' sub-tree, and ComputedValues not under DOM element were
ignored.) 'servo-style-structs/sundries' aggregates all the style structs that
are smaller than 8 KiB.

Other notable things done by the patch are as follows.

- It significantly changes the signatures of the methods measuring nsINode and
  its subclasses, in order to handle the tallying of style structs separately
  from element-nodes. Likewise for nsIFrame.

- It renames the 'layout/style-structs' sub-tree as
  'layout/gecko-style-structs', to clearly distinguish it from the new
  'layout/servo-style-structs' sub-tree.

- It adds some FFI functions to access various Rust-side data structures from
  C++ code.

- There is a nasty hack used twice to measure Arcs, by stepping backwards from
  an interior pointer to a base pointer. It works, but I want to replace it
  with something better eventually. The "XXX WARNING" comments have details.

- It makes DMD print a line to the console if it sees a pointer it doesn't
  recognise. This is useful for detecting when we are measuring an interior
  pointer instead of a base pointer, which is bad but easy to do when Arcs are
  involved.

- It removes the Rust code for measuring CVs, because it's now all done on the
  C++ side.

MozReview-Commit-ID: BKebACLKtCi

--HG--
extra : rebase_source : 4d9a8c6b198a0ff025b811759a6bfa9f33a260ba
2017-08-11 16:37:33 +10:00
Xidorn Quan 8c243b6260 Bug 1383780 - Null-check return value of SVGUseElement::GetContentURLData before returning. r=bz
MozReview-Commit-ID: 19X22AVQ4Gg

--HG--
extra : rebase_source : 2fa532cec7931603540553fc1bf51787f52d7647
2017-08-02 12:07:58 +10:00
Sebastian Hengst 5e6e6641de Backed out changeset 5dd6f04aea59 (bug 1383780) for failing crashtests on stylo. r=backout on a CLOSED TREE 2017-08-02 13:27:08 +02:00
Xidorn Quan 61c08a894b Bug 1383780 - Null-check return value of SVGUseElement::GetContentURLData before returning. r=bz
MozReview-Commit-ID: 19X22AVQ4Gg

--HG--
extra : rebase_source : 35ed42fc87eea22fa62f90e997ea90ad41e7f9ea
2017-08-02 12:07:58 +10:00
Nicholas Nethercote 49eb219ff5 Bug 1383982 (attempt 2) - Introduce a general mechanism for measuring memory usage of graph-like structures. r=erahm.
--HG--
extra : rebase_source : 7075f9570a4262158351ce9ac3ca8360ea4d5394
2017-07-28 20:10:04 +10:00
Sebastian Hengst 9077ac8886 Backed out changeset a57d8f30d1bf (bug 1383982) for build bustage at nsGlobalWindow.cpp:13826: 'class nsWindowSizes' has no member named 'mMallocSizeOf'. r=backout 2017-07-28 09:50:48 +02:00
Nicholas Nethercote 5c3abe8aab Bug 1383982 - Introduce a general mechanism for measuring memory usage of graph-like structures. r=erahm.
All the SizeOf{In,Ex}cludingThis() functions take a MallocSizeOf function
which measures memory blocks. This patch introduces a new type, SizeOfState,
which includes a MallocSizeOf function *and* a table of already-measured
pointers, called SeenPtrs. This gives us a general mechanism to measure
graph-like data structures, by recording which nodes have already been
measured. (This approach is used in a number of existing reporters, but not in
a uniform fashion.)

The patch also converts the window memory reporting to use SizeOfState in a lot
of places, all the way through to the measurement of Elements. This is a
precursor for bug 1383977 which will measure Stylo elements, which involve
Arcs.

The patch also converts the existing mAlreadyMeasuredOrphanTrees table in the
OrphanReporter to use the new mechanism.

--HG--
extra : rebase_source : 2c23285f8b6c3b667560a9d14014efc4633aed51
2017-07-28 15:03:44 +10:00
Ehsan Akhgari 585393f54b Bug 1382914 - Store the hashtable of ancestor ranges in the node slots instead of in a property in order to speed up access to it; r=smaug 2017-07-25 13:01:16 -04:00
John Dai b6b41eca6c Bug 1315885 - Part 4: Implement callback reaction for custom element reactions. r=wchen
--HG--
extra : rebase_source : 0ccd628ce1f0904bf2d412ade2710c6e1203641e
2017-07-18 20:30:00 -04:00
Olli Pettay 0738714332 Bug 1377993 - Make node slots less memory hungry in common cases. r=peterv
MozReview-Commit-ID: Lhr1UsCrRTs
2017-07-18 00:25:49 +02:00
Bobby Holley b2fd3f821c Bug 1380106 - Drop style data in DestroyContent. r=heycam,r=bz
MozReview-Commit-ID: 9ydkvlDA9oS
2017-07-12 14:11:41 -07:00
Masatoshi Kimura b515c9c804 Bug 1373984 - Turn nsIDocument::mCharacterSet into mozilla::NotNull<const mozilla::Encoding*>. r=hsivonen
MozReview-Commit-ID: GF0YXDwfA14

--HG--
extra : rebase_source : fdae0046f882d47fb539a7f882364e5c5caafdcd
extra : source : 49249788c0dee331ac2989dc39f0505d965a7bd8
2017-06-18 20:37:50 +09:00
Sebastian Hengst dfc1ad2562 Backed out changeset 7235d05662b0 (bug 1373984) for Android bustage. r=backout on a CLOSED TREE 2017-06-25 18:30:13 +02:00
Masatoshi Kimura 2e04751921 Bug 1373984 - Turn nsIDocument::mCharacterSet into mozilla::NotNull<const mozilla::Encoding*>. r=hsivonen
MozReview-Commit-ID: GF0YXDwfA14

--HG--
extra : rebase_source : a84ab644f52e68676b45f112ff69f868d89f6177
extra : source : 49249788c0dee331ac2989dc39f0505d965a7bd8
2017-06-18 20:37:50 +09:00
Wes Kocher e02435a31e Backed out changeset 77af189b5c49 (bug 1373984) for build bustage in nsHtml5Parser.cpp a=backout CLOSED TREE
MozReview-Commit-ID: 6kBmU71j2To
2017-06-25 05:10:14 -07:00
Masatoshi Kimura 241039fd97 Bug 1373984 - Turn nsIDocument::mCharacterSet into mozilla::NotNull<const mozilla::Encoding*>. r=hsivonen
MozReview-Commit-ID: GF0YXDwfA14

--HG--
extra : rebase_source : 09da1685795583513bf019d61c58230c2c4d298d
extra : source : 49249788c0dee331ac2989dc39f0505d965a7bd8
2017-06-18 20:37:50 +09:00
Masayuki Nakano 9f1aec970a Bug 1374207 - part4: Element classes should use TextEditor class instead of nIEditor r=smaug
Unfortunately, nsGenericHTMLElement::GetAssociatedEditor() cannot use concrete classes because it may return nsIEditor which is set via nsIDocShell.editor.  The editor set to nsIDocShell may be implemented by JS since nsIEditor isn't marked as builtinclass.

MozReview-Commit-ID: 6GY9LOYp4hM

--HG--
extra : rebase_source : 3e0464067b30daf8254805458c5358d7ea644be8
2017-06-22 15:21:31 +09:00
Emilio Cobos Álvarez f6dc661b5b Bug 1370802: Parse lang attributes as atoms. r=heycam
MozReview-Commit-ID: Cnq3wB7aVB1

--HG--
extra : rebase_source : fa0252b78381bf023ab08bf2d9fd13d4c0ed57a1
2017-06-15 21:48:26 +02:00
John Dai 005cba50ea Bug 556743 - Implement the labels attribute. r=smaug 2017-06-15 20:04:00 -04:00
Olli Pettay 1c41ba7c1e Bug 1367552 - Use IdleDispatch for ContentUnbinder , r=ehsan
--HG--
extra : rebase_source : 7575c7db087334f239eec517666a7ddd8061a668
2017-05-24 18:06:32 -04:00
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 e0e2e3ceb4 Bug 1331047: Return the correct flattened tree parent for ::before and ::after of the root element. r=bholley
MozReview-Commit-ID: LEuf9dyknh4
2017-04-27 17:09:27 +02:00
Boris Zbarsky 14dfe4c256 Bug 1356498. Change nsDocument's unlink to unbind/remove its kids the same way other places (including FragmentOrElement's unlink) do. r=mystor
This prevents us from trying to re-set the base URI to the href of a <base> element that's being unlinked.
2017-04-18 20:56:45 -04:00
Xidorn Quan ea9834babb Bug 1343964 part 4 - Have document and svg:use element own URLExtraData. r=bholley,bz
MozReview-Commit-ID: 8451L5qJvEx

--HG--
extra : rebase_source : caa9b3ccd786563a59dc39fe7c23842928c173cc
2017-04-06 16:51:29 +10:00
Xidorn Quan 8b3894a4e8 Bug 1349059 - Replace XMLBaseAttributeWithStyledElement with XMLBaseAttributeForStyleAttr for a more accurate measurement. r=bz
MozReview-Commit-ID: DXILBM79r2Q

--HG--
extra : rebase_source : 526885b04879da7b244f76ff4ef9aa40305d1c81
2017-03-21 11:32:19 +11:00
Manish Goregaokar 16276b38cd Bug 1341086 - Part 3: stylo: Add thread-safe version of nsStyleUtil::IsSignificantChild(); r=emilio
MozReview-Commit-ID: 3l8cNwDHKFl

--HG--
extra : rebase_source : af2ed1c345991c894d482193a1fb654bd6a7ba69
2017-03-16 14:10:22 -07:00
Edgar Chen 00f084fb1b Bug 1347634 - GetCustomElementData and SetCustomElementData don't need to be virtual; r=smaug 2017-03-16 12:21:12 +08:00
Xidorn Quan 6eb58892f8 Bug 1345343 - Add a pref to turn off effect of xml:base on style attribute. r=bz
MozReview-Commit-ID: EzNLxIW0OCv

--HG--
extra : rebase_source : 7c6d1278ed47d35b109bbe3e6305032b7f125fa4
2017-03-10 18:04:34 +11:00
Xidorn Quan 3357d0d06e Bug 1344102 - Add a telemetry for xml:base on styled element. r=bz
MozReview-Commit-ID: 9vqlxDi5KB8

--HG--
extra : rebase_source : 70598eecff0c25e82d25a9bf9f2e36d26bf35648
2017-03-03 14:32:11 +11:00
Tobias Schneider 5167bc2af8 Bug 1337936 - (intersection-observer) Revise lifetime management. r=smaug
MozReview-Commit-ID: 4pzm00igBLR

--HG--
extra : rebase_source : ad9c5581f991c392f431793fde289b8ca8245bd0
2017-02-22 10:45:13 -08:00
Sebastian Hengst ae051c91a0 Backed out changeset 5f93d62d9229 (bug 1337936) for asserting in crashtest 869038.html. r=backout 2017-02-22 14:06:26 +01:00
Tobias Schneider 0da735fe74 Bug 1337936 - (intersection-observer) Revise lifetime management. r=smaug
MozReview-Commit-ID: AvdDJaRELXm

--HG--
extra : rebase_source : a3e8705822545fd4c1cee688939c617a419d3936
2017-02-21 03:13:39 -08:00
Xidorn Quan fc22390de5 Bug 1340926 part 3 - Deprecate usage of xml:base. r=Ehsan,francois
MozReview-Commit-ID: EpuKLrCj0qc

--HG--
extra : rebase_source : 051f300371d27d4dcdbcb8e70b54c3196155780e
2017-02-20 12:41:11 +11:00
Xidorn Quan 3ff59c9fc4 Bug 1340061 part 2 - Remove explicit base URI facility. r=bz
MozReview-Commit-ID: JaUzecbdT2F

--HG--
extra : rebase_source : df409ca400fbb2afe9b59e33585cb81fcedc962f
2017-02-16 18:35:52 +11:00
Xidorn Quan c12c9d292d Bug 1340061 part 1 - Use source doc URI for SVG <use> anonymous content. r=bz
MozReview-Commit-ID: 2fkDfYh79b

--HG--
extra : rebase_source : 8625243bc7c6120f5a6741f11eb0fccb4f0da8e8
2017-02-16 18:14:46 +11: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
Boris Zbarsky d7e6d48b2f Bug 1338725 part 2. Move GetClasses/DoGetClasses from nsIContent to Element. r=baku 2017-02-13 16:06:45 -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
Boris Zbarsky c23f96a55c Bug 1330536 part 7. Change nsINode::GetTextContent to take an OOMReporter, not an ErrorResult. r=smaug 2017-01-17 23:52:29 -05:00
Tobias Schneider 7bf1d2ce13 Bug 1326194 - Unlink observed targets as soon as DOMSlots gets unlinked. r=mrbkap
MozReview-Commit-ID: 4OnDvyc98S8

--HG--
extra : rebase_source : ff6336a0af81babf37f5a89a2809a515eb8430cc
2017-01-06 13:47:06 -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
Tobias Schneider db4c7dfb10 Bug 1325103 - Clear mRegisteredIntersectionObservers when unlinking DOMSlots. r=mstange 2016-12-20 15:20:03 -08:00
Masayuki Nakano 7436f01057 Bug 564411 Move all methods/attributes of nsIEditorIMESupport to nsIEditor r=smaug
Doing QI from nsIEditor to nsIEditorIMESupport doesn't make sense because editor should always support all methods and attributes of nsIEditorIMESupport (it does NOT mean that all nsIEditor implementation need to support IME).

This patch moves all of them to nsIEditor for avoiding redundant QIs.

MozReview-Commit-ID: DzIKuGHG4iy

--HG--
extra : rebase_source : cc5e9a6ae4572ebe461d9770ffa5c23d33dc8526
2016-12-20 21:47:31 +09: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