Commit Graph

3327 Commits

Author SHA1 Message Date
Emilio Cobos Álvarez
a6bbfc28c2 Bug 1498873 - Pass the right frame to PushAbsoluteContainingBlock to determine whether we're a fixed-pos containing block. r=bzbarsky
When we're creating a scrollframe with let's say, display: flex or grid, the
containing block is the grid container itself, but the transformed frame is the
scroll frame.

This is the only caller that (incorrectly) passes the same frame to
PushAbsoluteContainingBlock.

Our painting code deals with it, mostly, because it starts from the placeholder
to paint fixed items, and it hits the scrollframe, but it gets confused
sometimes causing the issue described here.

I'll find a way to add a crashtest for this, and maybe a reftest, though this
works in non-WR.

We should probably add a few more assertions to the frame constructor...

Differential Revision: https://phabricator.services.mozilla.com/D8724
2018-10-17 20:22:38 +00:00
Cameron McCormack
602e2cc27c Bug 1499408 - Part 2: Have css::URLValue get URLExtraData from its CssUrlData. r=emilio
MozReview-Commit-ID: IqZGzkHlSZD

Depends on D8874

Differential Revision: https://phabricator.services.mozilla.com/D8875
2018-10-17 09:43:32 +00:00
Brian Grinstead
b1c4ba522c Bug 1499428 - Remove display="xul:menu" on menulist and menulist-popuponly;r=emilio
Instead, set the NS_NewMenuFrame directly on menulist elements.

Differential Revision: https://phabricator.services.mozilla.com/D8897
2018-10-16 19:58:33 +00:00
Emilio Cobos Álvarez
3dfc3a8664 Bug 1498067 - Add event markers for WipeContainingBlock and other expensive paths in the frame constructor. r=dbaron
I removed the debug-only printf spew because I think this is superior.

Let me know if you want to keep it around.

See https://bugzilla.mozilla.org/show_bug.cgi?id=1496817#c8, this needs a fix
to the profiler UI which is still not deployed, but can be tested already and I
expect will be deployed soon.

Differential Revision: https://phabricator.services.mozilla.com/D8323
2018-10-11 01:22:05 +00:00
Daniel Varga
ed1019ec4e Merge mozilla-central to mozilla-inbound. a=merge 2018-10-10 13:56:40 +03:00
Cameron McCormack
198a280c43 Bug 1496308 - Require URLExtraData::mPrincipal to be non-null r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D7682
2018-10-10 03:10:07 +00:00
Nicholas Nethercote
644f8ac68f Bug 1497734 - Rename nsStaticAtom subclasses. r=heycam
Specifically:
- nsICSSAnonBoxPseudo --> nsCSSAnonBoxPseudoStaticAtom
- nsICSSPseudoElement --> nsCSSPseudoElementStaticAtom

The `nsI` prefix isn't necessary because these are no longer XPIDL types, and
the `StaticAtom` suffix makes their meaning clearer.
2018-10-10 16:49:13 +11:00
Nicholas Nethercote
2941cd164a Bug 1451169 - Reduce indirection for PseudoParentData::mPseudoType. r=xidorn 2018-04-03 22:15:31 +10:00
Nicholas Nethercote
7cd45dc653 Bug 1451169 - Reduce indirection for FrameConstructionDataByTag::mTag. r=xidorn 2018-04-03 22:15:31 +10:00
Nicholas Nethercote
e923575758 Bug 1451169 - Reduce indirection for static atom pointers in nsCSSFrameConstructor.h. r=xidorn 2018-04-03 22:15:30 +10:00
Nazım Can Altınova
31b38059e9 Bug 1494608 - Remove the frame construction markers r=mstange
Markers are taking so much time(~10%) to allocate and in a website
like Speedometer, it takes ages to load the profile data since
there are so many frame construction markers.

Differential Revision: https://phabricator.services.mozilla.com/D7064
2018-09-28 01:26:02 +00:00
Timothy Guan-tin Chien
49140cca5d Bug 1493741 - Don't generate elements around UA Widget shadow root r=emilio
This patch make nsCSSFrameConstructor::CreateGeneratedContentItem() early
returns if the originating element contains an UA Widget shadow root.

Differential Revision: https://phabricator.services.mozilla.com/D6828
2018-09-28 00:23:15 +00:00
Emilio Cobos Álvarez
98cd995de5 Bug 1494332 - Avoid setting the has-first-letter child bit on a first-line. r=bzbarsky
We rely on the bit being on the block to restyle them in the right order.

