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

1396 Коммитов

Автор SHA1 Сообщение Дата
Cameron McCormack 41de040ecf Bug 1553731 - Part 3: Make nsIFrame::Is___Frame() avoid reading from memory. r=mats
Differential Revision: https://phabricator.services.mozilla.com/D32605

--HG--
extra : moz-landing-system : lando
2019-06-01 08:03:42 +00:00
Cameron McCormack faf479d778 Bug 1553731 - Part 1: Rename nsFrameIdList.h to FrameIdList.h. r=mats
Differential Revision: https://phabricator.services.mozilla.com/D32603

--HG--
rename : layout/generic/nsFrameIdList.h => layout/generic/FrameIdList.h
extra : moz-landing-system : lando
2019-06-01 08:03:32 +00:00
Cosmin Sabou b93ad0326f Backed out 3 changesets (bug 1553731) for build bustages on nsIFrame.h CLOSED TREE
Backed out changeset 90ed9808e1c0 (bug 1553731)
Backed out changeset b8669aa5a820 (bug 1553731)
Backed out changeset 0d0bf5d84a3c (bug 1553731)

--HG--
rename : layout/generic/FrameIdList.h => layout/generic/nsFrameIdList.h
2019-06-01 04:23:49 +03:00
Cameron McCormack 4ea9edb03a Bug 1553731 - Part 3: Make nsIFrame::Is___Frame() avoid reading from memory. r=mats
Differential Revision: https://phabricator.services.mozilla.com/D32605

--HG--
extra : moz-landing-system : lando
2019-06-01 01:04:54 +00:00
Cameron McCormack c4adc9d346 Bug 1553731 - Part 1: Rename nsFrameIdList.h to FrameIdList.h. r=mats
Differential Revision: https://phabricator.services.mozilla.com/D32603

--HG--
rename : layout/generic/nsFrameIdList.h => layout/generic/FrameIdList.h
extra : moz-landing-system : lando
2019-06-01 01:04:44 +00: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
Emilio Cobos Álvarez b3863ed908 Bug 1547792 - AspectRatio should be a single ratio, not a size. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D29244

--HG--
extra : moz-landing-system : lando
2019-05-02 23:28:21 +00:00
Masayuki Nakano c842b7b133 Bug 253889 - part 4: Finally, get rid of nsIPresShell r=emilio
And also this cleans up some legacy comments of PresShell users.

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

--HG--
extra : moz-landing-system : lando
2019-05-01 02:28:59 +00:00
Emilio Cobos Álvarez edde08a7cb Bug 1547985 - Use rust types for vertical-align. r=mats
The previous commit removed the dependence on the discriminant value, so we
don't need to keep discriminants different from text-align anymore.

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

--HG--
extra : moz-landing-system : lando
2019-05-01 13:08:34 +00:00
Masayuki Nakano 2f69dfdd5d Bug 1547536 - Make PresShell QI-able for aware of do_QueryReferent() r=smaug
There is the following usage of nsIPresShell:
```
nsCOMPtr<nsIPresShell> presShell = do_QueryReferent(mPresShellWeak);
```

So, for changing this to:
```
RefPtr<PresShell> presShell = do_QueryReferent(mPresShellWeak);
```

PresShell should have its own IID.

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

--HG--
extra : moz-landing-system : lando
2019-04-30 00:56:14 +00:00
Emilio Cobos Álvarez fcded20df5 Bug 1547138 - followup: Let the compiler generate more IntrinsicSize functions as suggested by TYLin. 2019-04-26 02:18:42 +02:00
Emilio Cobos Álvarez 11ea945833 Bug 1546697 - Use a consistent style for enum classes in layout. r=dholbert
Per the discussion in:

  https://groups.google.com/d/msg/mozilla.dev.platform/P79pwa9z5m8/iPYPAWPHCAAJ

They should be CamelCase, and that's what most of them already do. This converts
the rest, which are a few.

For the ones that already used `e` or `k` prefixes, I've mostly done:

 for file in $(rg Type::e layout | cut -d : -f 1 | sort | uniq); do sed -i 's#Type::e#Type::#g' $file; done

