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

18602 Коммитов

Автор SHA1 Сообщение Дата
Mats Palmgren c0348042e9 Bug 1434478 part 6 - Propagate a percentage basis to nsIFrame::IntrinsicISizeOffsets for resolving padding/margin. r=dholbert
This is needed only for CSS Grid since in other cases we're
only using IntrinsicISizeOffsets in the inline-axis and
the percentage basis is always indefinite for *intrinsic
sizing*.  When calculating the intrinsic size of grid items
in the grid container's block axis however, we do have
a definite size for the grid area in the inline-axis and it
should be used per:
https://drafts.csswg.org/css-grid/#algo-overview
"2. Next, the track sizing algorithm resolves the sizes of
the grid rows, using the grid column sizes calculated in
the previous step."

(Percentage padding/margin for grid items is always resolved
against the grid area's inline-size nowadays.)
2018-04-10 00:16:58 +02:00
Mats Palmgren 5e6f2b92bb Bug 1434478 part 5 - Create nsLayoutUtils::ResolveToLength for resolving CSS <length-percentage> (idempotent patch). r=dholbert 2018-04-10 00:16:58 +02:00
Mats Palmgren f9c1c7eeb0 Bug 1434478 part 4 - Factor out constants like NS_UNCONSTRAINEDSIZE so they can be used in headers without needing nsIFrame.h (idempotent patch). r=dholbert 2018-04-10 00:16:58 +02:00
Mats Palmgren 7674d544b7 Bug 1434478 part 2 - Stop back-computing percentage padding/margin when the percentage basis is indefinite. Treat them as zero sized instead. r=dholbert 2018-04-10 00:16:57 +02:00
Noemi Erli b55e1a1cbc Merge inbound to mozilla-central. a=merge 2018-04-09 19:46:07 +03:00
Kartikaya Gupta 5cbb6be895 Bug 1426199 - Re-enable more crashtests that are now passing. r=sotaro 2018-04-09 08:02:12 -04:00
Jonathan Watt ef1290712d Bug 1452170 follow-up - Fix Windows unified build bustage by adding missing AutoRestore.h includes. r=me on CLOSED TREE 2018-04-09 10:21:42 +01:00
Jonathan Watt 782365b415 Bug 1452170 - Remove RestyleLogging.h, RestyleTrackerInlines.h and related RESTYLE_LOGGING cruft. r=heycam 2018-04-09 09:33:56 +01:00
Emilio Cobos Álvarez f39eaa5d48 Bug 1452080: Remove ComputedStyle::PresContext usage from layout and canvas code. r=xidorn
Couldn't find an easy way of splitting these up :(

MozReview-Commit-ID: 2kTZ5McREUT
2018-04-09 11:19:49 +02:00
Noemi Erli 5d9588e156 Backed out 3 changesets (bug 1452080) for bustage in /builds/worker/workspace/build/src/layout/base/nsCSSFrameConstructor.cpp on a CLOSED TREE
Backed out changeset 7f5104c7a242 (bug 1452080)
Backed out changeset 806a9c95a243 (bug 1452080)
Backed out changeset bffebe8aa254 (bug 1452080)
2018-04-09 11:18:12 +03:00
Emilio Cobos Álvarez 2a427429ff Bug 1452080: Remove ComputedStyle::PresContext usage from layout and canvas code. r=xidorn
Couldn't find an easy way of splitting these up :(

MozReview-Commit-ID: 2kTZ5McREUT
2018-04-09 09:57:55 +02:00
Emilio Cobos Álvarez e1aec7cd95 Bug 1447827: Rename the reparenting stuff. r=xidorn
MozReview-Commit-ID: H7tl6O8Ju32
2018-04-07 15:51:19 +02:00
Emilio Cobos Álvarez a2cb2d85cd Bug 1447827: Remove unused hover generation. r=xidorn
Not worth to keep the dead code, even if we may end up having to do something
about it in bug 1376082.

MozReview-Commit-ID: 8GG7O9ujtk0
2018-04-07 15:50:59 +02:00
Emilio Cobos Álvarez e128bf7b1a Bug 1447827: Remove ServoRestyleManager. r=xidorn
MozReview-Commit-ID: CFafQsb4rQn
2018-04-07 15:50:06 +02:00
Emilio Cobos Álvarez 7839e70676 Bug 1447827: Move ServoRestyleManager.cpp into RestyleManager.cpp. r=xidorn
Only moving implementation files, and s/ServoRestyleManager/RestyleManager/,
plus some indentation fixes.

MozReview-Commit-ID: 2WZ7KJfTrPS
2018-04-07 15:49:03 +02:00
Emilio Cobos Álvarez b508e66696 Bug 1447827: Move members from ServoRestyleManager to RestyleManager. r=xidorn
This leaves ServoRestyleManager as just a typedef.

MozReview-Commit-ID: 5wfTkiDc2Nr
2018-04-07 15:40:00 +02:00
Emilio Cobos Álvarez 0ea369c6a3 Bug 1450717: Remove unneeded / inconsistent arguments from nsCSSFrameConstructor. r=mats
Much in the spirit of bug 1442207.

They're not only unneeded, and cheap to get, but also we call them
inconsistently with the light DOM and flattened tree parent (like ContentRemoved
for display: contents), so they're really confusing, and kind of a footgun.

MozReview-Commit-ID: 9u3Kp8Kpp5i
2018-04-07 15:37:39 +02:00
Emilio Cobos Álvarez 93fa973783 Bug 1303605: Make LazyFC assertions actually hold. r=bz
The code was trying to assert that we had frames constructed for all the nodes
in the parent chain, but we don't bail out in the
!GetContentInsertionFrameFor(aContainer) in the case that it's a children
element, because they actually have no insertion frame, though their children
do.

Move the LazyFC check after the insertion point check. That makes the previous
check work on the insertion point of the child, which makes it sound.

This also fixes bug 1410020, and with it a Shadow DOM test-case that was failing
because we had two sibling assigned to two different <slot>s, and the second one
wasn't getting properly flagged, and thus the second sibling never got a frame.

The other two test failures in this test are an event dispatch failure, where
the position of the target is not what the test expects (we don't account for
margin and padding). Filed that as bug 1450027.

Also, added a test for which we have wrong layout without these patches, and
that crashes with "Called Servo_Element_IsDisplayNone" with the first patch of
this bug applied but not this one, due to the bogus check mentioned above.

MozReview-Commit-ID: 6OeaVrZhTDv
2018-04-07 15:22:06 +02:00
Emilio Cobos Álvarez c0f2f96f66 Bug 1303605: Remove the undisplayed maps. r=bz,mats
This is mostly code removal, changing GetDisplayContentsStyle(..) checks by an
FFI call to Servo.

The tricky parts are:

 * MaybeCreateLazily, which I fixed to avoid setting bits under display: none
   stuff. This was a pre-existing problem, which was wallpapered by the
   sc->IsInDisplayNoneSubtree() check, which effectively made the whole
   assertion useless (see bug 1381017 for the only crashtest that hit this
   though).

 * ContentRemoved, where we can no longer know for sure whether the element is
   actually display: contents if we're removing it as a response to a style
   change. See the comment there. That kinda sucks, but that case is relatively
   weird, and it's better than adding tons of complexity to handle that.

 * GetParentComputedStyle, which also has a comment there. Also, this function
   has only one caller now, so we should maybe try to remove it.

The different assertions after DestroyFramesForAndRestyle are changed for a
single assertion in the function itself, and the node bit used as an
optimization to avoid hashtable lookups is taken back.

MozReview-Commit-ID: AZm822QnhF9
2018-04-07 15:21:56 +02:00
Bobby Holley 5c354190dc Bug 1451421 - Stop using Gecko namespace ids in servo. r=xidorn
MozReview-Commit-ID: 2532dHCGPXW
2018-04-06 15:30:58 -07:00
Ben Kelly e8a484cfaa Bug 1451467 Check for nullptr mDocument->GetWindow() in a few more places in nsPresContext. r=smaug
--HG--
extra : rebase_source : a6ac4af614b261ec44162011daddfff0c8536f0c
2018-04-05 18:33:00 +03:00
Emilio Cobos Álvarez 92232a9bc4 Bug 1451239: Remove resolved namespace id and tag from FCItems. r=bz
Tag is unused.

This changes how some mixes of MathML and html get wrapped in anonymous table
boxes (in particular, it changes whether it uses a MathML or an HTML table
frame). The main thing this affects is whether the frame responds to certain
attributes. Responding to mathml attributes on its mContent when that mContent
is not a MathML element is weird. So arguably this is also more correct.

However, that seems acceptable to me, and you can already get that mixing
manually. On a few (arguably simple) manual test-cases mixing MathML and HTML
tables I couldn't manage to get the patched build to render differently.

Plus, neither our reftests nor the WPT MathML test-suite upstreamed by Fred Wang
for WebKit rely on this.

MozReview-Commit-ID: 8IV3iF5xIs0
2018-04-06 11:51:47 +02:00
Boris Zbarsky 4292bca4ee Bug 1449631 part 6. Remove nsIDOMEventTarget::DispatchEvent. r=smaug
MozReview-Commit-ID: 8YMgmMwZkAL
2018-04-05 13:42:41 -04:00
Boris Zbarsky 1dce94cf16 Bug 1449631 part 2. Remove nsIDOMEventTarget::RemoveEventListener. r=smaug
We can't have a null content in
ScrollbarActivity::StopListeningForScrollAreaEvents, because only viewport
frames have a null GetContent().

MozReview-Commit-ID: 9iAg0ivVqqG
2018-04-05 13:42:40 -04:00
Nicholas Nethercote e0c05abb10 Bug 1451169 - Reduce indirection for PseudoParentData::mPseudoType. r=xidorn
MozReview-Commit-ID: CiXGCKrpfCB

--HG--
extra : rebase_source : a2c22543668887d1fd20065e71f359aaf33795d9
2018-04-03 22:15:31 +10:00
Nicholas Nethercote bfe00b7ed4 Bug 1451169 - Reduce indirection for FrameConstructionDataByTag::mTag. r=xidorn
MozReview-Commit-ID: 4qNZF7SS2bS

--HG--
extra : rebase_source : b6bda58ac9bf80c45f41427bcec53538fb927f1a
2018-04-03 22:15:31 +10:00
Nicholas Nethercote 65653d8de1 Bug 1451169 - Reduce indirection for static atom pointers in nsCSSFrameConstructor.h. r=xidorn
MozReview-Commit-ID: Kt3QfZsk0zD

--HG--
extra : rebase_source : e4bd0efe51064bb18a446655a52f5b75807ba696
2018-04-03 22:15:30 +10:00
Nicholas Nethercote a560608963 Bug 1451169 - Use `nsStaticAtom*` instead of `nsStaticAtom**` in Element.h. r=baku
And then fix up everything else that needs to change as well.

MozReview-Commit-ID: GDMfERqdQAc

--HG--
extra : rebase_source : 01fe06c3182245a409099a53383d92bf4fa0155c
2018-04-03 13:21:06 +10:00
Cosmin Sabou 9783b68517 Merge mozilla-central to autoland. a=merge on a CLOSED TREE 2018-04-04 21:05:46 +03:00
Emilio Cobos Álvarez e42b195001 Bug 1451217: Remove VerifyStyleTree stuff. r=xidorn
MozReview-Commit-ID: DDXMq9WkUkE
2018-04-04 13:34:11 +02:00
Margareta Eliza Balazs 210797c4c1 Merge inbound to mozilla-central. a=merge 2018-04-04 12:43:55 +03:00
Emilio Cobos Álvarez 46e051dd40 Bug 1450705: Don't go through the binding manager to see if our parent is an SVG element. r=bz
We don't extend svg elements, except in a lone test, that isn't really impacted
by this.

I agree this should look at the frame btw, though that looks a bit out of scope
for this bug.

MozReview-Commit-ID: MbvIE5TszB
2018-04-04 07:49:21 +02:00
Emilio Cobos Álvarez 93307076b0 Bug 1450617: No need to ResolveTag to disable first-line on fieldsets. r=bz
We don't extend HTML fieldsets with XBL, and I don't think we want to start
doing that now.

MozReview-Commit-ID: GiltTWXUBzZ
2018-04-04 07:48:31 +02:00
Emilio Cobos Álvarez 364d1d533b Bug 1450617: Only allow extending from / to XUL elements. r=bz
MozReview-Commit-ID: JaFKQDkLGgw
2018-04-04 07:48:31 +02:00
Matt Woodrow edb36524ee Bug 1443027 - Add two new tests for merging behaviour. r=mstange
MozReview-Commit-ID: G5vgtSCdRZP

--HG--
extra : rebase_source : 2775e9a67e8262144f572d369873eb133dfbc6e5
2018-03-23 12:20:40 +13:00
Ting-Yu Lin b8ed325fb0 Bug 1347049 - Remove the ability to hide AccessibleCaret when scrolling. r=mats
This feature is B2G only. Remove it to make AccessibleCaret simpler to
maintain.

MozReview-Commit-ID: 7JZw5XtaUeU

--HG--
extra : rebase_source : aba249d361723feeaf769a3b802564dbcd6ca9ea
2018-04-04 15:45:52 +08:00
Sebastian Hengst b988859a27 merge mozilla-central to mozilla-inbound 2018-04-03 20:06:28 +03:00
Sebastian Hengst a0665934fa Backed out 2 changesets (bug 1443027) for frequent crashes on OS X. a=backout
Backed out changeset 1e3dc6112e76 (bug 1443027)
Backed out changeset d2734042605a (bug 1443027)
2018-04-03 19:51:49 +03:00
Nicholas Nethercote 94289ab246 Bug 1448225 - Convert StylePrefs to StaticPrefs. r=emilio
The new StaticPrefs machinery means that StylePrefs can be removed.

Note that this approach mirrors all static prefs into Rust, but I have only
updated structs.rs for the prefs that Stylo uses.

On a CLOSED TREE, since a sheriff closed the tree while I was about to land this
via autoland.

MozReview-Commit-ID: G1SY0987WJ7
2018-04-03 09:06:20 +02:00
arthur.iakab ad2eeb28a0 Merge mozilla-central to mozilla-inbound 2018-04-03 12:41:24 +03:00
Emilio Cobos Álvarez 496aa11da2 Bug 1450721: Remove special-case in nsCSSFrameConstructor. r=bz
We don't extend these elements, and I don't feel bad making that code depend on
the UA rule at:

  https://hg.mozilla.org/mozilla-central/file/ef717c03ff54d10b2e30df7e63fc11172c69db44/toolkit/content/xul.css#l63

If we don't create frames for these, we bail out due to the lack of an insertion
point. If we do, well, things are buggy already.

MozReview-Commit-ID: DBBo8jBpqFc
2018-04-03 08:07:40 +02:00
Jim Chen de337ec2e1 Bug 1441279 - 6. Register accessible caret observers across docshell tree; r=bz
AccessibleCaretManager uses scroll and reflow observers to detect when
to update the position of carets. However, it currently only registers
the observers on the leaf docshell, so only changes in the innermost
iframe are detected; that is, it fails to update caret position when an
ancestor iframe is scrolled. This patch makes it register observers on
all ancestor docshells so that changes in ancestor iframes are detected
as well.

MozReview-Commit-ID: bwiSjj8936

--HG--
extra : rebase_source : d567f1d8df67f79769c6532b061e2df1e5ab878f
2018-04-02 17:13:46 -04:00
Matt Woodrow 7a24890fe5 Bug 1443027 - Add two new tests for merging behaviour. r=mstange
MozReview-Commit-ID: G5vgtSCdRZP

--HG--
extra : rebase_source : e89b192cc6ca0ef48b529d8d38ff665f3327d81d
2018-03-23 12:20:40 +13:00
Brad Werth 69dd600383 Bug 1298008 Part 1: Update GeometryUtils::GetBoxRectForFrame to use GetMarginRectRelativeToSelf for margin boxes. r=dholbert
MozReview-Commit-ID: HpOi0TnqEgw

--HG--
extra : rebase_source : 46a187e385091c3623fa81b5d0e5e11fbdffe8fa
2018-01-22 15:12:37 -08:00
Mats Palmgren 4fd8ffd48e Bug 1398537 part 2 - [css-multicol] Implement percentages for 'column-gap' (Gecko part). r=dholbert 2018-04-02 01:56:19 +02:00
Brindusan Cristian 1fa25f597f Backed out 3 changesets (bug 1298008) for devtools failures on browser_boxmodel_pseudo-element.js CLOSED TREE
Backed out changeset c18e2aac48a5 (bug 1298008)
Backed out changeset b5a4113f4649 (bug 1298008)
Backed out changeset 40f53976a5b8 (bug 1298008)
2018-03-30 23:10:23 +03:00
Brad Werth 512a439d30 Bug 1298008 Part 1: Update GeometryUtils::GetBoxRectForFrame to use GetMarginRectRelativeToSelf for margin boxes. r=dholbert
MozReview-Commit-ID: HpOi0TnqEgw

--HG--
extra : rebase_source : a9bc4d4ab09961b0babdf862311a1d504d40bfc6
2018-01-22 15:12:37 -08:00
Ciure Andrei 68bc832e63 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-03-30 01:09:21 +03:00
Ciure Andrei 5d841a3421 Merge inbound to mozilla-central. a=merge 2018-03-30 01:06:18 +03:00
Olli Pettay 57fd877895 Bug 1447993, when handling pointerup while there is pointercapture, do a hit test in order to find the click target, r=masayuki
--HG--
extra : rebase_source : 160ef0aae3922cb32b11476650c15a3f55334691
2018-03-29 19:22:59 +03:00