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

401 Коммитов

Автор SHA1 Сообщение Дата
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
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
Nicholas Nethercote ac72ddb583 Bug 1390760 - Measure ServoComputedData::visited_style. r=bholley.
For the Obama wikipedia page, this covers about 85% of the unmeasured
ComputedValues structs. The about:memory output looks like this:

> +---2,443,648 B (02.41%) -- computed-values
> |   +--1,088,272 B (01.07%) -- dom
> |   +----945,744 B (00.93%) -- non-dom
> |   +----409,632 B (00.40%) -- visited

I'm not sure why some CVs are still being missed.

MozReview-Commit-ID: 1bYWwSi4ihn

--HG--
extra : rebase_source : 14e4bd36a54bbbd8fd265f559704bec5a5e3b154
2017-08-21 16:07:16 +10:00
Emilio Cobos Álvarez 977a701ae1 Bug 1392093: Remove dead code to get the old style context. r=heycam
Unused since https://github.com/servo/servo/pull/18153.

MozReview-Commit-ID: DtQdm3ONS5E

--HG--
extra : rebase_source : 8a781dfdd4963b73c0f6a0c5bc2de8041bcc0db9
2017-08-20 18:01:25 +02:00
Emilio Cobos Álvarez 2b074ed3a4 Bug 1391787: Mutex out the system color stuff. r=Manishearth
GTK is definitely not thread-safe, and unless proven otherwise, I suspect the
other widgets aren't either.

Mutex the calls to get the system color stuff.

There are chances to make this more fine-grained moving the mutexes into the
specific widget code and when needed. That is more analysis work which I'm not
sure we should waste time on, since the chances on racing here seem quite
unlikely in practice (system colors are uncommon enough in content, I guess).

MozReview-Commit-ID: AOQQ2jtkgpx
2017-08-20 18:19:19 +02:00
Bobby Holley a0a0196602 Bug 1375911 - Avoid creating a stylo thread pool in e10s parent processes. r=xidorn
MozReview-Commit-ID: LW92yNDKZf4
2017-08-17 19:15:20 -07:00
Emilio Cobos Álvarez af1bc71c5d Bug 1390650: stylo: Remove some unused FFI functions. r=bholley,xidorn
MozReview-Commit-ID: K9fXGRmgkr4

--HG--
extra : rebase_source : 2428cd915b9d7f4b75b23df99e9d532034ff63a7
2017-08-15 23:21:30 +02:00
J. Ryan Stinnett bdb91a3c76 Bug 1390691 - Fix up Gecko_CalcStyleDifference 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 callee expects space for the struct
return value, while C++ believes it's just an integer value.

MozReview-Commit-ID: FRBqlZuMiAR

--HG--
extra : rebase_source : d1b2af4b965c000a5bd8e1792ae166cba5e152a9
2017-08-14 20:02:01 -05: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
Bobby Holley 3e308bd38d Bug 1389385 - Rearrange dirty noting to operate on the element rather than the parent. r=emilio
This will allow us to scope restyle roots more tightly.

MozReview-Commit-ID: 2t2lp5sKBHH
2017-08-11 18:18:22 -07:00
Bobby Holley 7a9898d81a Bug 1389385 - Do all descendant bit propagation from Gecko over FFI. r=emilio
Deduplicating code is nice, and it will help us when we make the bit
propagation more complicated in upcoming patches.

MozReview-Commit-ID: KIQnNJVayrM
2017-08-11 18:18:19 -07:00
Xidorn Quan b97e3aed9b Bug 1388255 - Make nsStylePosition::mGridTemplate{Columns,Rows} a UniquePtr. r=canaltinova,dholbert
MozReview-Commit-ID: 8SOE6sAavCX

