Commit graph

1709 commits

Author SHA1 Message Date
Ting-Yu Lin
e418a257b5 Bug 1745113 Part 3 - Change CountGraphemeClusters() to take a Span parameter. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D135641
2022-01-13 18:36:04 +00:00
Emilio Cobos Álvarez
b975e781a1 Bug 1747922 - Rename StyleMathMLMathVariant -> StyleMathVariant.
MANUAL PUSH: Trivial rename.
2021-12-30 02:35:54 +01:00
Neia Finch
b205467245 Bug 1747922 - Replace MathML font constants with enum r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D134802
2021-12-30 00:34:27 +00:00
Jonathan Kew
828754d158 Bug 1746187 - Implement rendering support for hyphenate-character. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D133890
2021-12-16 13:47:56 +00:00
Marian-Vasile Laza
e3ec8630b1 Backed out 4 changesets (bug 1746187) for causing xpcshell failures on test_css-properties-db.js.
Backed out changeset fa4f889dd0d3 (bug 1746187)
Backed out changeset e3fce2273109 (bug 1746187)
Backed out changeset 6733677ad35d (bug 1746187)
Backed out changeset a4375ff93414 (bug 1746187)
2021-12-16 04:51:13 +02:00
Jonathan Kew
36031468e9 Bug 1746187 - Implement rendering support for hyphenate-character. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D133890
2021-12-15 23:16:49 +00:00
Nika Layzell
7b2e6d4996 Bug 1741665 - Align nsCString's public size_type better with other C++ APIs, r=mccr8,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D131422
2021-12-13 21:47:56 +00:00
Jonathan Kew
2927597ae0 Bug 1742626 - Attempt to improve Indic-script ::first-letter behavior by not allowing a boundary after a ligated virama in scripts that use half-consonant forms. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D132373
2021-12-08 15:42:55 +00:00
Dan Minor
522eefbe31 Bug 1719554 - Unify unicode::Script as intl::Script; r=platform-i18n-reviewers,gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D132278
2021-12-06 18:15:50 +00:00
Miko Mynttinen
a5e210a518 Bug 1743637 - Fix array out of bounds in nsTextFrame::ToCString r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D132498
2021-12-06 14:44:55 +00:00
Butkovits Atila
56c46d06a1 Backed out 3 changesets (bug 1719554) for causing bustages complaining about gfxTextRun.cpp.
Backed out changeset 6181e40d4da1 (bug 1719554)
Backed out changeset c261ede6ae81 (bug 1719554)
Backed out changeset 221ec418475c (bug 1719554)
2021-12-04 00:58:15 +02:00
Dan Minor
30ad309163 Bug 1719554 - Unify unicode::Script as intl::Script; r=platform-i18n-reviewers,gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D132278
2021-12-03 20:49:32 +00:00
Emilio Cobos Álvarez
571e82c9f0 Bug 1744152 - Make the aAllUpperCase parameter of TransformString more generic. r=jfkthame
Bug 1744009 will stop creating frames for <option>s, but will need to
support text-transform on the option strings to calculate the right
intrinsic size for the <select> element.

The reason why we want to calculate the intrinsic size without having
into account the option styles is so that changing the selected option
doesn't change the width of the combobox, which is something that can
happen now.

This is similar to:

  https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/layout/layout_box.cc;l=307;drc=32f574f6df1d37b0d9ed765fe138270414d79e49

This patch will allow to achieve this (and not regress tests like
html/rendering/non-replaced-elements/form-controls/text-transform.html.ini).

Differential Revision: https://phabricator.services.mozilla.com/D132746
2021-12-03 11:45:48 +00:00
Noemi Erli
cc6683ef9e Backed out changeset 7af79a49bf5f (bug 1743637) for causing perma geckoview failures 2021-12-02 13:31:34 +02:00
Miko Mynttinen
a3bddeeb94 Bug 1743637 - Fix array out of bounds in nsTextFrame::ToCString r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D132498
2021-12-01 23:59:37 +00:00
Sandor Molnar
3d64c3bcca Backed out changeset e86bd6c22ef7 (bug 1743637) for causing android failures. CLOSED TREE 2021-12-01 19:59:31 +02:00
Miko Mynttinen
b27a53abad Bug 1743637 - Fix array out of bounds in nsTextFrame::ToCString r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D132498
2021-12-01 16:32:59 +00:00
Emilio Cobos Álvarez
2dca36cb25 Bug 502258 - Add a Show Password button to <input type=password> controls. r=Gijs
It's controlled by the pref:
layout.forms.input-type-show-password-button.enabled

Differential Revision: https://phabricator.services.mozilla.com/D130407
2021-11-25 20:12:05 +00:00
Ting-Yu Lin
2c88da9b0e Bug 1740831 Part 2 - Replace LineBreaker::Strictness with LineBreakRule. r=m_kato
LineBreaker::Strictness is just an alias of LineBreakRule in Segmenter.h. This
is to reduce the dependency of the legacy LineBreaker.

Differential Revision: https://phabricator.services.mozilla.com/D131026
2021-11-15 17:20:36 +00:00
Ting-Yu Lin
638eb14439 Bug 1740831 Part 1 - Replace LineBreaker::WordBreak with WordBreakRule. r=m_kato
LineBreaker::WordBreak is just an alias of WordBreakRule in Segmenter.h. This is
to reduce the dependency of the legacy LineBreaker.

Differential Revision: https://phabricator.services.mozilla.com/D131025
2021-11-15 17:20:35 +00:00
Emilio Cobos Álvarez
4d6ee249dc Bug 1739925 - Add a foreground color to attention selection. r=jfkthame
In some platforms (like macOS, windows dark mode, android, and some gtk
themes) the foreground selection color might be `currentcolor`, and that
doesn't generally guarantee enough contrast with the attention
background.

Remove HeadlessLookAndFeelGTK's handling of this color since it's
useless (always overridden by prefs in all.js)

Differential Revision: https://phabricator.services.mozilla.com/D130617
2021-11-11 11:14:13 +00:00
Ting-Yu Lin
f32eaad379 Bug 1722484 Part 2 - Replace LineBreaker::Next() and WordBreaker::Next() with the new iterators. r=m_kato
With the rewrite, we reduce the dependency of lwbrk LineBreaker::Next(),
WordBreaker::Next(), and their `int32_t` sentinel values
NS_LINEBREAKER_NEED_MORE_TEXT and NS_WORDBREAKER_NEED_MORE_TEXT.

Differential Revision: https://phabricator.services.mozilla.com/D130392
2021-11-09 01:14:15 +00:00
Iulian Moraru
36283a9a3b Backed out 2 changesets (bug 1722484) for causing multiple build bustages. CLOSED TREE
Backed out changeset bef547b588ff (bug 1722484)
Backed out changeset e676fa1a0cb7 (bug 1722484)
2021-11-09 01:42:20 +02:00
Ting-Yu Lin
7310c93473 Bug 1722484 Part 2 - Replace LineBreaker::Next() and WordBreaker::Next() with the new iterators. r=m_kato
With the rewrite, we reduce the dependency of lwbrk LineBreaker::Next(),
WordBreaker::Next(), and their `int32_t` sentinel values
NS_LINEBREAKER_NEED_MORE_TEXT and NS_WORDBREAKER_NEED_MORE_TEXT.