For the ones that used uppercase, I've removed the prefix if it was already in
the type name, and turn them into CamelCase.

Depends on D28680

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

--HG--
extra : moz-landing-system : lando
2019-04-25 23:03:04 +00:00
Emilio Cobos Álvarez 6159d9a874 Bug 1546697 - Make BaselineSharingGroup an enum class. r=dholbert
It looked a bit weird when mixed up with the other enum classes I'm about to
rename.

Depends on D28679

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

--HG--
extra : moz-landing-system : lando
2019-04-25 22:42:13 +00:00
Emilio Cobos Álvarez 3e1e7ce302 Bug 1547138 - IntrinsicSize shouldn't use nsStyleCoord. r=dholbert
We have a better type to represent "a coord or nothing", and that's Maybe.

This code is shorter, and I think reads generally better / is less easy to
misuse.

I wrote this on top of bug 1547126 so there shouldn't be conflicts.

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

--HG--
extra : moz-landing-system : lando
2019-04-25 23:48:14 +00:00
Daniel Holbert 26a606eda1 Bug 1547126: Give nsIFrame::IntrinsicSize a convenience constructor that takes nscoord-valued width and height. r=TYLin
This patch shouldn't affect behavior; it's just simplifying existing code with
a new convenience constructor.

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

--HG--
extra : moz-landing-system : lando
2019-04-25 23:44:53 +00:00
Miko Mynttinen f579c8f5c5 Bug 1540785 - Part 1: Introduce nsDisplayItemBase r=mattwoodrow
***

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

--HG--
extra : moz-landing-system : lando
2019-04-22 19:57:59 +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
Masayuki Nakano e8446480e1 Bug 1542407 - Make nsIFrame use mozilla::PresShell directly rather than via nsIPresShell r=emilio
Except retrieving from weak reference, `nsIFrame` should treat
`mozilla::PresShell` directly rather than via `nsIPresShell`.

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

--HG--
extra : moz-landing-system : lando
2019-04-06 06:02:28 +00:00
Jonathan Kew 224d07137d Bug 1479760 - Use the ::selection colors to paint inactive as well as active selections. r=emilio
This will enable the devtools font highlighting issue in bug 1479760 to be fixed
using ::selection, and matches webkit/blink behavior.

When we implement ::inactive-selection (bug 1475773) it will supersede this.

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

--HG--
extra : moz-landing-system : lando
2019-04-04 09:17:25 +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
Cosmin Sabou fd7ed41616 Backed out changeset 59e4bc8fa1ba (bug 1479760) for reftest failures on rtl-selection-with-decoration.html. CLOSED TREE 2019-04-01 20:32:15 +03:00
Jonathan Kew 4f167fbdae Bug 1479760 - Use the ::selection colors to paint inactive as well as active selections. r=emilio
This will enable the devtools font highlighting issue in bug 1479760 to be fixed
using ::selection, and matches webkit/blink behavior.

When we implement ::inactive-selection (bug 1475773) it will supersede this.

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

--HG--
extra : moz-landing-system : lando
2019-04-01 13:02:39 +00:00
violet 0a0bd52597 Bug 1537708 - Clean up NS_STATE_IS_OUTER_SVG flag in favor of IsSVGOuterSVGFrame r=longsonr
NS_STATE_IS_OUTER_SVG is redundant, we clean it up and use
nsIFrame::IsSVGOuterSVGFrame() instead.

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

--HG--
extra : moz-landing-system : lando
2019-03-22 02:23:35 +00:00
Brian Birtles f9f6d9275c Bug 1518816 - Make nsLayoutUtils utility functions for getting animations use the EffectSet::GetEffectSetForFrame; r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D23285

--HG--
extra : moz-landing-system : lando
2019-03-18 04:12:12 +00:00
violet 68968a150f Bug 1504072 - non-display outer SVG also doesn't maintain overflow r=longsonr
There is some inconsistency between nsIFrame::FrameMaintainsOverflow() and
nsSVGContainerFrame::ComputeCustomOverflow(). If an element is a nondisplay
outer SVG, the latter gives false while the former returns true. We make them
consistent since nondisplay element doesn't need to maintain overflow.

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

