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

639 Коммитов

Автор SHA1 Сообщение Дата
Daniel Holbert 8716bfc87d Bug 1494426 part 1: Use ReflowInput::AvailableSize() convenience method in a few more places. r=TYLin
This patch isn't expected to change behavior; it's just some simplification.

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

--HG--
extra : moz-landing-system : lando
2018-09-26 21:42:41 +00:00
Chris Peterson 2afd829d0f Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj
This patch is an automatic replacement of s/NS_NOTREACHED/MOZ_ASSERT_UNREACHABLE/. Reindenting long lines and whitespace fixups follow in patch 6b.

MozReview-Commit-ID: 5UQVHElSpCr

--HG--
extra : rebase_source : 4c1b2fc32b269342f07639266b64941e2270e9c4
extra : source : 907543f6eae716f23a6de52b1ffb1c82908d158a
2018-06-17 22:43:11 -07:00
Matt Woodrow 9c4d8fd626 Bug 1464928 - Invalidate border-collapse tables when we remove the border from a cell. r=mstange
MozReview-Commit-ID: 4LWdFJkr72v

--HG--
extra : rebase_source : 8f04a6ce75556b0036ea726e9aa174df4f10bc6d
2018-06-07 20:31:38 +12:00
Cameron McCormack 3cd117ed4f Bug 1466448 - Part 2: Remove unused ReflowOutput::mFlags. r=mats
--HG--
extra : rebase_source : 41f141ad1f9830c45a4a11cab825ea3d956051ea
2018-06-04 16:22:10 +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
Matt Woodrow 8eb6516c62 Bug 1443380 - Don't mark all descendant frames modified for display list building when invalidating a frame subtree since marking just the root is sufficient. r=miko 2018-04-04 16:15:49 +12: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
Mats Palmgren 60e745ae58 Bug 1424528 part 1 - Remove nsDidReflowStatus::FINISHED 3rd arg in DidReflow calls (automated change). r=dholbert
MozReview-Commit-ID: CiK7pV0OsGr
2017-12-14 16:21:49 +01:00
Ting-Yu Lin dfca359d6e Bug 1416699 - Add a space between #include and comment. r=jeremychen
Skip files under intl/icu/ because they're imported from third party.

DONTBUILD because this is a whitespace-only change.

MozReview-Commit-ID: GSd6oeFSTO7

--HG--
extra : rebase_source : 38c20bf6099c18b2fcb4c324d470b279addf8891
2017-11-13 17:54:18 +08:00
Mats Palmgren 770a2228d1 Bug 1414666 part 2 - A few formatting improvements after mass conversion of PresContext()->PresShell() to PresShell(). r=emilio
MozReview-Commit-ID: FoEnINS0Jbk
2017-11-09 03:00:48 +01: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 3e45fddd09 Bug 1362412 - Do not invalidate table cell's parent frame if it's not border collapse or there is no border. r=mattwoodrow
MozReview-Commit-ID: 5nTrJmMbm9d

--HG--
extra : rebase_source : 8ff459c52545c9a71c890f12d0cf015ce381c3bf
2017-11-07 13:47:13 +08: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
Matt Woodrow ext:(%2C%20Miko%20Mynttinen%20%3Cmikokm%40gmail.com%3E%2C%20Timothy%20Nikkel%20%3Ctnikkel%40gmail.com%3E) 31e9b3f8cd Bug 1404181 - Part 2: Track a 'visible' rect for display list building as well as the 'dirty' rect, so that we can do partial building by specifying a smaller 'dirty' rect. r=mstange
MozReview-Commit-ID: 7DUV9dl4zb1

--HG--
extra : rebase_source : e7bf5eacba44ce9cf77c55d623edef33a85f0492
2017-10-04 14:28:38 +13:00
Boris Zbarsky 661d20b507 Bug 1409162. Make nsTableCellFrame::GetColIndex/GetRowIndex faster. r=mats 2017-10-17 15:39:36 -04: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
Ya-Chieh Wu ce1be4b4eb Bug 895096 - Part 1: Round border-collapsed table borders to device pixels rather than CSS pixels, as for other borders, and store them (as BCPixelSize) as device pixels rather than CSS pixels. r=dbaron
MozReview-Commit-ID: 3yqj8gAAGYv
2017-09-12 19:48:00 -04: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
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
Ya-Chieh Wu f9aeb057f1 Bug 1370833 Part 1 - make less table invalidations for non-border-collapse tables. r=mattwoodrow
For the most part, I tried to make less *manual* table invalidations
for non-border-collapse tables and relied the table invalidations on
the comparison of the display items. By doing so, we can avoid the
over-painting issue.

MozReview-Commit-ID: 4w1DUKHXIFO

