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

126 Коммитов

Автор SHA1 Сообщение Дата
Matt Woodrow 1a07a450f8 Bug 1344971 - Part 3: Don't compute a region for nsDisplayBorder when we only want a rect. r=mstange 2017-03-07 14:07:33 +13:00
Miko Mynttinen 2fc0722497 Bug 1425078 - Remove nsDisplayList::AppendNewToTop and nsDisplayList::AppendNewToBottom r=mattwoodrow
MozReview-Commit-ID: E3neKT2sV4Q

--HG--
extra : rebase_source : 98b65e4c82f8a965df211e828bc68d46e7a6716e
2017-12-13 11:23:04 -06:00
Samathy Barratt d8ba79a56b Bug 1351447 - Rename imagelib's DrawResult to ImgDrawResult r+tnikkel r=tnikkel
Renamed to imgDrawResult

MozReview-Commit-ID: 5ESSgIhhU41

--HG--
rename : image/DrawResult.h => image/ImgDrawResult.h
extra : rebase_source : dbf645574aff7eefe65fa81809d6c07cb5800ec6
2017-12-11 15:37:59 +00:00
Ciure Andrei b8d4330b53 Backed out changeset 8e33d0ce108c (bug 1351447) for failing /builds/worker/workspace/build/src/widget/cocoa/nsCocoaUtils on OS X r=backout a=backout on a CLOSED TREE
--HG--
rename : image/ImgDrawResult.h => image/DrawResult.h
2017-12-12 09:49:59 +02:00
Samathy Barratt 0749baf2d8 Bug 1351447 - Rename imagelib's DrawResult to ImgDrawResult r=tnikkel
Renamed to imgDrawResult

MozReview-Commit-ID: 5ESSgIhhU41

--HG--
rename : image/DrawResult.h => image/ImgDrawResult.h
extra : rebase_source : 4fba109b84ef456126d50e0d5e525f29f944a46d
2017-12-11 15:37:59 +00:00
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
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
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
Boris Zbarsky 661d20b507 Bug 1409162. Make nsTableCellFrame::GetColIndex/GetRowIndex faster. r=mats 2017-10-17 15:39:36 -04: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
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
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
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
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 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
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
L. David Baron f56a065e7d Bug 1353187 - Give frame properties the const-ness semantics of member variables. r=dholbert
This makes it so that, given a |const nsIFrame*|, a caller can retrieve
properties but not set or remove them, but with an |nsIFrame*| all
operations are allowed.  I believe this is sensible since properties act
as extended member variables for things that are needed rarely, and
these are the const-ness semantics of member variables.

This also avoids the need for const_cast<nsIFrame*> to cast away const
in the following patch, which guards property access with a frame state
bit.

MozReview-Commit-ID: IJ9JnGzdH51

--HG--
extra : transplant_source : %D4%DF%04%91_q%E6%CF%B3N%82%2C%A5%CB0%3A%B6%810%ED
2017-04-04 20:59:21 -07:00
Carsten "Tomcat" Book 358125cbde Backed out changeset a86c4218ca5f (bug 1353187) 2017-04-04 09:54:51 +02:00
L. David Baron c2af2e1613 Bug 1353187 - Give frame properties the const-ness semantics of member variables. r=dholbert
This makes it so that, given a |const nsIFrame*|, a caller can retrieve
properties but not set or remove them, but with an |nsIFrame*| all
operations are allowed.  I believe this is sensible since properties act
as extended member variables for things that are needed rarely, and
these are the const-ness semantics of member variables.

This also avoids the need for const_cast<nsIFrame*> to cast away const
in the following patch, which guards property access with a frame state
bit.

MozReview-Commit-ID: IJ9JnGzdH51

--HG--
extra : transplant_source : %91%D6%C7%01hC%B3z%90%B6%93%93qcAK%CB%09%D6z
2017-04-03 20:43:30 -07:00
Cameron McCormack f63cdecde2 Bug 1297899 - Part 6: Move RestyleManagerHandle functionality into RestyleManager. r=bholley
MozReview-Commit-ID: 7lsti0bGzNr