--HG--
extra : rebase_source : 666c95221e059da9b1a729eea3584e2060968582
2017-08-09 11:30:25 +10:00
Daisuke Akatsuka 26b36b660d Bug 1382137 - Part 2: make list-style-type animatable. r=hiro
MozReview-Commit-ID: BT4SX6SxIYi
2017-08-08 10:12:57 +09:00
Daisuke Akatsuka e77e436ab7 Bug 1382137 - Part 1: implement conversion method from Gecko CounterStylePtr to CounterStyleOrNone. r=hiro
In this path, implement conversion method from CounterStylePtr to CounterStyleOrNone since we need this to implement clone_list_style_type method.

MozReview-Commit-ID: Fmyc50WQU4C
2017-08-08 10:12:54 +09:00
Emilio Cobos Álvarez 938400aeaa Bug 1385896: Move nsStyleContext::mParent to GeckoStyleContext. r=heycam
Unfortunately this means that we lose the NS_STYLE_INHERIT_BIT optimization to
avoid posting changes if we had not requested the struct. In practice, I'm not
sure this optimization matters much, though, and we already compare all the
structs anyway.

We _could_ keep a weak parent pointer from the text style if needed, given we're
going to keep alive the text style at least until the parent style context goes
away, so should be safe, but I don't think the extra churn is worth it, to be
honest. Happy to do so as part of bug 1368290 if you think it's worth it.

MozReview-Commit-ID: ka6tNwf4Ke

--HG--
extra : rebase_source : dd6e98cf5743a8dd2e959ca09ed9a17e52b201e9
2017-07-31 16:21:40 +02:00
Nicholas Nethercote cc91deea30 Bug 1383977 - stylo: Measure Elements and ComputedValues. r=manishearth.
The patch provides FFI access to Gecko's SeenPtrs type from Rust, in order to
record what has already been measured when measuring Arcs. (The SeenPtrs must
be initialized on the Gecko side because the same table is reused for measuring
all Elements within a window, because Elements can share ComputedValues.) I
have confirmed with DMD that this is working correctly.

The patch also introduces MallocSizeOfRepeats, which is like MallocSizeOf but
takes a SizeOfState, which holds a SeenPtrs table.

MozReview-Commit-ID: DHS8zvCsEdQ

--HG--
extra : rebase_source : acf4d7909abf6ceb1719331ccf2e33137eb6dc91
2017-07-19 10:30:53 +10:00
Josh Matthews 14380b5ec0 Bug 1381143 - Report specific error for invalid CSS colors. r=heycam a=bustage
MozReview-Commit-ID: FIFjld3wi82

--HG--
extra : rebase_source : af13ed3ad44968b0e7167e2dd125603ef33e4981
2017-07-31 15:40:47 -07:00
J. Ryan Stinnett ed1565f7ca Bug 1384789 - Fix up missed rename. r=bustage
MozReview-Commit-ID: FDkUBSccQuu
2017-07-31 16:04:04 -05:00
J. Ryan Stinnett edcbffb572 Bug 1384789 - Mark import loop sheet complete. r=heycam
For an import loop sheet, set the URIs and principal, and mark it complete, so
that it can still be properly accessed via CSSOM without errors.

MozReview-Commit-ID: 1oO1LoaPk8V

--HG--
extra : rebase_source : 2de1e8e03a2e8934710c2f2631f771bc067923d3
2017-07-27 17:03:42 -05:00
Xidorn Quan 62d02de8ce Bug 1366956 part 2 - Replace IsFramesTimingEnabled FFI function with direct pref cache access. r=heycam
MozReview-Commit-ID: 3pVCEmuxf9D

--HG--
extra : rebase_source : 5d08e4f3bba0f3955a893046b04bf137bcd7c57d
2017-07-18 10:55:36 +10:00
Xidorn Quan 168e6ca204 Bug 1385529 - Remove Gecko_GetMediaFeatures and access nsMediaFeatures::features directly. r=emilio
MozReview-Commit-ID: IbTikEgabXA

