Commit Graph

2816 Commits

Author SHA1 Message Date
Simon Giesecke
82dc9b2271 Bug 1642949 - Replace uses of RemoveElementAt by RemoveLastElement/PopLastElement where possible. r=necko-reviewers,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D78027
2020-06-10 10:46:14 +00:00
Emilio Cobos Álvarez
e8caef7a14 Bug 477157 - Ceil border and outline widths to 1 dev px at computed value time, but don't floor others to dev pixels until paint time. r=mats,dbaron
This seems to match what other browsers do, and seems saner layout-wise,
at least.

I only annotated outline-width-interpolation.html because it's already
fixed upstream in:

  8a489657bc

Differential Revision: https://phabricator.services.mozilla.com/D75360
2020-06-10 10:44:32 +00:00
Butkovits Atila
e3dce68834 Backed out 3 changesets (bug 1643289, bug 1642949) for causing failure at test_headless_screenshot.html. CLOSED TREE
Backed out changeset 98c420f73380 (bug 1643289)
Backed out changeset 9447ea8910aa (bug 1643289)
Backed out changeset 0c827da9d847 (bug 1642949)
2020-06-10 10:07:23 +03:00
Simon Giesecke
d419f0ff08 Bug 1642949 - Replace uses of RemoveElementAt by RemoveLastElement/PopLastElement where possible. r=necko-reviewers,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D78027
2020-06-10 05:49:28 +00:00
Ting-Yu Lin
e21e57fd94 Bug 1626129 - Apply skip sides for nsTableCellFrame's border and padding, and use it to calculate available space to reflow children. r=dbaron
Before this patch, nsTableCellFrame never skips border and padding. If
it needs to be broken into multiple fragments, its children don't have a
correct available space to reflow. (A side effect of this is that
nsTableCellFrame renders correctly if it has
box-decoration-break:clone.)

table-nested-1308876-1-ref.html is modified to reflect the rendering
after applying this patch, which isn't necessarily correct (based on the
file's comment).

Differential Revision: https://phabricator.services.mozilla.com/D71096
2020-05-18 00:47:05 +00:00
Narcis Beleuzu
c566b70954 Backed out 2 changesets (bug 1626129) reftest failure on table-nested-1308876-1.xhtml . CLOSED TREE
Backed out changeset f0e5f7503048 (bug 1626129)
Backed out changeset 3fdea5ae7d2a (bug 1626129)
2020-05-16 09:08:03 +03:00
Ting-Yu Lin
adee74c5ca Bug 1626129 - Apply skip sides for nsTableCellFrame's border and padding, and use it to calculate available space to reflow children. r=dbaron
Before this patch, nsTableCellFrame never skips border and padding. If
it needs to be broken into multiple fragments, its children don't have a
correct available space to reflow. (A side effect of this is that
nsTableCellFrame renders correctly if it has
box-decoration-break:clone.)

table-nested-1308876-1-ref.html is modified to reflect the rendering
after applying this patch, which isn't necessarily correct (based on the
file's comment).

Differential Revision: https://phabricator.services.mozilla.com/D71096
2020-05-16 00:39:58 +00:00
Mirko Brodesser
9b384325c1 Bug 1633448: part 2) Rename nsFrameSelection::GetTableCellSelection to IsInTableSelectionMode. r=smaug
Depends on D72688

Differential Revision: https://phabricator.services.mozilla.com/D72689
2020-04-27 19:34:53 +00:00
Simon Giesecke
2d8c4390b7 Bug 1628715 - Part 15: Replace MOZ_NONNULL_RETURN by returning NotNull<elem_type*>. r=xpcom-reviewers,necko-reviewers,dragana,nika
Differential Revision: https://phabricator.services.mozilla.com/D71300
2020-04-24 13:35:27 +00:00
Simon Giesecke
191a830575 Bug 1628715 - Part 7: Add MOZ_NONNULL_RETURN to infallible nsTArray::AppendElements. r=xpcom-reviewers,necko-reviewers,nika,valentin
Differential Revision: https://phabricator.services.mozilla.com/D70831
2020-04-24 13:31:14 +00:00
L. David Baron
b4556207cc Bug 1631941 - Add DEBUG-only mWritingMode to mozilla::LogicalSides. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D71885
2020-04-22 23:52:08 +00:00
Stefan Hindli
ed13e122ee Backed out 3 changesets (bug 1631941) for mass build bustages CLOSED TREE
Backed out changeset 8a7e21f2b5f9 (bug 1631941)
Backed out changeset 6a53d6f1ec95 (bug 1631941)
Backed out changeset 91ac0b7e571b (bug 1631941)
2020-04-23 02:14:30 +03:00
L. David Baron
129af7be9b Bug 1631941 - Add DEBUG-only mWritingMode to mozilla::LogicalSides. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D71885
2020-04-22 17:54:28 +00:00
Stefan Hindli
145ea7c2cf Backed out 3 changesets (bug 1631941) for causing valgrind bustages in /builds/worker/workspace/obj-build/dist/include/mozilla/WritingModes CLOSED TREE
Backed out changeset 17391a8c2a05 (bug 1631941)
Backed out changeset b0b425ffb6e9 (bug 1631941)
Backed out changeset f4c1d7dcca50 (bug 1631941)
2020-04-22 20:13:06 +03:00
L. David Baron
304574d922 Bug 1631941 - Add DEBUG-only mWritingMode to mozilla::LogicalSides. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D71885
2020-04-22 15:55:54 +00:00
Mirko Brodesser
9d47d3f4c6 Bug 1626665: part 11) Declare nsILineIterator::GetNumLines const. r=hsivonen
Depends on D70015

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

