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

16764 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez 672ef887fb Bug 1592474 - Report a console warning when we disable scroll anchoring on a scroller. r=dholbert,flod
Depends on D51024

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

--HG--
extra : moz-landing-system : lando
2019-10-31 09:19:21 +00:00
Emilio Cobos Álvarez f70cc8c005 Bug 1592474 - Add some heuristics to disable scroll anchoring in pathological cases. r=dholbert
The idea of these are not to penalize legit uses of scroll anchoring, and
catching pathological cases fast.

The current algorithm I thought of is just whether the average of all the
consecutive scroll anchoring adjustments is less than a given threshold.

If the average adjustment is close to zero and the user is not scrolling, it
means that we're not making much progress.

It is important that zero adjustments don't get counted, since those are common
during window resizes and don't have side-effects anyway.

Exact number may need tuning, let me know if you want it
nightly-and-early-beta-only for now or something.

Depends on D51038

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

--HG--
extra : moz-landing-system : lando
2019-10-31 09:25:08 +00:00
Emilio Cobos Álvarez 4510f3e34a Bug 1592474 - Share code between ScrollAnchorContainer::{Destroy,InvalidateAnchor}. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D51038

--HG--
extra : moz-landing-system : lando
2019-10-31 09:23:35 +00:00
Kirk Steuber 9b781e6983 Bug 1448807 - Remove showWindowResizer from browser Custom Element r=NeilDeakin
Differential Revision: https://phabricator.services.mozilla.com/D50274

--HG--
extra : moz-landing-system : lando
2019-10-30 13:46:55 +00:00
Morgan Reschenberg 36e1ff99a9 Bug 1587127: Ensure no backplate is drawn for lines that have only visibility:hidden descendants. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D48725

--HG--
extra : moz-landing-system : lando
2019-10-30 15:45:45 +00:00
Daniel Varga b747b90cd8 Backed out changeset ec25a8482342 (bug 1592389) for mochitest failure at layout/style/test/test_value_computation.html. On a CLOSED TREE 2019-10-30 10:17:29 +02:00
Sam Mauldin 09a1cf803b Bug 1592389 - Rename Mozfield / Mozfieldtext to Field and Fieldtext r=emilio
Split off of Bug 1590894
Rename these to support unprefixed version
Also add alias to keep compatibility

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

--HG--
extra : moz-landing-system : lando
2019-10-30 05:51:38 +00:00
Nour 7afb8b57b4 Tests for wbr element Bug 584141 r=Ehsan
added tests for Bug 584141 selection across wbr elements

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

--HG--
extra : moz-landing-system : lando
2019-10-29 20:35:23 +00:00
Emilio Cobos Álvarez 40e57d6c9f Bug 1591282 - Display carets in the outline list, so that descendant backgrounds don't occlude it. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D50701

--HG--
extra : moz-landing-system : lando
2019-10-29 04:30:54 +00:00
Ting-Yu Lin 7fd6d04f2b Bug 1588025 - Make the custom content container a font inflation root. r=emilio
font-inflation-1e.html is adapted from font-inflation-1a.html with the
writing-mode set on <html> instead of <body>. It can trigger the
assertion "current writing mode should match that of our flow root" in
nsFontInflationData::FindFontInflationDataFor().

The root cause is: nsCanvasFrame can generate the position:absolute
custom content container to contain elements like AccessibleCaret. When
the container is constructed, the container's writing-mode is always
horizontal-rl, which is getting from nsCanvasFrame that uses
ViewportFrame's style.

If <html> has a vertical writing-mode, custom content container's used
mWritingMode becomes orthogonal to ViewportFrame, because <html>'s used
mWritingMode is propagated all the way up to ViewportFrame.

This patch solves the above issue by making the custom content container
a font inflation root, so FindFontInflationDataFor() stops at it instead
of finding all the way up to the ViewportFrame.

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

--HG--
extra : moz-landing-system : lando
2019-10-28 20:42:06 +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 d0f336a7a6 Bug 1591546 Part 1 - Add WritingMode::IsBidiRTL(). r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D50771