Differential Revision: https://phabricator.services.mozilla.com/D130392
2021-11-08 22:24:19 +00:00
Emilio Cobos Álvarez
ac14d7e42d Bug 1738614 - Remove WindowBackground/Foreground system colors. r=mstange
There's no reason for these to be different to the CSS-exposed
Window/WindowText.

Differential Revision: https://phabricator.services.mozilla.com/D129990
2021-11-02 18:08:07 +00:00
Jonathan Kew
a4983c6f2f Bug 1738560 - When text-transform is in effect, ensure we finish building the transformed textrun even if we would otherwise skip the line-break scan (in SVG text). r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D130055
2021-11-02 11:47:01 +00:00
Jonathan Kew
7cda6fde19 Bug 1712780 - Skip running the line-breaker when scanning SVG text frames. r=emilio
As we don't support multi-line text in SVG, there's no point running the line-breaker and
collecting potential break positions for textframes that are part of an SVG text subtree.
Telling BuildTextRunsScanner to skip this makes it somewhat less expensive.

In my local build, this reduces the reflow time of the testcase from nearly 20s to about 4.5s.
Still much too long, but at least it's a step in the right direction.

Differential Revision: https://phabricator.services.mozilla.com/D129404
2021-10-26 16:54:01 +00:00
Ting-Yu Lin
c2f6ef7a09 Bug 1736938 Part 3 - Make all WordBreaker's methods static, and adapt the callers. r=jfkthame
The motivation is the same as the previous part.

Differential Revision: https://phabricator.services.mozilla.com/D129109
2021-10-25 19:00:22 +00:00
Emilio Cobos Alvarez
920a666c29 Bug 1736379 - Tweak selection contrast check to avoid totally-indistinguishable selection background. r=jfkthame
Windows on dark mode uses a semi-transparent selection background like macOS,
which is basically the proton accent color. Avoid totally indistinguishable
backgrounds by ensuring there's at least minimal background contrast when
NS_SAME_AS_FOREGROUND_COLOR is used.

Differential Revision: https://phabricator.services.mozilla.com/D128757
2021-10-22 15:55:54 +00:00
Greg Tatum
ee2694c97d Bug 1719546 - Replace nsBidi with mozilla::intl::Bidi; r=platform-i18n-reviewers,dminor
Differential Revision: https://phabricator.services.mozilla.com/D128793
2021-10-20 14:01:21 +00:00
Butkovits Atila
01c5e2aed8 Backed out 3 changesets (bug 1719546) for causing SM bustages at Bidi.h. CLOSED TREE
Backed out changeset c4d6ffc7e445 (bug 1719546)
Backed out changeset a1f7ed6c4251 (bug 1719546)
Backed out changeset e69fc596f2c3 (bug 1719546)
2021-10-19 21:09:47 +03:00
Greg Tatum
f250d90114 Bug 1719546 - Replace nsBidi with mozilla::intl::Bidi; r=platform-i18n-reviewers,dminor
Differential Revision: https://phabricator.services.mozilla.com/D128793
2021-10-19 16:55:36 +00:00
Emilio Cobos Álvarez
8ca969082f Bug 1674204 - Fix hyphenated text min-content size. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D128105
2021-10-12 13:06:02 +00:00
Masayuki Nakano
1836c00470 Bug 1729170 - Make all methods of nsTextFragment take uint32_t for the offset and length of text r=smaug
`nsTextFragment` is a storage of data node and DOM offset is `uint32_t`, but
some methods of `nsTextFragment` takes `int32_t` for the offset/length in
its text.  Therefore, callers need to cast from `uint32_t` to `int32_t` if
the offset value is offset in a DOM node.  Therefore, all methods of it should
take `uint32_t` values as offset/length in its text.

Differential Revision: https://phabricator.services.mozilla.com/D127923
2021-10-12 05:05:12 +00:00
Jonathan Kew
6a202b53cb Bug 1731120 - Make truly-empty textframes return true for IsEmpty even when WhiteSpaceIsSignificant, unless they're editable or in an <input> element. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D128009
2021-10-11 12:54:44 +00:00
Iulian Moraru
2c4b830b92 Backed out changeset 5500054be8d6 (bug 1731120) for causing android 4.1 shippable build bustages. CLOSED TREE 2021-10-10 23:08:49 +03:00
Jonathan Kew
a22fbdf382 Bug 1731120 - Make truly-empty textframes return true for IsEmpty even when WhiteSpaceIsSignificant, unless they're editable or in an <input> element. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D128009
2021-10-10 15:30:55 +00:00
Emilio Cobos Álvarez
9fbc18ca4c Bug 1733384 - Make inert not modify the computed style. r=sefeng,layout-reviewers,jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D127422
2021-10-07 17:00:36 +00:00
Butkovits Atila
4d927c1fb4 Backed out 4 changesets (bug 1733384) for causing failures at browser_windowPrompt.js. CLOSED TREE
Backed out changeset fa609fadac26 (bug 1733384)
Backed out changeset dd1936d9fe17 (bug 1733384)
Backed out changeset 1a073e40ab1a (bug 1733384)
Backed out changeset 65708a4c708f (bug 1733384)
2021-10-07 17:52:51 +03:00
Emilio Cobos Álvarez
bfdd0fcc77 Bug 1733384 - Make inert not modify the computed style. r=sefeng,layout-reviewers,jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D127422
2021-10-07 11:47:34 +00:00
Jonathan Kew
56e3aa0a0f Bug 1729578 - Adjust overly-strict assertion in nsContinuingTextFrame::FirstContinuation(). r=emilio
It turns out this assertion (added as part of bug 1725555) is not necessarily valid.
When we're updating the frame tree in response to DOM modifications (in the testcase
here, we're under nsCSSFrameConstructor::ContentRemoved), we may call DeleteFrom on
the primary textFrame first, which results in calling SetPrevInFlow(nullptr) on its
nextContinuation; this in turn clears the mFirstContinuation back-pointers in all
the successors. But if we then call DeleteFrom on one of the continuations later
in the chain, those nulled-out pointers trigger this assertion. In fact, it's OK
for them to be null in this case, so the assertion is over-zealous and we should
drop it.

I believe the only time it's OK for this to happen is if the chain of nsContinuingTextFrames
has been "detached" from the primary frame during frame-tree updating, as has happened in
this example.

We can still sanity-check the mFirstContinuation pointer here by asserting that it
matches the FirstContinuation() reported by our prev-continuation, or is null if there
is no prev-continuation. This is a bit expensive, though, so it's a only a debug-mode
assertion (for the fuzzers to try and hit).

Differential Revision: https://phabricator.services.mozilla.com/D125444
2021-09-14 14:17:25 +00:00
Narcis Beleuzu
e5d3122984 Backed out changeset 88fee7a54781 (bug 1729578) for crashtest failures on 1507961-1.html . CLOSED TREE 2021-09-14 15:20:04 +03:00
Jonathan Kew
0b513c5331 Bug 1729578 - Adjust overly-strict assertion in nsContinuingTextFrame::FirstContinuation(). r=emilio
It turns out this assertion (added as part of bug 1725555) is not necessarily valid.
When we're updating the frame tree in response to DOM modifications (in the testcase
here, we're under nsCSSFrameConstructor::ContentRemoved), we may call DeleteFrom on
the primary textFrame first, which results in calling SetPrevInFlow(nullptr) on its
nextContinuation; this in turn clears the mFirstContinuation back-pointers in all
the successors. But if we then call DeleteFrom on one of the continuations later
in the chain, those nulled-out pointers trigger this assertion. In fact, it's OK
for them to be null in this case, so the assertion is over-zealous and we should
drop it.