--HG--
extra : rebase_source : 3ea81bad872f675be14862f627f174912e0c79ac
2017-07-29 15:21:36 +10:00
Xidorn Quan 2f534aa9d7 Bug 1381690 - Have check_allowed_in read gPropertyEabled table directly. r=manishearth
MozReview-Commit-ID: 5pwnEqxqVi6

--HG--
extra : rebase_source : 78c6702fe3260c4ac8720fbaca1de19f9b9c0b8c
2017-07-18 10:11:40 +10:00
Cameron McCormack 8939798d4b Bug 1384625 - Crash in ServoComputedValues::GetStyleVariables, which should never need to be called. r=emilio
MozReview-Commit-ID: 4HYNGMPMhsH

--HG--
extra : rebase_source : 103e892149986f23d29553700a6622eaf27012fd
2017-07-27 17:33:29 +08:00
Josh Matthews ace7bd502f Bug 1381137: Append skipped/dropped message to Stylo CSS error reports. r=heycam
MozReview-Commit-ID: GUgJneVg1oy
2017-07-26 14:55:33 +02:00
Cameron McCormack f7f0ad18d0 Bug 1376248 - Part 1: Use an nsAutoAnimationMutationBatch when updating animations for an element in stylo. r=birtles
MozReview-Commit-ID: 2ft7qn9iVLB

--HG--
extra : rebase_source : b24eea2c4e08b448dcbc1891339a42d3534ddc2d
2017-07-24 16:02:53 +08:00
Emilio Cobos Álvarez ecbfd2ef14 Bug 1383307: Honor the relevant link visited pref. r=manishearth
MozReview-Commit-ID: D5NiEJUpONQ
2017-07-23 23:56:37 +02:00
Manish Goregaokar 08c6de8178 Bug 1382017 part 4 Gecko piece - Rename ServoComputedValues -> ServoComputedData; r=heycam
ServoComputedValues is confusing because ComputedValues is actually
ServoStyleContext on the C++ side.

MozReview-Commit-ID: IQNVdfREAMt
2017-07-20 21:44:02 -07:00
Manish Goregaokar 26f3a98f78 Bug 1382017 part 4 Gecko piece - Remove usage of ServoComputedValues from most Gecko code; r=xidorn
MozReview-Commit-ID: 2NB4DgxMrL3
2017-07-20 17:27:05 -07:00
Manish Goregaokar 9e805b0538 Bug 1382017 part 2 Gecko piece - Remove usage of ServoComputedValues from binding functions; r=xidorn
MozReview-Commit-ID: 3KygTIIMVvF
2017-07-18 23:17:34 -07:00
Cameron McCormack 962f773bc4 Bug 1380133 - Part 5: Call CalcStyleDifference with ServoStyleContexts instead of a FakeStyleContext wrapping a ServoComputedValues. r=emilio
MozReview-Commit-ID: 6JhMas1EiM7
---
 layout/style/ServoBindings.cpp  | 21 ++++++++++-----
 layout/style/ServoBindings.h    |  3 ++-
 layout/style/nsStyleContext.cpp | 58 +++++++++++++++++++++--------------------
 layout/style/nsStyleContext.h   | 29 ++++++++++++++-------
 4 files changed, 65 insertions(+), 46 deletions(-)

--HG--
extra : rebase_source : 88576e17cd3867acdf8862dab42fd4b1e73bc755
2017-07-21 11:42:44 +08:00
Cameron McCormack 1580e4a025 Bug 1380133 - Part 2: Take a ServoStyleContext* in Gecko_CalcStyleDifference. r=emilio
MozReview-Commit-ID: DJnuUAmm1Fh
---
 layout/style/ServoBindings.cpp | 14 +++++++-------
 layout/style/ServoBindings.h   |  4 ++--
 2 files changed, 9 insertions(+), 9 deletions(-)