--HG--
extra : moz-landing-system : lando
2019-10-28 09:33:05 +00:00
Masayuki Nakano a434f646f8 Bug 1577058 - part 2: Make `nsFrameSelection::CommonPageMove()` handle `nsFrameSelection::ScrollSelectionIntoView()` too r=smaug
Currently, `nsFrameSelection::CommonPageMove()` is called before every caller
calls `nsFrameSelection::ScrollSelectionIntoView()`.  However, when an editing
host has focus, the scroll target may be outside of it.  In such case, without
moving caret, user may want only to scroll the scrollable element.

Chrome behaves like so.  Chrome also can scroll outside scrollable element
of focused editing host.  However, it scrolls caret into view only when
caret is moved actually.  Therefore, it makes sense to follow this behavior.

This patch makes `nsFrameSelection::CommonPageMove()` also call
`nsFrameSelection::ScrollSelectionIntoView()`.  However, it newly takes
`SelectionIntoView` flag for making callers can choose the condition.  I.e.,
`ScrollSelectionIntoView()` should be called always, or only when selection
is actually changed, or shouldn't be called.

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

--HG--
extra : moz-landing-system : lando
2019-10-28 10:03:37 +00:00
Masayuki Nakano 28c3b3ebfc Bug 1577058 - part 1: `nsFrameSelection::CommonPageMove()` should use page scroll amount if there is a scrollable element rather than height of click target r=smaug
`nsFrameSelection::CommonPageMove()` emulates click in selection limiter
when scrollable frame is outside of focused editing host.  However, the
clicked position should be considered with scrollable element's page
scroll amount rather than height of editing host since the height may be
much taller than the scrollable frame.

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

--HG--
extra : moz-landing-system : lando
2019-10-28 10:03:13 +00:00
Miko Mynttinen 1534e5d150 Bug 1567889 - Part 3: Cleanup will change budgeting r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D38853

--HG--
extra : moz-landing-system : lando
2019-10-28 14:11:45 +00:00
Miko Mynttinen 5ffddb5a57 Bug 1567889 - Part 2: Avoid will-change budget lookups if the frame does not have the will-change bit set r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D38852

--HG--
extra : moz-landing-system : lando
2019-10-28 14:11:26 +00:00
Miko Mynttinen ccab3f6249 Bug 1567889 - Part 1: Improve const correctness for some bool getters/setters r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D38851

--HG--
extra : moz-landing-system : lando
2019-10-28 14:11:05 +00:00
Cosmin Sabou 3c54e28fc8 Backed out 2 changesets (bug 1577058) for causing bug 1541915 to nearly permafail.
Backed out changeset c556c5228132 (bug 1577058)
Backed out changeset d00a7e091efd (bug 1577058)
2019-10-27 17:38:58 +02:00
Alex Henrie 74cc0f4dce Bug 1591490 - Use the NS_IS_SURROGATE_PAIR macro everywhere. r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D50697

--HG--
extra : moz-landing-system : lando
2019-10-27 05:05:51 +00:00
Masayuki Nakano 7a894386f2 Bug 1577058 - part 2: Make `nsFrameSelection::CommonPageMove()` handle `nsFrameSelection::ScrollSelectionIntoView()` too r=smaug
Currently, `nsFrameSelection::CommonPageMove()` is called before every caller
calls `nsFrameSelection::ScrollSelectionIntoView()`.  However, when an editing
host has focus, the scroll target may be outside of it.  In such case, without
moving caret, user may want only to scroll the scrollable element.

Chrome behaves like so.  Chrome also can scroll outside scrollable element
of focused editing host.  However, it scrolls caret into view only when
caret is moved actually.  Therefore, it makes sense to follow this behavior.

This patch makes `nsFrameSelection::CommonPageMove()` also call
`nsFrameSelection::ScrollSelectionIntoView()`.  However, it newly takes
`SelectionIntoView` flag for making callers can choose the condition.  I.e.,
`ScrollSelectionIntoView()` should be called always, or only when selection
is actually changed, or shouldn't be called.

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

