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
Shishir Jaiswal
ddcf08c7d4
Bug 1634911 - Simplify loops over lines in block layout to use ranged for. r=emilio
...
- 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-19 16:54:02 +00:00
Mirko Brodesser
9b384325c1
Bug 1633448: part 2) Rename nsFrameSelection::GetTableCellSelection to IsInTableSelectionMode. r=smaug
...
Depends on D72688
Differential Revision: https://phabricator.services.mozilla.com/D72689
2020-04-27 19:34:53 +00:00
Emilio Cobos Álvarez
8cfb840466
Bug 1627643 - Allow to find and display selection native anonymous content. r=jfkthame
...
The check for generated content in nsTextFrame is to the best of my
knowledge useless: We don't display generated content as selected when
the parent is selected anyhow, and the offsets would be wrong.
We special-case text inputs and textarea because of ::placeholder, see
the comment, but otherwise there's no reason you shouldn't be able to
find-in-page generated content / fallback / etc.
I added ForceBreakBetween so as to not create ranges that span across
shadow / anonymous content boundaries. They don't work anyway (see the
TODO in test_find.html), so it seems better to make that explicit until
we properly handle them (bug 1590379).
I added a pref just to be safe since this is long-standing behavior, but
I think it should be uncontroversial.
Differential Revision: https://phabricator.services.mozilla.com/D72447
2020-04-27 13:56:04 +00:00
Simon Giesecke
191a830575
Bug 1628715 - Part 7: Add MOZ_NONNULL_RETURN to infallible nsTArray::AppendElements. r=xpcom-reviewers,necko-reviewers,nika,valentin
...
Differential Revision: https://phabricator.services.mozilla.com/D70831
2020-04-24 13:31:14 +00:00
Jonathan Kew
3751d26654
Bug 425915 - Use complex line breaker to identify word boundaries in SEAsian languages without interword spaces. r=m_kato
...
Differential Revision: https://phabricator.services.mozilla.com/D71206
2020-04-23 14:18:08 +00:00
Botond Ballo
54e45ef6b0
Bug 1629732 - Fix non-unified build errors in layout/generic. r=tnikkel
...
Differential Revision: https://phabricator.services.mozilla.com/D71122
--HG--
extra : moz-landing-system : lando
2020-04-16 00:52:02 +00:00
Ting-Yu Lin
5610a9711b
Bug 1627398 Part 1 - Convert nsIFrame::List flags to EnumSet. r=heycam
...
Differential Revision: https://phabricator.services.mozilla.com/D69914
--HG--
extra : moz-landing-system : lando
2020-04-08 00:22:19 +00:00
Mirko Brodesser
33bac859bb
Bug 1626665: part 3) Declare more methods around nsTextFrame const. r=hsivonen
...
Differential Revision: https://phabricator.services.mozilla.com/D69573
--HG--
extra : moz-landing-system : lando
2020-04-06 08:36:30 +00:00
Mirko Brodesser
69c90a4e03
Bug 1626665: part 2) Declare some methods in ClusterIterator const. r=hsivonen
...
Depends on D69225
Differential Revision: https://phabricator.services.mozilla.com/D69357
--HG--
extra : moz-landing-system : lando
2020-04-03 05:26:25 +00:00
Mirko Brodesser
2fd410ffa9
Bug 1626665: declare some methods around nsTextFrame const or static. r=hsivonen
...
Differential Revision: https://phabricator.services.mozilla.com/D69225
--HG--
extra : moz-landing-system : lando
2020-04-03 05:26:07 +00:00
André Bargull
9ad58ea608
Bug 1625138 - Part 13: Replace mozilla::IsUnsigned with std::is_unsigned. r=froydnj
...
Differential Revision: https://phabricator.services.mozilla.com/D68368
--HG--
extra : moz-landing-system : lando
2020-03-28 13:57:14 +00:00
Mirko Brodesser
16d65c131f
Bug 1623858: part 6) Use switch statement in nsTextPaintStyle::InitSelectionColorsAndShadow. r=smaug
...
Depends on D67644
Differential Revision: https://phabricator.services.mozilla.com/D67806
--HG--
extra : moz-landing-system : lando
2020-03-23 10:47:08 +00:00
Mirko Brodesser
8c66344a6d
Bug 1623858: part 1) Rename nsINode::IsSelectionDescendant to nsINode::IsMaybeSelected. r=smaug
...
More accurate.
Differential Revision: https://phabricator.services.mozilla.com/D67599
--HG--
extra : moz-landing-system : lando
2020-03-20 14:27:39 +00:00
Simon Giesecke
8aa47bcfb7
Bug 1613985 - Use default for equivalent-to-default constructors/destructors in layout. r=dholbert
...
Differential Revision: https://phabricator.services.mozilla.com/D66016
--HG--
extra : moz-landing-system : lando
2020-03-17 09:38:32 +00:00