Differential Revision: https://phabricator.services.mozilla.com/D7086
2018-09-27 13:16:00 +00:00
Emilio Cobos Álvarez
6ba6e374ff Bug 1494030 - Fix an assertion. r=mats
We're trying to insert a table caption via an append into a display: contents
element. We pass the content-insertion-frame (the table frame) instead of the
siblings' parent (the table wrapper frame).

This is the right thing to pass though, we adjust the caption parent frame
later, on AdjustCaptionParentFrame, and we ensure that we don't get here for a
non-caption thing because of IsValidSibling (though note that that can actually
lie, see bug 1424656, we'd get the layout wrong if the title element was a
replaced element for example), so a normal append without a previous sibling
will still be correct.

It'd be nice to make this a bit less messy, fwiw, but I don't have the ideas or
the time to do it now.

Differential Revision: https://phabricator.services.mozilla.com/D7067
2018-09-27 11:20:47 +00:00
Ting-Yu Lin
817e09b94c Bug 1486602 Part 4 - Introduce FCDATA_MAY_NEED_BULLET to support "display: list-item" on legend r=mats
Depends on D6841

Differential Revision: https://phabricator.services.mozilla.com/D6842
2018-09-26 20:51:01 +00:00
Ting-Yu Lin
1ad540c6ce Bug 1486602 Part 3 - Create bullet frame for block frames in nsCSSFrameConstructor::ConstructBlock() instead of in their SetInitialSingleChild() r=mats
nsCSSFrameConstructor::FindDisplayData() guarantees a block with "display:
list-item" will be constructed by ConstructBlock() (either through
ConstructScrollableBlock() or ConstructNonScrollableBlock()).

This is also a preparation to fix bug 1491915 since we want to control
bullet frame creation under column hierarchy.

Depends on D6840

Differential Revision: https://phabricator.services.mozilla.com/D6841
2018-09-26 20:55:26 +00:00
Neil Deakin
57105b6149 Bug 326944, remove nsIComboboxControlFrame interface, r=mats 2018-09-26 10:41:12 -04:00
Neil Deakin
a9503bbfd9 Bug 328680, remove nsIListControlFrame interface, r=mats 2018-09-26 10:41:01 -04:00
Nathan Froyd
e3cc1897b1 Bug 1492894 - part 3 - eliminate already_AddRefed variables in layout/; r=emilio
We need to disallow these to fix our static analysis, which should have
already been disallowing them.
2018-09-21 16:45:49 -04:00
Jean-Luc Bonnafoux
3cddd11ff8 Bug 1491639 - rename function IS_TABLE_CELL r=dbaron
rename function IS_TABLE_CELL

Differential Revision: https://phabricator.services.mozilla.com/D5974
2018-09-18 01:29:19 +00:00
Emilio Cobos Álvarez
9bda9d152b Bug 1488817 - Remove the has-first-letter-child bit from the block when the first-letter is removed from a first-line. r=bzbarsky
Always new reasons to remove the first-line frame and this reparenting stuff...
I hope I can get to it.

Differential Revision: https://phabricator.services.mozilla.com/D5075
2018-09-17 17:36:06 +00:00
Ting-Yu Lin
2db09d4b3b Bug 1489015 - Make NS_NewPlaceholderFrame() return nsPlaceholderFrame* to avoid type casting r=bzbarsky
Depends on D5112

Differential Revision: https://phabricator.services.mozilla.com/D5113
2018-09-14 17:14:53 +00:00
Ting-Yu Lin
d686296f3f Bug 1489015 - Remove nsAbsoluteItems::AddChild() and add an assertion in nsFrameItems::AddChild() r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D5112
2018-09-14 17:14:51 +00:00
Cameron McCormack
8dcdbfc698 Bug 1489529 - Update comments to no longer point to nsRuleNode. r=emilio
There are a few mentions of nsRuleNode left but they are mostly
historical references so it makes sense to keep them.

Differential Revision: https://phabricator.services.mozilla.com/D5505
2018-09-12 17:37:37 +10:00
Ting-Yu Lin
956a67f2dc Bug 1346983 - Add ColumnSetWrapperFrame to wrap nsColumnSetFrames and column span frames. r=dbaron
ColumnSetWrapperFrame is needed to implement column-span. Patches in bug
1421105 will utilize this frame.

Co-authored-by: Neerja Pancholi <npancholi@mozilla.com>

Differential Revision: https://phabricator.services.mozilla.com/D5092
2018-09-06 17:58:24 +00:00
Ting-Yu Lin
4c8d4b5799 Bug 1485495 - Use AutoRestore to restore aState.mAdditionalStateBits. r=dholbert
Depends On D4020

