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

256 Коммитов

Автор SHA1 Сообщение Дата
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
Ting-Yu Lin 05d16fd80b Bug 1677635 Part 1 - Add an enum class mozilla::OverflowType, and remove NS_FOR_FRAME_OVERFLOW_TYPES. r=layout-reviewers,emilio
The existing nsOverflowType will be removed in the next part.

Also, I change `UnionRectIncludeEmpty` to `UnionRectEdges` in two FIXME
comments because the method is renamed in Bug 641426 Part 5
https://hg.mozilla.org/mozilla-central/rev/90e46b3e8e6f

Differential Revision: https://phabricator.services.mozilla.com/D97232
2020-11-17 23:45:09 +00:00
Kagami Sascha Rosylight cc03864743 Bug 1623764 - Part 3: Expose IsLineWrapped via LineInfo r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D85922
2020-09-09 23:45:29 +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 96a85f4c16 Bug 1623764 - Part 3: Expose IsLineWrapped via LineInfo r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D85922
2020-08-09 12:58:13 +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 d41518f2d3 Bug 1623764 - Part 3: Expose IsLineWrapped via LineInfo r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D85922
2020-08-05 13:24:22 +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
Kagami Sascha Rosylight f4c2e30310 Bug 1652188 - Return struct from nsILineIterator::GetLine() r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D83215
2020-07-13 18:36:30 +00:00
Ting-Yu Lin 4ecda7f556 Bug 1651202 Part 2 - Minor format tweaks for block frame's frame tree output. r=heycam
Make the following tweak so that they are consistent with others.

* Add a space before the open angle bracket. This is at the end of
`Block(div)(1)@7f10e25de5d0 ... <`

* Tweak nsLineBox format.
`line 7f10e25de808: count=1` becomes `line@7f10e25de808 count=1`.

* Tweak child list format.
`AbsoluteList 0x7f10e3c7e560` becomes `AbsoluteList@7f10e3c7e560`

Differential Revision: https://phabricator.services.mozilla.com/D82603
2020-07-08 05:37:39 +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 21f2b48e01 Bug 1647525 - Use HasAnyStateBits() in remaining layout files r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D81230
2020-06-28 01:00:19 +00:00
Mirko Brodesser 9d47d3f4c6 Bug 1626665: part 11) Declare `nsILineIterator::GetNumLines` `const`. r=hsivonen
Depends on D70015

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

--HG--
extra : moz-landing-system : lando
2020-04-08 06:57:07 +00:00
Mirko Brodesser b872cdb707 Bug 1626665: part 10) Declare `nsILineIterator::FindFrameAt` `const`. r=hsivonen
Depends on D70014

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

--HG--
extra : moz-landing-system : lando
2020-04-08 06:57:00 +00:00
Mirko Brodesser 68794c6bc5 Bug 1626665: part 8) Declare `nsLineIterator::GetNextSiblingOnLine` `const`. r=hsivonen
Depends on D70012

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

--HG--
extra : moz-landing-system : lando
2020-04-08 06:55:41 +00:00
Mirko Brodesser 6533647d1c Bug 1626665: part 7) Declare `nsILineIterator::GetLine` `const`. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D70012

--HG--
extra : moz-landing-system : lando
2020-04-08 06:50:57 +00:00
Ting-Yu Lin af15e4dfe8 Bug 1627398 Part 2 - Support printing frame tree in CSS pixels. r=heycam
Audit all the types related to app units [1] printed in
nsIFrame::List (and all the methods that override it), and use
ConvertToString to convert their printing format to CSS pixels if
needed.

In addition, add operator<< to BaseCoord so that it can cooperate with
mozilla::ToString, which is needed by ConvertToString.

[1] The types include nsRect, nsSize, nscoord, LogicalRect, and
LogicalSize.

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

--HG--
extra : moz-landing-system : lando
2020-04-08 00:18:52 +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
Ting-Yu Lin ae3f310d62 Bug 1596339 Part 6 - Use ToString() on nsPoint and nsSize in frame tree dump. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D52967