--HG--
extra : rebase_source : 13c64026190afe5de25f540adb6deea9f518149f
2017-02-13 11:21:33 +08:00
Mats Palmgren f8383bac25 Bug 1324072 - Use the frame's BStart, not rect's (fixes typo from bug 789096). r=jfkthame 2016-12-19 16:48:36 +01:00
Matt Woodrow ce997d1ff2 Bug 1319626 - Part 5: Minimize visible region for border layers. r=mstange
--HG--
extra : rebase_source : 49d82764cd1d2f4ef4cf44b705889754bb081f8b
2016-11-24 18:11:30 +13:00
Carsten "Tomcat" Book fc781d5a09 Backed out changeset 5e4dbaca50ef (bug 1319626) 2016-11-24 17:02:24 +01:00
Carsten "Tomcat" Book 61849e269d merge mozilla-inbound to mozilla-central a=merge 2016-11-24 16:41:59 +01:00
Matt Woodrow 5e1a7b14aa Bug 1319626 - Part 5: Minimize visible region for border layers. r=mstange 2016-11-24 18:11:30 +13:00
Ting-Yu Lin 754b6c9659 Bug 1317588 Part 3 - Remove #define NS_SIDE_TOP/RIGHT/BOTTOM/LEFT. r=mats
This patch was written with the help of the following script. Also, manually
add mozilla qualifier to the enum values in nsStyleCoord.h, gfxRect.h, and
Types.h to make it build.

function rename() {
find .\
     -type f\
     ! -path "./obj*"\
     ! -path "./.git"\
     ! -path "./.hg"\
     \( -name "*.cpp" -or\
        -name "*.h" \)\
        -exec sed -i -e "s/$1/$2/g" "{}" \;
}

rename "NS_SIDE_TOP" "eSideTop"
rename "NS_SIDE_RIGHT" "eSideRight"
rename "NS_SIDE_BOTTOM" "eSideBottom"
rename "NS_SIDE_LEFT" "eSideLeft"

MozReview-Commit-ID: 9T0ORsqM6nP

--HG--
extra : rebase_source : 884ad96104c6e9cf6c8b3145d2d3a071ecccfe6a
2016-11-18 18:12:25 +08:00
Vincent Lequertier 15d1386c74 Bug 1312155 - Move border-width constants out of nsPresContext; r=heycam 2016-11-16 10:11:00 +01:00
Emilio Cobos Álvarez 619cb14d87 Bug 1299066: Make NS_STYLE_DISPLAY_* an enum class. Prefer indexing instead of linear search in the frame constructor r=heycam,bz
The main renaming was generated with the following python script:

```

import sys
import re

CAMEL_CASE_REGEX = re.compile(r"(^|_|-)([A-Z])([A-Z]+)")
DISPLAY_REGEX = re.compile(r"\bNS_STYLE_DISPLAY_([^M][A-Z_]+)\b")

def to_camel_case(ident):
  return re.sub(CAMEL_CASE_REGEX,
                lambda m: m.group(2) + m.group(3).lower(), ident)

def constant_to_enum(constant):
  return "StyleDisplay::" + to_camel_case(constant) + ("_" if constant == "NONE" else "")

def process_line(line):
  return re.sub(DISPLAY_REGEX,
                lambda m: constant_to_enum(m.group(1)), line)

lines = []
with open(sys.argv[1], "r") as f:
  for line in f:
    lines.append(process_line(line))

with open(sys.argv[1], "w") as f:
  for line in lines:
    f.write(line)
```

And the following shell commands:

```
find . -name '*.cpp' -exec python display.py {} \;
find . -name '*.h' -exec python display.py {} \;
```

MozReview-Commit-ID: 91xYCbLC2Vf
2016-09-01 20:41:17 -07:00
Ting-Yu Lin 40fcd21b9a Bug 1277129 Part 7b - Rename various ReflowState variables to ReflowInput. r=dbaron
This patch is generated by the following script:

function rename() {
find .\
     -type f\
     ! -path "./obj*"\
     ! -path "./.git"\
     ! -path "./.hg"\
     \( -name "*.cpp" -or\
        -name "*.h" \)\
        -exec sed -i -r "s/$1/$2/g" "{}" \;
}

rename "([[:alpha:]]*)([rR])eflowState(s?)" "\1\2eflowInput\3"

MozReview-Commit-ID: ITFO7uMTkSb

--HG--
extra : rebase_source : c91a2e174a0baec60c1b0111ac7636295004ab35
2016-07-21 18:36:39 +08:00
Ting-Yu Lin 55cde36029 Bug 1277129 Part 6b - Rename rendContext to mRenderingContext in SizeComputationInput. r=dbaron
MozReview-Commit-ID: LczLJDtDncy

--HG--
extra : rebase_source : c32e928ae25f94305fb907db89278dce7304a903
2016-07-21 18:36:38 +08:00
Ting-Yu Lin 4053c4c028 Bug 1277129 Part 5c - Rename nsHTMLReflowMetrics to ReflowOutput. r=dbaron
This patch is generated by the following script:

function rename() {
find .\
     -type f\
     ! -path "./obj*"\
     ! -path "./.git"\
     ! -path "./.hg"\
     \( -name "*.cpp" -or\
        -name "*.h" \)\
        -exec sed -i -e "s/$1/$2/g" "{}" \;
}

rename "nsHTMLReflowMetrics" "ReflowOutput"

MozReview-Commit-ID: 2HBb7DkooH5

--HG--
extra : rebase_source : acfa442a6483772fcb5748dc6f5e7072e599032a
2016-07-21 18:36:38 +08:00
Ting-Yu Lin 820f88de49 Bug 1277129 Part 1c - Rename nsHTMLReflowState to ReflowInput. r=dbaron
This patch is generated by the following script:

function rename() {
find .\
     -type f\
     ! -path "./obj*"\
     ! -path "./.git"\
     ! -path "./.hg"\
     \( -name "*.cpp" -or\
        -name "*.h" \)\
        -exec sed -i -e "s/$1/$2/g" "{}" \;
}

rename nsHTMLReflowState ReflowInput

MozReview-Commit-ID: 9r9vdVv1pXc

--HG--
extra : rebase_source : 623ec822996ba0ea0058dd137acf5a658cdea04a
2016-07-21 18:36:35 +08:00
Astley Chen 4caee4596d Bug 1277131 : Part 2 - rename nsMathMLmtableOuterFrame to nsMathMLmtableWrapperFrame. r=heycam
MozReview-Commit-ID: EylH72aitOj

--HG--
extra : rebase_source : 4261f2f2f4fef4cf3aaf99bcadb6dfeff9dcbad4
2016-06-16 13:14:50 +01:00
Astley Chen 1fcb0ee95d Bug 1277131 : Part 1 - rename nsTableOuterFrame to nsTableWrapperFrame. r=heycam
MozReview-Commit-ID: KrSHLbmovTM

--HG--
rename : layout/tables/nsTableOuterFrame.cpp => layout/tables/nsTableWrapperFrame.cpp
rename : layout/tables/nsTableOuterFrame.h => layout/tables/nsTableWrapperFrame.h
extra : rebase_source : 730a73b8439f1f5c5ccdb32b241deda5224c321c
2016-06-16 13:14:08 +01:00
Xidorn Quan 60bcaa5c0b Bug 1257121 part 4 - Use return value rather than out param to return font metrics. r=jfkthame
MozReview-Commit-ID: 6xrHYbgHGVd

--HG--
extra : rebase_source : 4d0cea24689588d8a1daa1869502e31ac7c3dc56
2016-03-17 13:55:48 +08:00
Xidorn Quan 8acf32453c Bug 1257121 part 3 - Add GetInflatedFontMetricsForFrame function to simplify a common use pattern. r=jfkthame
MozReview-Commit-ID: 4KMLCz6wQHQ