Differential Revision: https://phabricator.services.mozilla.com/D4021
2018-08-27 18:38:58 +00:00
Ting-Yu Lin
0a520e7c33 Bug 1484360 - Remove UNSET_DISPLAY in nsCSSFrameConstructor. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D3686
2018-08-18 14:07:24 +00:00
Ting-Yu Lin
8f5482e772 Bug 1484306 Part 3 - Use nsFrameList::Split() to replace the usage of FindFirstBlock(). r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D3645
2018-08-17 22:14:26 -07:00
Ting-Yu Lin
8d3db5f24a Bug 1484306 Part 2 - Add nsFrameList::Split(), and use it to replace the usage of FindFirstNonBlock(). r=dholbert
This API is similar to Vec::Split() in Rust.
https://doc.rust-lang.org/std/vec/struct.Vec.html#method.split

Differential Revision: https://phabricator.services.mozilla.com/D3644
2018-08-17 22:14:25 -07:00
Ting-Yu Lin
16f802f127 Bug 1484306 Part 1 - Add nsFrameList::FrameLinkEnumerator::Find(). r=dholbert
Use it to implement FindFirstBlock() and FindFirstNonBlock(). This is a
demonstration on how Find() is used. The usage of them will be overhauled in
Part 2 and 3.

Differential Revision: https://phabricator.services.mozilla.com/D3642
2018-08-17 22:14:25 -07:00
Cameron McCormack
e84b70ae83 Bug 1482782 - Part 5: Move CSS anonymous box atoms to nsGkAtoms. r=njn,emilio
Summary: Depends On D3283

Reviewers: njn!, emilio!

Tags: #secure-revision

Bug #: 1482782

Differential Revision: https://phabricator.services.mozilla.com/D3284
2018-08-15 15:46:39 +10:00
Cameron McCormack
eb1c77b263 Bug 1482782 - Part 4: Move CSS pseudo-element atoms to nsGkAtoms. r=njn,emilio
Summary: Depends On D3282

Reviewers: njn!, emilio!

Tags: #secure-revision

Bug #: 1482782

Differential Revision: https://phabricator.services.mozilla.com/D3283
2018-08-15 15:46:00 +10:00
Narcis Beleuzu
ace8b010f2 Backed out 8 changesets (bug 1483121, bug 1482782) for build bustages on nsDirectoryService.cpp. CLOSED TREE
Backed out changeset 0a8334bbcf45 (bug 1483121)
Backed out changeset cb2dcb859071 (bug 1482782)
Backed out changeset c834d4ca2eef (bug 1482782)
Backed out changeset 887de0efbb67 (bug 1482782)
Backed out changeset 018fdb50a6be (bug 1482782)
Backed out changeset 33a8aa8096c9 (bug 1482782)
Backed out changeset e3632354f16e (bug 1482782)
Backed out changeset 46f8319bee82 (bug 1482782)
2018-08-15 09:14:41 +03:00
Cameron McCormack
f242832b4e Bug 1482782 - Part 5: Move CSS anonymous box atoms to nsGkAtoms. r=njn,emilio
Summary: Depends On D3283

Reviewers: njn!, emilio!

Tags: #secure-revision

Bug #: 1482782

Differential Revision: https://phabricator.services.mozilla.com/D3284
2018-08-15 15:46:39 +10:00
Cameron McCormack
a3c0cd4850 Bug 1482782 - Part 4: Move CSS pseudo-element atoms to nsGkAtoms. r=njn,emilio
Summary: Depends On D3282

Reviewers: njn!, emilio!

Tags: #secure-revision

Bug #: 1482782

Differential Revision: https://phabricator.services.mozilla.com/D3283
2018-08-15 15:46:00 +10:00
L. David Baron
f019ed6581 Bug 1479859 patch 1 - Make inline frames be abs-pos containing blocks for reasons other than being relatively positioned. r=emilio
The basic change here is making nsCSSFrameConstructor::ConstructInline
use the function nsIFrame::IsAbsPosContainingBlock rather than testing
for only one of the conditions in it (being relatively or absolutely
positioned).  The rest of the code changes follow from that change.

I tested locally that the added test fails without the patch and passes
with it (either with or without the next patch).

Note that this causes a regression of three web-platform-test reftests:
  testing/web-platform/tests/css/css-contain/contain-paint-002.html
  testing/web-platform/tests/css/css-contain/contain-paint-011.html
  testing/web-platform/tests/css/css-contain/contain-paint-012.html
which will be fixed in patch 4, since that fix is easier to write after
patch 2.

Differential Revision: https://phabricator.services.mozilla.com/D2813
2018-08-07 15:02:07 -07:00
Emilio Cobos Álvarez
56069dc7d1 Bug 1479528: Remove FrameConstructionItem::mHasInlineEnds. r=bz
It's write-only.

Looks like this became unused in bug 501847 when we changed how ib splits work
and no longer needed this information.