--HG--
extra : moz-landing-system : lando
2020-04-08 06:57:07 +00:00
Mirko Brodesser
b872cdb707 Bug 1626665: part 10) Declare nsILineIterator::FindFrameAt const. r=hsivonen
Depends on D70014

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

--HG--
extra : moz-landing-system : lando
2020-04-08 06:57:00 +00:00
Mirko Brodesser
177f4f9fb2 Bug 1626665: part 9) Declare more methods around nsTable* const. r=hsivonen
Depends on D70013

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

--HG--
extra : moz-landing-system : lando
2020-04-08 06:56:57 +00:00
Mirko Brodesser
68794c6bc5 Bug 1626665: part 8) Declare nsLineIterator::GetNextSiblingOnLine const. r=hsivonen
Depends on D70012

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

--HG--
extra : moz-landing-system : lando
2020-04-08 06:55:41 +00:00
Mirko Brodesser
6533647d1c Bug 1626665: part 7) Declare nsILineIterator::GetLine const. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D70012

--HG--
extra : moz-landing-system : lando
2020-04-08 06:50:57 +00:00
Mirko Brodesser
1a8fa110c7 Bug 1623858: part 7) Rename and simplify nsFrame::DisplaySelection. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D67807

--HG--
extra : moz-landing-system : lando
2020-03-24 09:16:53 +00:00
Simon Giesecke
8aa47bcfb7 Bug 1613985 - Use default for equivalent-to-default constructors/destructors in layout. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D66016

--HG--
extra : moz-landing-system : lando
2020-03-17 09:38:32 +00:00
Atharva Raykar
85d0d3cca9 Bug 1622673 - Converting integer literal to bool literal. r=dbaron
Differential Revision: https://phabricator.services.mozilla.com/D66960

--HG--
extra : moz-landing-system : lando
2020-03-16 21:48:12 +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
Andrew Osmond
91b071ed14 Bug 1618345 - Enforce proper color management by splitting gfx::Color into sRGBColor and DeviceColor types. r=jrmuizel
gfx::Color is currently misused in many places. The DrawTargets expect
the color space to be in device space, e.g. what we are actually going
to draw using. Everything sitting above generally deals with sRGB, as
specified in CSS. Sometimes we missed the conversion from sRGB to device
space when issuing draw calls, and similarly sometimes we converted the
color to device space twice.

This patch splits the type in two. sRGBColor and DeviceColor now
represent sRGB and device color spaces respectively. DrawTarget only
accepts DeviceColor, and one can get a DeviceColor from an sRGBColor via
the ToDeviceColor helper API. The reftests now pass with color
management enabled for everything (e.g. CSS) instead of just tagged
raster images.

There will be a follow up patch to enable color management everywhere by
default on all supported platforms.

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

--HG--
extra : moz-landing-system : lando
2020-03-09 14:16:17 +00:00
Mark Banner
15cfe23b88 Bug 1620542 - Automatically fix ESLint errors in .eslintrc.js files. r=mossop
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2020-03-07 10:09:44 +00:00
Alex Henrie
6b0d1e9459 Bug 1619041 - Avoid unnecessary operations in nsCellMap::HasMoreThanOneCell. r=dbaron
Differential Revision: https://phabricator.services.mozilla.com/D64856

--HG--
extra : moz-landing-system : lando
2020-02-29 19:42:16 +00:00
Alex Henrie
e137b3a593 Bug 1618085 - Avoid calling Get(Row|Col)Span unnecessarily in nsCellMap::RemoveCell. r=dbaron
Differential Revision: https://phabricator.services.mozilla.com/D64280

