Commit Graph

1500 Commits

Author SHA1 Message Date
Mats Palmgren
1c2b8c222e Bug 1414666 part 1 - Add nsIFrame::PresShell() for convenient access to the shell. r=emilio
MozReview-Commit-ID: 8FPTPKWyVtY
2017-11-09 03:00:48 +01: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
Ethan Lin
f18aa8ed14 Bug 1413397 - Avoid empty border's fallback. r=kats
MozReview-Commit-ID: 1KXYjcObJdi

--HG--
extra : rebase_source : ea36d0f77dff76175dbc6d2a27cb0017e703e0bf
2017-11-01 17:30:04 +08:00
Jonathan Kew
0aa24e331c Bug 1412355 - Replace the mXOffset/mYOffset fields in DetailedGlyph records with a gfx::Point that stores glyph offsets in line-orientation-relative coordinates. r=jrmuizel 2017-10-30 14:55:42 +00:00
Sebastian Hengst
8968724f1a Backed out changeset 4905048de8d1 (bug 1412355) for frequently failing reftest layout/reftests/writing-mode/1248248-1-orientation-break-glyphrun.html on Linux x64 debug and asan. r=backout
--HG--
extra : amend_source : 61e56c97354c788bfd03aa551e911a1aff14006e
2017-10-28 16:39:59 +02:00
Jonathan Kew
8397a853b8 Bug 1412355 - Replace the mXOffset/mYOffset fields in DetailedGlyph records with a gfx::Point that stores glyph offsets in line-orientation-relative coordinates. r=jrmuizel 2017-10-28 11:37:35 +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
Jonathan Kew
793b63713b Bug 1408612 - patch 1 - Use single-precision floats more consistently for glyph position computations when drawing text. r=jrmuizel 2017-10-24 09:59:09 +01:00
Matt Woodrow ext:(%2C%20Miko%20Mynttinen%20%3Cmikokm%40gmail.com%3E%2C%20Timothy%20Nikkel%20%3Ctnikkel%40gmail.com%3E)
3fa03bb34e Bug 1404181 - Part 22: Make sure we mark frames as modified any time they change position or style data and make sure we don't accidentally mark the root as being modified when we don't need to. r=mstange
MozReview-Commit-ID: J5ov5cwvvrE

--HG--
extra : rebase_source : 4eadb82e5e0b3264cc7d6aeef2693ce8aea69b43
2017-09-29 10:51:49 +13:00
Boris Zbarsky
661d20b507 Bug 1409162. Make nsTableCellFrame::GetColIndex/GetRowIndex faster. r=mats 2017-10-17 15:39:36 -04:00
Daniel Holbert
8ee548e499 Bug 1373767 part 1: Always make nsMathMLmathBlockFrame a block formatting context. r=bz
(This makes it behave a bit more like a normal CSS block, and it ensures that
it can provide a float manager to its descendants.)

MozReview-Commit-ID: FmnQYjzD2eD

--HG--
extra : rebase_source : 6e02bff6786fe4e4146339908c5f2e1becd3a929
2017-07-13 15:34:20 -07:00
Nicholas Nethercote
d225f7151b Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro.
(Path is actually r=froydnj.)

Bug 1400459 devirtualized nsIAtom so that it is no longer a subclass of
nsISupports. This means that nsAtom is now a better name for it than nsIAtom.

MozReview-Commit-ID: 91U22X2NydP

--HG--
rename : xpcom/ds/nsIAtom.h => xpcom/ds/nsAtom.h
extra : rebase_source : ac3e904a21b8b48e74534fff964f1623ee937c67
2017-10-03 09:05:19 +11:00
Cameron McCormack
0b7960f23a Bug 1397626 - Part 3: Use SharedFontList to store font-family specified and computed values. r=xidorn
MozReview-Commit-ID: J3MNO2un2ov

--HG--
extra : rebase_source : 737943aea3d383669a7103d4e23f109889c09034
2017-10-03 12:27:45 +08:00
Ting-Yu Lin
2e869d8f3d Bug 1341009 - Add nsReflowStatus::IsEmpty() assertions to all nsIFrame::Reflow() methods and some reflow helpers, and remove unneeded Reset(). r=dholbert
nsReflowStatus::IsEmpty() assertions are added after DISPLAY_REFLOW in the
beginning of the Reflow().

A few Reflow() implementations have Reset() calls at the end which are left
in place by this patch (with an explanatory comment added to each). These
ending Reset()s are only needed for cases where a non-splittable frame
passes its own nsReflowStatus to a child's reflow method. Just in case the
child leaves a "not fully complete" value in the nsReflowStatus, the
non-splittable parent frame must clear out the nsReflowStatus before
returning, so that its own parent doesn't then try to split it.

MozReview-Commit-ID: 6Jj3jfMAqj4

--HG--
extra : rebase_source : e1fe6a775ad97e16a6d7cc224634ff962ccb0fbf
2017-09-13 18:00:25 +08:00
Miko Mynttinen
351756e478 Bug 1359584 - Part 3: Improve nsDisplayItem const correctness and fix surrounding whitespace r=mstange
MozReview-Commit-ID: 3GkWiu6C4Zo

