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

318 Коммитов

Автор SHA1 Сообщение Дата
Bobby Holley ef26283b2d Bug 1403397 - Revert: Add a testing API. r=bholley
This reverts commit 4194b7dd8ec748c044a9b8b0967fd9d652ea342c.
2017-10-03 14:05:56 -07:00
Bobby Holley bd4be52f46 Bug 1403397 - Add a testing API. r=bz,r=Manishearth
This will allow us to verify the entire detection pipeline in real nightly
builds, which will give us confidence that real heap corruption will be
detected and reported properly.

MozReview-Commit-ID: 43Fp2HT8RYy
2017-09-28 18:23:15 -07:00
Emilio Cobos Álvarez 1ae8fc2d3a Bug 1403078: Lazily tweak the traversal root to account for sibling invalidations. r=heycam
MozReview-Commit-ID: Ij3nMOKu5FO
2017-09-26 14:20:11 +02:00
Bobby Holley cb69588ef2 Bug 1402285 - Don't try to cache pseudo styles with an unstyled originating element. r=emilio
MozReview-Commit-ID: C4JNZFtYHBH
2017-09-22 18:02:24 -07:00
Bobby Holley 51ff1b0b2b Bug 1401317 - Disable lazy pseudo caching when the originating element's primary style was reused via the rule node. r=emilio
MozReview-Commit-ID: IkBa39E1bR1
2017-09-20 10:09:59 -07:00
Bobby Holley 8d10314a67 Bug 1400435 - Use a more precise check in the nsCSSValue destructor. r=xidorn
MozReview-Commit-ID: KFdgtxyOZ01
2017-09-19 22:53:23 -07:00
Nicholas Nethercote 5036b9133e Bug 1400078 - Measure the UA cache. r=njn.
ServoStyleSetSizes now has two uses, one for the Stylist, and one for the UA
cache, and so the patch removes 'Stylist' from the field names.

Example output from about:memory:

> +----1,359,608 B (00.55%) -- layout
> |    +----756,488 B (00.31%) -- style-sheet-cache [2]
> |    +----393,968 B (00.16%) -- servo-ua-cache
> |    |    +--234,496 B (00.10%) -- element-and-pseudos-maps
> |    |    +---59,648 B (00.02%) -- revalidation-selectors
> |    |    +---58,320 B (00.02%) -- invalidation-map
> |    |    +---30,752 B (00.01%) -- other
> |    |    +---10,752 B (00.00%) -- precomputed-pseudos

MozReview-Commit-ID: 8oxuJO0ojp

--HG--
extra : rebase_source : 7d86216967259b71df7280261d025cc65bf00ba4
2017-09-19 09:25:00 +10:00
Emilio Cobos Álvarez 1ce36be939 Bug 1399546: Remove broken code for handling the body text color. r=bholley,Manishearth
MozReview-Commit-ID: AfAT9DgzvI7
2017-09-16 02:38:58 +02:00
Neerja Pancholi 519d87d216 Bug 1389029 - Undo code changes in Bug 1388234 which is unnecessary now that we post restyle events for rowspan/colspan changes. r=emilio
MozReview-Commit-ID: 5eTW5dCcxzP

This patch reverts the code changes, but not the test changes from changeset bf9cf6f393eb. There is a crashtest here which is valuable to keep.

--HG--
extra : rebase_source : e6f5d7234eca396a0302c1d562fc54663b274c6c
2017-09-06 12:56:53 -07:00
Bobby Holley 977fd4a02a Bug 1397500 - Disable the ActiveElementUsesStyle optimization for stylo. r=emilio
MozReview-Commit-ID: 20aqaFv9fxE
2017-09-06 15:30:53 -07:00
Nazım Can Altınova 39c02b31f3 Bug 1394551 - stylo: Dont unnecessarily construct gfxFontFeatureValueSet r=xidorn
If there is no font feature values inside document we should avoid creating
unnecessary objects.

MozReview-Commit-ID: HJKMzQvQAPR

--HG--
extra : rebase_source : 06dc792d2c4848c4c8ca49b9eb98630d5d475006
2017-08-30 17:08:50 -07:00
Nicholas Nethercote fb0b046a21 Bug 1387958 - Measure the stylist during memory reporting. r=heycam.
Example output from the Obama Wikipedia page:

> ├──2,315,600 B (01.16%) -- stylist
> │  ├──1,916,928 B (00.96%) ── invalidation-map
> │  ├────228,800 B (00.11%) ── rule-tree
> │  ├────142,336 B (00.07%) ── element-and-pseudos-maps
> │  ├─────14,336 B (00.01%) ── revalidation-selectors
> │  ├──────9,648 B (00.00%) ── other
> │  └──────3,552 B (00.00%) ── precomputed-pseudos

