Commit Graph

3327 Commits

Author SHA1 Message Date
Emilio Cobos Álvarez
f59e343e84 Bug 1584935 - Enable lazy frame construction everywhere. r=tnikkel
This is only the minimal change, there's cleanup coming afterwards in
follow-up bugs.

Differential Revision: https://phabricator.services.mozilla.com/D74749
2020-05-12 22:41:55 +00:00
Bogdan Tara
8be4e678bb Backed out 2 changesets (bug 1584935) for many toolkit/content/tests/chrome/test_* failures CLOSED TREE
Backed out changeset e78fc5cb2ed7 (bug 1584935)
Backed out changeset 8d7c5732cda9 (bug 1584935)
2020-05-12 03:03:58 +03:00
Emilio Cobos Álvarez
3117dfe9a8 Bug 1584935 - Clean up a tiny bit more now that lazyfc is infallible. r=tnikkel
Fairly minor clean-up.

Differential Revision: https://phabricator.services.mozilla.com/D74751
2020-05-11 22:52:16 +00:00
Emilio Cobos Álvarez
30b379ae2c Bug 1584935 - Enable lazy frame construction everywhere. r=tnikkel
This is only the minimal change, there's cleanup coming afterwards in
follow-up bugs.

Differential Revision: https://phabricator.services.mozilla.com/D74749
2020-05-11 22:52:23 +00:00
Emilio Cobos Álvarez
43fc8c5696 Bug 1634840 - Remove warning about inlines in XUL. r=dbaron
It's not like we're going to change behavior here anytime soon anymore
(other than removing XUL usage), and the helpfulness of the warning has
probably decreased with time.

But maybe I'm missing a reason why it should be kept around?

Differential Revision: https://phabricator.services.mozilla.com/D73544
2020-05-05 23:57:55 +00:00
Ting-Yu Lin
b030112d2f Bug 1630819 - Remove the logic to reframe root unconditionally when reframing body. r=emilio
For whatever reasons, we pass body element into
`RecreateFramesForContent`, the root element won't be reframed down in
the `ContentRemoved` path, but in `ContentRangeInserted()` path while
checking `WipeContainingBlock`. And in bug 1593752, we already have the
logic to reframe root element only when html and body's writing-modes
are different, so we won't over-eagerly reframe the root element.

Differential Revision: https://phabricator.services.mozilla.com/D71606
2020-04-20 18:03:14 +00:00
Chris H-C
bd97e241a8 Bug 40545 - Options to use label attribute when present r=emilio,jfkthame,mats
According to spec, option elements with label attributes should show and use
those labels rather than their element text. So let's do that.

Requires some trickery because the option element is a block element (so it
lays out its width based on its text content) so we put its label (if it has
one) in its ::before and skip frame generation so it measures the text of its
label, not of its text node children.

Differential Revision: https://phabricator.services.mozilla.com/D63545
2020-04-06 16:06:36 +00:00
Sylvestre Ledru
3ce73036e5 Bug 1519636 - Reformat recent changes to the Google coding style r=jgilbert
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D67574
2020-04-05 13:34:58 +00:00
Emilio Cobos Álvarez
09bb95c69f Bug 1618678 - Make scrollbar style caching work on Android. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D65915
2020-04-04 12:39:56 +00:00
Gurzau Raul
7488b7888f Backed out changeset 813e1405e501 (bug 40545) for Android failures at test_bug659596.html on a CLOSED TREE. 2020-04-01 19:35:32 +03:00
Chris H-C
b9fca9539f Bug 40545 - Options to use label attribute when present r=emilio,jfkthame,mats
According to spec, option elements with label attributes should show and use
those labels rather than their element text. So let's do that.

Requires some trickery because the option element is a block element (so it
lays out its width based on its text content) so we put its label (if it has
one) in its ::before and skip frame generation so it measures the text of its
label, not of its text node children.

Differential Revision: https://phabricator.services.mozilla.com/D63545
2020-04-01 09:20:21 +00:00
Emilio Cobos Álvarez
3479dd9ee8 Bug 1611848 - Properly suppress shadow dom / display: contents inside svg text. r=heycam
Returning null from FindSVGData just means "fall back to whatever display
specifies", and that's not great.

Differential Revision: https://phabricator.services.mozilla.com/D67706
2020-03-26 00:06:53 +00:00
Sean Feng
fbd3ec536a Bug 1377999 - Make TextNode to adapt the DOMArena changes r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D62353
2020-03-17 14:53:54 +00:00
Ting-Yu Lin
807ebe1c6c Bug 1622008 Part 3 - Remove nsPresContext* and PresShell* from the argument list of some continuing-frame-creation methods. r=dholbert
Both PresShell() and PresContext() are cached in nsIFrame. This
simplifies the setup for the callers to
nsCSSFrameConstructor::CreateContinuingFrame().