--HG--
extra : rebase_source : 08964aef3b335163985dd6818b4a6ae3a4e34fce
2016-03-17 12:07:47 +08:00
Cameron McCormack 89cac5abd1 Bug 1248864 - Part 3: Use RestyleManagerHandle instead of concrete restyle manager class. r=dholbert 2016-02-24 18:01:12 +11:00
Cameron McCormack 736a5f47e7 Bug 1248864 - Part 1: Move RestyleManager.h to EXPORTS.mozilla. r=dholbert 2016-02-24 18:01:12 +11:00
Bogdan Postelnicu 77718e8be6 Bug 1246106 - pass aStyleBorder as reference to ComputeBorderOverflow. r=mats 2016-02-08 03:32:00 +01:00
Ting-Yu Lin 2d02ad0652 Bug 1227927 Part 3 - Use ranged-based for-loop to rewrite some simple loops in part 2. r=mats
--HG--
extra : commitid : CcdpGdlMNIk
extra : rebase_source : 9c184cb8107bf6276c237d03d240f8755fd61553
2016-01-29 22:42:15 +08:00
Ting-Yu Lin 1889f6bc41 Bug 1227927 Part 2 - Remove nsIFrame::GetFirstPrincipalChild(). r=mats
--HG--
extra : commitid : 5qtaK1nS8RC
extra : rebase_source : dcc98f423b2446269beb6fa6a9d092ae8213f38e
2016-01-29 22:42:14 +08:00
Xidorn Quan e397870be2 Bug 1230034 part 5 - Convert all frame properties which use DeleteValue and ReleaseValue as destructor to be typesafe. r=dbaron
By changing signature of those two functions, we make compiler complain about
all their existing uses, so we can find all of them and convert them.

Some of the callsites of Get() with those properties are also converted, but not
all of them. It is fine because if there is any incorrect conversion, compilers
is able to find out now. So they are completely typesafe.

--HG--
extra : source : 808415985d3d446f18941eb007a9be9d69d180ce
2016-01-28 14:23:59 +11:00
Xidorn Quan 6ad1442a53 Bug 1230034 part 4 - Make FramePropertyDescriptor to be a template. r=froydnj,dbaron
This patch makes methods of FramePropertyTable and FrameProperties to be
simple template wrapper functions. Then it converts all references to
FramePropertyDescriptor to use "void" parameter to simulate the current
unsafe behavior.

SmallValueHolder is used for storing small values like int32_t, float,
which can fit in the size of a pointer directly, and thus no lifetime
management is needed.

--HG--
extra : source : 88b2723cddf119d73d8a442d8238b50406e9d604
2016-01-28 14:23:59 +11:00
Mats Palmgren 8336eb31ab Bug 1241840 - Set table cell colspan=0 to 1 instead per the HTML spec. r=bz 2016-01-27 17:02:12 +01:00
Nicholas Nethercote 06e901cb9f Bug 1231550 - Use DrawTarget instead of gfxContext and/or nsRenderingContext in many places in font/text code. r=jfkthame.
AutoTextRun now only needs a DrawTarget instead of an nsRenderingContext, and
similar nsRenderingContext/gfxContext-to-DrawTarget replacements can be
propagated a long way up the call graph. This patch replaces 93 occurrences of
nsRenderingContext and 135 occurrences of gfxContext with DrawTarget; that's
13% of them.

The patch is mostly plumbing changes. A couple of not-entirely-plumbing
changes:

- It adds a comment about the null check in
  gfxGlyphExtents::GetTightGlyphExtentsAppUnits().

- A couple of functions simply had an unused gfxContext or nsRenderingContext
  parameter removed, e.g. SetLineBreaks().

--HG--
extra : rebase_source : 8f56994bb4d254a86788b17ab2864ebc758a7e6b
2015-12-15 13:56:41 -08:00
Nicholas Nethercote 16cd9db041 Bug 1230863 - Remove unused nsPresContext args from many functions. r=roc. 2015-12-06 17:15:53 -08:00