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

682 Коммитов

Автор SHA1 Сообщение Дата
James Teh c604c6018c Bug 1616078: Don't use HTMLListBulletAccessible for CSS ::marker content. r=eeejay,emilio,MarcoZ
::marker content gets handled like text from any other CSS pseudo-class.
Therefore, using HTMLListBulletAccessible ends up duplicating the content already exposed in the a11y tree.
Now, we only use HTMLListBulletAccessible for nsBulletFrames instead of all marker frames.

As part of this, remove nsContainerFrame::GetSpokenMarkerContent, since we no longer need it to retrieve ::marker content.
The bulk of its other work was done by nsBulletFrame::GetSpokenContent, which we now call directly.
It also handled producing a default bullet character for list-style-image, but it makes sense for this to live in the a11y code.

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

--HG--
extra : moz-landing-system : lando
2020-02-21 01:23:37 +00:00
Ting-Yu Lin e50292bfb5 Bug 1613732 Part 1 - Revise documentation for ReflowChildFlags, ReflowChild(), and FinishReflowChild(). r=dholbert
The entire comment deleted in nsContainerFrame.cpp belongs to
FinishReflowChild(), which is already documented in the header.

Change `aChildFrame` to `aKidFrame` for ReflowChild() to match its
implementation.

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

--HG--
extra : moz-landing-system : lando
2020-02-07 04:17:30 +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
Emilio Cobos Álvarez bf6256b1fc Bug 1613349 - Make nsIFrame::TakeProperty MOZ_MUST_USE. r=dholbert
Depends on D61756

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

--HG--
extra : moz-landing-system : lando
2020-02-06 00:39:10 +00:00
Emilio Cobos Álvarez bba367ec8f Bug 1613349 - Rename nsIFrame::RemoveProperty to nsIFrame::TakeProperty. r=dholbert
This is hopefully clearer naming.

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

--HG--
extra : moz-landing-system : lando
2020-02-06 00:13:38 +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
Xidorn Quan 3bb05cef1c Bug 1606192 - Remove some unused nsresult return value in layout code. r=dbaron
Differential Revision: https://phabricator.services.mozilla.com/D58342

--HG--
extra : moz-landing-system : lando
2019-12-28 03:27:13 +00:00
jeffin143 6e53ecda96 Bug 1600476 : convert NS_STYLE_TOP_LAYER_* to an enum class in nsStyleConsts.h r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D55377

--HG--
extra : moz-landing-system : lando
2019-12-01 13:05:55 +00:00
jeffin143 7868d04683 Bug 1597893 : convert NS_STYLE_WINDOW_SHADOW_* to an enum class in nsStyleConsts.h r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D53920

--HG--
extra : moz-landing-system : lando
2019-11-25 16:00:23 +00:00
Razvan Maries 8520cc6954 Backed out changeset dce49f743139 (bug 1597893) for build bustages on nsCocoaWindow.mm. CLOSED TREE 2019-11-22 14:50:12 +02:00
jeffin143 6967337237 Bug 1597893 : convert NS_STYLE_WINDOW_SHADOW_* to an enum class in nsStyleConsts.h r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D53920

--HG--
extra : moz-landing-system : lando
2019-11-21 16:52:06 +00:00
Bogdan Tara 6aae1c4aaa Backed out changeset 726c8aa10d1a (bug 1597893) for bustages complaining about nsCocoaWindow.h CLOSED TREE 2019-11-21 15:35:09 +02:00
jeffin143 9f50df6c78 Bug 1597893 : convert NS_STYLE_WINDOW_SHADOW_* to an enum class in nsStyleConsts.h r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D53920

--HG--
extra : moz-landing-system : lando
2019-11-21 12:09:03 +00:00
Ting-Yu Lin cfa677a4cc Bug 1591546 Part 2 - Add WritingMode::IsPhysicalRTL(). r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D50772

--HG--
extra : moz-landing-system : lando
2019-10-28 18:22:05 +00:00
Ting-Yu Lin 03c5d676c0 Bug 1587645 Part 2 - Add WritingMode::IsPhysicalLTR(). r=jfkthame
I discovered this while improving `ScrollFrameHelper::IsPhysicalLTR()`
in Part 1. Our code base needs a notion of physical direction. Let's add
it to WritingMode.

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