--HG--
extra : moz-landing-system : lando
2019-10-27 01:44:55 +00:00
Masayuki Nakano 250257d0dd Bug 1577058 - part 1: `nsFrameSelection::CommonPageMove()` should use page scroll amount if there is a scrollable element rather than height of click target r=smaug
`nsFrameSelection::CommonPageMove()` emulates click in selection limiter
when scrollable frame is outside of focused editing host.  However, the
clicked position should be considered with scrollable element's page
scroll amount rather than height of editing host since the height may be
much taller than the scrollable frame.

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

--HG--
extra : moz-landing-system : lando
2019-10-27 01:44:34 +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
Ting-Yu Lin f491e4df0c Bug 1587645 Part 1 - Remove ScrollFrameHelper::GetFrameForDir(). r=emilio
After bug 1102175, the root scroll frame always obtains its used
WritingMode from either body element or root element. The `if (mIsRoot) {}`
block in `GetFrameForDir()` becomes redundant, so does
`GetFrameForDir()` itself.

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

--HG--
extra : moz-landing-system : lando
2019-10-25 20:01:39 +00:00
L. David Baron 449f8593f0 Bug 1584018 - Make flex and grid code indicate that its block resizes can affect basis for percentages. r=dholbert,mats
Differential Revision: https://phabricator.services.mozilla.com/D50511

--HG--
extra : moz-landing-system : lando
2019-10-24 22:35:46 +00:00
Daniel Holbert d55c8c26d0 Bug 1590639 part 4: Fix non-unified build issues in layout/style. r=emilio
This patch:

- Gives layout/generic/AnonymousContentKey.h an include for `<stdint.h>` to
  provide the uint8_t type, and TypedEnumBits.h to provide the
  MOZ_MAKE_ENUM_CLASS_BITWISE_OPERATORS macro. (This is a change in another
  directory, but it's needed in order for layout/style/ServoStyleSet.cpp to
  build successfully.)
- Adds a missing "nsINode" forward-decl to dom/base/IdentifierMapEntry.h,
  because it uses that type in function declarations.  (This change is needed
  in order for layout/style/CachedInheritingStyles.cpp to build successfully.)
- Gives CSSStyleRule.cpp an include for PseudoStyleType.h,
  nsCSSPseudoElements.h, and CSSEnabledState.h because it uses those types.
- Gives GeckoBindings.cpp an include for gfxTextRun.h, to provide the definition
  of type gfxFontGroup (so GeckoBindings can call GetFirstValidFont() on an
  object of that type).
- Gives Loader.h an include for nsIContentInlines.h, to provide the inline
  function IsInUAWidget().
- Gives Rule.cpp an include for HoldDropJSObjects.h, to provide DropJSObjects().
- Gives nsImageLoader.cpp an include for DocumentInlines.h (and Document.h for
  good measure), to provide the inline function GetPresContext().
- Gives nsStyleStruct.cpp an include for DocumentInlines.h, to provide inline
  function Document::GetPresContext().