--HG--
extra : rebase_source : ac5e6de35a2b20318c70f8eed4375a5673ef6c31
2017-06-09 10:46:34 +08: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 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
Ehsan Akhgari 5e0d8b7dc6 Bug 1362880 follow-up: Bump up the reserved size to 32 2017-05-08 21:17:21 -04:00
Ehsan Akhgari 84a1f50b35 Bug 1362880 - Reserve storage for 10 RowInfo objects in nsTableRowGroupFrame::CalculateRowBSizes(); r=dbaron 2017-05-08 20:54:22 -04:00
Morris Tseng c09ed5d520 Bug 929484 - Remove nsTableBorderBackground displayitem and nsTablePainter. r=mstange
MozReview-Commit-ID: 1HmfGyBqWnf
2017-05-05 14:30:15 +08:00
Morris Tseng b16599bc8f Bug 929484 - Draw each table's background on their own display item. r=mstange
This patch do following things:
1. Create nsDisplayTableBorderCollapse that draws all collapse border of
table.
2. Don't use nsDisplayTableBorderBackground.
3. Let column and column group frame generate display items.
4. When traversing the table, also traverse the column and column group
frames.
5. For each type of table frame (col group, col, row group, row and
cell), draw their own background.

MozReview-Commit-ID: 1s2VLv6G8xi
2017-05-05 14:30:15 +08:00
Carsten "Tomcat" Book 9e9042963b Backed out changeset 93acd240b578 (bug 929484) for reftest failures in border-separate-opacity-table-column-group.html 2017-05-04 17:00:20 +02:00
Carsten "Tomcat" Book 44f55ecb9b Backed out changeset 3dc8c2aea9bf (bug 929484) 2017-05-04 16:59:59 +02:00
Morris Tseng 087ad6539a Bug 929484 - Remove nsTableBorderBackground displayitem and nsTablePainter. r=mstange
MozReview-Commit-ID: 1HmfGyBqWnf
2017-05-04 17:32:08 +08:00
Morris Tseng a1fbf1c8a6 Bug 929484 - Draw each table's background on their own display item. r=mstange
This patch do following things:
1. Create nsDisplayTableBorderCollapse that draws all collapse border of
table.
2. Don't use nsDisplayTableBorderBackground.
3. Let column and column group frame generate display items.
4. When traversing the table, also traverse the column and column group
frames.
5. For each type of table frame (col group, col, row group, row and
cell), draw their own background.

MozReview-Commit-ID: 1s2VLv6G8xi
2017-05-04 17:32:08 +08: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
Neerja Pancholi ee17cb9c09 Bug 1285874 - Maintain a map of removed table-rows and use it to lazily recalculate row indices. r=dbaron
MozReview-Commit-ID: Jt6QJTp0YGe
2017-03-02 15:09:30 -08:00
Ting-Yu Lin 8f840dc923 Bug 775624 Part 22 - Remove NS_FRAME_COMPLETE. r=dholbert
This patch is written by the following script with some manual adjustment to
the comment in nsRubyTextContainerFrame.cpp and nsRubyFrame.cpp, and
nsColumnSetFrame's constructor.

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

rename "nsReflowStatus *([a-zA-Z0-9]*) = NS_FRAME_COMPLETE" "nsReflowStatus \1"
rename "([a-zA-Z0-9.*]*) *= NS_FRAME_COMPLETE;" "\1.Reset();"
rename "([a-zA-Z0-9.*]*) == NS_FRAME_COMPLETE" "\1.IsEmpty()"

MozReview-Commit-ID: 9tqQAHvdQex

--HG--
extra : rebase_source : 3119776946dc2c8350098b7bf9f3ceff29bdffb5
2017-02-14 17:55:48 +08:00
Ting-Yu Lin f19bfc4b93 Bug 775624 Part 21 - Remove NS_FRAME_NOT_COMPLETE. r=dholbert
To preserve the semantics, Reset() is called to clear other bits in the
status prior to set the incomplete bit. Though some of them might not be
necessary.

MozReview-Commit-ID: InNDwcpp28A

--HG--
extra : rebase_source : 833e44a5dbb447d82c67f715cd5b0b2e97a5c62d
2017-02-14 17:30:56 +08:00
Ting-Yu Lin d5c6d28836 Bug 775624 Part 16 - Convert NS_INLINE_IS_BREAK_BEFORE to a method. r=dholbert
MozReview-Commit-ID: 8vxRpqbZNnk

--HG--
extra : rebase_source : 195e2da23d64da9e9a888968a45eaae2e6539585
2017-02-14 16:05:24 +08:00
Ting-Yu Lin 56ebb62910 Bug 775624 Part 12 - Add bit-fields for inline break status, and convert NS_INLINE_LINE_BREAK_BEFORE. r=dholbert
NS_INLINE_LINE_BREAK_BEFORE() was replaced by the help of the following script.

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

rename " = NS_INLINE_LINE_BREAK_BEFORE\(\);" ".SetInlineLineBreakBeforeAndReset();"

MozReview-Commit-ID: mz6L8zay7q