--HG--
extra : moz-landing-system : lando
2019-10-25 20:01:46 +00:00
Brian Grinstead dffa39b257 Bug 1561326 - Support CSS min/max width/height for top level windows with root HTML element. r=emilio
Helps support migrating from XUL DOM to an HTML DOM structure. I attempted
to remove the early return when the root element is not a XUL element, but
it appears setting the transparency on a non XUL root is still broken
(test widget/tests/test_mouse_scroll.xul started failing on windows).

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

--HG--
extra : moz-landing-system : lando
2019-09-09 16:14:51 +00:00
Mats Palmgren a74c7c2d43 Bug 1574123 - Use nsLayoutUtils::GetMarkerFrame() more to avoid manual null-checks. r=emilio
(This basically addresses the review comments that I missed in
bug 1105868 part 4. My bad.)

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

--HG--
extra : moz-landing-system : lando
2019-08-15 14:23:37 +00:00
Mats Palmgren 53321dfa54 Bug 1105868 part 4 - Accessibility support for inline list-items. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D39833

--HG--
extra : moz-landing-system : lando
2019-08-14 14:37:16 +00:00
Razvan Maries a025d50160 Merge mozilla-central to autoland. a=merge on a CLOSED TREE
--HG--
extra : rebase_source : b9360eb82974f2add7877b6c9197a1297e0c74af
2019-08-09 02:57:47 +03:00
Razvan Maries cbb99dc4bf Backed out changeset 4c31868ffe1c (bug 1561326) for perma fails on browser_startup_syncIPC.js. a=backout 2019-08-08 22:44:38 +03:00
Brian Grinstead 9dac9754e5 Bug 1561326 - Support CSS min/max width/height for top level windows with root HTML element. r=emilio
Helps support migrating from XUL DOM to an HTML DOM structure. I attempted
to remove the early return when the root element is not a XUL element, but
it appears setting the transparency on a non XUL root is still broken
(test widget/tests/test_mouse_scroll.xul started failing on windows).

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

--HG--
extra : moz-landing-system : lando
2019-08-07 18:20:35 +00:00
L. David Baron b4137c33ae Bug 1547759 - Add a flag to allow FinishReflowChild to handle relative positioning, and convert the caller for which this makes sense. r=jfkthame
Note that this changes the writing mode used for the SetSize call from
the parent's to the child's.  (This controls what position is kept
constant.)  I don't think this changes behavior at all, since there is
(for this caller) a SetRect call just below.

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

--HG--
extra : moz-landing-system : lando
2019-08-05 11:56:05 +00:00
L. David Baron c923b062b3 Bug 1547759 - Pass ReflowInput to FinishReflowChild in almost all cases. r=jfkthame
At first glance, it might look like this would change behavior, since
FinishReflowChild passes aReflowInput to DidReflow, which in turn
notifies aReflowInput's mPercentBSizeObserver.  However, if you examine
how the mPercentBSizeObserver is propagated, it can only be set for the
anonymous block wrapping the children of table cells, the children of
table cells, or additionally a child of a table wrapper frame that has
it set (i.e., a table or its caption, when logically a child of a table
cell).  Since all of the frames for which this is being changed are
either internal table elements that are inside of the table, or are
things that can never be a descendant of a table at all, there should be
no change in behavior.

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

--HG--
extra : moz-landing-system : lando
2019-08-05 11:52:19 +00:00
L. David Baron 1488be9417 Bug 1571250 - Convert flags passed to ReflowChild, FinishReflowChild, SyncFrameViewAfterReflow and from GetXULLayoutFlags / GetLayoutFlags into an enum class. r=TYLin
It seems better to convert this before adding a new flag (in bug
1547759) and risking replacing the wrong 0 with a flag.

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

--HG--
extra : moz-landing-system : lando
2019-08-08 19:48:19 +00:00
Ting-Yu Lin 66429c8cc2 Bug 1506293 Part 1 - Use next-in-flows instead of next-continuations when converting overflow containers. r=dbaron
In the beginning of nsOverflowContinuationTracker::Insert() there is an
assertion MOZ_ASSERT(aOverflowCont->GetPrevInFlow()). Assume this is
correct, we should use next-in-flows instead of next-continuations when
converting overflow containers.

The crashtest is not added because the assertion can also be triggered
in the reftests added in Part 3 without this patch.

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

--HG--
extra : moz-landing-system : lando
2019-07-27 06:13:56 +00:00
L. David Baron ce547cd6f5 Bug 1566945 - Add a parameter to nsContainerFrame::InsertFrames for aPrevFrame's line box. r=dholbert
For now, always pass null, except when passing it through from one
overload to another.

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