--HG--
extra : moz-landing-system : lando
2019-11-15 03:59:28 +00:00
Ting-Yu Lin fa2ec9dc21 Bug 1596339 Part 5 - Use ToString() on nsRect in frame tree dump. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D52966

--HG--
extra : moz-landing-system : lando
2019-11-15 03:52:14 +00:00
Ting-Yu Lin 9b33cffdf0 Bug 1596339 Part 2 - Implement operator<< for LogicalRect, and use it in frame tree dump. r=dholbert
This change uses parentheses, i.e. '(' and ')', to enclose the dimension
of LogicalRect. This match the output of BaseRect's operator<<.

Note: This introduces inconsistency in the frame tree dump because some
of the output format still use braces to enclose the data. But in later
patches, I'll gradually change the format to use parentheses.

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

--HG--
extra : moz-landing-system : lando
2019-11-15 03:51:56 +00:00
Ting-Yu Lin 198f20c438 Bug 1596339 Part 1 - Implement operator<< for WritingMode, and use it in frame tree dump. r=dholbert
WritingMode.h already depends on ostream header implicitly via
nsBidiUtils.h -> nsString.h. For completeness, I still add #include
<ostream>.

While I'm here, I make the format of debug prints in nsLineBox more
consistent with the counter-part in nsFrame. Some of them will be
revised in the later patches.

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

--HG--
extra : moz-landing-system : lando
2019-11-15 03:51:54 +00:00
Ting-Yu Lin d0f336a7a6 Bug 1591546 Part 1 - Add WritingMode::IsBidiRTL(). r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D50771

--HG--
extra : moz-landing-system : lando
2019-10-28 09:33:05 +00:00
Cameron McCormack d4d395fb49 Bug 1576018 - Tweak frame tree debugging output. r=TYLin
Differential Revision: https://phabricator.services.mozilla.com/D43178

--HG--
extra : moz-landing-system : lando
2019-08-23 05:31:37 +00:00
L. David Baron 2af9d08603 Bug 1568501 - Search from the end of the line rather than the start, like this code did before bug 1566945. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D39268

--HG--
extra : moz-landing-system : lando
2019-07-25 21:02:40 +00:00
Masayuki Nakano f5737567dd Bug 1544343 - part 3: Make layout use mozilla::PresShell instead of nsIPresShell as far as possible r=emilio
This patch changes remaining things under `layout/`.  However, there are some
places which still need to use `nsIPresShell`.  That will be fixed in a
follow up bug.

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

--HG--
extra : moz-landing-system : lando
2019-04-16 07:25:10 +00:00
Masayuki Nakano 9165a150a1 Bug 1540930 - Make nsPresContext use mozilla::PresShell directly rather than via nsIPresShell r=emilio
`nsPresContext` should use `mozilla::PresShell` directly instead of
`nsIPresShell`.  This patch makes it.

Unfortunately, `nsPresContext` and `nsIFrame` have `PresShell()`.  Therefore,
we cannot use `PresShell*` in its methods so that this patch uses `mozilla::`
namespace prefix.

It might be better to rename them as `PresShellPtr()` in another bug.

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

--HG--
extra : moz-landing-system : lando
2019-04-03 12:40:26 +00:00
Mats Palmgren be049c79d6 Bug 205202 part 4 - [css-lists][css-pseudo] Rename various uses of bullet with marker to avoid any misleading association with nsBulletFrame (idempotent patch). r=emilio 2019-03-24 23:13:53 +01:00
Ryan Hunt b936c00a65 Bug 1523969 part 14 - Move method definition inline comments to new line in 'layout/'. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D21115

--HG--
extra : rebase_source : 4d65c07d8822f3a54ac881b5d0f55468ce884554
2019-02-25 16:09:24 -06:00
Cameron McCormack 1ea7c3efc9 Bug 1511854 - Part 2: Fix some more formatting oddities in layout/ after the clang-format. r=TYLin
Depends on D13686

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