--HG--
extra : moz-landing-system : lando
2020-02-27 20:26:30 +00:00
Emilio Cobos Álvarez
bc8a8f5439 Bug 1492315 - Subtract table grid item margins correctly. r=mats
Differential Revision: https://phabricator.services.mozilla.com/D63762

--HG--
extra : moz-landing-system : lando
2020-02-24 21:56:02 +00:00
Sylvestre Ledru
ca6530131a Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan,kvark
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2020-02-24 15:33:38 +00:00
Simon Giesecke
9350e6b741 Bug 1613985 - Use MOZ_COUNTED_DEFAULT_CTOR_*/MOZ_COUNTED_DTOR_* macros. r=froydnj
This removes the need for explicit #ifdef NS_BUILD_REFCNT_LOGGING without
introducing user-defined destructors when it is not defined.

Also, some uses of virtual for declaring destructors are replaced by the
appropriate override declaration through these changes.

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

--HG--
extra : moz-landing-system : lando
2020-02-20 11:40:14 +00:00
Dorel Luca
d5f9df8ee1 Backed out 2 changesets (bug 1613985) for Build bustage on Windows2012. CLOSED TREE
Backed out changeset fd177b40b561 (bug 1613985)
Backed out changeset fb6d62b7f28d (bug 1613985)
2020-02-19 22:22:41 +02:00
Simon Giesecke
59b23375c0 Bug 1613985 - Use MOZ_COUNTED_DEFAULT_CTOR_*/MOZ_COUNTED_DTOR_* macros. r=froydnj
This removes the need for explicit #ifdef NS_BUILD_REFCNT_LOGGING without
introducing user-defined destructors when it is not defined.

Also, some uses of virtual for declaring destructors are replaced by the
appropriate override declaration through these changes.

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

--HG--
extra : moz-landing-system : lando
2020-02-19 18:05:38 +00:00
Alex Henrie
631136f3b0 Bug 1613834 - Remove redundant check from nsTableCellMap::RemoveColsAtEnd. r=dbaron
Differential Revision: https://phabricator.services.mozilla.com/D61962

--HG--
extra : moz-landing-system : lando
2020-02-08 06:29:28 +00:00
Emilio Cobos Álvarez
c5c0ef9787 Bug 1613349 - Rename nsIFrame::DeleteProperty to RemoveProperty. r=dholbert
As it doesn't necessarily call delete and that may be confusing.

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

--HG--
extra : moz-landing-system : lando
2020-02-06 16:06:49 +00:00
Daniel Holbert
bf616e9f11 Bug 1613198: Move inline impls for nsIFrame::GetNormalPosition and GetLogicalNormalPosition into nsIFrameInlines.h. r=jfkthame
Also, add an nsIFrameInlines.h include to all .cpp files who call these APIs
and who don't yet have an include for this header.

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

--HG--
extra : moz-landing-system : lando
2020-02-05 09:52:35 +00:00
Ting-Yu Lin
c81d3e5f5f Bug 1610670 - Add AllPhysicalSides() to support range-based for loops. r=mats
This patch is generated via:
1. Manually modify gfx/2d/Types.h
2. Run the following script and clang-format.

```

function rename() {
    echo "Renaming $1 to $2"
    rg -l "$1" | xargs sed -i -E -e s/"$1"/"$2"/g
}

rename "NS_FOR_CSS_SIDES\(side\)" "for (const auto side : mozilla::AllPhysicalSides())"
rename "NS_FOR_CSS_SIDES\(s\)" "for (const auto s : mozilla::AllPhysicalSides())"
rename "NS_FOR_CSS_SIDES\(i\)" "for (const auto i : mozilla::AllPhysicalSides())"
rename "NS_FOR_CSS_SIDES\(ix\)" "for (const auto ix : mozilla::AllPhysicalSides())"
```

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

--HG--
extra : moz-landing-system : lando
2020-02-04 03:28:27 +00:00
Thomas Dolezal
bfd4477a13 Bug 1612146 - Converting empty-cells defines into enum class. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D61398

--HG--
extra : moz-landing-system : lando
2020-02-01 21:43:31 +00:00
Thomas Dolezal
28e6a65cfb Bug 1612143 - Replacing table-layout defines with an enum r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D61260

--HG--
extra : moz-landing-system : lando
2020-01-31 01:23:23 +00:00
Emilio Cobos Álvarez
4812f9408a Bug 1611583 - Use cbindgen for css-align types. r=dholbert
This provides stronger typing and removes a bunch of subtle constants matching.

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