I believe the only time it's OK for this to happen is if the chain of nsContinuingTextFrames
has been "detached" from the primary frame during frame-tree updating, as has happened in
this example.

We can still sanity-check the mFirstContinuation pointer here by asserting that it
matches the FirstContinuation() reported by our prev-continuation, or is null if there
is no prev-continuation. This is a bit expensive, though, so it's a only a debug-mode
assertion (for the fuzzers to try and hit).

Differential Revision: https://phabricator.services.mozilla.com/D125444
2021-09-14 10:10:11 +00:00
Ting-Yu Lin
57b867e7ff Bug 1728708 Part 4 - Simplify WordBreaker::Next() and make it recognize the end of text a word break opportunity. r=jfkthame
A UAX29 compatible word breaker (like ICU4C) treat the end of text as a
word break opportunity (rule WB2 [1]), but currently lwbrk word breaker
doesn't.

The motivation of this patch is to make `WordBreaker::Next()` closer to
a UAX29 compatible one (at least for English text), and see if the
callers need to change. This should make the future integration of ICU4X
segmenter easier.

The only caller of WordBreaker::Next() is ClusterIterator's constructor.
This patch shouldn't change its behavior because we've already manually
assigned a word break point at the end of the line when `aContext` is
empty and `aDirection` is -1. This patch generalizes it to all
conditions.

Also, update TestPrintWordWithBreak() so that the result string makes
more sense.

[1] https://www.unicode.org/reports/tr29/#WB2

Differential Revision: https://phabricator.services.mozilla.com/D124304
2021-09-08 04:19:38 +00:00
Ting-Yu Lin
69a841c529 Bug 1728708 Part 2 - Rename WordBreaker::NextWord() to WordBreaker::Next(). r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D124302
2021-09-08 04:19:37 +00:00
Emilio Cobos Álvarez
8b10d3a89d Bug 1693222 - Implement SelectedItem and SelectedItemText system colors. r=mstange
Since Highlight / HighlightText are now equivalent to the text selection
ones, remove those too.

Differential Revision: https://phabricator.services.mozilla.com/D123964
2021-09-02 11:38:01 +00:00
Narcis Beleuzu
92fc260af2 Backed out changeset 28a0487d0291 (bug 1693222) for reftest failure on themed-widget.html. CLOSED TREE 2021-09-02 02:26:12 +03:00
Emilio Cobos Álvarez
c3eb845bbf Bug 1693222 - Implement SelectedItem and SelectedItemText system colors. r=mstange
Since Highlight / HighlightText are now equivalent to the text selection
ones, remove those too.

Differential Revision: https://phabricator.services.mozilla.com/D123964
2021-09-01 18:21:57 +00:00
Jonathan Kew
eadc207a4e Bug 1725555 - patch 3 - Also use continuations array to accelerate nsTextFrame::SelectionStateChanged. r=emilio
After CollectClientRectsAndText is eliminated from the profiles here, SelectionStateChanged
is the next obvious hotspot, and it can similarly be accelerated by binary-searching the continuations.

Depends on D122999

Differential Revision: https://phabricator.services.mozilla.com/D123000
2021-08-27 16:23:25 +00:00
Jonathan Kew
e8d3a05cc4 Bug 1725555 - patch 2 - Enable the primary nsTextFrame to provide, and cache, an array of all the continuations in the chain. r=emilio
This allows us to binary-search the continuations from nsRange::CollectClientRectsAndText,
instead of linear-searching the linked list for every range we need to look up.

Depends on D122998

Differential Revision: https://phabricator.services.mozilla.com/D122999
2021-08-27 16:23:24 +00:00
Jonathan Kew
065c50ed6d Bug 1725555 - patch 1 - Cache first-continuation pointer in nsContinuingTextFrame so that accessing FirstContinuation() is constant-time. r=emilio
This is helpful when we have extremely long continuation chains, to avoid having to
follow all the back-pointers to find the primary frame. By itself it makes little
difference to the testcase here, but is a basis for the patch that follows.

Differential Revision: https://phabricator.services.mozilla.com/D122998
2021-08-27 16:23:24 +00:00
Alexandru Michis
010cf9dd17 Backed out 3 changesets (bug 1725555) for causing crashes in nsTextFrame.
CLOSED TREE

Backed out changeset d0864a5c8e90 (bug 1725555)
Backed out changeset 22b941581212 (bug 1725555)
Backed out changeset f2357e055668 (bug 1725555)
2021-08-26 20:43:41 +03:00
Jonathan Kew
849c259bc7 Bug 1725555 - patch 3 - Also use continuations array to accelerate nsTextFrame::SelectionStateChanged. r=emilio
After CollectClientRectsAndText is eliminated from the profiles here, SelectionStateChanged
is the next obvious hotspot, and it can similarly be accelerated by binary-searching the continuations.

Depends on D122999

Differential Revision: https://phabricator.services.mozilla.com/D123000
2021-08-26 16:56:44 +00:00
Jonathan Kew
6481b69a6c Bug 1725555 - patch 2 - Enable the primary nsTextFrame to provide, and cache, an array of all the continuations in the chain. r=emilio
This allows us to binary-search the continuations from nsRange::CollectClientRectsAndText,
instead of linear-searching the linked list for every range we need to look up.

Depends on D122998

Differential Revision: https://phabricator.services.mozilla.com/D122999
2021-08-26 16:56:43 +00:00
Jonathan Kew
2dddbe283f Bug 1725555 - patch 1 - Cache first-continuation pointer in nsContinuingTextFrame so that accessing FirstContinuation() is constant-time. r=emilio
This is helpful when we have extremely long continuation chains, to avoid having to
follow all the back-pointers to find the primary frame. By itself it makes little
difference to the testcase here, but is a basis for the patch that follows.

Differential Revision: https://phabricator.services.mozilla.com/D122998
2021-08-26 16:56:43 +00:00
Alexandru Michis
6fa51346d4 Backed out 3 changesets (bug 1725555) for causing crashes in nsTextFrame::FindContinuationForOffset. a=backout
DONTBUILD

Backed out changeset a0c5d86c771b (bug 1725555)
Backed out changeset 35fbd6aaada3 (bug 1725555)
Backed out changeset 6abaa3b17be8 (bug 1725555)
2021-08-24 12:42:39 +03:00
Jonathan Kew
c02e51c6af Bug 1725555 - patch 3 - Also use continuations array to accelerate nsTextFrame::SelectionStateChanged. r=emilio
After CollectClientRectsAndText is eliminated from the profiles here, SelectionStateChanged
is the next obvious hotspot, and it can similarly be accelerated by binary-searching the continuations.

Depends on D122999

Differential Revision: https://phabricator.services.mozilla.com/D123000
2021-08-23 12:56:19 +00:00
Jonathan Kew
a2a210e2f2 Bug 1725555 - patch 2 - Enable the primary nsTextFrame to provide, and cache, an array of all the continuations in the chain. r=emilio
This allows us to binary-search the continuations from nsRange::CollectClientRectsAndText,
instead of linear-searching the linked list for every range we need to look up.

Depends on D122998

Differential Revision: https://phabricator.services.mozilla.com/D122999
2021-08-23 12:56:19 +00:00
Jonathan Kew
5128ae2085 Bug 1725555 - patch 1 - Cache first-continuation pointer in nsContinuingTextFrame so that accessing FirstContinuation() is constant-time. r=emilio
This is helpful when we have extremely long continuation chains, to avoid having to
follow all the back-pointers to find the primary frame. By itself it makes little
difference to the testcase here, but is a basis for the patch that follows.