--HG--
extra : moz-landing-system : lando
2018-12-05 18:44:05 +00:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Mats Palmgren 0e1ec1a9f1 Bug 1487221 - Add memory reporting for nsLineBox::mFrames. r=bz 2018-09-19 05:27:18 +02:00
Emilio Cobos Álvarez adf95c2d09 Bug 1476054: Fixes and cleanups for Servo PR #21156. r=me
Similar to the previous patch, logical clear doesn't appear in computed style
objects.

MozReview-Commit-ID: FbN0hiUGzYa
2018-07-17 10:23:26 +02:00
Gurzau Raul c05f725b1e Backed out 6 changesets (bug 1476054) for failing on servo/ports/geckolib/glue.rs on a CLOSED TREE
Backed out changeset f4941fe345ad (bug 1476054)
Backed out changeset cc571c618e4c (bug 1476054)
Backed out changeset 0a712d7bcb66 (bug 1476054)
Backed out changeset 62293a989ed2 (bug 1476054)
Backed out changeset ef2a43e3fc6c (bug 1476054)
Backed out changeset a2bb0089cf1d (bug 1476054)
2018-07-16 23:56:23 +03:00
Emilio Cobos Álvarez 9325870208 Bug 1476054: Fixes and cleanups for Servo PR #21156. r=me
Similar to the previous patch, logical clear doesn't appear in computed style
objects.

MozReview-Commit-ID: FbN0hiUGzYa
2018-07-16 21:38:46 +02:00
Mats Palmgren e95647ed68 Bug 1467526 - Add a few MOZ_DIAGNOSTIC_ASSERT in nsLineBox::DeleteLineList to enforce our invariants better. r=emilio 2018-06-07 20:20:34 +02:00
Cameron McCormack b3a4b80968 Bug 1464967 - Part 1: Make nsLineBox::BreakTypeToString static. r=gerald
MozReview-Commit-ID: L97yf6oCXlq

--HG--
extra : rebase_source : 6cc25d93ff8c8d446f63e90c93b8bc01aff59b66
2018-05-29 14:06:50 +10:00
Chris Peterson 71422dcaa9 Bug 1457813 - Part 2: Replace non-asserting NS_PRECONDITIONs with MOZ_ASSERTs. r=froydnj
s/NS_PRECONDITION/MOZ_ASSERT/ and reindent

MozReview-Commit-ID: KuUsnVe2h8L

--HG--
extra : source : c14655ab3df2c9b1465dd8102b9d25683359a37b
2018-04-28 12:50:58 -07:00
Mats Palmgren 25cd0c37f7 Bug 1400618 part 1 - Collect NAC / generated content and call DestroyAnonymousContent / UnbindFromTree on those after the frames are destroyed. r=bz
MozReview-Commit-ID: 2trDgeJPw25
2017-11-07 01:20:33 +01:00
Daniel Holbert 680815cd6e Bug 1412346 part 5: (automated patch) Switch a bunch of C++ files in layout to use our standard mode lines. r=jfkthame
This patch was generated automatically by the "modeline.py" script, available
here: https://github.com/amccreight/moz-source-tools/blob/master/modeline.py

For every file that is modified in this patch, the changes are as follows:
 (1) The patch changes the file to use the exact C++ mode lines from the
     Mozilla coding style guide, available here:
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Mode_Line

 (2) The patch deletes any blank lines between the mode line & the MPL
     boilerplate comment.

 (3) If the file previously had the mode lines and MPL boilerplate in a
     single contiguous C++ comment, then the patch splits them into
     separate C++ comments, to match the boilerplate in the coding style.

MozReview-Commit-ID: EuRsDue63tK

--HG--
extra : rebase_source : 3356d4b80ff6213935192e87cdbc9103fec6084c
2017-10-27 10:33:53 -07:00
Sylvestre Ledru 4e9cf83ee8 Bug 1378712 - Remove all trailing whitespaces r=Ehsan
MozReview-Commit-ID: Kdz2xtTF9EG

--HG--
extra : rebase_source : 7235b3802f25bab29a8c6ba40a181a722f3df0ce
2017-07-06 14:00:35 +02:00
L. David Baron 6fa3cf9282 Bug 944200 followup - Consistently use nscoord_MIN for uninitialized mFloatEdgeIStart/End. r=mats
This fixes an inconsistency in part 2 (32faa7c639ff), which wrote the
constant for uninitialized in two different ways.