This change requires new code to measure HashMaps, which uses the new
'malloc_enclosing_size_of' functions that can measure a heap block from an
interior pointer.

The patch changes MallocSizeOfFn to a newtype, and introduces
MallocEnclosingSizeOfFn alongside.

It also adds new traits: MallocSizeOfBox, MallocSizeOfVec, MallocSizeOfHash.
These each contain a single method that does shallow measurement of the
relevant type, which is often useful. (This is a different style to the
existing MallocSizeOf trait, which does deep measurement, but I'm moving away
from the always-deep-measurement style because it's less flexible.)

MozReview-Commit-ID: FgJCCmdw0ZF

--HG--
extra : rebase_source : c692c2073aa66020224489b97247c49de95a99a4
2017-09-05 11:38:45 +10:00
Ting-Yu Lin 748cb71860 Bug 1396700 - Add a method to ServoStyleSet for creating XBL style set. r=xidorn
The motivation of this patch is that clearing mPresContext should be an
implementation detail of XBL style set, so I create a method for that, and
remove ClearPresContext().

MozReview-Commit-ID: Ftta0rcAqu6

--HG--
extra : rebase_source : 0bdb1ac3e2c988e5a0220172f19ab4b006e883d7
2017-09-01 16:45:39 +08:00
Ting-Yu Lin 0facc17a51 Bug 1396700 - Remove ServoStyleSet::UpdateStyleSheet(). r=xidorn
This is no longer used.

MozReview-Commit-ID: G7cUcz9CKeQ

--HG--
extra : rebase_source : 3f13913863c8d8c4db14d02763781f3037d64d22
2017-09-01 17:12:58 +08:00
Ting-Yu Lin 3b33ba27fb Bug 1382078 Part 4 - Avoid unneeded restyle when XBL styleset is utilized by different PresContext. r=emilio
This fixed layout/style/test/test_media_queries_dynamic.html after Part 3 is added.

MozReview-Commit-ID: 7ZpSunCnkIc

--HG--
extra : rebase_source : 6acab11ba784b801b90afc0558c32baabcc3f271
2017-09-04 17:57:00 +08:00
Ting-Yu Lin b6d71d0740 Bug 1382078 Part 3 - Support media changes for XBL stylesheets. r=emilio
MozReview-Commit-ID: EJp8EMyanBT

--HG--
extra : rebase_source : 0ea61ea1f649548158fa600e5e11190631ce447f
2017-09-02 15:25:45 +08:00
Sebastian Hengst 3764de542b Backed out changeset b49d8d47c3f1 (bug 1382078) 2017-09-02 20:43:36 +02:00
Ting-Yu Lin d537ea001c Bug 1382078 Part 3 - Support media changes for XBL stylesheets. r=emilio
MozReview-Commit-ID: EJp8EMyanBT

--HG--
extra : rebase_source : 524aaa95070c7708b3c24a0c9ee8a24344be2645
2017-09-02 15:25:45 +08:00
Emilio Cobos Álvarez dcdc508e66 Bug 1395351: Use the parallel traversal flag more often. r=bholley
MozReview-Commit-ID: JF6i0HDniR2

--HG--
extra : rebase_source : e917a604cf01d2fdafee5d52eb9878971e217cfe
2017-09-01 19:28:57 +02:00
Emilio Cobos Álvarez 7a147d3d24 Bug 1395351: Assert the root element is styled in StyleDocument. r=bholley
MozReview-Commit-ID: 6KncJ5IqLbt

--HG--
extra : rebase_source : d9c455e9e567d4647157192cc386403c2b343cba
2017-09-01 19:31:45 +02:00
Emilio Cobos Álvarez 80541449d2 Bug 1374235: style: Remove the for reconstruction traversals. r=bholley
One less hack, a few more to go.

MozReview-Commit-ID: 6katL1EGn2U
2017-09-01 18:46:23 +02:00
Sebastian Hengst df63e116bf Backed out changeset 35afffcb4182 (bug 1374235) for build bustage because it landed before its servo commit. r=backout 2017-09-01 14:07:47 +02:00
Emilio Cobos Álvarez fd2d4e8b6f Bug 1374235: style: Remove the for reconstruction traversals. r=bholley
One less hack, a few more to go.

MozReview-Commit-ID: 6katL1EGn2U
2017-09-01 13:16:09 +02:00
Emilio Cobos Álvarez 175b1c068d Bug 1384232: Don't post restyles when loading XBL stylesheets. r=TYLin
MozReview-Commit-ID: 3MCz4vuJb9q

--HG--
extra : rebase_source : 7b15ea991bf3f75c4c33d48080e3f936cf7b4a1b
2017-08-31 22:59:11 +02:00
Emilio Cobos Álvarez afe0dfdd27 Bug 1384232: Let ServoStyleset know what its purpose is. r=TYLin
MozReview-Commit-ID: IwC6FcxhYMT

--HG--
extra : rebase_source : 6d15a71b5bd3bbcce4c255b6993ac000daabe09e
2017-08-31 22:50:24 +02:00
Brian Birtles 670dfc03bf Bug 1395452 - Call HasAnimationController() before GetAnimationController(); r=hiro
nsDocument::GetAnimationController() will lazily create an animation controller
which, in some call sites, is unnecessary.

This patch first calls HasAnimationController() and only calls
GetAnimationController() if it returns true. This avoids creating an animation
controller in situations where one is not necessarily required.

MozReview-Commit-ID: 4cdpLRvMVJU

--HG--
extra : rebase_source : 125a59c0b0535d5df9a9964538b3784ddb1212c7
2017-08-31 15:00:39 +09:00
Nicholas Nethercote 9251ef42b7 Bug 1394729 - Measure memory usage of Stylo's Rule Tree. r=heycam.
This patch splits up the existing "layout/style-sets" measurement into
"layout/gecko-style-sets", or "layout/servo-style-sets/stylist/rule-tree" and
"layout/servo-style-sets/other". (Additional things will be measured under
"layout/servo-style-sets/" later, such as cascade data.)

This requires introducing a new type, ServoStyleSetSizes, for transferring the
multiple measurements from Rust code to C++ code.

MozReview-Commit-ID: FbmzpsjBpgI

--HG--
extra : rebase_source : f2d1441705139e6674d355792255302fcd89f748
2017-08-30 18:21:26 +10:00
Bobby Holley 7174bd25c7 Bug 1392863 - Clean up DoProcessPendingRestyles. r=emilio
MozReview-Commit-ID: 4JhWFNPVvGn
2017-08-26 12:28:25 -07:00
Nazım Can Altınova b2b88364dd Bug 1355721 - stylo: Implement font feature values lookup r=emilio,xidorn
MozReview-Commit-ID: 7wgQ1NCn7vL

--HG--
extra : rebase_source : 6c774e87b8bd3f30d819302aba5a73a50047981a
2017-08-23 18:05:53 -07:00
Emilio Cobos Álvarez c5ba418ffa Bug 1387913: Make sure to update the stylist if needed on EnsureUniqueInnerOnCSSSheets. r=heycam
MozReview-Commit-ID: 3eKd78qMC1T

--HG--
extra : rebase_source : b317f0e12f769d39a7cbae66d9147c52d40cffea
2017-08-22 20:36:14 +02:00
Gregory Szorc 2a5e786286 Backed out changesets b749fc196a50, 2791eac8d760 (bug 1355721) for build bustage
CLOSED TREE

--HG--
extra : amend_source : 7618f27e1cf71347f12384935374d303d5c1ab23
extra : histedit_source : 1143d226673ace563bb5d9ff3c420ded33439791%2C9746a30097304bd2214a0072773dc00c767d31cd
2017-08-24 20:30:17 -07:00
Nazım Can Altınova 00f1cc4565 Bug 1355721 - stylo: Implement font feature values lookup r=emilio,xidorn
MozReview-Commit-ID: 7wgQ1NCn7vL

--HG--
extra : rebase_source : c104c2b09ebfbf5cdb98bc5638473cac1bfc40c9
2017-08-23 18:05:53 -07:00
Bobby Holley 7210bd7226 Bug 1383332 - Track the restyle root and use it to do less work during the traversal. r=emilio
MozReview-Commit-ID: A8O3JOpsv4E
2017-08-22 21:19:24 -07:00
Ting-Yu Lin c7dc325aed Bug 1388165 - Clear mPresContext after creating XBL styleset. r=xidorn
MozReview-Commit-ID: VBmKMTt8lc

--HG--
extra : rebase_source : e2b16da8f3d9c55a1485558f76285dc10c39b530
2017-08-22 14:46:25 +08:00
Bobby Holley 1b117f0519 Bug 1373343 - Skip the parallel traversal when the presshell isn't active. r=heycam
I've verified with the profiler that we use the parallel traversal for
loading a foreground tab, but not for a tab opened with ctrl-click.

MozReview-Commit-ID: 2SiVDlLLyah
2017-08-17 19:08:29 -07:00
J. Ryan Stinnett 418161625f Bug 1390691 - Fix up Servo_StyleSet_MediumFeaturesChanged for Linux 32-bit ABI. r=manishearth
Bindgen bitfield enums don't work as return values with the Linux 32-bit ABI at
the moment because they wrap the value in a struct.

This causes the Rust side to believe the caller will pass along space for the
struct return value, while C++ believes it's just an integer value.

MozReview-Commit-ID: LY6z7lEKgOp

--HG--
extra : rebase_source : deb9739bd100e2162e7c93d6d45d7029d7793355
2017-08-15 17:10:13 -05:00
Emilio Cobos Álvarez 18c2f8e9a8 Bug 1389871: stylo: only clear relevant origins when medium features change. r=heycam
MozReview-Commit-ID: 6ocZc1u1TbU

--HG--
extra : rebase_source : a1f0f17bcb06e075aaa39cce5ac5e31e30f1b33e
2017-08-14 10:37:19 +02:00
Cameron McCormack 56eccb1311 Bug 1382925 - Part 3: Pass in relevant origin when style sheet rules change and when author styles are toggled. r=emilio
MozReview-Commit-ID: EGEnUBAvVyX

--HG--
extra : rebase_source : 3a445fb948b4f1284f50fe212b47d2fea9538311
2017-08-12 18:49:01 +08:00
Cameron McCormack 7e913c1a93 Bug 1382925 - Part 1: Make Servo_StyleSet_NoteStyleSheetsChanged take a set of origins to dirty. r=emilio
MozReview-Commit-ID: KY29REU78tH

--HG--
extra : rebase_source : bc3ca1deb1fcc797e6156c8bd0656012eb9c4315
2017-08-12 18:19:22 +08:00
Bobby Holley 1cf62db957 Bug 1389681 - Move NoteDirty* to Element. r=emilio
MozReview-Commit-ID: KvKAEuYkssx
2017-08-12 10:12:28 -07:00
Hiroyuki Ikezoe 0d870b1b90 Bug 1388031 - Cleanup code that was used for verifying styling results for throttled animation flush in post traversal. r=bholley
Now that we do process normal traversal even in the case of throttled animation
flush so that we don't need to do special handling for the case.

Note about the comment in has_current_styles():
the remaining animation hints is not caused by either this patch or the
previous patch in this patch series, it's been there in the first place, but
it should be fixed somehow later. See bug 1389675.

MozReview-Commit-ID: JojHufxNCiS
2017-08-11 20:34:08 -07:00
Hiroyuki Ikezoe fb03af5d7d Bug 1388031 - Process normal traversal for throttled animation flush as well. r=bholley
MozReview-Commit-ID: BirD8BDMifp
2017-08-11 20:34:06 -07:00
Bobby Holley 890588d0ca Bug 1389347 - Make the parallel traversal an explicit flag instead of guessing from Servo. r=emilio
MozReview-Commit-ID: 83DgB1sZnCb
2017-08-11 15:55:14 -07:00
Bobby Holley 9f46941f63 Bug 1389347 - Inline PrepareAndTraverseSubtree into StyleDocument. r=emilio
MozReview-Commit-ID: Kza0gGqvvmM
2017-08-11 15:55:13 -07:00
Bobby Holley 142eb4df57 Bug 1389347 - Hoist StyleNew{Children,Subtree} into their own paths. r=emilio
The buggy animation handling isn't a regression, since currently we pass
UnstyledChildrenOnly in those cases, which blocks the animation traversal
in Servo_TraverseSubtree.

In general I really wanted to handle these two paths together. But there's
enough broken with the NewChildren path that I wanted to scope the buginess
as tightly as possible. And I really need to separate the handling here from
StyleDocument() to make the restyle root stuff work.

MozReview-Commit-ID: 9F0mcQl7AAX
2017-08-11 15:55:13 -07:00
Bobby Holley 7ec2e91713 Bug 1389347 - Separate StyleSubtreeForReconstruct into its own path. r=emilio
This makes things a bit easier to follow, and sets the stage for eliminating
PrepareAndTraverseSubtree and making StyleDocument restyle-root-aware.

MozReview-Commit-ID: 40ORrqAuXni
2017-08-11 15:55:12 -07:00
Bobby Holley 622ed2a2c9 Bug 1389347 - Hoist various bits of PrepareAndTraverse functionality into an RAII class. r=emilio
MozReview-Commit-ID: CPVnZjSwRpN
2017-08-11 15:55:12 -07:00
Hiroyuki Ikezoe 80dfc0d6fb Bug 1379516 - Mark animation timerline marker for stylo. r=birtles
MozReview-Commit-ID: GkPSXEk4xua

--HG--
extra : rebase_source : 3fa0f5029bcfd87e9d6abfec9c6ea5d03a7656e6
2017-08-11 08:44:11 +09:00
Emilio Cobos Álvarez e4646d449f Bug 1388234: Don't assert when calling out of band to ResolveInheritingAnonymousBoxStyle. r=heycam
MozReview-Commit-ID: FYctJRfLTK6

--HG--
extra : rebase_source : feec0d3a65c501ea7b3382d892f512388bd7240e
2017-08-08 14:54:13 +02:00
Bobby Holley fb45c73178 Bug 1388623 - Use our new traversal flags to avoid doing post-traversal clearing of restyle state. r=emilio
MozReview-Commit-ID: E4fqtsQtO9E
2017-08-09 12:12:28 -07:00