Differential Revision: https://phabricator.services.mozilla.com/D122998
2021-08-23 12:56:18 +00:00
Sebastian Hengst
49f27b5e78 Backed out 3 changesets (bug 1725555) for causing crashes in nsTextFrame::FindContinuationForOffset. a=backout DONTBUILD
Backed out changeset 2b74d92f7be2 (bug 1725555)
Backed out changeset 054669fb1640 (bug 1725555)
Backed out changeset 62ba1322b82b (bug 1725555)
2021-08-20 11:52:43 +02:00
Jonathan Kew
7c028b0377 Bug 1725555 - patch 3 - Also use continuations array to accelerate nsTextFrame::SelectionStateChanged. r=emilio
After CollectClientRectsAndText is eliminated from the profiles here, SelectionStateChanged
is the next obvious hotspot, and it can similarly be accelerated by binary-searching the continuations.

Depends on D122999

Differential Revision: https://phabricator.services.mozilla.com/D123000
2021-08-19 11:02:04 +00:00
Jonathan Kew
76844eef98 Bug 1725555 - patch 2 - Enable the primary nsTextFrame to provide, and cache, an array of all the continuations in the chain. r=emilio
This allows us to binary-search the continuations from nsRange::CollectClientRectsAndText,
instead of linear-searching the linked list for every range we need to look up.

Depends on D122998

Differential Revision: https://phabricator.services.mozilla.com/D122999
2021-08-19 11:02:04 +00:00
Jonathan Kew
7effafb1d1 Bug 1725555 - patch 1 - Cache first-continuation pointer in nsContinuingTextFrame so that accessing FirstContinuation() is constant-time. r=emilio
This is helpful when we have extremely long continuation chains, to avoid having to
follow all the back-pointers to find the primary frame. By itself it makes little
difference to the testcase here, but is a basis for the patch that follows.

Differential Revision: https://phabricator.services.mozilla.com/D122998
2021-08-19 11:02:03 +00:00
Jonathan Kew
4d2453d27e Bug 1722763 - Don't let ::first-letter break Regional-Indicator flag ligatures. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D121373
2021-07-31 08:54:07 +00:00
Sandor Molnar
66760c31e9 Backed out changeset 5ae8ad2a0901 (bug 1722763) for causing wpt failures in /css/selectors/first-letter-flag-001. CLOSED TREE 2021-07-31 01:47:09 +03:00
Jonathan Kew
2f6c5848a8 Bug 1722763 - Don't let ::first-letter break Regional-Indicator flag ligatures. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D121373
2021-07-30 18:18:24 +00:00
Mats Palmgren
a901b05850 Bug 1542807 part 1 - Create generated content and use normal box construction for list-style-type/list-style-image ::markers. r=emilio
The change from 0x25FE to 0x25AA for list-style-type:square
was approved here:
https://github.com/w3c/csswg-drafts/issues/6200#issuecomment-828616747

Differential Revision: https://phabricator.services.mozilla.com/D111691
2021-06-14 01:22:04 +00:00
Kagami Sascha Rosylight
55dbc99e55 Bug 1713491 - Return std::pair from nsIFrame::GetOffsets r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D117520
2021-06-11 23:54:06 +00:00
Butkovits Atila
ed3da455ae Backed out 7 changesets (bug 1542807) for causing failures at inert-retargeting-iframe.tentative.html. CLOSED TREE
Backed out changeset e9ef32fa2f2e (bug 1542807)
Backed out changeset 8fa0cb199975 (bug 1542807)
Backed out changeset 38daf64afe59 (bug 1542807)
Backed out changeset e3aee052c495 (bug 1542807)
Backed out changeset a71056d4c7cc (bug 1542807)
Backed out changeset cf91e7d0a37f (bug 1542807)
Backed out changeset eee949e5fd67 (bug 1542807)
2021-06-12 01:38:25 +03:00
Butkovits Atila
53cb932555 Backed out changeset aa6c7477c4d2 (bug 1713491) for causing build bustages on nsIFrame.cpp. CLOSED TREE 2021-06-12 00:12:06 +03:00
Kagami Sascha Rosylight
9d0b659349 Bug 1713491 - Return std::pair from nsIFrame::GetOffsets r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D117520
2021-06-11 18:53:28 +00:00
Mats Palmgren
906fd4d388 Bug 1542807 part 1 - Create generated content and use normal box construction for list-style-type/list-style-image ::markers. r=emilio
The change from 0x25FE to 0x25AA for list-style-type:square
was approved here:
https://github.com/w3c/csswg-drafts/issues/6200#issuecomment-828616747

Differential Revision: https://phabricator.services.mozilla.com/D111691
2021-06-11 18:10:38 +00:00
Dorel Luca
e1f4d9bb38 Backed out changeset 17e7b969b830 (bug 1713491) for Linux build bustage in gecko/dom/events/ContentEventHandler.cpp. CLOSED TREE 2021-06-11 17:52:10 +03:00
Kagami Sascha Rosylight
74760a9a0e Bug 1713491 - Return std::pair from nsIFrame::GetOffsets r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D117520
2021-06-11 11:37:11 +00:00
Marian-Vasile Laza
1710dd4296 Backed out changeset a722491ae6b3 (bug 1713491) on devs request
CLOSED TREE
2021-06-11 14:31:46 +03:00
Kagami Sascha Rosylight
2d398fce26 Bug 1713491 - Remove return type of nsIFrame::GetOffsets r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D117485
2021-06-11 10:59:12 +00:00
Jonathan Kew
a74bd20f2b Bug 737785 - Un-prefix -moz-tab-size (keeping the prefixed version as an alias for now). r=layout-reviewers,dholbert
This results in lots of new WPT test passes.

There were also a couple of WPT tests that turned out to be broken;
tab-size-inline-001 and -002 had errors in their reference files such
that they'd never pass anywhere. So those are fixed here.

Depends on D117331

Differential Revision: https://phabricator.services.mozilla.com/D117332
2021-06-10 09:19:24 +00:00
Jonathan Kew
f50275dcbb Bug 1308113 - Account for letter- and word-spacing when resolving tab-size <number>. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D117331
2021-06-10 09:19:23 +00:00
Jonathan Kew
6c3cdc729e Bug 1710667 - LetterSpacing and WordSpacing helpers don't need their nsStyleText param to be optional. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D114862
2021-05-11 17:42:29 +00:00
Emilio Cobos Álvarez
4d41ec19c2 Bug 1710324 - Tweak dark background detection so that it works for XUL use cases. r=mstange
Two changes:

 * Make it work across document boundaries, so that it works on e.g., the
   bookmarks sidebar.

 * Don't bail out if there's no scrollable frame, as XUL <tree>s use raw
   <scrollbar> elements without any scrollframe (gnarly). In that case, just
   use the target frame, but make sure to skip over themed elements (like the
   scrollbars themselves) so that we can find the right background.

The logic to check the canvas frame background etcetera was simpler in
FindNonTransparentBackgroundFrame. The only caller other than the
scrollbar darkening code is nsTextFrame, which should find a non-canvas frame
before anyways, but it doesn't hurt there.

