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

412 Коммитов

Автор SHA1 Сообщение Дата
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
Ting-Yu Lin afe9123179 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

--HG--
extra : moz-landing-system : lando
2020-03-12 21:50:23 +00:00
Emilio Cobos Álvarez a25126cd0d Bug 1611181 - Make direction use an enum class. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D60857

--HG--
extra : moz-landing-system : lando
2020-01-24 11:46:14 +00:00
Xidorn Quan cee370a4fb Bug 1144465 - Resolve bidi inside ruby. r=jfkthame
This commit changes IsBidiLeaf to mark ruby boxes not a bidi leaf, since
conceptually they are not. I auditted all uses of it, and I believe it
makes more sense this way.

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

--HG--
extra : moz-landing-system : lando
2020-01-01 00:34:23 +00:00
Xidorn Quan 3bb05cef1c Bug 1606192 - Remove some unused nsresult return value in layout code. r=dbaron
Differential Revision: https://phabricator.services.mozilla.com/D58342

--HG--
extra : moz-landing-system : lando
2019-12-28 03:27:13 +00:00
jeffin143 0ed9c7c846 Bug 1600483 : convert NS_STYLE_RUBY_ALIGN_* to an enum class in nsStyleConsts.h r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D55380

--HG--
extra : moz-landing-system : lando
2019-12-01 13:08:49 +00:00
jeffin143 e9711f487b Bug 1598528 : convert NS_STYLE_TEXT_ORIENTATION_* to an enum class in nsStyleConsts.h r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D54252

--HG--
extra : moz-landing-system : lando
2019-11-26 04:50:04 +00:00
Alex Henrie 74cc0f4dce Bug 1591490 - Use the NS_IS_SURROGATE_PAIR macro everywhere. r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D50697

--HG--
extra : moz-landing-system : lando
2019-10-27 05:05:51 +00:00
L. David Baron a08b5323cb Bug 1576972 - Keep lastRealFrame up-to-date even when we skip empty text frames. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D43885

--HG--
extra : moz-landing-system : lando
2019-08-29 10:14:08 +00:00
L. David Baron 868643a218 Bug 1568501 - Invalidate FastLineIterator::mPrevFrame only when lines actually split. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D39267

--HG--
extra : moz-landing-system : lando
2019-07-25 21:31:21 +00:00
L. David Baron 96bd181ea7 Bug 1300293 - Pass the line box from nsBidiPresUtils::ResolveParagraph through SplitInlineAncestors to nsIFrame::InsertFrames. r=jfkthame
This is what fixes the performance problem in bug 1300293.

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

--HG--
extra : moz-landing-system : lando
2019-07-22 17:50:05 +00:00
L. David Baron 1ac8b69a03 Bug 1300293 - Pass the line box from nsBidiPresUtils::ResolveParagraph through EnsureBidiContinuation to nsIFrame::InsertFrames. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D38798

--HG--
extra : moz-landing-system : lando
2019-07-22 17:50:05 +00:00
L. David Baron 64f57e5d7f Bug 1300293 - Make nsBidiPresUtils track line boxes separately for the progress of TraverseFrames and ResolveParagraph. r=jfkthame
TraverseFrames gathers a bunch of frames into an array, and then at
forced breaks or the end of the block flushes its array by running
ResolveParagraph.  ResolveParagraph can sometimes cause lines to break,
so lines recorded during TraverseFrames may no longer be accurate during
ResolveParagraph.

It may look like the lines are only needed during ResolveParagraph and
we could handle the one issue in TraverseFrames that deals with
preformatted newlines by restructuring the code a tad.  However, in the
next patch, there will be an additional caller that needs the current
line during TraverseFrames to pass to CreateContinuation, which makes
such a structure less plausible.

This will also make it easier to produce a current line for the call to
SplitInlineAncestors within ResolveParagraph, which will be done in the
patch after the next.

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

--HG--
extra : moz-landing-system : lando
2019-07-22 18:55:56 +00:00
L. David Baron d81370ebeb Bug 1300293 - Track the block and line list that each frame in BidiParagraphData::mLogicalFrames came from. r=jfkthame
This information is used in the next patch, which will use that information to
maintain a line iterator while iterating over mLogicalFrames (and will remove
the stored mLinePerFrame).

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

--HG--
extra : moz-landing-system : lando
2019-07-22 17:50:04 +00:00
L. David Baron 9b308e257b Bug 1567036 - Clear BidiParagraphData::mPrevFrame when ResolveParagraphWithinBlock creates a new continuation, which invalidates its relationship to the line iterator. r=jfkthame
This patch adds an assertion that documents the invariant that this code
needs to maintain to manage the line iterator correctly.  Failing to
meet that invariant would also cause additional assertions in my
work-in-progress on bug 1300293.