--HG--
extra : moz-landing-system : lando
2019-03-17 11:00:48 +00:00
Sylvestre Ledru 4aa92e3091 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D22514
2019-03-13 10:19:06 +01:00
Emilio Cobos Álvarez a5a514eff4 Bug 1534914 - Improve blocked cursor behavior to fall back to next image. r=smaug
Right now we just block the image returned from nsIFrame::GetCursor, which is
the first loading cursor image.

I think we should do the same we do when the image fails to load, which is to
fall back to the next image instead.

This patch moves all the custom cursor code selection logic to
EventStateManager, and lets the frame return a CursorKind and whether custom
images are allowed.

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

--HG--
extra : moz-landing-system : lando
2019-03-13 18:38:09 +00:00
Matt Woodrow c9e19a7db0 Bug 1529458 - Only create new hit test info for positioned frame if they might be sorted into a different location. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D22649

--HG--
extra : moz-landing-system : lando
2019-03-11 18:36:42 +00:00
Matt Woodrow d9bacb3214 Bug 1533317 - Only invalidate items from the current frame, not descendants when we start needing a wrap list during a partial display list build. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D22636

--HG--
extra : moz-landing-system : lando
2019-03-11 02:35:32 +00:00
shindli 1c03485629 Backed out changeset 200ab1e8d571 (bug 1533317) for multiple reftest failures 2019-03-11 02:26:27 +02:00
Matt Woodrow fd0b75b269 Bug 1533317 - Only invalidate items from the current frame, not descendants when we start needing a wrap list during a partial display list build. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D22636

--HG--
extra : moz-landing-system : lando
2019-03-10 22:16:11 +00:00
Matt Woodrow f1c492571e Bug 1529831 - Don't create wrap lists for positioned frames that are leaves. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D20773

--HG--
extra : moz-landing-system : lando
2019-03-05 20:45:40 +00:00
Emilio Cobos Álvarez b7bb398730 Bug 1516454 - Use rust lengths for border corners. r=boris
The test in https://github.com/web-platform-tests/wpt/pull/15423 hasn't been
synced over yet, but it passes with this patch of course.

Differential Revision: https://phabricator.services.mozilla.com/D20960
2019-02-26 06:01:34 -08:00
Cosmin Sabou a499294d09 Backed out 4 changesets (bug 1516454, bug 1530247) for multiple failures on Linux x64 asan. CLOSED TREE
Backed out changeset 180c7672c57c (bug 1516454)
Backed out changeset a460a4d0a66c (bug 1516454)
Backed out changeset c6ab8d3dd19a (bug 1530247)
Backed out changeset 43862dc87e0b (bug 1516454)
2019-02-26 00:49:27 +02:00
Emilio Cobos Álvarez b411b3894d Bug 1516454 - Use rust lengths for border corners. r=boris
The test in https://github.com/web-platform-tests/wpt/pull/15423 hasn't been
synced over yet, but it passes with this patch of course.

Differential Revision: https://phabricator.services.mozilla.com/D20960
2019-02-25 12:42:31 -08:00
Samuel Thibault fb05007f2c Bug 919508 - layout: Do not trim spaces when inspected from accessibility layer r=jfkthame
--HG--
extra : histedit_source : 3fbe469291ddca0344d6fd88dcadb6282f1ca846
2019-02-22 22:12:48 +01:00
Ting-Yu Lin d373ed0def Bug 1526097 - Remove nsIFrame::eBlockFrame flag. r=dholbert
Only nsBlockFrame and its subclasses recognize the nsIFrame::eBlockFrame
flag, so we can replace the usage of the flag with either
nsIFrame::IsBlockFrameOrSubclass() or a do_QueryFrame().

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