Differential Revision: https://phabricator.services.mozilla.com/D2521

MozReview-Commit-ID: GDwcheP3bV4
2018-08-03 09:12:31 +02:00
Emilio Cobos Álvarez
ddc0c5aed2 Bug 1479528: Remove FrameConstructionItem::mIsForSVGAElement. r=bz
It was needed presumably because XBL could override the tag name and what not.
But I removed that capability for elements other than XUL elements, so we can
just poke at the content directly.

Differential Revision: https://phabricator.services.mozilla.com/D2520

MozReview-Commit-ID: B5Ihu0gaNd8
2018-08-03 09:12:07 +02:00
Emilio Cobos Álvarez
00bc1c3a67 Bug 1479528: Move all the data-finding related stuff into a single function. r=dholbert
To make it hopefully a bit easier to follow.

Differential Revision: https://phabricator.services.mozilla.com/D2564

MozReview-Commit-ID: 2LMf7IXM1kr
2018-08-03 09:11:40 +02:00
Emilio Cobos Álvarez
207b87ae5f Bug 1479528: Move the XBL binding loads a bit more away. r=dholbert
They're pretty ugly...

Differential Revision: https://phabricator.services.mozilla.com/D2563

MozReview-Commit-ID: CUDUyfe9Bgp
2018-08-03 09:11:13 +02:00
Emilio Cobos Álvarez
3929396966 Bug 1479528: Make the ShouldSuppressFrameIn* functions take references. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D2562

MozReview-Commit-ID: 8lcn1XW4aik
2018-08-03 09:10:46 +02:00
Xidorn Quan
f21ef958b7 Bug 1479995 - Rename ScrollbarStyles to ScrollStyles. r=mstange
This change also renames several related functions, as well as fields,
and the header is moved into EXPORTS.mozilla given it is defined under
mozilla namespace.

MozReview-Commit-ID: LqCdcW8fmUN
2018-08-01 16:14:26 +10:00
Emilio Cobos Álvarez
bc847c0eef Bug 1479860: Remove unused aCompileEventHandlers argument from BindToTree. r=bz
Mostly automatic via sed. Only parts which I touched manually (apart from a
couple ones where I fixed indentation or which had mispelled arguments) are the
callers. I may have removed a couple redundant `virtual` keywords as well when
I started to do it manually, I can revert those if wanted.

Most of them are just removing the argument, but in Element.cpp I also added an
assertion for GetBindingParent when binding the ShadowRoot's kids (the binding
parent is set from the ShadowRoot constructor, and I don't think we bind a
shadow tree during unlink or what not which could cause a behavior difference).

Differential Revision: https://phabricator.services.mozilla.com/D2574

MozReview-Commit-ID: 2oIgatty2HU
2018-08-01 10:42:54 +02:00
Bogdan Tara
e428767209 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-07-31 21:33:21 +03:00
Emilio Cobos Álvarez
b6d012a9a8 No bug - Fix two typos. r=me
MozReview-Commit-ID: F8vq8l4HwCQ
2018-07-31 19:24:23 +02:00
Nazım Can Altınova
78ddd2032e Bug 1414345 - Part 2: Add AutoProfilerLabels for all Frame Construction paths r=mstange
MozReview-Commit-ID: 4n65jAonwmA
2018-07-26 16:31:54 +02:00
Nazım Can Altınova
825d1c05f6 Bug 1414345 - Part 1: Add 'Frame Construction' markers to all frame construction paths r=mstange
MozReview-Commit-ID: 4s9MGljBqPp
2018-07-26 16:17:17 +02:00
Emilio Cobos Álvarez
b6d2dbb4fa Bug 1478391: Autogenerate StyleAppearance. r=jwatt
This builds on bug 1428676 and introduces StyleAppearance, which replaces the
NS_THEME_* constants.

Really sorry for the size of the patch.

There's a non-trivial change in the gtk theme, which I submitted separately as
bug 1478385.

Differential Revision: https://phabricator.services.mozilla.com/D2361

MozReview-Commit-ID: DiSmMWK7Krp
2018-07-26 17:06:17 +02:00
Ting-Yu Lin
30ab922fe9 Bug 1477871 - Extract the construction of nsColumnSetFrame into a helper function. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D2312
2018-07-25 17:40:50 +00:00
Emilio Cobos Álvarez
efa385c3a5 Bug 1478069: Remove ContentInfo::mChildren. r=bz
It's not needed anymore, since we tag the pseudo-elements at creation time for
styling.

Differential Revision: https://phabricator.services.mozilla.com/D2330

MozReview-Commit-ID: 7j4DVEHXYIC
2018-07-25 11:31:23 +02:00