Differential Revision: https://phabricator.services.mozilla.com/D66600
2020-03-12 21:50:23 +00:00
Ting-Yu Lin
317d84813f Bug 1622008 Part 2 - Use cached mPresShell in nsCSSFrameConstructor. r=dholbert
The nsPresContext* argument of
nsCSSFrameConstructor::CreateContinuingFrame() is used only to get
PresShell. However, mPresShell is already cached in
nsCSSFrameConstructor (via its base class nsFrameManager).

By switching to use the cached value, we can remove now-unused
nsPresContext* or PresShell* from some continuing-frame-creation
methods' argument list in the next part.

Differential Revision: https://phabricator.services.mozilla.com/D66599
2020-03-12 21:50:21 +00:00
David Major
346f4e075f Bug 1620694 - Prevent inlining of nsFrameConstructorState::ProcessFrameInsertions r=dholbert
`nsFrameConstructorState::ProcessFrameInsertions` has a 600+ byte stack frame due to its `AutoTArray`s. If this function becomes indirectly inlined into the recursive parts of `nsCSSFrameConstructor`, that will bloat the callers' stack frames and make us pay 600 bytes at every level of recursion. Crashtests aren't happy about that on stack-limited Win32 builds.

This inlining has not yet happened in official builds, but did occur in my try runs for bug 1619461 where the inliner became more aggressive.

Differential Revision: https://phabricator.services.mozilla.com/D65815
2020-03-09 14:22:34 +00:00
Tim Nguyen
da0471ef5a Bug 1610597 - Re-introduce display: -moz-stack; as <legacy-stack>. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D62758
2020-02-14 16:32:38 +00:00
Thomas Dolezal
1d175a57fd Bug 1611733 - Bug 1611633 - convert ns style position defines to enum class. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D61958
2020-02-07 12:35:30 +00:00
Emilio Cobos Álvarez
709a8692aa Bug 1611701 - Tweak NODE_IS_EDITABLE flag handling for NAC so that it works consistently for <input type=number>. r=bzbarsky,masayuki,whimboo
I thought this would fix <input type=number style="user-select: none">, but
turns out it doesn't.

<input type=number> doesn't have the editor root as a root of the anonymous
subtree, so the current hack wouldn't work, as the anon root wouldn't have the
editable flag. So tweak the code a bit to handle stuff in a simpler way than
setting the flags after the fact, and set the NAC-root flag earlier to avoid
the mOuterWrapper->AppendChildTo(root) call forgetting about root's flags.

I had to tweak one AccessibleCaret test, but that's because it uses <textarea>
with user-select: none, and our behavior there is not particularly sane. It just
happened to work because that test-case also had a bunch of contenteditable
elements, and we stop matching this rule:

  https://searchfox.org/mozilla-central/rev/220a3bd6063fcbe5ca50e88dcabdc7dee0aca448/layout/style/contenteditable.css#22

Because the anonymous div now properly matches :-moz-read-write, which made the
rule apply and the test work. See comment 4 of this bug.

I'll fix this stuff up and add some tests for our behavior here in bug 1611699.

I refactored the dragdrop tests to cover more input types, but I ended up not
being able to use them because they're dependent on the content.

Instead I added an extra test and changed the refactor so that it applies to
<input type=search>, as there's layout work going on in bug 558594, and it'd be
unfortunate to regress this there too.

Differential Revision: https://phabricator.services.mozilla.com/D61094
2020-02-06 22:15:19 +00:00
Emilio Cobos Álvarez
fea80addd7 Bug 1613349 - Rename nsINode::DeleteProperty to RemoveProperty. r=smaug
And the related methods as well.

Differential Revision: https://phabricator.services.mozilla.com/D61768
2020-02-06 16:06:49 +00:00
Emilio Cobos Álvarez
c7c1186c47 Bug 1613349 - Rename nsIFrame::DeleteProperty to RemoveProperty. r=dholbert
As it doesn't necessarily call delete and that may be confusing.

Differential Revision: https://phabricator.services.mozilla.com/D61764
2020-02-06 16:06:49 +00:00
Emilio Cobos Álvarez
d114a3765d Bug 1613349 - Make nsIFrame::TakeProperty MOZ_MUST_USE. r=dholbert
Depends on D61756

Differential Revision: https://phabricator.services.mozilla.com/D61757
2020-02-06 00:39:10 +00:00
Emilio Cobos Álvarez
4714f59f93 Bug 1613349 - Rename nsINode::UnsetProperty to nsINode::TakeProperty. r=smaug
For consistency with the previous change for layout.

Depends on D61755