The constructor uses nscoord_MIN for uninitialized, and that's also what
GetFloatEdges tests for, so this should use nscoord_MIN as well.

I believe this is because the review comment in comment 29 was only
partially addressed.

I noticed the difference because it caused broken behavior in a tree
with my patch for bug 1227493, which defines NS_INTRINSIC_WIDTH_UNKNOWN
differently.  Some text was disappearing on github (email and website
on user pages), slack (usernames of private chats in the sidebar), and
twitter (username of user who tweeted a quoted tweet).

MozReview-Commit-ID: Ah9FUPf2dw4

--HG--
extra : rebase_source : 2d947e017647bc6d6029169ef57cddca5aa4f3a9
2017-05-16 14:31:30 -07:00
Mats Palmgren 491f6d4576 Bug 944200 part 2 - [css-ui] Store the line's float edges for text-overflow analysis if needed. r=dholbert
MozReview-Commit-ID: L9YnBKCckgR
2017-04-15 00:31:43 +02:00
Julian Seward 2a625e574c Bug 1316556 - Remove zeroing allocation in class nsIPresShell. r=dbaron.
--HG--
extra : rebase_source : 203c4848cf0fe321b429c78ddf71acd662755e6d
2016-12-01 09:06:50 +01:00
Jeremy Chen 64cac18a6f Bug 1308077 - remove default branch of switch-case-statement in nsLineBox::BreakTypeToString. r=xidorn
MozReview-Commit-ID: 4HZTHsaFJb9

--HG--
extra : rebase_source : 5a0c14df3a6b98c492164d36ff4455de4e9466da
2016-10-06 15:22:22 +08:00
Manish Goregaokar aad318e17a Bug 1300337 - Replace None_ variants from nsStyleConsts.h with None; r=heycam,TYLin
MozReview-Commit-ID: CxHzbEzjLxT

--HG--
extra : rebase_source : 232f90b8b107f7fb49f47a29a4e493660b8a7d87
2016-09-04 00:16:58 +05:30
Jeremy Chen c6d0429830 Bug 1297306 - part6:replace NS_STYLE_CLEAR_* with StyleClear enum class. r=xidorn
After using enum class, a switch-case warning in CombineBreakType is caught.
This is one of such kind safty checks that we would like to gain.
Fix it by adding default case for switch-case in CombineBreakType.

MozReview-Commit-ID: BdS3LPN6qzX

--HG--
extra : rebase_source : 17f24a0d482ed6eb51b23e6942d0ac1c87375e0b
2016-09-07 10:20:17 +08:00
Jeremy Chen 59704a5d4b Bug 1297306 - part3:make BreakTypeToString() to be a member of nsLineBox. r=xidorn
With this change, we could export BreakTypeToString() to other files that desire
to print break type for debugging.

MozReview-Commit-ID: 34m1BWAmZTB

--HG--
extra : rebase_source : 2d613e7caffb36ec23b684dab538a9f5d6e34f65
2016-09-07 10:20:16 +08:00
Jeremy Chen 0cd76e6b59 Bug 1297306 - part2:make the implementation of nsLineBox::LastChild() be behind DEBUG_FRAME_DUMP flag. r=xidorn
This should've been covered in Bug 956447. The declaration is already behind
DEBUG_FRAME_DUMP in nsLineBox.h. Just move the implementation to agreee with that.

MozReview-Commit-ID: 9N0WxKkajF1

--HG--
extra : rebase_source : b79b068b8a84c66f289d40deb5b5b9347fb7c4a4
2016-09-07 10:20:16 +08:00
Jeremy Chen 9ab3247b7d Bug 1297306 - part1:remove unused NS_STYLE_CLEAR_* condition. r=xidorn
NS_STYLE_CLEAR_NONE has been defined to 0 for like forever, so this code should
never be run. Remove it.

MozReview-Commit-ID: IQ73H6QGsPX

--HG--
extra : rebase_source : 4a32e0e7cd4325b0741f542a796fd1da4de10075
2016-09-07 10:20:16 +08:00