This allows the flattened tree to have a reasonable state before content
removals, allowing us to fix bugs like bug 1420533.
This used to be also the old setup, but was changed in bug 382376, since the
frame constructor used to reconstruct stuff synchronously. This used to break
all sorts of stylo invariants, and I fixed this in bug 1389743, so now the order
can be sane again.
MozReview-Commit-ID: K2pTweGKSq0
--HG--
extra : rebase_source : e53b7314f39f9c1c2e87fbe202f64b06e4c64c57
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 removes the extremely verbose "[nsFrameLoader] ReallyStartLoadingInternal
tried but couldn't show remote browser" warning. We already return NS_OK in
this case, so the behavior is expected.
--HG--
extra : rebase_source : 1b5a61542996ec4af9ff6a646ee15cb5ea22efdf
nsContentUtils::ExtractErrorValues converts `aSourceSpecOut` from
UTF-16 to UTF-8, which is generally not what we want. This patch
introduces a new version of ExtractErrorValues that doesn't perform
the conversion. To keep the patch short and avoid rewriting existing
clients, the existing version of the function is left in place.
MozReview-Commit-ID: J2NQb5ZCfht
--HG--
extra : rebase_source : c2bec753280bf7a2ea92d350ff42c03a8fd808b4
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
nsContentUtils::ExtractErrorValues converts `aSourceSpecOut` from
UTF-16 to UTF-8, which is generally not what we want. This patch
introduces a new version of ExtractErrorValues that doesn't perform
the conversion. To keep the patch short and avoid rewriting existing
clients, the existing version of the function is left in place.
MozReview-Commit-ID: J2NQb5ZCfht
--HG--
extra : rebase_source : c2bec753280bf7a2ea92d350ff42c03a8fd808b4
See bug 1422633, there are assertions missing, and servo doesn't assert at all
anymore.
I don't think it's worth optimizing / lazily resolving it, each time the
document state changes.
We usually just restyle the world anyway (which requires recomputing it), and
the changes that it's optimizing (nsWindow::SetActive() and XUL root element
localedir attribute changes) aren't common enough to warrant the complexity I'd
say.
This doesn't handle invalidating the cache in the case the root element goes
away, I haven't bothered because it was already broken, and GetRootElement() is
already gone in RemoveSubtreeFromDocument.
MozReview-Commit-ID: 9RuQhmmy7Kr
We should follow the real use cases to synthesize mouse or touch events to generate pointer events so that the related logic is covered by these test cases.
MozReview-Commit-ID: 9xSgjSL0Azt
We should follow the real use cases to synthesize mouse or touch events to generate pointer events so that the related logic is covered by these test cases.
MozReview-Commit-ID: 9xSgjSL0Azt
nsRange::SetStart(), nsRange::SetEnd(), nsRange::IsPointInRange() and
nsRange::ComparePoint() take a set of container node and offset in it to
specifying a DOM point. However, the caller may not have computed the offset
but may know the child node at the point. In such case, they can avoid
computing the offset with nsINode::IndexOf() if they have overloads which
take RawRangeBoundary.
Therefore, this patch implements the overloads and changes the callers in
editor.
MozReview-Commit-ID: E4DLbAgTTCI
--HG--
extra : rebase_source : 8d1632a030f1e0a0dd2b81c3996c19d427e8b0bd
Some methods of editor retrieves anchor and focus of selection. However, there
are no methods which directly access RangeBoundary of anchor and focus.
This patch adds it for making editor code simpler and avoiding unnecessary
child offset computation.
MozReview-Commit-ID: EvepQpFMi8S
--HG--
extra : rebase_source : 38f3c506db5c9d8790bbd625d552bfbc8d99cebc
Remove the headers included for "backwards compatibility" and just include them
where required.
--HG--
extra : source : e2beba7e6875120ebbbcadf24bcbcb5b86411a94
extra : amend_source : 11f07a27431cd468511f0bd45afe36150c6e342c
This is to fix the case where preference is restore to false when a testcase
ends, but nsDocument::DeleteShell is called afterwards. So, we make the
preference per-doc and set it when the document is created. The value does not
change for the lifetime of the document.
This is to fix the case where preference is restore to false when a
testcas ends, but nsDocument::DeleteShell is called afterwards. So, we
make the preference per-doc and once it is enabled for a document, it
stays enabled.
Remove the headers included for "backwards compatibility" and just include them
where required.
--HG--
extra : rebase_source : 03e703a81ed4b80f4f116ff36d8787464ce5acba
This removes an unnecessary level of indirection by replacing all
nsStringGlue.h instances with just nsString.h.
--HG--
extra : rebase_source : 340989240af4018f3ebfd92826ae11b0cb46d019
The service worker job queue can get stuck sometimes, so we don't want
the per-process service worker data structure to hold strong
references to content. Instead, I add a proxy that is only a weak
reference. The wrinkle is that we need to keep the promise alive as
long as the job and the window are otherwise alive. I solve this by
putting a cycle collected reference to the promise on the window
itself.
MozReview-Commit-ID: GbmCY4ZIQWk
--HG--
extra : rebase_source : 363ea865fd51bb44f3e727cd3469e316370e7cbc