--HG--
extra : rebase_source : 1423442cd723b8a052d183394dc5f5ef272a5272
2017-08-24 17:09:44 +02:00
Matt Woodrow
46694e7e28 Bug 1388614 - Make sure MathML display items are unique. r=karlt
FrameLayerBuilder requires the the (frame,per-frame-key) for each display item is unique. It only enforces this in certain situations though, so there's cases where we've gotten away without this.

Retained display lists introduces more situations where we rely on this, so I've found a few.

MathML nsDisplayNotation and nsDisplayMathMLBar are the two fixed by this patch.
2017-08-10 23:26:42 +12:00
Matt Woodrow
781ec6ffa1 Bug 1388162 - Add a Destroy function to nsDisplayItem to use instead of manually invoking the destructor, this will allow us to recycle them in the future. r=mstange
* * *
[mq]: fix

MozReview-Commit-ID: LUXZAIL73BJ
2017-08-07 16:07:43 +12:00
Matt Woodrow
40f5b92e3b Bug 1388161 - Store the dirty rect on the display list builder rather than passing it as a parameter to BuildDisplayList. r=mstange 2017-08-07 14:23:35 +12:00
Sebastian Hengst
8257b2d113 Backed out changeset 8f2dd8f13b53 (bug 1388161) for failing chrome's test_animation_performance_warning.html | preserve-3d transform. r=backout 2017-08-10 14:40:21 +02:00
Sebastian Hengst
7f85daeb2a Backed out changeset e9985564e081 (bug 1388162) for failing chrome's test_animation_performance_warning.html | preserve-3d transform. r=backout 2017-08-10 14:40:20 +02:00
Sebastian Hengst
d389170f49 Backed out changeset 6b2edbf5944a (bug 1388614) for failing chrome's test_animation_performance_warning.html | preserve-3d transform. r=backout 2017-08-10 14:40:09 +02:00
Matt Woodrow
f47c170811 Bug 1388614 - Make sure MathML display items are unique. r=karlt
FrameLayerBuilder requires the the (frame,per-frame-key) for each display item is unique. It only enforces this in certain situations though, so there's cases where we've gotten away without this.

Retained display lists introduces more situations where we rely on this, so I've found a few.

MathML nsDisplayNotation and nsDisplayMathMLBar are the two fixed by this patch.
2017-08-10 23:26:42 +12:00
Matt Woodrow
95f2e31f88 Bug 1388162 - Add a Destroy function to nsDisplayItem to use instead of manually invoking the destructor, this will allow us to recycle them in the future. r=mstange 2017-08-07 16:07:43 +12:00
Matt Woodrow
a3a130b6ff Bug 1388161 - Store the dirty rect on the display list builder rather than passing it as a parameter to BuildDisplayList. r=mstange 2017-08-07 14:23:35 +12:00
Emilio Cobos Álvarez
cfe31ad4cc Bug 1383634: Remove usage of GetParentAllowServo in mathml code. r=xidorn
MozReview-Commit-ID: JncrAto7T3K

--HG--
extra : rebase_source : 818e5bbf148f30b9a62eaa0c55528daf921eb01a
2017-07-24 10:11:41 +02:00
Wes Kocher
02de79cf14 Backed out changeset 14868b3c13e3 (bug 1373767) for android reftest failures in font-inflation-1.html a=backout CLOSED TREE
MozReview-Commit-ID: 5cpCdxuXNin

--HG--
extra : amend_source : a9a3f49d7d9414a4395f6d4d0d80aee7f578ceeb
2017-07-18 22:40:00 -07:00
Daniel Holbert
4aff74aee9 Bug 1373767: Always make nsMathMLmathBlockFrame a block formatting context. r=bz
(This makes it behave a bit more like a normal CSS block, and it ensures that
it can provide a float manager to its descendants.)

MozReview-Commit-ID: FmnQYjzD2eD

--HG--
extra : rebase_source : fe5bc96985b0e13a805b014653c422a83b27cfc0
2017-07-13 15:34:20 -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
Kartikaya Gupta
cad9534e69 Bug 1377090 - Turn gfxMatrix into a typedef for MatrixDouble. r=jrmuizel
Most of this patch is updating a few places that use gfxMatrix to use
the equivalent-but-differently-named functions on MatrixDouble:
- Translate/Rotate/Scale get turned into PreTranslate/PreRotate/PreScale
- Transform(Point) gets turned into TransformPoint(Point)
- gfxMatrix::TransformBounds(gfxRect) gets turned into
  gfxRect::TransformBoundsBy(gfxMatrix).
- gfxMatrix::Transform(gfxRect) gets turned into
  gfxRect::TransformBy(gfxMatrix).
The last two functions are added in this patch as convenience wrappers
to gfxRect instead of Matrix.h because we don't want Matrix.h to "know"
about gfxRect (to avoid adding gecko dependencies on Moz2D). Once we
turn gfxRect into a typedef for RectDouble these will be eliminated
anyway.

MozReview-Commit-ID: BnOjHzmOSKn