--HG--
extra : moz-landing-system : lando
2019-02-20 21:18:14 +00:00
Emilio Cobos Álvarez dad3a20b22 Bug 1525955 - Include anon boxes in CSSPseudoElementType, to remove ComputedStyle::mPseudoTag. r=heycam
This is more consistent with what the Rust bits of the style system do, and
removes a pointer from ComputedStyle which is always nice.

This also aligns the Rust bits with the C++ bits re. not treating xul pseudos as
anonymous boxes. See the comment in nsTreeStyleCache.cpp regarding those.

Can't wait for XUL trees to die.

Depends on D19001

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

--HG--
extra : moz-landing-system : lando
2019-02-19 13:44:33 +00: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 646fb37989 Bug 1527519 Part 1 - Make do_QueryFrame more const-friendly, and mark nsIFrame::IsBlockFrameOrSubclass() as a const method. r=mats
This patch makes do_QueryFrame() accept const frame pointer e.g.
"const nsIFrame*", and also helps eliminate a few const_cast in Part 3.

Note that the fast path of do_QueryFrame is const-correct, but the slow
path is not (due to nsIFrame::QueryFrame() returns void*).

For example:

```
const nsIFrame* f;
nsBlockFrame* a = do_QueryFrame(f); // fast path, compile error.
nsIAnonymousContentCreator* b = do_QueryFrame(f); // slow path, still compiles.
```

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

--HG--
extra : moz-landing-system : lando
2019-02-15 01:38:04 +00:00
Daniel Holbert cd89295a59 Bug 1525628 part 1: Add nsIFrame::IsBlockFrameOrSubclass() convenience accessor. r=mats
Differential Revision: https://phabricator.services.mozilla.com/D19083

--HG--
extra : moz-landing-system : lando
2019-02-08 00:38:12 +00:00
Emilio Cobos Álvarez 12867b1a3f Bug 1525371 - Kill ComputedStyle::mPresContext, move the pointer to the frame instead. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D18734
2019-02-07 11:15:36 +01:00
Ting-Yu Lin ab56bd8e8f Bug 1523061 Part 3 - Remove ListTag() that prints frame tag in a frame list. r=dholbert
We can replace it by a simple for-loop. If we want to print not only the
tag, but the detailed frame information, we can use nsFrameList::List().

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

--HG--
extra : moz-landing-system : lando
2019-01-29 21:30:11 +00:00
Ting-Yu Lin 305e652840 Bug 1523061 Part 2 - Remove static ListTag(FILE*, const nsIFrame*). r=dholbert
Many of the modifications are guarded by #ifdefs. I verify them locally
by manually define them in nsBlockDebugFlags.h and nsLinelayout.cpp.

Note that I replace "mFrame" with "frame" in lines guarded by
NOISY_BLOCK_DIR_MARGINS in nsBlockFrame.cpp because they were
incorrectly renamed in Bug 1277129 Part 6a.
https://hg.mozilla.org/mozilla-central/rev/a70b04f074fc

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

--HG--
extra : moz-landing-system : lando
2019-01-29 21:22:14 +00:00
Ting-Yu Lin c4c0690aa3 Bug 1523061 Part 1 - Remove two nsIFrame::ListTag() methods that retrieve frame tag in a string. r=dholbert
There are three different APIs that serve similar purpose. Keeping only
one is sufficient.

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

--HG--
extra : moz-landing-system : lando
2019-01-29 17:59:53 +00: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
Razvan Maries 4c67bec411 Merge mozilla-inbound to mozilla-central a=merge 2019-01-16 19:00:15 +02:00
Emilio Cobos Álvarez b44ff327e9 Bug 1520154 - Move cursor to cbindgen. r=boris
The only reason it was on style_traits is so that they could use it from some
other crates, but Servo eventually ends up getting the value from an integer, so
may as well pass it around and do that in the end of the process anyway.

Differential Revision: https://phabricator.services.mozilla.com/D16557
2019-01-16 14:13:07 +01:00
Sylvestre Ledru 47a5dd1fb8 Bug 1519636 - Reformat everything to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-01-16 08:50:07 +00:00