--HG--
extra : rebase_source : c4df8f13546511b504aefb0fa481d5f4171955ee
2017-07-21 11:42:42 +08:00
Cameron McCormack 9654eabe7f Bug 1380133 - Part 1: Minor reformatting and encapsulation. r=emilio
MozReview-Commit-ID: 3hmptLbxxok
---
 dom/animation/KeyframeUtils.h      |  2 +-
 layout/style/ServoBindings.cpp     | 24 +++++++++++++++---------
 layout/style/ServoStyleContext.cpp | 21 ++++++++++++---------
 layout/style/ServoStyleContext.h   | 33 ++++++++++++++-------------------
 layout/style/ServoTypes.h          | 24 ++++++++++++++----------
 layout/style/nsAnimationManager.h  |  7 +++----
 6 files changed, 59 insertions(+), 52 deletions(-)

--HG--
extra : rebase_source : 150278b5f7429986e79976ec9faf290db6de86c0
2017-07-21 11:42:42 +08:00
Emilio Cobos Álvarez c02bd43974 Bug 1382372: Add a fast-path for matching attr selectors with the empty namespace. r=bz
MozReview-Commit-ID: GSr0oGJJZRM
2017-07-20 19:13:32 +02:00
Sebastian Hengst b289637574 Backed out changeset 454d7232178d (bug 1380133) for bustage at mozilla/KeyframeUtils.h: no 'object' file generated. r=backout on a CLOSED TREE 2017-07-20 15:41:12 +02:00
Sebastian Hengst 515a615505 Backed out changeset 6f89b4ceda12 (bug 1380133) 2017-07-20 15:40:16 +02:00
Sebastian Hengst d67d0384af Backed out changeset 9a84b6988af9 (bug 1380133) 2017-07-20 15:39:58 +02:00
Cameron McCormack 7ac8c49b89 Bug 1380133 - Part 5: Call CalcStyleDifference with ServoStyleContexts instead of a FakeStyleContext wrapping a ServoComputedValues. r=emilio
MozReview-Commit-ID: 6JhMas1EiM7

--HG--
extra : rebase_source : 22d94de05a300bd3d696db94b6999821c0af0b11
2017-07-19 17:50:35 +08:00
Cameron McCormack befeb6585d Bug 1380133 - Part 2: Take a ServoStyleContext* in Gecko_CalcStyleDifference. r=emilio
MozReview-Commit-ID: DJnuUAmm1Fh

--HG--
extra : rebase_source : 7f2447038eee1aa94d603a83409c88747203a411
2017-07-19 14:15:45 +08:00
Cameron McCormack c1be90be48 Bug 1380133 - Part 1: Minor reformatting and encapsulation. r=emilio
MozReview-Commit-ID: 3hmptLbxxok

--HG--
extra : rebase_source : 50044c27fbf6915a36f6a52d3cec7f226dc89460
2017-07-19 13:14:53 +08:00
Brian Birtles 267881f1f1 Bug 1381389 - Append PropertyValuePair objects on Gecko side so they are initialized correctly; r=hiro
Without this mValue may end up looking like a valid nsCSSValue object and bad
things will happen when we try to clone it.

We could just assign mem::zeroed() to mValue but this array hacking on the Servo
side is already pretty nasty and mSimulateComputeValuesFailure would still
remain unassigned (and if we did try to assign it on the Servo side we'd need to
only assign it in debug builds). Unless this proves performance-critical, it's
probably best to just do this on the Gecko side.

MozReview-Commit-ID: 75nFsflhZUM

--HG--
extra : rebase_source : 0e5d94a7f6fdb6768983ba440a3ea69d65cbffbf
2017-07-20 14:38:54 +09:00
Manish Goregaokar cdb73416fd Bug 1367904 - Part 14: stylo: Remove FFI calls for fetching style structs from ServoComputedValues; r=bholley
MozReview-Commit-ID: 2HrVZl9HZu1
2017-07-17 21:01:10 -07:00
Manish Goregaokar 3597e8df2e Bug 1367904 - Part 13: stylo: Flatten ServoComputedValues into ServoStyleContext; r=bholley
This patch also removes the duplication of style contexts during the
restyle, because otherwise pointer equality of ServoComputedValues stops
holding (and we assert on that in a few places)