Differential Revision: https://phabricator.services.mozilla.com/D114697
2021-05-11 13:57:18 +00:00
Csoregi Natalia
e000635504 Backed out 3 changesets (bug 1710324) for causing mass failures and crashes. CLOSED TREE
Backed out changeset 7328372519f1 (bug 1710324)
Backed out changeset aa852464d828 (bug 1710324)
Backed out changeset 238a4cfcdc86 (bug 1710324)
2021-05-11 03:27:51 +03:00
Emilio Cobos Álvarez
d420cf322f Bug 1710324 - Tweak dark background detection so that it works for XUL use cases. r=mstange
Two changes:

 * Make it work across document boundaries, so that it works on e.g., the
   bookmarks sidebar.

 * Don't bail out if there's no scrollable frame, as XUL <tree>s use raw
   <scrollbar> elements without any scrollframe (gnarly). In that case, just
   use the target frame, but make sure to skip over themed elements (like the
   scrollbars themselves) so that we can find the right background.

The logic to check the canvas frame background etcetera was simpler in
FindNonTransparentBackgroundFrame. The only caller other than the
scrollbar darkening code is nsTextFrame, which should find a non-canvas frame
before anyways, but it doesn't hurt there.

Differential Revision: https://phabricator.services.mozilla.com/D114697
2021-05-10 23:33:33 +00:00
Emilio Cobos Álvarez
bb862cf713 Bug 1709647 - Use NS_SAME_AS_FOREGROUND_COLOR instead of NS_DONT_CHANGE_COLOR. r=jfkthame
I don't think they are meaningfully different.

Depends on D114390

Differential Revision: https://phabricator.services.mozilla.com/D114391
2021-05-06 09:57:19 +00:00
Emilio Cobos Álvarez
366c9f5ece Bug 1709647 - Remove unused NS_CHANGE_COLOR_IF_SAME_AS_BG. r=jfkthame
It was introduced in bug 1024930, but it is unused since.

Differential Revision: https://phabricator.services.mozilla.com/D114389
2021-05-06 09:57:19 +00:00
Miko Mynttinen
03cca3bf64 Bug 1702675 - Demote nsTextFrame selection state assert to NS_ASSERTION r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D111637
2021-04-13 17:11:28 +00:00
Emilio Cobos Álvarez
b7fda546dc Bug 1476524 - Don't require so much contrast for selection background-against-background checks. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D111794
2021-04-13 16:29:14 +00:00
Jonathan Kew
0d70ec8a0e Bug 1667977 - Don't risk using a stale fontGroup from a pre-existing textrun in GetHyphenTextRun; ensure it retrieves fresh metrics from the context. r=emilio
If there's a textrun already cached in the frame, it's fine to check its attrbutes such as direction,
but using it to retrieve a fontGroup to shape new text is risky because this could lead to a font-
matching search via the platform font list (if the fonts already configured in the group don't
support the text to be shaped), and the list could have been mutated in the meantime, making the
old fontgroup's references invalid. Instead, we should retrieve the fontgroup from the context to
ensure it is current.

Differential Revision: https://phabricator.services.mozilla.com/D111376
2021-04-09 13:32:05 +00:00
Emilio Cobos Álvarez
390c6943fe Bug 1702676 - Change public LookAndFeel API to accept a color scheme. r=mstange
This shouldn't change behavior, but is the biggest cross-platform part
of the change so I'd like to get it landed sooner rather than later.

The two calls like:

  GetColor(ColorID::TextSelectBackground, color);
  if (color == 0x000000) {
    mColorTextSelectForeground = NS_RGB(0xff, 0xff, 0xff);
  } else {
    mColorTextSelectForeground = NS_DONT_CHANGE_COLOR;
  }

that I'm removing are just broken. They were calling the version of
GetColor the function that took a default value when the color wasn't
available, not the version of the color with the outparam.

To prevent such mistakes, add two signatures, GetColor(), returning a
Maybe<nscolor> and Color(), returning a color with a fallback.

Differential Revision: https://phabricator.services.mozilla.com/D110651
2021-04-02 12:22:14 +00:00
Narcis Beleuzu
e9fb777466 Backed out changeset 597b9606c3ca (bug 1702676) for reftest failures on mq_prefers_reduced_motion_reduce.html CLOSED TREE 2021-04-02 09:34:53 +03:00
Emilio Cobos Álvarez
f7f84a3c53 Bug 1702676 - Change public LookAndFeel API to accept a color scheme. r=mstange
This shouldn't change behavior, but is the biggest cross-platform part
of the change so I'd like to get it landed sooner rather than later.

The two calls like:

  GetColor(ColorID::TextSelectBackground, color);
  if (color == 0x000000) {
    mColorTextSelectForeground = NS_RGB(0xff, 0xff, 0xff);
  } else {
    mColorTextSelectForeground = NS_DONT_CHANGE_COLOR;
  }

that I'm removing are just broken. They were calling the version of
GetColor the function that took a default value when the color wasn't
available, not the version of the color with the outparam.

To prevent such mistakes, add two signatures, GetColor(), returning a
Maybe<nscolor> and Color(), returning a color with a fallback.

Differential Revision: https://phabricator.services.mozilla.com/D110651
2021-04-02 00:21:37 +00:00
Jonathan Kew
a6337b97c8 Bug 1686512 - Accept characters with Symbol category as possible ::first-letter, in addition to alphanumerics. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D110223
2021-03-30 18:04:28 +00:00
Jonathan Kew
3306bf121d Bug 1700490 - Use computed font size (rather than used size) to resolve percentages for text-decoration properties. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D109904
2021-03-26 16:05:09 +00:00
Miko Mynttinen
f30a7d057b Bug 1679645 - Cache the selection state in nsTextFrame rather than in nsDisplayText r=emilio,jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D108646
2021-03-25 21:28:52 +00:00
Simon Giesecke
628cc55f22 Bug 708901 - Migrate to nsTHashSet in layout. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D108597
2021-03-24 17:56:46 +00:00
Csoregi Natalia
f54ee076ae Backed out 13 changesets (bug 708901, bug 1184468) for causing build bustage on GeckoViewHistory.cpp. CLOSED TREE
Backed out changeset b1e4c01e63b8 (bug 708901)
Backed out changeset 37b52cce83c0 (bug 708901)
Backed out changeset eee75f33f060 (bug 708901)
Backed out changeset 479bf64c7986 (bug 708901)
Backed out changeset 15a8fb94d15d (bug 708901)
Backed out changeset be31ccd9a61d (bug 708901)
Backed out changeset fc54f4eaedd5 (bug 708901)
Backed out changeset 03c3a56c3d13 (bug 708901)
Backed out changeset 73f11d3c1298 (bug 708901)
Backed out changeset aed22fd80893 (bug 708901)
Backed out changeset 74d8249fbe7e (bug 708901)
Backed out changeset acb725eb3c1d (bug 1184468)
Backed out changeset 70f3ea6efec4 (bug 1184468)
2021-03-24 19:26:20 +02:00
Simon Giesecke
c73f87b72b Bug 708901 - Migrate to nsTHashSet in layout. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D108597
2021-03-24 16:58:58 +00:00
Butkovits Atila
7ff95ae753 Backed out changeset 01519685a650 (bug 1679645) for causing failures at test_bug600570.html. 2021-03-23 22:44:33 +02:00
Miko Mynttinen
40648350fd Bug 1679645 - Cache the selection state in nsTextFrame rather than in nsDisplayText r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D108646
2021-03-23 18:21:02 +00:00
Jonathan Kew
da446daa40 Bug 1696792 - Suppress font shaping across tspan boundaries in SVG content. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D108486
2021-03-16 12:50:13 +00:00
longsonr
b7e4cc0df4 Bug 1695490 - Remove svg.text-spacing.enabled pref r=emilio
Backs out bug 1599173 which landed in Firefox 72. The pref has been enabled since bug 1600855 which landed in Firefox 73