- Gives nsStyleTransformMatrix.h an include for Units.h (instead of gfxPoint.h,
  which isn't useful) to provide the CSSPoint type.
- Gives nsStyleTransformMatrix.h an include for ServoStyleConsts.h, to provide
  LengthPercentage and the various StyleRotate/StyleScale/StyleTransform/etc
  types. (These can't be easily forward-declared, because some of them are
  legitimate types whereas others are type aliases. We could theoretically
  forward-declare all of the underlying types and then repeat the type aliases,
  but that'd be verbose and unmaintainable.)

Depends on D50165

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

--HG--
extra : moz-landing-system : lando
2019-10-23 08:14:54 +00:00
Daniel Holbert 547238dc03 Bug 1590639 part 1: Fix non-unified build issues in layout/generic. r=TYLin
The issues fall into these categories:
 - Files that used StaticPrefs::layout_XYZ() API or gfxVars::XYZ that needed an
   include. (Addressed by adding the missing include.)
 - Files that use mozilla::dom::XYZ or mozilla::gfx::XYZ without qualifying the
   namespace & without a 'using' decl. (Addressed by adding "using".)
 - A few other includes for types/inlines that were used without their header.

Depends on D50162

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

--HG--
extra : moz-landing-system : lando
2019-10-23 22:05:22 +00:00
Emilio Cobos Álvarez 0bae88943a Bug 1590426 - Cleanup signatures in nsImageFrame / nsImageControlFrame. r=tnikkel
In particular, remove useless virtual keywords per our style guide, and remove
redundant argument names (argument names where the name is contained in the type
of the argument), since they're somewhat useless.

I think the result looks neater.

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

--HG--
extra : moz-landing-system : lando
2019-10-22 19:05:21 +00:00
Emilio Cobos Álvarez 2c65109365 Bug 1589955 - Sync-decode images when intrinsic ratio between the old and new source changes. r=tnikkel
This seems to fix it for me, and it's pretty straight-forward, but I _think_
we'd still paint the old image if the image is huge and it's loading, which
may be counter-productive. Maybe we should guard the whole "paint mOldImage"
with and if (!oldImageIsDifferent), wdyt?

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

--HG--
extra : moz-landing-system : lando
2019-10-23 12:22:06 +00:00
Emilio Cobos Álvarez 27c8d88f2c Bug 1590191 - Trigger image loads for <area> cursor styles. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D49998

--HG--
extra : moz-landing-system : lando
2019-10-23 08:29:54 +00:00
Emilio Cobos Álvarez a2fd653551 Bug 1590278 - Cleanup scrollframe virtual / override / final declarations. r=hiro
There's so much noise.

Every time I read it I feel lost in a sea of virtual keywords :)

This should help.

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

--HG--
extra : moz-landing-system : lando
2019-10-22 12:25:06 +00:00
Emilio Cobos Álvarez 560f96bea7 Bug 1590281 - Don't propagate overscroll-behavior from body to viewport. r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D50024

--HG--
extra : moz-landing-system : lando
2019-10-22 12:16:13 +00:00
shindli 03dfb76e95 Backed out changeset 613ca59a8e61 (bug 584141) for causing tier1 permafails in layout/generic/test/test_selection_doubleclick.html CLOSED TREE 2019-10-22 01:09:48 +03:00
Brendan Dahl 48a59e061b Bug 1583314 - Skip or port XBL tests to shadow DOM. r=bzbarsky
Where possible I ported tests to use the shadow DOM. The following could
potentially be ported, but don't think it worth of it:
  test_bug414907.xul - uses children nodes in constructor which is very
different in shadow DOM world
  test_bug233643.xul - really tests XBL behavior
  test_anonymous_content.py - bug on file already to create shadow DOM
test from scratch

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

--HG--
rename : devtools/client/inspector/test/browser_inspector_highlighter-xbl.js => devtools/client/inspector/test/browser_inspector_highlighter-custom-element.js
extra : moz-landing-system : lando
2019-10-21 20:21:20 +00:00
Nour 89bdaf0774 Tests for wbr element Bug 584141 r=Ehsan
added tests for Bug 584141 selection across wbr elements

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

--HG--
extra : moz-landing-system : lando
2019-10-21 20:04:44 +00:00
Sylvestre Ledru 7c309095ea Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
Please note that it is the first reformat with clang-format 9
I only saw a fix in the .mm file

# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-10-21 14:13:44 +00:00
Cosmin Sabou 1dd7851e3f Backed out changeset ab0ed4869416 (bug 584141) for mochitest failures on test_selection_doubleclick.html. CLOSED TREE 2019-10-18 21:44:41 +03:00
Nour 4dcaa130ee Tests for wbr element Bug 584141 r=Ehsan
added tests for Bug 584141 selection across wbr elements

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

--HG--
extra : moz-landing-system : lando
2019-10-18 17:12:28 +00:00
Nour b5e280180d Bug 584141 Added WBR frame class implementing nsFrame and overriding thepeekOffset* methods. r=dbaron,Ehsan
The wbr element represents a line break opportunity. Before the change double clicking on a text that contains a wbr element did not select the whole sentence.
After the change, the presence of a wbr element in the selection does not affect the selection functionality.

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

--HG--
extra : moz-landing-system : lando
2019-10-14 19:35:23 +00:00
Hiroyuki Ikezoe f6dee32218 Bug 1588675 - Use nsPresContext::IsRootContentDocumentCrossProcess instead of IsRootContentDocument for places where we call nsLayoutUtils::ComputeScrollMetadata. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D49272

--HG--
extra : moz-landing-system : lando
2019-10-16 21:34:45 +00:00
David Major 2bf032d442 Bug 1468131 - Avoid a ubsan complaint in GetTrimmableWhitespaceCount r=emilio
ubsan was complaining about the expression
```
    const char* str = aFrag->Get1b() + aStartOffset;
```
when `aFrag->Get1b() == nullptr` and `aStartOffset == -1`, because the addition generates an invalid pointer.

Due to other logic in the function, we would never dereference that pointer, so it was reasonably harmless, but this patch silences the complaint.

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

--HG--
extra : moz-landing-system : lando
2019-10-15 22:59:51 +00:00
Emilio Cobos Álvarez 5e0abce31f Bug 1588748 - Make an scroll anchoring assertion a release assert. r=dholbert
This should prevent this being exploitable, should this fire.

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

--HG--
extra : moz-landing-system : lando
2019-10-15 18:46:42 +00:00
Geoff Brown c906073cd5 Bug 1585119 - Re-enable many mochitests on android; r=geckoview-reviewers,snorp
Most of these tests have been disabled for a long time; they run well
in the current test environment.
With the additional tests running, task times increase; I have added one
more test chunk for android mochitest-plain.
These tests were identified from a random sampling of mochitest manifests;
I intend to enable more mochitests in future patches.

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

--HG--
extra : moz-landing-system : lando
2019-10-15 15:07:09 +00:00
Geoff Brown d0c30405e1 Bug 1521640 - Update android crashtest assertion ranges; r=geckoview-reviewers,snorp
Avoid assertion range mismatch errors in Android crashtests.

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

--HG--
extra : moz-landing-system : lando
2019-10-15 19:40:24 +00:00
Emilio Cobos Álvarez 1aaa268725 Bug 1588743 - Remove old scroll-snap implementation, and scroll snapping prefs. r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D49267

--HG--
extra : moz-landing-system : lando
2019-10-15 12:40:14 +00:00
Coroiu Cristina 291d475197 Backed out changeset 1a951477dca5 (bug 1588743) for xpcshell failures at devtools/shared/tests/unit/test_css-properties-db.js on a CLOSED TREE 2019-10-15 15:35:50 +03:00
Emilio Cobos Álvarez 8325c4b9a3 Bug 1588743 - Remove old scroll-snap implementation, and scroll snapping prefs. r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D49267

--HG--
extra : moz-landing-system : lando
2019-10-15 11:39:30 +00:00
Ting-Yu Lin 3fc5360b6e Bug 1582019 Part 2 - Disable splitting absolute positioned multicol containers. r=dholbert
The crashtest contains an absolute positioning <dialog> multicol
container. If it is fragmented, we end up having a very wrong frame
tree.

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

--HG--
extra : moz-landing-system : lando
2019-10-14 23:32:35 +00:00
Ting-Yu Lin 1142a39a2a Bug 1582019 Part 1 - Move the comments to make them easier to read. r=dholbert
By looking at the original diff, the comments were placed after the conditions.
https://hg.mozilla.org/mozilla-central/diff/854d0d4791411c4733946d366a3824509451ed4f/layout/generic/nsAbsoluteContainingBlock.cpp

I place the comments before the conditions, and add blank lines to
separate them. This is a preparation because Part 2 is going to add a
new condition.

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

--HG--
extra : moz-landing-system : lando
2019-10-14 22:43:19 +00:00
Oana Pop Rus 8a7bc2ad4e Backed out changeset 77357e0aa88e (bug 1584859) for wpt and mochitest failures. on a CLOSED TREE 2019-10-13 14:06:44 +03:00
Emilio Cobos Álvarez 8657ceea27 Bug 1584859 - Make smooth scrolling conditional on reduced motion settings. r=dbaron
We could put this change itself behind a pref too, if we considered that worth
it. But probably not so.

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

--HG--
extra : moz-landing-system : lando
2019-10-13 09:16:26 +00:00