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

392 Коммитов

Автор SHA1 Сообщение Дата
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
Jonathan Kew e4bd6b69d2 Bug 1370053 - Don't do the empty-frame short-circuit in ResolveParagraph until after updating the current bidi run if necessary. r=smontagu 2017-06-07 09:42:52 +01:00
Jonathan Kew a8f81efd8e Bug 1365982 - Attach frame properties to each frame instead of looking them up in a hashtable on the prescontext. r=mats
--HG--
rename : layout/base/FramePropertyTable.cpp => layout/base/FrameProperties.cpp
rename : layout/base/FramePropertyTable.h => layout/base/FrameProperties.h
2017-05-27 12:36:00 +01:00
Jonathan Kew a0fe53386a Bug 1366623 - Ensure we don't continue using a stale BidiDataProperty after dynamic content changes make it obsolete. r=dholbert 2017-05-23 15:21:58 +01:00
Jonathan Kew 07bd548fcf Bug 1362423 - Ensure nsBidiPresUtils::Resolve always clears the NEEDS_BIDI_RESOLUTION flags for the block and continuations, whichever code-path it takes when looking for possible short-circuits. r=dholbert 2017-05-10 11:01:07 +01:00
Emilio Cobos Álvarez 6b268e09c2 Bug 1361749: Initialize all the fields in nsFrameContinuationState. r=mats
Not all of them are initialized/used in all the paths, but worth doing it just
for sanity.

MozReview-Commit-ID: 2EsHQCc0U8P
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-05-03 22:05:41 +02:00
Emilio Cobos Álvarez 23bce99ae1 Bug 1361051: rename mozilla::FrameType to mozilla::LayoutFrameType. r=xidorn
This avoids conflicts with mozilla::dom::FrameType.

MozReview-Commit-ID: 7aEMbHRaTFk

--HG--
extra : rebase_source : 2d01321f5ce0ec8c0e3f70984674f82678034b3c
2017-05-01 19:32:52 +02:00
Emilio Cobos Álvarez e44543aad4 Bug 1360241: Devirtualize nsIFrame::GetType. r=heycam
MozReview-Commit-ID: 5Nzhyta5Hle

--HG--
extra : rebase_source : c2e9d4bfb9239f5e851d110cd7dff98c1e1a8d8b
2017-04-30 17:30:08 +02:00
Jonathan Kew 9351a19d2c Bug 1358548 - Move functionality of BidiParagraphData::Init() into a constructor instead of a separate method. r=dholbert 2017-04-26 23:25:49 +01:00
Jonathan Kew 766bc53ebd Bug 1358275 - Optimize away repeated StyleContext() calls in nsBidiPresUtils::TraverseFrames. rs=dholbert 2017-04-26 23:25:49 +01:00
Jonathan Kew 5d6ac17478 Bug 1358275 - Skip the main body of bidi-resolution for blocks that can be determined to be purely LTR content without directional overrides/embeddings. r=dholbert 2017-04-26 23:25:48 +01:00
Jonathan Kew 7e488692ea Bug 1357694 - Use AutoTArray for the array members in BidiLineData, to reduce heap allocation costs. r=dholbert 2017-04-19 20:09:32 +01:00
Ehsan Akhgari 83690b136c Bug 1352527 - Part 2: Switch nsBidiPresUtils consumers of nsBidi to use nsLayoutUtils::GetBidiEngine(); r=jfkthame 2017-04-14 02:41:55 -04:00
Mats Palmgren 75139be545 Bug 1343606 - Pass the correct first child frame for the lines we're going to traverse, and reset bpd.mPrevFrame since we're starting at a new line. r=jfkthame
MozReview-Commit-ID: 77CG4u22OTt
2017-03-02 20:45:40 +01:00
L. David Baron 347306cdf9 Bug 1340127 - Consider different bidi control/override values when deciding whether to consider a frame first or last. r=jfkthame
I believe the reordering of the first/last check across the code that
delves into letter frames is an improvement, but a currently undectable
one, since it appears that we don't currently allow ::first-letter
pseudo-elements to break across lines, even in the presence of
multi-character ::first-letters that are broken by
'word-break:break-all'.
2017-03-01 10:04:27 -08:00
Mats Palmgren ec4f6376fc Bug 410857 part 4 - Stop passing around aBlockFrame just for DEBUG purposes. Introduce BidiParagraphData::mCurrentBlock for that purpose and set it to the right block continuation this time. r=jfkthame 2017-02-20 17:43:08 +01:00
Mats Palmgren 8e10f864fc Bug 410857 part 3 - Cache the PresContext instead of fetching it for every paragraph. r=jfkthame 2017-02-20 17:43:08 +01:00
Mats Palmgren a908f9773e Bug 410857 part 1 - Traverse overflow lines too so we don't miss some text. r=jfkthame 2017-02-20 17:43:08 +01:00
Olli Pettay d6d2f4663c Bug 1330226 - BidiParagraphData should allocate less, r=jfkthame
--HG--
extra : rebase_source : a8c974f4a583d461dab121a5e4b5fb687c33b1fc
2017-01-12 22:46:23 +08:00
Nathan Froyd f6a73ed989 Bug 1315274 - rename mozilla::MakeRange to mozilla::IntegerRange; r=Waldo
MakeRange is just way too generic for this sort of thing.
2017-01-06 09:22:53 -05:00
Jeremy Chen aee90be343 Bug 1286468 followup - Fix naming issues.
MozReview-Commit-ID: C2PDA4R5k5F
2016-10-24 15:01:25 +08:00