It then adds two assignments of mPrevFrame to null that make that
assertion hold.

The first assignment to null is tested by a number of tests already in
our test suite, including
layout/reftests/w3c-css/received/css-writing-modes/block-plaintext-004.html
and layout/reftests/bidi/unicode-bidi-plaintext.html , which would hit
the added assertion if that assignment to null were not present.

The second assignment to null was untested in our test suite (though it
showed up when doing view-source: of https://html.spec.whatwg.org/ ), so
I've added a reftest (1567036-1.html) that hits the added assertion if
that second assignment to null is not present.

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

--HG--
extra : moz-landing-system : lando
2019-07-18 20:09:04 +00:00
L. David Baron ce547cd6f5 Bug 1566945 - Add a parameter to nsContainerFrame::InsertFrames for aPrevFrame's line box. r=dholbert
For now, always pass null, except when passing it through from one
overload to another.

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

--HG--
extra : moz-landing-system : lando
2019-07-17 23:34:45 +00:00
Ting-Yu Lin 307ef73912 Bug 1524431 Part 2 - Check IsBidiSplittable() before processing the ancestor frames. r=jfkthame
The idea is to check IsBidiSplittable() in more places to prevent fixed
continuations created by column-span from becoming fluid ones.

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

--HG--
extra : moz-landing-system : lando
2019-06-11 19:27:57 +00:00
Ting-Yu Lin 6904399bd9 Bug 1524431 Part 1 - Revert Bug 1520722 Part 2. r=jfkthame
This reverts the modification to nsBidiPresUtils.cpp in Bug 1520722 Part
2, but keeps the test added. Next part will fix the problem in a proper
way.

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

--HG--
extra : moz-landing-system : lando
2019-06-11 16:21:57 +00:00
Cameron McCormack 112bcc43db Bug 1554461 - Use an array to store nsContinuationStates when the number of them is low. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D32617

--HG--
extra : moz-landing-system : lando
2019-05-31 11:42:42 +00:00
Cameron McCormack e82b3826f9 Bug 1553378 - Devirtualize calls to GetText() / TextLength() when we know we have a Text node. r=smaug,jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D32100
2019-05-22 15:18:48 +10: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
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
Ting-Yu Lin 6694012956 Bug 1527519 Part 2 - Replace some nsLayoutUtils::GetAsBlock() with nsIFrame::IsBlockFrameOrSubclass(). r=mats
Depends on D19860

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

--HG--
extra : moz-landing-system : lando
2019-02-15 01:38:04 +00:00
Ting-Yu Lin 97005f50c2 Bug 1520722 Part 2 - When removing bidi continuations, go no further than the block which needs resolution. r=dbaron
When doing bidi resolution for column-content blocks, we may still
traverse the parent chain up in RemoveBidiContinuation, reach
nsColumnSetFrame, and accidentally convert nsColumnSetFrame's
continuation into fluid ones.

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

--HG--
extra : moz-landing-system : lando
2019-02-01 06:14:27 +00:00
Ting-Yu Lin 925c1edf69 Bug 1521982 - Adjust callers of nsIFrame::List() in nsBidiPresUtils to stop passing 0 as a const char* argument. r=dholbert
This patch is similar to Bug 1503420 Part 1.

nsIFrame::List()'s second argument should be a const char*, not an
integer. It'll crash if we pass 0 as const char*. Fix the bug by
omitting the argument because the default value of the argument is an
empty string.

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

--HG--
extra : moz-landing-system : lando
2019-01-23 02:24:46 +00:00
Ehsan Akhgari e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01: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
Daniel Holbert f7ce2706a7 Bug 1509972 part 1: Remove unnecessary nsAutoPtr includes from files in layout/base. r=TYLin
In each file touched by this commit, there were no mentions of nsAutoPtr
besides the #include.

I verified that the folder layout/base still builds successfully in
non-unified mode after this patch, too. So, none of these files are secretly
using nsAutoPtr and depending on some other .cpp file to provide the header.

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

--HG--
extra : moz-landing-system : lando
2018-11-26 22:12:20 +00:00
Andi-Bogdan Postelnicu 5e3e0d4498 Bug 1453795 - Layout - Initialize member fields in classes/ structures. r=dbaron 2018-07-12 09:42:14 +03: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
Sebastian Hengst 0819f35e51 Backed out 4 changesets (bug 525063) on request from Andi. a=backout
Backed out changeset 516c4fb1e4b8 (bug 525063)
Backed out changeset 6ff8aaef2866 (bug 525063)
Backed out changeset bf13e4103150 (bug 525063)
Backed out changeset d7d2f08e051c (bug 525063)
2018-04-13 16:01:28 +03:00
Tristan Bourvon a3a77c0312 Bug 525063 - Initialize uninitialized class attributes in m-c. r=ehsan 2018-04-10 21:11:02 +02:00
Boris Zbarsky 4370006c40 Bug 1449404 part 3. Get rid of nsIContent::AppendTextTo. r=mccr8 2018-03-28 18:01:47 -04:00
Emilio Cobos Álvarez e341b20ec4 Bug 1447483: Merge nsStyleContext and ServoStyleContext, rename to ComputedStyle. r=jwatt on a CLOSED TREE
MozReview-Commit-ID: JPopq0LudD
2018-03-22 20:06:24 +01:00
Emilio Cobos Álvarez 5dd797f154 Back out changeset b683bb3f22a1 (Bug 1447483) for not landing with all the files. r=me on a CLOSED TREE
This reverts commit 1808914126bb9f9e4a82d2c3d7ac961885fe7d62.

MozReview-Commit-ID: 5skESBseEvo
2018-03-22 20:05:22 +01:00
Emilio Cobos Álvarez ca5ac79cca Bug 1447483: Merge nsStyleContext and ServoStyleContext, rename to ComputedStyle. r=jwatt
MozReview-Commit-ID: JPopq0LudD
2018-03-22 19:48:42 +01:00
Daniel Holbert 5110d9e202 Bug 1443672: Adjust a few .cpp files in layout to #include their own header first. r=emilio
MozReview-Commit-ID: L4ZSDT5Akhi

--HG--
extra : rebase_source : 4795c4eaf84957639f446471788697956fe2bf17
2018-03-06 15:59:36 -08:00
Noemi Erli 2062223489 Backed out changeset 04fecea9eaf0 (bug 1443672) as per dholbert's request on a CLOSED TREE 2018-03-07 20:55:26 +02:00
Daniel Holbert 93e46d9a9b Bug 1443672: Adjust a few .cpp files in layout to #include their own header first. r=emilio
MozReview-Commit-ID: L4ZSDT5Akhi

--HG--
extra : rebase_source : 4795c4eaf84957639f446471788697956fe2bf17
2018-03-06 15:59:36 -08:00
Henri Sivonen 5b05e804a9 Bug 1431025 - Use encoding_rs::mem::is_utf16_bidi() as the implementation of HasRTLChars(). r=jfkthame
MozReview-Commit-ID: KnaI7wIndVf

--HG--
extra : rebase_source : 6a00c8fc140c1cf070e8fa668e7e099f98621820
2018-01-18 14:28:15 +02:00
Jonathan Kew 489e9ad994 Bug 1426042 - Ensure we don't forget to set bidi data when required on a zero-length trailing frame. r=dholbert 2018-01-05 13:58:51 +00: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
Jonathan Kew cfe79f23f5 Bug 1308359 - patch 2 - Move trivial ICU-wrapper nsBidi methods to the header file as inlines, and remove unnecessary nsresult return values from methods that cannot fail. r=xidorn 2017-09-22 10:37:17 +01:00
Daniel Holbert 7b2a0e9d5a Bug 1384669: Reduce refcount churn in BidiParagraphData by using non-refcounted pointer hash keys. r=jfkthame
We don't need to bother with refcounting for these pointers, because they're
pointing to DOM elements, and the DOM is basically immutable during reflow.
And BidiParagraphData is a stack-only class which only lives for a short period
of reflow - so it can assume these pointers' targets will stick around for its
whole life.

MozReview-Commit-ID: J3SfRYoRweX

--HG--
extra : rebase_source : 9ebab968fdb1e4cc30033ab0744d883a9b0d820e
2017-07-26 12:47: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
Alexis Beingessner adb013669b Bug 1088760 - Remove nsRenderingContext, replacing all of its uses with gfxContext. r=jwatt,jrmuizel
MozReview-Commit-ID: K1WUIOnvazF
2017-06-13 11:00:10 -04:00
Sebastian Hengst f3bf820bfd Backed out changeset 3d1ce85e6348 (bug 1088760) for bustage, at least on Android at layout/generic/nsPluginFrame.cpp:1612. r=backout 2017-06-13 00:30:03 +02:00
Alexis Beingessner c75211cb95 Bug 1088760 - Remove nsRenderingContext, replacing all of its uses with gfxContext. r=jwatt,jrmuizel
MozReview-Commit-ID: K1WUIOnvazF
2017-06-12 17:32:48 -04:00
Jonathan Kew 55bcceba64 Bug 1370053 - Fix a couple of comment/variable-name typos in ResolveParagraph. r=smontagu 2017-06-07 09:42:53 +01:00