--HG--
extra : moz-landing-system : lando
2019-07-17 23:34:45 +00:00
L. David Baron bb277e6cb2 Bug 1474771 - Revert all changes from bug 1459937 since they are no longer needed. r=dholbert
(The single line that made them active was commented out in the previous patch.)

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

--HG--
extra : moz-landing-system : lando
2019-07-01 21:58:35 +00:00
Gerald Squelart 2f31b3fef4 Bug 1474771 - Propagate NS_FRAME_IS_DIRTY to descendants when marking as dirty rather than during reflow. r=dholbert
This simplifies dealing with frames that are pushed/pulled between
continuations during reflow, allows us to avoid the complexity of the
fix to 1459937, and hopefully fixes some of the regressions from bug
1308876.

This disables the changes from bug 1459937 by commenting out a single
line in ReparentFrameInternal in nsBlockFrame.cpp, but all the added
code will be removed in the following patch.

Co-authored-by: Gerald Squelart <gsquelart@mozilla.com>
Co-authored-by: L. David Baron <dbaron@dbaron.org>

Depends on D36423

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

--HG--
extra : moz-landing-system : lando
2019-07-01 21:56:43 +00:00
Ting-Yu Lin 3a4933eb98 Bug 1549267 Part 1 - Remove NS_INTRINSICSIZE and NS_AUTOHEIGHT. r=mats
This patch is generated by the following steps.

1) Manually delete NS_INTRINSICSIZE and NS_AUTOHEIGHT in LayoutConstants.

2) Run the following script.
```
  #!/bin/bash
  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_INTRINSICSIZE NS_UNCONSTRAINEDSIZE
  rename NS_AUTOHEIGHT NS_UNCONSTRAINEDSIZE
```

3) ./mach clang-format

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

--HG--
extra : moz-landing-system : lando
2019-06-04 23:41:20 +00:00
Mats Palmgren 0ba61eca7b Bug 1552357 - Improve intrinsic sizing of inlines. r=jfkthame
This is primarily to fix sizing of 'box-decoration-break:clone' inlines,
but also some 'slice' edge cases by recognizing more break opportunities,
and to improve sizing when BIDI-continuations are involved.

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

--HG--
extra : rebase_source : 45a76e55e3eb5ac41fd60b11eb2acce24c6a1dd1
extra : amend_source : d8980854573522ddf761f0cf036aaa4ee0d96cac
2019-05-29 01:25:12 +02:00
Cameron McCormack 00bc6ad52c Bug 1552098 - Add "Matched CSS Rules" command to the layout debugger. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D31397

--HG--
extra : moz-landing-system : lando
2019-05-16 23:11:50 +00:00
Masayuki Nakano 3622509485 Bug 1545342 - part 2: Make some public enum of nsIPresShell move to mozilla namespace and defined as enum class in PresShellForwards.h r=smaug
This patch moves some `enum` in `nsIPresShell` which are in public scope into
`mozilla` namespace and change them as `enum class`es.

Unfortunately, only "where to scroll" enum is just defines constants of
percentages of scroll destination.  Therefore, this patch makes only them
as `static const`.

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

--HG--
extra : moz-landing-system : lando
2019-04-25 05:04:15 +00:00
Masayuki Nakano f5737567dd Bug 1544343 - part 3: Make layout use mozilla::PresShell instead of nsIPresShell as far as possible r=emilio
This patch changes remaining things under `layout/`.  However, there are some
places which still need to use `nsIPresShell`.  That will be fixed in a
follow up bug.

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

--HG--
extra : moz-landing-system : lando
2019-04-16 07:25:10 +00:00
Ting-Yu Lin f49d08722a Bug 1543571 Part 1 - Replace "reflow state" with "reflow input". r=dholbert
This patch is generated by the following script on Linux:

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 "reflow state" "reflow input"

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

--HG--
extra : moz-landing-system : lando
2019-04-11 20:27:37 +00:00
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
Mats Palmgren 8166e09775 Bug 1540198 - [DEBUG] Assert that the child frames have the correct parent pointer in SetInitialChildList. r=TYLin
Differential Revision: https://phabricator.services.mozilla.com/D25434