Differential Revision: https://phabricator.services.mozilla.com/D106731
2021-02-28 21:52:21 +00:00
Gerald Squelart
2416d881e2 Bug 1691589 - Reduce reliance on GeckoProfiler.h when only labels (and maybe markers) are needed - r=necko-reviewers,geckoview-reviewers,sg,agi,florian
There are no code changes, only #include changes.
It was a fairly mechanical process: Search for all "AUTO_PROFILER_LABEL", and in each file, if only labels are used, convert "GeckoProfiler.h" into "ProfilerLabels.h" (or just add that last one where needed).
In some files, there were also some marker calls but no other profiler-related calls, in these cases "GeckoProfiler.h" was replaced with both "ProfilerLabels.h" and "ProfilerMarkers.h", which still helps in reducing the use of the all-encompassing "GeckoProfiler.h".

Differential Revision: https://phabricator.services.mozilla.com/D104588
2021-02-16 04:44:19 +00:00
Jonathan Kew
ffa1341bfa Bug 92176 - Make the ::first-letter pseudo respect the Dutch 'ij' digraph and treat it as a unit. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D103223
2021-01-28 11:46:53 +00:00
Ting-Yu Lin
a43cae175a Bug 1686603 Part 2 - Add StyleSizeOverrides parameter to ReflowInput's constructor & co. to override data from style system data. r=dholbert
This patch adds the struct as a parameter to various functions.

The struct is cached in ReflowInput so that we don't need to pass it
down to the internal method where nsIFrame::ComputeSize() is called.

In the subsequent patches, we'll use it to revise the implementation of
flex container's flex base size resolution, and size overrides.

Differential Revision: https://phabricator.services.mozilla.com/D101793
2021-01-26 02:47:40 +00:00
Csoregi Natalia
0492d8333a Backed out 8 changesets (bug 1686603) for causing crashtest failures. CLOSED TREE
Backed out changeset 94b5d0986d27 (bug 1686603)
Backed out changeset e7edf6fcc41d (bug 1686603)
Backed out changeset 4c9271f07178 (bug 1686603)
Backed out changeset 7013b95266ae (bug 1686603)
Backed out changeset cf7a55638aef (bug 1686603)
Backed out changeset 7717a0f2a37b (bug 1686603)
Backed out changeset c82593b13a61 (bug 1686603)
Backed out changeset fd1d95a1e706 (bug 1686603)
2021-01-26 04:32:13 +02:00
Ting-Yu Lin
ffce5ed7d6 Bug 1686603 Part 2 - Add StyleSizeOverrides parameter to ReflowInput's constructor & co. to override data from style system data. r=dholbert
This patch adds the struct as a parameter to various functions.

The struct is cached in ReflowInput so that we don't need to pass it
down to the internal method where nsIFrame::ComputeSize() is called.

In the subsequent patches, we'll use it to revise the implementation of
flex container's flex base size resolution, and size overrides.

Differential Revision: https://phabricator.services.mozilla.com/D101793
2021-01-25 22:29:31 +00:00
Mihai Alexandru Michis
b6b2f1e5f4 Backed out 7 changesets (bug 1686603) for causing crashtest assertion failures.
CLOSED TREE

Backed out changeset 19cba7d34a7f (bug 1686603)
Backed out changeset 3a0d0155ea5e (bug 1686603)
Backed out changeset f1f672cdd0c6 (bug 1686603)
Backed out changeset 63020922e2fd (bug 1686603)
Backed out changeset 8766ce79ba5e (bug 1686603)
Backed out changeset 965dbe8de1e1 (bug 1686603)
Backed out changeset b1328ee45f43 (bug 1686603)
2021-01-21 09:21:12 +02:00
Ting-Yu Lin
d0c462cb81 Bug 1686603 Part 2 - Add StyleSizeOverrides parameter to ReflowInput's constructor & co. to override data from style system data. r=dholbert
This patch adds the struct as a parameter to various functions.

The struct is cached in ReflowInput so that we don't need to pass it
down to the internal method where nsIFrame::ComputeSize() is called.

In the subsequent patches, we'll use it to revise the implementation of
flex container's flex base size resolution, and size overrides.

Differential Revision: https://phabricator.services.mozilla.com/D101793
2021-01-21 04:17:59 +00:00
Ting-Yu Lin
545a6376cd Bug 1677635 Part 4 - Rename nsOverflowAreas to OverflowAreas, and move it into mozilla namespace. r=layout-reviewers,emilio
This patch is generated via the rename functionality in my editor; add
`mozilla::` prefix to `OverflowAreas` in headers; and remove the
`OverflowType` alias added in Part 1.

Differential Revision: https://phabricator.services.mozilla.com/D97235
2020-11-18 00:08:12 +00:00
Jonathan Kew
522773107e Bug 1664094 - Make OGHAM SPACE MARK trimmable, and fix relevant WPT test/metadata. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D97169
2020-11-16 16:57:38 +00:00
Jonathan Kew
0e3cf9687e Bug 1665657 - Whitespace that will hang should not contribute to the min inline-size of a textframe. r=emilio
This affects a few of the examples in the text/white-space-2 reftest, but the changes look sensible;
more significantly from an interop point of view, there are specific web-platform reftests that are
currently failing, but will pass after the patch.

Differential Revision: https://phabricator.services.mozilla.com/D95811
2020-11-04 13:31:30 +00:00
Jonathan Kew
810bc229cc Bug 1674839 - Skip trimmable whitespace after a line-break when computing min inline-width for a textframe. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D95810
2020-11-04 13:31:16 +00:00
Sean Feng
2ce0e3da25 Bug 1518999 - Implement PerformancePaintTiming for FirstContentfulPaint r=smaug,mstange
Spec: https://w3c.github.io/paint-timing/#sec-PerformancePaintTiming
We only support FirstContentfulPaint at the moment.

Differential Revision: https://phabricator.services.mozilla.com/D66463
2020-10-27 16:25:50 +00:00
Bogdan Tara
da1098d4aa Backed out 10 changesets (bug 1654103, bug 1672023, bug 1518999) for PanZoomControllerTest.touchEventForResult gv-junit failures CLOSED TREE
Backed out changeset ff3fb0b4a512 (bug 1672023)
Backed out changeset e7834b600201 (bug 1654103)
Backed out changeset 807893ca8069 (bug 1518999)
Backed out changeset 13e6b92440e9 (bug 1518999)
Backed out changeset 8b2ac5a6c98a (bug 1518999)
Backed out changeset 575748295752 (bug 1518999)
Backed out changeset 65f07ce7b39b (bug 1518999)
Backed out changeset 4bb80556158d (bug 1518999)
Backed out changeset 8ac8461d7bd7 (bug 1518999)
Backed out changeset e8ba13ee17f5 (bug 1518999)
2020-10-24 03:36:18 +03:00
Sean Feng
981acf390f Bug 1518999 - Implement PerformancePaintTiming for FirstContentfulPaint r=smaug,mstange
Spec: https://w3c.github.io/paint-timing/#sec-PerformancePaintTiming
We only support FirstContentfulPaint at the moment.