Differential Revision: https://phabricator.services.mozilla.com/D61756
2020-02-05 22:26:20 +00:00
Emilio Cobos Álvarez
096deac0e1 Bug 1613349 - Rename nsIFrame::RemoveProperty to nsIFrame::TakeProperty. r=dholbert
This is hopefully clearer naming.

Differential Revision: https://phabricator.services.mozilla.com/D61755
2020-02-06 00:13:38 +00:00
Tim Nguyen
06304d84e0 Bug 1610404 - Remove nsGroupBoxFrame (display: -moz-groupbox). r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D61422
2020-02-03 09:55:51 +00:00
Eric Rahm
53df32d84e Bug 1610387 - Remove nsAutoPtr usage from layout/. r=dbaron
Differential Revision: https://phabricator.services.mozilla.com/D60455
2020-02-01 09:40:36 +00:00
Nazım Can Altınova
6c84e9b60a Bug 1609708 - Rename PROFILER_TRACING to PROFILER_TRACING_MARKER. r=gerald
Depends on D60229

Differential Revision: https://phabricator.services.mozilla.com/D60231
2020-01-17 21:29:15 +00:00
Emilio Cobos Álvarez
02472ef6d7 Bug 1561900 - Fix scroll state restoration when not coming from the bfcache on the initial frame construction. r=bzbarsky
There is no way this ever properly worked, as we always passed null for
`aFrameState`.

So it'd only work if we reframed the document element or such...  Which is not
amazing.

For simpler test-cases, when we don't construct the scrollframe via
PresShell::Initialize, but via the regular frame constructor updates
(ContentAppended, etc...), those end up working because we go through lazy frame
construction, which ends up in RecreateFramesForContent, which passes
mTempFrameTreeState.

Differential Revision: https://phabricator.services.mozilla.com/D59569
2020-01-15 13:18:52 +00:00
Brian Grinstead
6e4924aab9 Bug 1596485 - Rename mXBLInvolved to mShadowDOMInvolved and XBLInvolved to ShadowDOMInvolved r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D59071
2020-01-08 15:08:06 +00:00
Emilio Cobos Álvarez
8e1b7f6cc2 Bug 1606130 - Make display: -moz-box more similar to other display types for block layout. r=jfkthame,surkov
It is unexpected (see bug) that a -moz-box is affected by baseline alignment.
Make -moz-box be block-outside, and -moz-inline-box be inline-outside, instead
of the bespoke thing we have now.

This is more similar to everything else, and fixes the bug.

Differential Revision: https://phabricator.services.mozilla.com/D58726
2020-01-07 21:00:42 +00:00
Bogdan Tara
6da2ee37ed Backed out changeset 23d862866f3a (bug 1606130) for android crashtest complaining about 1547420-1.html 2020-01-07 22:53:10 +02:00
Emilio Cobos Álvarez
50be243e46 Bug 1606130 - Make display: -moz-box more similar to other display types for block layout. r=jfkthame,surkov
It is unexpected (see bug) that a -moz-box is affected by baseline alignment.
Make -moz-box be block-outside, and -moz-inline-box be inline-outside, instead
of the bespoke thing we have now.

This is more similar to everything else, and fixes the bug.

Differential Revision: https://phabricator.services.mozilla.com/D58726
2020-01-07 18:02:05 +00:00
Emilio Cobos Álvarez
aab1464a8a Bug 1605803 - Use cbindgen for content property. r=xidorn
This cleans up and also allows us to keep the distinction between content: none
and content: normal, which allows us to fix the computed style we return from
getComputedStyle().

Do this last bit from the resolved value instead of StyleAdjuster, because
otherwise we need to tweak every initial struct for ::before / ::after.

Differential Revision: https://phabricator.services.mozilla.com/D58276
2020-01-05 13:10:39 +00:00
Tetsuharu OHZEKI
893482215f Bug 1597465 - Fix uses of nsCSSFrameConstructor::FindXULMenubarData in layout/base/nsCSSFrameConstructor.cpp. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D58482
2020-01-03 14:57:14 +00:00
Ting-Yu Lin
43341db36d Bug 1499281 - Remove column-span pref in nsCSSFrameConstructor. r=dbaron
For BeginBuildingColumns, returning nsBlockFrame, i.e. the original
NS_NewColumnSetWrapperFrame's return type, should be sufficient since no
other caller in frame constructor needs to call ColumnSetWrapper's
methods.

Differential Revision: https://phabricator.services.mozilla.com/D58398
2019-12-31 16:13:41 +00:00
Emilio Cobos Álvarez
a9a9d605f8 No bug - Remove a comment that referenced XBL.
And fix a typo while at it.