--HG--
extra : rebase_source : defd00e62dc90e316cb12c67521951a1e5892489
2019-03-29 18:34:17 +01:00
Mats Palmgren bff6f8a4d5 Bug 288704 part 3 - Make nsBulletFrame use the built-in 'list-item' CSS counter and remove the old implementation. r=emilio 2019-03-24 23:13:53 +01: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
Razvan Maries 2fb9019d41 Merge mozilla-central to mozilla-inbound. a=merge on a CLOSED TREE 2019-02-15 11:59:08 +02:00
Emilio Cobos Álvarez e9ae3b0907 Bug 1527410 - Use Rust sizes for flex-basis, width, height, and their min/max properties. r=jwatt
Really sorry for the size of the patch :(

Only intentional behavior change is in the uses of HasLengthAndPercentage(),
where it's easier to do the right thing. The checks that used to check for
(IsCalcUnit() && CalcHasPercentage()) are wrong since bug 957915.

Differential Revision: https://phabricator.services.mozilla.com/D19553
2019-02-15 03:59:31 +01:00
Ting-Yu Lin 8c62035164 Bug 1527519 Part 3 - Replace remaining nsLayoutUtils::GetAsBlock() with do_QueryFrame(), and delete nsLayoutUtils::GetAsBlock(). r=mats
Depends on D19861

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

--HG--
extra : moz-landing-system : lando
2019-02-15 01:38:05 +00:00
Emilio Cobos Álvarez 8101ae2ea8 Bug 1523071 - Use Rust lengths for margin / padding / inset. r=jwatt
Also for the intersection observer root margin, since it was easier to fix it
up and clean it up than not doing it.

This is the first big step to get rid of nscoord. It duplicates a bit of logic
in nsLayoutUtils since for now max/min-width/height are still represented with
nsStyleCoord, but I think I prefer to land this incrementally.

I didn't add helpers for the physical accessors of the style rect sides that
nsStyleSides has (top/bottom/left/right) since I think we generally should
encourage the logical versions, but let me know if you want me to do that.

Differential Revision: https://phabricator.services.mozilla.com/D17739
2019-02-10 04:11:58 +01: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
Emilio Cobos Álvarez d2ed260822 Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug
Summary: Really sorry for the size of the patch. It's mostly automatic
s/nsIDocument/Document/ but I had to fix up in a bunch of places manually to
add the right namespacing and such.

Overall it's not a very interesting patch I think.

nsDocument.cpp turns into Document.cpp, nsIDocument.h into Document.h and
nsIDocumentInlines.h into DocumentInlines.h.

I also changed a bunch of nsCOMPtr usage to RefPtr, but not all of it.

While fixing up some of the bits I also removed some unneeded OwnerDoc() null
checks and such, but I didn't do anything riskier than that.
2019-01-03 17:48:33 +01:00
Cameron McCormack 1db3f9da78 Bug 1512716 - Re-indent NS_QUERYFRAME macros after clang-format. r=TYLin
Differential Revision: https://phabricator.services.mozilla.com/D13995

--HG--
extra : moz-landing-system : lando
2018-12-07 20:00:18 +00: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
Ting-Yu Lin f088ec9229 Bug 1486602 Part 2 - Replace RenumberLists with RenumberList in comments r=mats
The function was renamed in bug 1171419 Part 10.

Depends on D6839

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

--HG--
extra : moz-landing-system : lando
2018-09-26 01:22:24 +00:00
Gerald Squelart 4b4619bb45 Bug 1459937 - Mark pulled floats (from pulled lines) dirty - r=dbaron
Similar to lines (see previous patch), floats from next-in-flow or overflow
frames have probably not been marked dirty (as ReflowInput hasn't dealt with
them when it was constructed), so we need to mark them dirty for proper reflow.

If we don't do that, and they don't fit in the current column, the next column
will only mark its current children dirty, so when pulling back its first
floats from the previous column they will not be reflowed as needed.

MozReview-Commit-ID: KKrwtzeQMrI

--HG--
extra : rebase_source : ec99f380c978c6d28135490401beb0bb54c8e2b3
2018-07-10 11:36:33 +10:00
Andreea Pavel 10d4df5aa9 Backed out 3 changesets (bug 1459937) for failing crashtest with Assertion failure: (IndexInFlow(aOldParent) < IndexInFlow(aNewParent)) on a CLOSED TREE
Backed out changeset 2cff5c67d000 (bug 1459937)
Backed out changeset fb3fba19e615 (bug 1459937)
Backed out changeset bd4bd8ac335c (bug 1459937)
2018-07-15 10:06:23 +03:00