The whole function doesn't have much sense.
I killed its only DOM use in bug 1427511.
Now it only has two callers in nsCSSFrameConstructor, which basically only want
to know whether the children of the same node can have different flattened tree
parents.
So let's check that directly instead (checking whether the element has a binding
or a shadow root), and simplify a bit other surrounding code while at it.
Leave the XUL popup / menubar code doing the broken thing they were doing
beforehand, because it doesn't look to me like it's trivial to fix... They're
effectively assuming that the children of the menupopup end up in a single
insertion point, which is true, but doesn't need to be. Maybe they should walk
the DOM tree? Don't want to dig into that right now, since XUL insertion points
can be filtered and all that... Not fun.
Also, this removes the broken optimization that used to check
mParentFrame->GetContent()->HasChildren(), because it's pretty broken. It used
to be relevant before bug 653881, because <children> element used to not exist,
but now the insertion point at least needs to contain the <children> element all
the time.
There even used to be a XXX comment saying that the optimization didn't work,
which was removed in:
https://hg.mozilla.org/mozilla-central/rev/2d8585ec74b3
We could still check for "no insertion points", and optimize that, but it
doesn't seem worth it.
MozReview-Commit-ID: L4lspkxKENr
/builds/worker/workspace/build/src/layout/xul/nsMenuFrame.cpp r=backout a=backout on a CLOSED TREE
--HG--
extra : amend_source : e09bf154093728898ad2c27dd185108f9ff3b009
We no longer call the function directly. It has been replaced by
nsStyleDisplay::GetTransitionCombinedDuraion(uint32_t).
MozReview-Commit-ID: 9wZExWPmnyG
--HG--
extra : rebase_source : dff6b4e686578e7c79e16148ab3ab63b40444be7
This is also a prerequisite to use repeated values for the used value.
Note that each count should never be zero since their initial value is 1 and
we never set zero length property value to the member.
MozReview-Commit-ID: 44ZMhopuK6o
--HG--
extra : rebase_source : 6284b2b5beb43bf78c16e0c39e95ec0e5118ed14
This is a prerequisite to use repeated values for the used value of the each
animation property instead of the computed values.
In a subsequent patch in this patch series, the timing function will be replaced
with the one which may be a repeated value in computed animation timing function values list.
MozReview-Commit-ID: GOKHE3MH0Ue
--HG--
extra : rebase_source : ecc270eddb648d2915292ec3e219f4e349c6047c
The layout debugger UI is only accessible on desktop platforms, so there's no
need to include it for Android builds.
MozReview-Commit-ID: 8PTDwExU5xz
--HG--
extra : rebase_source : 0cf22b85afd0b036a4899761eca3248ba3ffafbe
The event targets of touch events are not necessarily to be the same as their corresponding pointer events. So we don't have to cache the event target of pointer events when they are generated from touch.
MozReview-Commit-ID: 9Gd6ion7NXf
There are some edge cases in test verification where mozharness requests
reftest verification of a non-reftest. In this case, it is best for the
reftest harness to figure out that the requested file is not a test,
do no work and exit cleanly without complaint.
It doesn't fill the ancestors of the first frame if aCommonAncestor is null,
which means that we get garbage afterwards.
MozReview-Commit-ID: G85dv7KM1Xd
--HG--
extra : rebase_source : 80168515b122c60461bf1cde1695fb7b98aaaa99
Now that accessing nsIContent slots is not a blob of virtual function calls, we
should be able to unify logic here, and speed up the not-so-rare case for
chrome, while keeping the usual case fast.
MozReview-Commit-ID: 87iY5Cbhx4T
This bug notes that getCSSValuesForProperty does not mention the
"none" value for counter-increment and counter-reset. This fixes the
problem by mentioning the variants in the entries in nsCSSPropList.h.
MozReview-Commit-ID: HpZIMIIejHc
It seemed valid to simply set the expected variants in
nsCSSPropList.h; other properties (e.g., align-content) do this as
well.
MozReview-Commit-ID: HVZGOofkwi1
--HG--
extra : rebase_source : 53388e48c491843a3fd93a3c46fdcd9c9bd3cc41
The "all" property in the devtools CSS database included all possible
property values; however only a few are truly appropriate. This patch
adds a special case for "all" to
InspectorUtils::GetCSSValuesForProperty to fix this.
MozReview-Commit-ID: HEnrvCJylHI
--HG--
extra : rebase_source : 4738129974b95e2c231cd92cd5e4bc04e6708409
The renaming here is like this:
SetStringBuffer -> SetKnownLiveStringBuffer
SetEphemeralStringBuffer -> SetStringBuffer
SetOwnedString -> SetKnownLiveString
SetOwnedAtom -> SetKnownLiveAtom
This should make it clearer what the lifetime expectations are on the caller side.
MozReview-Commit-ID: ERHbB3r6paN
This matches Blink's behavior.
Just skipping table row groups from being containing blocks makes
layout/reftests/table-overflow/table-cell-block-overflow.html render differently
(and way more different than any other browser, actually...), so I avoided doing
that.
Though I'm not really proud of this one, better ideas welcome. Maybe I should
just fix table layout so that we agree with WebKit / Blink... But that seemed
harder, too.
MozReview-Commit-ID: AkUB4MFzwZK
This code was relying on nsImageFrame::ContentRemoved running before it.
MozReview-Commit-ID: Imjhd9exjQS
--HG--
extra : rebase_source : 7c6367f515dc140176e50d959c07250057e28354
This makes the pres shell be notified as the last observer unconditionally.
In practice this doesn't matter, and it may already be the case if an iframe
goes display: none and back. In practice, the only dependency that requires this
order is that the pres shell needs to be notified _after_ the content sink, so
we don't try to enter frame construction before beginning the shell update.
That may be worth looking into, but definitely not in the scope of this bug... :)
MozReview-Commit-ID: 9WeJ5kaUtBq
--HG--
extra : rebase_source : 6589df0aa8a875dc270894fabb6b4bc170d6b6fe
This also removes some confusing comments around nsIDocument regarding some kind
of "special" stylesheets, which don't seem to exist anymore, and consolidates
StyleSheetList so that we only have one implementation.
I think that fixes a potential leak on the shadow root code (even though the API
is v0 only), given the pointer from the ShadowRootStyleSheetList to the
ShadowRoot wasn't being CCd.
Also, more stuff could be renamed, methods removed, etc, feel free to suggest
more cleanup, I've done mostly the minimal.
Next steps are moving the stylesets there and stop using the proto binding sheet
list / resources.
MozReview-Commit-ID: D9hnDgPQAS5
This also removes some confusing comments around nsIDocument regarding some kind
of "special" stylesheets, which don't seem to exist anymore, and consolidates
StyleSheetList so that we only have one implementation.
I think that fixes a potential leak on the shadow root code (even though the API
is v0 only), given the pointer from the ShadowRootStyleSheetList to the
ShadowRoot wasn't being CCd.
Also, more stuff could be renamed, methods removed, etc, feel free to suggest
more cleanup, I've done mostly the minimal.
Next steps are moving the stylesets there and stop using the proto binding sheet
list / resources.
MozReview-Commit-ID: D9hnDgPQAS5
--HG--
extra : rebase_source : 0597917521894288c6b749e5d3ac6ac3b7db44a0
This test case is broken. The anchor element is drag but not canvas element. Shift the position of mousedown event a little bit so that the canvas element is drag.
MozReview-Commit-ID: 5Ebqtbzwg0d
ShapeInfo and its derived classes are private to nsFloatManager, which don't
need to be in the header. Move them to cpp to make compile faster after
changing them.
MozReview-Commit-ID: MRkBGoqcPj
--HG--
extra : rebase_source : bc1de4269629f881e49af0d4faba89e8fbd4e460
There may be some pending input events in the queue of thread when content starts a dnd operation. Spec says that input events should be suppressed when there is a dnd operation. Add a flag in ESM and turn on/off when start/finish a dnd operation. Checking the flag in PresShell::HandleEvent because we may start a dnd operation with pointermove and we want to suppress the mousemove as well.
MozReview-Commit-ID: 43NZrA7SW4c
For an OOF frame, the parent frame that's associated with our parent
style context is the *placeholder's* parent -- not the OOF frame's
parent.
MozReview-Commit-ID: CUSBkWDqxWz
--HG--
extra : rebase_source : 96dfef60ed87b94fe7ec1ea5c3104658e283b3ea
This is a follow-up to bug 1409249. There are a lot of places where our
factory singleton constructors either don't correctly handle their returned
references being released by the component manager, or do handle it, but in
ways that are not obvious.
This patch handles a few places where we can sometimes wind up with dangling
singleton pointers, adds some explanatory comments and sanity check
assertions, and replaces some uses of manual refcounting with StaticRefPtr and
ClearOnShutdown.
There are still some places where we may wind up with odd behavior if the
first QI for a getService call fails. In those cases, we wind up destroying
the first instance of a service that we create, and re-creating a new one
later.
MozReview-Commit-ID: ANYndvd7aZx
--HG--
extra : rebase_source : acfb0611a028fef6b9387eb5d1d9e285782fbc7c
This feature is intended to help Firefox frontend developers experiment with
replacing XUL content with modern flexbox. We might also eventually use
this emulation to *actually* render most or all of our legacy XUL UI.
MozReview-Commit-ID: 3g2W9o3t23H
--HG--
extra : rebase_source : a3e8b443d9b58e5af3287a23de6edc276ed5e847
In modern flexbox and in "display:-webkit-box", children with
"visibility:collapse" currently generate "struts" which have 0 main-size but
nonzero cross-size.
But XUL/-moz-box treats these children differently -- it makes them 0-sized in
both axes. So we need to add a custom behavior to modern flexbox in order to
emulate that.
Specifically, this patch makes us:
- Ignore these children when computing the flex container's intrinsic sizes.
- Take a simpler codepath with 0-sized struts for collapsed elements when
laying out a -moz-box (rather than the typical 2-pass layout, with strut
cross-size being established in the 1st pass).
MozReview-Commit-ID: IpkADpFFBMx
--HG--
extra : rebase_source : d42a291c414c61906a82c2be2b5f1834aa24e4e3
XUL popups (i.e. FrameConstructionItem instances with mIsPopup==true) behave
like out-of-flow content -- in particular, they generate nsPlaceholderFrame
instances. So, they need the same placeholder-wrapping behavior that we have
for other out-of-flow frames inside of an emulated legacy box, in order to
satisfy our existing invariants.
MozReview-Commit-ID: KnspN4kTPnx
--HG--
extra : rebase_source : 8487f4ee50b21dc0389514fe34a17a73375a58ab
This patch does not change behavior. This patch just refactors the logic in
IsXULDisplayType so that -moz-box and -moz-inline-box are handled via a
dedicated early-return. This lets a later patch in this series make a more
understandable targeted tweak to add pref-controlled behavior for these display
values.
MozReview-Commit-ID: 6keGrxJcA5l
--HG--
extra : rebase_source : a4c7a6dd205da7d7c39c172ebb6d0c3bb7cd5458
Now that (per previous patch) NS_STATE_FLEX_IS_EMULATING_LEGACY_BOX isn't just
a webkit-box-specific tag: this patch here generalizes the variable-names and
comments associated with that flag in nsCSSFrameConstructor.cpp.
This patch does not make any changes to behavior; it's simply renaming &
comment tweaks.
MozReview-Commit-ID: DcF5GirAQwD
--HG--
extra : rebase_source : d847c5579399a4cc31dc14a52a93b03ed917034e
To be clear, this is a "paving the way" patch. At this point in the patch
series, it's not yet possible for us to generate a nsFlexContainerFrame that
has display:-moz-box. (A later patch in this series will make that possible.)
This patch adds the mechanics to nsFlexContainerFrame instances so that they'll
label themselves appropriately (with NS_STATE_FLEX_IS_EMULATING_LEGACY_BOX)
once it *does* become possible for -moz-box to spawn a nsFlexContainerFrame.
Moreover, this patch updates the state bit's documentation to reflect its new
potential-usage.
MozReview-Commit-ID: ElApieVoTLf
--HG--
extra : rebase_source : 0c59e2a0adc8e060a687e5ffdf6246eb8068eef6
This patch isn't changing semantics of this bit at all - it just renames it to
a more general name. In other words, this patch does not change behavior.
MozReview-Commit-ID: 4wb13X4YinJ
--HG--
extra : rebase_source : 9a89ce8782f735d7f4a8ad471606a2af5201ac83
If the content process which is printing target content is closed
during printing, PrintProgressService will continue to display
progress dialog even if Cancel is clicked.
This patch will:
* If IPC connection is closed, notify to PrintProgressService via
nsIWebProgressListener.
MozReview-Commit-ID: DoOfJjnk1wJ
--HG--
extra : rebase_source : 861d36fca15fe156645235cdc77bc9461363a0b0
The autofocus attribute on form elements forces layout in CheckIfFocusable.
To avoid unpleasant FOUCs, defer autofocus processing until frames are
constructed in PresShell::Initialize.
Resolve the race between nsAutoFocusEvent running and page load by checking the
readystate at time of event posting.
MozReview-Commit-ID: 90jiJYJWmRg
--HG--
extra : rebase_source : afff926ba916139b14d60e06db56290c6935673a
display: contents is about to ship in other engines, let's prevent subtle bugs.
MozReview-Commit-ID: C8saQnRvRuI
--HG--
extra : rebase_source : 9501831db98b23e6805e39dca219a94ca59d00a4
Currently, InspectorUtils::GetCSSValuesForProperty will not return
"match-parent" for "text-align". The bug is that InspectorUtils uses
an out-of-date approach to finding the end of the keyword table; and
this approach conflicts with the special "unsafe" handling in
TextAlignUnsafeEnabledPrefChangeCallback:
https://dxr.mozilla.org/mozilla-central/rev/21ddfb9e6cc008e47da89db50e22697dc7b38635/layout/base/nsLayoutUtils.cpp#317-321
MozReview-Commit-ID: 58qfKQwIyMX
--HG--
extra : rebase_source : 022a8c970c121cbe76533a29d0439a64ead63085
Most of the Shadow DOM related code are behind "dom.webcomponents.enabled" and
this pref is only used by Shadow DOM right now, so we should rename it to
"dom.webcomponents.shadowdom.enabled"
MozReview-Commit-ID: er1c7AsSSW
Because of the previous patch, the inherited_status is now always
EXPECTED_PASS so we don't need to actually pass it around.
MozReview-Commit-ID: pgMkLgNCOE
--HG--
extra : rebase_source : fce3c66ad7ccaf458befc7c41c9a2a4cdea87875
Without this patch, putting something like
skip-if(Android) include foo/reftest.list
behaves unexpectedly. Instead of skipping the foo/reftest.list file
on Android, it instead "inherits" the skip-if condition down into each
reftest inside foo/reftest.list. If any of those reftests then have a
fuzzy or fuzzy-if(Android,...) annotation, that will override the
skip-if annotation, and the test will still run.
Based on the occurrences of this pattern in the codebase, I believe the
more intuitive semantics of "skip the foo/reftest.list file completely,
on Android" is more desirable. This patch implements the change in
semantics. It also disallows inheriting other statuses down into
included reftest.list files, such as from a fails or fuzzy annotation on
the include statement. These cases don't currently exist in the tree,
but any attempt to do so will now throw an error.
MozReview-Commit-ID: HLJuSYNHvU5
--HG--
extra : rebase_source : d0d31ab63413aeee31d78226e55726836cd6bebf