--HG--
extra : rebase_source : fddffa1288c7a52c7245aec0839a65f8d1d3f008
2017-02-14 11:52:53 +08:00
Ting-Yu Lin 14b6536193 Bug 775624 Part 7 - Remove NS_FRAME_SET_INCOMPLETE. r=dholbert
This patch is written by the help of the following script.

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

rename "NS_FRAME_SET_INCOMPLETE\(\*([a-zA-Z0-9.*]*)\)" "\1->SetIncomplete()"
rename "NS_FRAME_SET_INCOMPLETE\(([a-zA-Z0-9.*]*)\)" "\1.SetIncomplete()"

MozReview-Commit-ID: GOd4y2N6dcz

--HG--
extra : rebase_source : 185f5d6f5a3c8306761860c579eff10d931f3b35
2017-02-11 23:06:17 +08:00
Ting-Yu Lin f7a393e947 Bug 775624 Part 5 - Remove NS_FRAME_IS_COMPLETE. r=dholbert
This patch is written by the help of the following script.

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

rename "NS_FRAME_IS_COMPLETE\(([a-zA-Z0-9.*]*)\)" "\1.IsComplete()"

MozReview-Commit-ID: GOd4y2N6dcz

--HG--
extra : rebase_source : aa8b11d3a756c9e7c521e6ffd70713af0174bd98
2017-02-11 22:45:07 +08:00
Ting-Yu Lin 99ebdf6cf3 Bug 775624 Part 4 - Remove NS_FRAME_IS_FULLY_COMPLETE. r=dholbert
This patch is written by the help of the following script.

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

rename "NS_FRAME_IS_FULLY_COMPLETE\(([a-zA-Z0-9.*]*)\)" "\1.IsFullyComplete()"

MozReview-Commit-ID: GOd4y2N6dcz

--HG--
extra : rebase_source : 200639e836cebe26fd77cde21f478fd027e1725f
2017-02-11 22:38:48 +08:00
Ting-Yu Lin b31150930a Bug 775624 Part 3 - Remove NS_FRAME_IS_NOT_COMPLETE. r=dholbert
This patch is written by the help of the following script.

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

rename "NS_FRAME_IS_NOT_COMPLETE\(([a-zA-Z0-9.*]*)\)" "\1.IsIncomplete()"

MozReview-Commit-ID: GOd4y2N6dcz

--HG--
extra : rebase_source : 412b60e7954118d8443ebf2a786046d7cd38c516
2017-02-11 22:17:26 +08:00
Ting-Yu Lin 9c347956ae Bug 775624 Part 1 - Convert nsReflowStatus to a class mimicking uint32_t. r=dholbert
Lay down the foundation for this refactor work so that nsReflowStatus could
be converted to bit-fields piece by piece, and each patch can be built (but
may not pass tests).

This change causes some build warnings, due to some debug logs printing
nsReflowStatus as an integer, but that will be fixed by Part 24 later.

All the operators related to uint32_t will be removed at the end of this
patch series by Part 23.

The yoda conditions are swapped in order to build successfully.

DisplayReflowExit() incorrectly declares aStatus as uint32_t. Change it to
const reference because nsReflowStatus is now a class.

MozReview-Commit-ID: 5DOpaP85ywJ

--HG--
extra : rebase_source : 53ca0750b5f764fcbf7ba2d00c9ec606aed704c2
2017-02-10 17:29:10 +08:00
Mats Palmgren 562b840a02 Bug 1312379 part 3 - [css-align][css-tables] Add methods for CSS Alignment first/last baseline of the table container. r=dholbert 2016-12-20 23:56:35 +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
Ravi Shankar 149cb6c819 Bug 1297982 - Replace NS_STYLE_BOX_DECORATION_BREAK_* with enum class; r=xidorn
MozReview-Commit-ID: 9Cli68UpKdz

--HG--
extra : rebase_source : aa43e54c5e5501cbfee29437c5fcfc0216823bd8
2016-08-26 12:44:32 +05:30
Ting-Yu Lin d77152fcd0 Bug 1277129 Part 7c - Rename various RS variables to RI. r=dbaron
This patch is generated by the following script:

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

rename aChildRS aChildRI
rename aContainingBlockRS aContainingBlockRI
rename aFrameRS aFrameRI
rename aLastRS aLastRI
rename aOuterRS aOuterRI
rename aRS aRI
rename blockHtmlRS blockHtmlRI
rename captionRS captionRI
rename cellRS cellRI
rename childRS childRI
rename firstAncestorRS firstAncestorRI
rename flexContainerRS flexContainerRI
rename gridRS gridRI
rename innerRS innerRI
rename lastButOneRS lastButOneRI
rename LineContainerRS LineContainerRI
rename mBlockRS mBlockRI
rename parentRS parentRI
rename secondAncestorRS secondAncestorRI
rename lastRSSize lastRISize
rename lastRSPadding lastRIPadding

MozReview-Commit-ID: YEgZs3WMow

--HG--
extra : rebase_source : c26050c71a3a5b13ef46e6d3582e581702d49ee8
2016-07-21 18:36:39 +08:00