--HG--
extra : rebase_source : cf1692d1f0d44a4b05d684a66678739181a426d5
2017-07-05 11:18:49 -04:00
Emilio Cobos Álvarez
e98e65c4a2 Bug 1376158: Don't let non-primary frames affect the mIncrementScriptLevel of the content. r=xidorn
In the test-case we have a munderoverFrame setting the script-level of the
content through a frame which is an anonymous block, and another one setting the
script level to the opposite for the same content, via its primary frame.

That's somewhat silly, and with the previous patches the non-primary one
happened to be ignored because the IncrementScriptLevel flag was set on the fly.

The whole situation is somewhat silly, because as far as I can tell MathML tries
to map one frame to one element, and this doesn't hold. This patch makes the
behavior consistent and makes the test-case render as "invalid markup", which is
what should happen anyway.

MozReview-Commit-ID: 5ugxVwX3sMa

--HG--
extra : rebase_source : 8f4a50b3c484ad92c85a4ad53ce6bf7bb7e1d6ca
2017-06-25 21:26:49 +02:00
Florian Quèze
66f6d259bc Bug 1374282 - script generated patch to remove Task.jsm calls, r=Mossop. 2017-06-22 12:51:42 +02:00
Mats Palmgren
e96c22d711 Bug 1373095 - Devirtualize GetRowSpan/GetColSpan. r=bz
MozReview-Commit-ID: 7EUqrFMMe9c
2017-06-17 02:49:09 +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
Karl Tomlinson
b93dc1ac06 bug 1368607 remove unused nsCSSMapping r=dbaron
--HG--
extra : rebase_source : ff8c80ce33b9c2afe39b396c067fc40d23530f5d
2017-05-30 17:19:39 +12: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
Mats Palmgren
154f4890bf Bug 1362886 part 2 - Devirtualize the IsLeaf() method by doing an array lookup instead. r=jfkthame
MozReview-Commit-ID: 1zm9rFhRVZ3
2017-05-26 12:11:12 +02:00
Mats Palmgren
a254b64145 Bug 1364805 part 4 - Remove the now unused LayoutFrameType values from the ctors. r=jfkthame
MozReview-Commit-ID: 1RSDoc3pQXf
2017-05-26 12:11:11 +02:00
Mats Palmgren
1242172259 Bug 1364805 part 2 - Add a nsIFrame::mClass field and propagate the concrete class' value up the ctor chain. r=jfkthame
nsIFrame::mClass is of type enum class nsQueryFrame::ClassID which is
a strict subset of the nsQueryFrame::FrameIID values.  For a concrete
frame class, its FrameIID is the same numeric value as its ClassID.

MozReview-Commit-ID: 1N0AkCGo1ol
2017-05-26 12:11:11 +02:00
Mats Palmgren
ec6b1ef065 Bug 1364805 part 1 - Make every concrete frame class be a NS_DECL_QUERYFRAME_TARGET. r=jfkthame
MozReview-Commit-ID: Gy9gcEYupeY
2017-05-26 12:11:11 +02:00
Robert Longson
3cfb1c0b03 Bug 1361604 - initialise nsMathMLSelectedFrame members in constructor rather than ::Init r=mats 2017-05-13 08:29:42 +01:00
Frédéric Wang
cdc033857b Bug 1361647 - Coverity report: nsMathMLmtableFrame::nsMathMLmtableFrame(nsStyleContext *): A scalar field is not initialized by the constructor. r=karlt 2017-05-06 05:46:00 +02:00
Frédéric Wang
b46061f15e Bug 1361591 - Coverity report: nsMathMLmspaceFrame:nsMathMLmspaceFrame(nsStyleContext *): A scalar field is not initialized by the constructor. r=karlt 2017-05-06 05:47:00 +02:00
Frédéric Wang
e6565da7c1 Bug 1361590 - A scalar field is not initialized by the constructor. r=karlt 2017-05-06 05:47:00 +02:00
Frédéric Wang
d02b26d7b2 Bug 1361589 - Coverity report: nsMathMLmencloseFrame::mRuleThickness/mRadicalRuleThickness is not initialized in this constructor nor in any functions that it calls. r=karlt 2017-05-06 05:48:00 +02:00
Emilio Cobos Álvarez
e464dadceb Bug 1361766: Move MathML content state changes outside of reflow. r=xidorn
This also adds assertions to ensure attributes and state don't change during
layout or frame construction.

MozReview-Commit-ID: BANcpxnRsYS

--HG--
extra : rebase_source : 5d1bc424d3ed90fda3047d3c92c09251346b7bec
2017-05-02 22:42:26 +02:00
Jonathan Kew
4b5525bbf7 Bug 1362167 - Use strongly-typed enum classes instead of generic uint16_t fields for the gfxShapedText and gfxTextRun flags. r=jrmuizel 2017-05-04 22:27:05 +01:00
Jonathan Kew
6fc5313103 Bug 1362167 - Split gfxShapedText.mFlags into two 16-bit flags fields, and arrange storage more compactly to reduce size of gfxShapedWord and gfxTextRun objects. r=jrmuizel 2017-05-04 22:25:16 +01: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