Differential Revision: https://phabricator.services.mozilla.com/D66463
2020-10-23 19:25:36 +00:00
Botond Ballo
01b3c7969d Bug 1667594 - Move nsLayoutUtils::RectCallback to namespace scope. r=emilio,jgilbert
This allows it to be forward-declared (while a nested class cannot be),
such that headers files that use RectCallback by pointer or reference
do not need to include nsLayoutUtils.h.

This avoids including nsLayoutUtils.h in nsRange.h.

Differential Revision: https://phabricator.services.mozilla.com/D91685
2020-09-30 21:06:47 +00:00
Kagami Sascha Rosylight
c9bb143319 Bug 1667138 - Do not skip backward word breaker r=emilio
Word breaking spaces could be incorrectly skipped if it was trimmed by CSS whitespace rules. This patch makes sure it can still break words when selecting text.

Differential Revision: https://phabricator.services.mozilla.com/D91494
2020-09-28 15:07:33 +00:00
Dorel Luca
72ef712fd0 Backed out 10 changesets (bug 1518999) for GeckoView failures in PanZoomControllerTest.scroll. CLOSED TREE
Backed out changeset 7b5bdd071d05 (bug 1518999)
Backed out changeset 401e488734dd (bug 1518999)
Backed out changeset c13e51e17329 (bug 1518999)
Backed out changeset 2a2d67ba15b8 (bug 1518999)
Backed out changeset 3d4d84003227 (bug 1518999)
Backed out changeset 972731762965 (bug 1518999)
Backed out changeset f21b13582dad (bug 1518999)
Backed out changeset 13a4c749a802 (bug 1518999)
Backed out changeset 5a6cea5fd344 (bug 1518999)
Backed out changeset c3bb552e76a3 (bug 1518999)
2020-09-17 02:58:34 +03:00
Sean Feng
11a2849f32 Bug 1518999 - Implement PerformancePaintTiming for FirstContentfulPaint r=smaug,mstange
Spec: https://w3c.github.io/paint-timing/#sec-PerformancePaintTiming
We only support FirstContentfulPaint at the moment.

Differential Revision: https://phabricator.services.mozilla.com/D66463
2020-09-14 15:13:18 +00:00
Ting-Yu Lin
ecca275fc4 Bug 1168478 Part 2 - Combine the border and padding arguments for nsIFrame::ComputeSize(). r=dholbert
Also combine the border and padding arguments for
nsContainerFrame::ComputeSizeWithIntrinsicDimensions(), too. This method
is used as a helper to implement ComputeSize() for various replaced
elements. Its callers are all within nsIFrame's derived classes'
overridden methods, so I'm not bothering to convert them in a separate
patch.

This change shouldn't change behavior.

Differential Revision: https://phabricator.services.mozilla.com/D90064
2020-09-14 20:42:22 +00:00
Kagami Sascha Rosylight
8aac8314d1 Bug 1623764 - Part 2: Add mSawInlineCharacter to PeekWordState r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D85921
2020-09-09 23:45:22 +00:00
Cosmin Sabou
2a9db10f24 Backed out 7 changesets (bug 1518999) for causing browsertime failures. CLOSED TREE
Backed out changeset d93cb254eef5 (bug 1518999)
Backed out changeset a9715e73e862 (bug 1518999)
Backed out changeset e28081d16e3c (bug 1518999)
Backed out changeset c9d88f3f1f5b (bug 1518999)
Backed out changeset 9836adcc4e83 (bug 1518999)
Backed out changeset 9f01755d327f (bug 1518999)
Backed out changeset ef494065b8e2 (bug 1518999)
2020-08-28 06:27:11 +03:00
Sean Feng
61ec0bd3c3 Bug 1518999 - Implement PerformancePaintTiming for FirstContentfulPaint r=smaug,mstange
Spec: https://w3c.github.io/paint-timing/#sec-PerformancePaintTiming
We only support FirstContentfulPaint at the moment.

Differential Revision: https://phabricator.services.mozilla.com/D66463
2020-08-27 14:50:43 +00:00
Cosmin Sabou
7b214fd81a Backed out 6 changesets (bug 1518999) for geckoview failures on scrollToVerticalOnZoomedContentAuto.
Backed out changeset 10bf1552e301 (bug 1518999)
Backed out changeset e62cd63e3595 (bug 1518999)
Backed out changeset 1bf0b02bb0e0 (bug 1518999)
Backed out changeset 2203a9c52afa (bug 1518999)
Backed out changeset 10f07ca7a246 (bug 1518999)
Backed out changeset b90cf6b54c09 (bug 1518999)
2020-08-25 01:02:36 +03:00
Sean Feng
517cde9bae Bug 1518999 - Implement PerformancePaintTiming for FirstContentfulPaint r=smaug,mstange
Spec: https://w3c.github.io/paint-timing/#sec-PerformancePaintTiming
We only support FirstContentfulPaint at the moment.

Differential Revision: https://phabricator.services.mozilla.com/D66463
2020-08-24 16:03:31 +00:00
Csoregi Natalia
c1ed2ba64f Backed out 6 changesets (bug 1518999) for marionette failures on test_refresh_firefox.py. CLOSED TREE
Backed out changeset eb8e5411868e (bug 1518999)
Backed out changeset 0924e0169dcb (bug 1518999)
Backed out changeset b7de245b329c (bug 1518999)
Backed out changeset f2a6a3797ef1 (bug 1518999)
Backed out changeset 123403a14312 (bug 1518999)
Backed out changeset 1968b8ca14d7 (bug 1518999)
2020-08-18 23:53:26 +03:00
Sean Feng
d914187ce2 Bug 1518999 - Implement PerformancePaintTiming for FirstContentfulPaint r=smaug,mstange
Spec: https://w3c.github.io/paint-timing/#sec-PerformancePaintTiming
We only support FirstContentfulPaint at the moment.

Differential Revision: https://phabricator.services.mozilla.com/D66463
2020-08-06 16:13:44 +00:00
Boris Chiou
dd3c20ccd8 Bug 1639963 - Update the API of nsIFrame::ComputeSize for aspect-ratio. r=emilio
In order to apply Automatic content-based minimum sizes, we have to know
the content size on the block axis. We cannot get the content size until
we finish the reflow of the child frames. So we have to keep a flag
which indicates the size of the ratio-dependent axis is overrideen by
aspect-ratio in ReflowInput.

We will set the correct return value in the next patch, For now, we
always return AspectRatioUsage::None.

Differential Revision: https://phabricator.services.mozilla.com/D79335
2020-08-17 06:57:56 +00:00
Dorel Luca
c243829674 Backed out 5 changesets (bug 1623764) for WPT failures in /editing/run/forwarddelete.html. CLOSED TREE
Backed out changeset 838b1a256f25 (bug 1623764)
Backed out changeset 00911e3c92c3 (bug 1623764)
Backed out changeset 5f7d278953d7 (bug 1623764)
Backed out changeset 0059379a3c29 (bug 1623764)
Backed out changeset 6e3a9276ec41 (bug 1623764)
2020-08-10 09:07:48 +03:00
Kagami Sascha Rosylight
00633d6b49 Bug 1623764 - Part 2: Add mSawInlineCharacter to PeekWordState r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D85921
2020-08-09 12:58:05 +00:00
Cosmin Sabou
1fd1260b5e Backed out 4 changesets (bug 1623764) for mochitest failures on test_movement_by_characters.html. CLOSED TREE
Backed out changeset f927522d89bc (bug 1623764)
Backed out changeset c100eb8ae430 (bug 1623764)
Backed out changeset 1147ded16458 (bug 1623764)
Backed out changeset 7af572ec5edf (bug 1623764)
2020-08-06 08:09:42 +03:00
Kagami Sascha Rosylight
0df495e2fe Bug 1623764 - Part 2: Add mSawInlineCharacter to PeekWordState r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D85921
2020-08-05 13:24:14 +00:00
Cameron McCormack
8b18ae5fbf Bug 1655394 - Add a Dump Text Runs command to the Layout Debugger. r=TYLin,jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D84953
2020-07-29 22:31:19 +00:00
Ting-Yu Lin
fdc00547f6 Bug 1637130 - Rename visual overflow to ink overflow. r=dbaron
This patch is generated by:

```
# Rename the nsOverflowType enum.
rg -l "eVisualOverflow" layout/ gfx/ | xargs sed -i "s/eVisualOverflow/eInkOverflow/g"

# Rename and drop the "Get" prefix from various functions.
rg -l "GetVisualOverflowRect" layout/ gfx/ | xargs sed -i "s/GetVisualOverflowRect/InkOverflowRect/g"
rg -l "GetPreEffectsVisualOverflowRect" layout/ gfx/ | xargs sed -i "s/GetPreEffectsVisualOverflowRect/PreEffectsInkOverflowRect/g"
rg -l "GetVisualOverflowFromDeltas" layout/ gfx/ | xargs sed -i "s/GetVisualOverflowFromDeltas/InkOverflowFromDeltas/g"
rg -l "GetScrollableOverflowRect" layout/ gfx/ | xargs sed -i "s/GetScrollableOverflowRect/ScrollableOverflowRect/g"

# Rename, drop the "Get" prefix, and change the suffix "Area" to "Rect"
# (because they return nsRect) for the two methods in nsLineBox.
rg -l "GetVisualOverflowArea" layout/ gfx/ | xargs sed -i "s/GetVisualOverflowArea/InkOverflowRect/g"
rg -l "GetScrollableOverflowArea" layout/ gfx/ | xargs sed -i "s/GetScrollableOverflowArea/ScrollableOverflowRect/g"

# Rename rest of the functions and variables.
rg -l "VisualOverflow" layout/ gfx/ | xargs sed -i "s/VisualOverflow/InkOverflow/g"
rg -l "visual overflow" layout/ gfx/ | xargs sed -i "s/visual overflow/ink overflow/g"
rg -l "visualOverflow" layout/ gfx/ | xargs sed -i "s/visualOverflow/inkOverflow/g"
rg -l "visOverflow" layout/ gfx/ | xargs sed -i "s/visOverflow/inkOverflow/g"
rg -l "vis-overflow" layout/ gfx/ python/ | xargs sed -i "s/vis-overflow/ink-overflow/g"

./mach clang-format
```

Differential Revision: https://phabricator.services.mozilla.com/D84231
2020-07-20 20:17:36 +00:00
longsonr
875f5e88ac Bug 1259861 - Move everything else into the mozilla namespace in layout/svg r=dholbert
Also: adjust include paths to be consistent for usages of various SVG headers,
and remove unused SVG includes (mostly for "utils" classes),
and drop stray "ns" from already-renamed SVG classes in various code comments.

Differential Revision: https://phabricator.services.mozilla.com/D83140
2020-07-11 02:20:20 +00:00
Kagami Sascha Rosylight
5052c19940 Bug 1637624 - Part 2: Use StaticPrefs for layout.word_select.* r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D83090
2020-07-10 21:21:30 +00:00
Kagami Sascha Rosylight
f6d17b63b5 Bug 1630704 - Part 28: Remove nsFrame r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D81865
2020-07-06 22:38:11 +00:00
Kagami Sascha Rosylight
1afcf4d621 Bug 1630704 - Part 27: Remove nsFrame from inheritance chain r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D81864
2020-07-06 22:29:42 +00:00
Simon Giesecke
cd8b8939b9 Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80860
2020-07-01 08:29:29 +00:00
Kagami Sascha Rosylight
7815996cb8 Bug 1647525 - Use HasAnyStateBits() in nsTextFrame r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D81209
2020-06-27 13:17:44 +00:00
longsonr
0a29054e26 Bug 1647101 - Move SVGTextFrame SVGViewFrame SVGFEContainerFrame SVGFEImageFrame SVGFELeafFrame SVGFEUnstyledLeafFrame into the mozilla namespace r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D80383
2020-06-23 22:59:34 +00:00
Emilio Cobos Álvarez
b9b9e38dd9 Bug 1646224 - Use mozilla::Length rather than nscoord to store font sizes. r=heycam,jfkthame
This avoids arbitrary precision loss when computing REM units and so on,
which is particularly important if we ever change the base of our app
units (but useful regardless).

Differential Revision: https://phabricator.services.mozilla.com/D79928
2020-06-22 09:45:40 +00:00
Cosmin Sabou
65d75a47f3 Backed out changeset 299e19193e11 (bug 1646224) for causing font related failures. CLOSED TREE 2020-06-18 18:26:51 +03:00
Emilio Cobos Álvarez
090e3d2409 Bug 1646224 - Use mozilla::Length rather than nscoord to store font sizes. r=heycam,jfkthame
This avoids arbitrary precision loss when computing REM units and so on,
which is particularly important if we ever change the base of our app
units (but useful regardless).

Differential Revision: https://phabricator.services.mozilla.com/D79928
2020-06-18 13:55:03 +00:00
Cameron McCormack
e8a6bb038c Bug 1645713 - Do less work when finding common ancestor for text run creation. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D79625
2020-06-16 23:40:37 +00:00
Razvan Maries
8dbf9c00bd Backed out changeset fe18d84dddfc (bug 1645132) for perma failures on 478185-1.html. CLOSED TREE 2020-06-12 00:54:58 +03:00
Emilio Cobos Álvarez
211344891a Bug 1645132 - Use NSToCoordCeilClamped to prevent overflow when laying out very big text nodes. r=jfkthame
The test in D79145 hits a negative isize assertion because of this.

Differential Revision: https://phabricator.services.mozilla.com/D79328
2020-06-11 18:18:45 +00:00
Emilio Cobos Álvarez
ef3d21048d Bug 1640623 - Use enum classes for LookAndFeel int and float IDs. r=jmathies,geckoview-reviewers,esawin
Differential Revision: https://phabricator.services.mozilla.com/D76694
2020-06-11 11:27:43 +00:00
Jonathan Kew
90eb219457 Bug 1643126 - When measuring text, don't include letter-spacing on a preformatted newline character. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D78603
2020-06-09 08:52:10 +00:00
Shishir Jaiswal
09db33e848 Bug 1634911 - Simplify loops over lines in block layout to use ranged for. r=emilio
- Fixed wrong 'line' comparison
- Fixed clang-tidy warning
- Addressed the final review comments.
- Fixed the build failures happening in DEBUG mode. Had to revert the range based for loop usage at one place.

Differential Revision: https://phabricator.services.mozilla.com/D75673
2020-05-20 10:38:40 +00:00
Dorel Luca
20db993541 Backed out changeset 39dff7adfc30 (bug 1634911) for build bustage in layout/generic/nsBlockFrame.cpp. CLOSED TREE 2020-05-19 20:10:12 +03:00