--HG--
extra : moz-landing-system : lando
2020-01-31 00:56:49 +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
Mats Palmgren
02656fc8cd Bug 1607045 - Look in all table continuations for the original header/footer of a repeated header/footer. r=TYLin
Differential Revision: https://phabricator.services.mozilla.com/D60553

--HG--
extra : moz-landing-system : lando
2020-01-23 15:51:22 +00:00
Emilio Cobos Álvarez
5cd5e6f148 Bug 1609996 - Remove mozilla::Swap in favor of std::swap. r=froydnj
Now mfbt/Move.h is empty except for that excellent comment about move
semantics... Should we put it somewhere else and delete the header as a
follow-up? Or just delete the header and carry on?

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

--HG--
extra : moz-landing-system : lando
2020-01-20 16:17:06 +00:00
Ting-Yu Lin
ddba50ad62 Bug 1308636 Part 2 - Convert CSSOM usages of moz-prefixed column properties in tests. r=dbaron
This patch was generated by the following shell script.

```
function remove_column_prefix() {
    echo "Renaming $1 to $2"
    find .\
         -type f\
         ! -path "./obj*"\
         ! -path "./.git"\
         ! -path "./.hg"\
         \( -name "*.html" -or\
            -name "*.xhtml" -or\
            -name "*.xht" -or\
            -name "*.xul" -or\
            -name "*.xml" -or\
            -name "*.svg"  \)\
            -exec sed -i -e "s/$1/$2/g" "{}" \;
}
remove_column_prefix "MozColumn" "column"
```

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

--HG--
extra : moz-landing-system : lando
2020-01-16 21:45:17 +00:00
Chris Peterson
406763af7f Bug 1570499 - Part 1: Replace MOZ_FALLTHROUGH macro with C++17's [[fallthrough]] attribute. r=froydnj
This changeset is a simple find and replace of `MOZ_FALLTHROUGH` and `[[fallthrough]]`.

Unfortunately, the MOZ_FALLTHROUGH_ASSERT macro (to assert on case fallthrough in debug builds) is still necessary after switching from [[clang::fallthrough]] to [[fallthrough]] because:

* MOZ_ASSERT(false) followed by [[fallthrough]] triggers a -Wunreachable-code warning in DEBUG builds
* but MOZ_ASSERT(false) without [[fallthrough]] triggers a -Wimplicit-fallthrough warning in NDEBUG builds.

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

--HG--
extra : moz-landing-system : lando
2019-12-20 07:16:43 +00:00
Alex Henrie
361541b5d9 Bug 1604099 - Remove redundant call to GetColCount from nsCellMap::ShrinkWithoutCell. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D57274

--HG--
extra : moz-landing-system : lando
2019-12-16 08:21:52 +00:00
Emilio Cobos Álvarez
b2fe832c7b Bug 1603313 - Remove some silly patterns. r=bzbarsky
foo ? true : false

or:

  foo ? false : true

Have always a nicer way to be written.

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

--HG--
extra : moz-landing-system : lando
2019-12-14 05:05:01 +00:00
jeffin143
8f714c8f81 Bug 1601856 : convert NS_STYLE_VISIBILITY_* to an enum class in nsStyleConsts.h r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D56140

--HG--
extra : moz-landing-system : lando
2019-12-13 05:34:38 +00:00
Mats Palmgren
31ae0a85ac Bug 1427141 - Request a break before the row-group if its first row doesn't fit. r=TYLin
FTR, the origin of the Reset() call in the else-branch I'm removing
is bug 397428.  I think this is before we had a break-before status,
or at least before our table code knew how to deal with it, so it
might have been correct to change an INCOMPLETE status into COMPLETE
in those days.  It seems the intent was to push the row-group:
https://bugzilla.mozilla.org/show_bug.cgi?id=397428#c14
"... and they all set aStatus to NS_FRAME_COMPLETE, which is logical
because we want to push this entire rowgroup to a new page and try
to reflow the row again..."

Nowadays though, returning a break-before status is the correct
way to do that.

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

--HG--
extra : moz-landing-system : lando
2019-12-09 10:21:16 +00:00
Gabriele Svelto
69790bc62e Bug 1600545 - Remove useless inclusions of header files generated from IDL files in accessible/, browser/, caps/, chrome/, devtools/, docshell/, editor/, extensions/, gfx/, hal/, image/, intl/, ipc/, js/, layout/, and media/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

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

--HG--
extra : moz-landing-system : lando
2019-12-06 09:16:44 +00:00