MozReview-Commit-ID: 7Evc1p8ZfM2
2017-07-17 21:01:02 -07:00
Manish Goregaokar f33beecc59 Bug 1367904 - Part 10: stylo: Switch Gecko over to ServoStyleContext; r=bholley
MozReview-Commit-ID: EmopKVjEzlz
2017-07-17 21:00:46 -07:00
Jonathan Chan 4a6248b9a6 Bug 1355380 - Part 2: Make Servo's rounding of image-orientation values agree with Gecko's, and pass orientations directly as an enum instead of as angles. r=manishearth
Both Servo and Gecko store the specified value of the image-orientation
property as a single-precision float, but Gecko does the conversion to radians
and the computation to identify which quarter-turn the angle is closest to
using doubles.

We add Angle::radians64 to perform the conversion to radians using doubles,
just as Gecko does, and then update image_orientation to perform the
computation the same exact way Gecko does in
nsStyleImageOrientation::CreateAsAngleAndFlip. This lets the previously failing
reftests pass.

We also update Gecko_SetImageOrientation to take an orientation directly
instead of an angle (otherwise we'd be doing the which-quarter-turn-is-closest
computation twice).

Finally this lets us re-enable the reftests for image-orientation previously
marked as fails-if(styloVsGecko||stylo).

MozReview-Commit-ID: 2zMMzQlsYEC

--HG--
extra : rebase_source : 99ed023e940193d4ad735a9ee27e45929a1efda1
2017-07-10 11:32:08 -07:00
Brian Birtles 1fe4c641fc Bug 1379582 - Disable frames() timing function using a pref on release/beta channels; r=hiro
MozReview-Commit-ID: 4B8NwMAfyrS

--HG--
extra : rebase_source : 08becf963a57eda8e335b1c43672b25a25dbd81d
2017-07-12 08:41:58 +09:00
Sebastian Hengst 313b7a8917 Backed out changeset f2836ff575eb (bug 1355380) 2017-07-12 00:09:56 +02:00
Jonathan Chan f49acecfb4 Bug 1355380 - Part 2: Make Servo's rounding of image-orientation values agree with Gecko's, and pass orientations directly as an enum instead of as angles. r=manishearth
Both Servo and Gecko store the specified value of the image-orientation
property as a single-precision float, but Gecko does the conversion to radians
and the computation to identify which quarter-turn the angle is closest to
using doubles.

We add Angle::radians64 to perform the conversion to radians using doubles,
just as Gecko does, and then update image_orientation to perform the
computation the same exact way Gecko does in
nsStyleImageOrientation::CreateAsAngleAndFlip. This lets the previously failing
reftests pass.

We also update Gecko_SetImageOrientation to take an orientation directly
instead of an angle (otherwise we'd be doing the which-quarter-turn-is-closest
computation twice).

Finally this lets us re-enable the reftests for image-orientation previously
marked as fails-if(styloVsGecko||stylo).

MozReview-Commit-ID: 2zMMzQlsYEC

--HG--
extra : rebase_source : c6ead4358a2b4fb052f6144959cea0ba79b985e2
2017-07-10 11:32:08 -07:00
Bobby Holley 509fba7d22 Bug 1379893 - Null-check the presshell in Gecko_GetStyleContext. r=emilio
MozReview-Commit-ID: EWTmhXnl64P
2017-07-11 10:42:57 -07:00
Josh Matthews e0c37f0ed3 Bug 1352669 - Hook up Stylo CSS parser to Gecko error reporter. r=emilio
MozReview-Commit-ID: 3r5Z6KiPgRM
2017-07-10 17:52:00 -04:00