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
`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
The PreFullZoomChange event gives listeners an opportunity to capture
state before the viewport full zoom changes. Responsive Design Mode uses
this to save and later restore the resolution of the RDM pane.
Differential Revision: https://phabricator.services.mozilla.com/D48621
--HG--
extra : moz-landing-system : lando
This is a gross hack, of course, but has the advantage of not breaking sites
that use both zoom and -moz-transform / -moz-transform-origin.
There should be no behavior change when the pref is off, of course, and the
webcompat team wanted to experiment with this.
Differential Revision: https://phabricator.services.mozilla.com/D49792
--HG--
extra : moz-landing-system : lando
The following tests are not removed and need to be ported to Shadow DOM:
- test_bug330925.xhtml
- test_bug372086.html
- test_bug319374.xhtml
Differential Revision: https://phabricator.services.mozilla.com/D50650
--HG--
extra : moz-landing-system : lando
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
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
The PreFullZoomChange event gives listeners an opportunity to capture
state before the viewport full zoom changes. Responsive Design Mode uses
this to save and later restore the resolution of the RDM pane.
Differential Revision: https://phabricator.services.mozilla.com/D48621
--HG--
extra : moz-landing-system : lando
The PreFullZoomChange event gives listeners an opportunity to capture
state before the viewport full zoom changes. Responsive Design Mode uses
this to save and later restore the resolution of the RDM pane.
Differential Revision: https://phabricator.services.mozilla.com/D48621
--HG--
extra : moz-landing-system : lando
VRManager only be accessible in the parent or GPU process. So, in the tab process, isPresenting() will always return false. In WebVR immersive mode, we need to skip layer painting and don't need to wait for painting because the compositing is already done in WebGL.
Differential Revision: https://phabricator.services.mozilla.com/D48119
--HG--
extra : moz-landing-system : lando
Make reftest --run-until-failure consistent with mochitest:
if --run-until-failure requested without --repeat, repeat up to 30 times;
if --run-until-failure requested with --repeat=N, repeat up to N times.
Differential Revision: https://phabricator.services.mozilla.com/D50484
--HG--
extra : moz-landing-system : lando
This patch:
- Gives ServoStyleRuleMap.cpp an include for Element.h (to provide that type).
- Gives inDeepTreeWalker.cpp a mozilla::dom prefix for its one use of Document.
- Gives inLayoutUtils.cpp a "using" decl for mozilla::dom, so we can compile
with the many un-namespaced "Document" and "Element" usages in that file.
Depends on D50167
Differential Revision: https://phabricator.services.mozilla.com/D50168
--HG--
extra : moz-landing-system : lando
This patch:
- Gives SVGFELeafFrame.cpp and SVGFEUnstyledLeafFrame.cpp the correct
namespace-prefixing in some static_cast operation, and changes the capturing
variable to be "auto*" to avoid repeating the long typename.
- Gives nsSVGContainerFrame.cpp, nsSVGIntegrationUtils.cpp, and
nsSVGSwitchFrame.cpp a "using namespace mozilla::dom" decl, so that their
multiple unprefixed SVGElement* usages become valid.
- Gives nsFilterInstance.h a forward-decl for WrFiltersHolder (which it uses in
function declarations)
- Gives nsFilterInstance.cpp an include for nsSVGIntegrationUtils.h to provide
the WrFiltersHolder type (which it uses).
- Gives nsSVGPatternFrame.h mozilla-namespace prefixes before all its
SVGAniated* type usages, to make them valid.
Depends on D50166
Differential Revision: https://phabricator.services.mozilla.com/D50167
--HG--
extra : moz-landing-system : lando
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
This patch:
- Gives nsMeterFrame.cpp a "using" decl for mozilla::dom::Document (matching
local style), to make its "nsCOMPtr<Document>" variable valid.
- Gives RetainedDisplayListBuilder.cpp an include for nsIFrameInlines.h
(and nsIFrame.h for good measure) to provide the definition for inline
function nsIFrame::IsFixedPosContainingBlock().
- Gives nsDisplayList.cpp an include for LayerAnimationInfo.h, since it uses
that type.
Depends on D50164
Differential Revision: https://phabricator.services.mozilla.com/D50165
--HG--
extra : moz-landing-system : lando
Changes here:
- Adding a "dom::" prefix in GeckoMVMContext.cpp (could've also added
a "using" decl, but I'm just adding a one-off prefix to match "dom::Document"
usage elsewhere in this file).
- Giving nsLayoutUtils an include for ViewportFrame.h since it uses that type.
- Giving nsPresArena.cpp an include for nsDisplayList.h to provide the
DisplayListArenaObjectId enum type.
Depends on D50163
Differential Revision: https://phabricator.services.mozilla.com/D50164
--HG--
extra : moz-landing-system : lando
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
This patch is entirely automated, and was generated with the following command:
./mach clang-format -p layout/
Differential Revision: https://phabricator.services.mozilla.com/D50162
--HG--
extra : moz-landing-system : lando
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
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
This seems to go back to our initial contenteditable implementation, and I don't
think there's a reason <label> should work differently from anything else.
Differential Revision: https://phabricator.services.mozilla.com/D46929
--HG--
extra : moz-landing-system : lando
Like visibility, we rely on pointer-events values inheriting down into
scrollbar part elements. So don't cached NAC styles for scrollbar parts
if we have a non-initial value for pointer-events, and adjust the UA
style sheet rules to ensure it is always inherited.
Differential Revision: https://phabricator.services.mozilla.com/D49359
--HG--
extra : moz-landing-system : lando
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
This patch introduces a Speech Recognition Service which interfaces with Mozilla's remote STT endpoint which is currently being used by multiple services
Differential Revision: https://phabricator.services.mozilla.com/D26047
--HG--
extra : moz-landing-system : lando