Differential Revision: https://phabricator.services.mozilla.com/D58340
2019-12-28 02:43:04 +00:00
Chris Peterson
0a9155f83b Bug 1570499 - Part 1: Replace MOZ_FALLTHROUGH macro with C++17's [[fallthrough]] attribute. r=froydnj
This changeset is a simple find and replace of `MOZ_FALLTHROUGH` and `[[fallthrough]]`.

Unfortunately, the MOZ_FALLTHROUGH_ASSERT macro (to assert on case fallthrough in debug builds) is still necessary after switching from [[clang::fallthrough]] to [[fallthrough]] because:

* MOZ_ASSERT(false) followed by [[fallthrough]] triggers a -Wunreachable-code warning in DEBUG builds
* but MOZ_ASSERT(false) without [[fallthrough]] triggers a -Wimplicit-fallthrough warning in NDEBUG builds.

Differential Revision: https://phabricator.services.mozilla.com/D56440
2019-12-20 07:16:43 +00:00
Emilio Cobos Álvarez
9f976bb6e6 Bug 1581467 - Do not use synthetic display-inside values. r=TYLin
This matches the new servo layout engine too, and thus removes some #[cfg]
gunk.  Just use `flow` since it doesn't simplify the layout code as much.

Differential Revision: https://phabricator.services.mozilla.com/D45973
2019-12-19 01:19:04 +00:00
Mats Palmgren
16ff277d0b Bug 1604771 - Remove the eSVGForeignObject IsFrameOfType bit. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D57621
2019-12-18 16:00:47 +00:00
Mats Palmgren
7b5803d9b5 Bug 1604668 - Remove the eExcludesIgnorableWhitespace IsFrameOfType bit. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D57569
2019-12-18 01:41:20 +00:00
jeffin143
daf9859748 Bug 1601856 : convert NS_STYLE_VISIBILITY_* to an enum class in nsStyleConsts.h r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D56140
2019-12-13 05:34:38 +00:00
jeffin143
d3b5feefb7 Bug 1601990 : convert NS_STYLE_POINTER_EVENTS_* to an enum class in nsStyleConsts.h r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D56203
2019-12-12 10:24:16 +00:00
jeffin143
fbb2ed37ee Bug 1600476 : convert NS_STYLE_TOP_LAYER_* to an enum class in nsStyleConsts.h r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D55377
2019-12-01 13:05:55 +00:00
Mats Palmgren
660fcb26bb Bug 471015 - [css-break] Implement <fieldset> fragmentation. r=TYLin
Differential Revision: https://phabricator.services.mozilla.com/D53709
2019-11-25 21:45:22 +00:00
Brindusan Cristian
a43400a7da Backed out changeset 0186165ee1d8 (bug 471015) for reftest failures at box-shadow/611574-1.html. CLOSED TREE 2019-11-25 21:40:19 +02:00
Mats Palmgren
2e0c35f477 Bug 471015 - [css-break] Implement <fieldset> fragmentation. r=TYLin
Differential Revision: https://phabricator.services.mozilla.com/D53709
2019-11-25 18:05:16 +00:00
Tim Nguyen
1da29fc40a Bug 1576946 - Remove nsStackFrame platform code. r=mats
Differential Revision: https://phabricator.services.mozilla.com/D49487
2019-11-12 19:50:19 +00:00
Mats Palmgren
82d8c79fa6 Bug 1595103 - [css-pseudo] Skip all ::marker boxes when finding content for a ::first-letter. r=emilio
Per discussion in:
https://github.com/w3c/csswg-drafts/issues/4503

Differential Revision: https://phabricator.services.mozilla.com/D52544
2019-11-11 19:28:34 +00:00
Brendan Dahl
e646772cea Bug 1492582 - Don't create scroll frames for windows that don't need them. r=emilio
When browser.xhtml switches to an <html> root element, the frame structure
changed and caused performance regressions on talos for tart and tresize.
browser.xhtml doesn't need scrolling, so we can disable it and keep performance
on par with XUL <window>.

Differential Revision: https://phabricator.services.mozilla.com/D50675
2019-11-08 23:34:08 +00:00
Noemi Erli
aa45dd3a98 Backed out 7 changesets (bug 1492582) for causing ss mochitest failures CLOSED TREE
Backed out changeset 1484255e5f4d (bug 1492582)
Backed out changeset bbf62ef50e52 (bug 1492582)
Backed out changeset 836724d3860e (bug 1492582)
Backed out changeset 5efddfd196b5 (bug 1492582)
Backed out changeset d4be1aa8cdb6 (bug 1492582)
Backed out changeset f05dfbeff17b (bug 1492582)
Backed out changeset e0e56a195659 (bug 1492582)
2019-11-07 21:51:46 +02:00