Unfortunately, nsGenericHTMLElement::GetAssociatedEditor() cannot use concrete classes because it may return nsIEditor which is set via nsIDocShell.editor. The editor set to nsIDocShell may be implemented by JS since nsIEditor isn't marked as builtinclass.
MozReview-Commit-ID: 6GY9LOYp4hM
--HG--
extra : rebase_source : 3e0464067b30daf8254805458c5358d7ea644be8
In our current setup, in which links with an href attribute always match either
:link or :visited, no matter whether that attribute's value is a valid URI,
changes to the attribute always put the element into either the "match nothing"
state or the "match :link" state, via calls to Link::ResetLinkState.
The only thing FlushPendingLinkUpdates is needed for is (lazily, in case it
turns out to not be needed because the element got removed from the DOM anyway)
registering a history observer to switch the link state to :visited as needed.
This means that selector matching consumers that would never expose :visited
state to start with don't need to worry about calling FlushPendingLinkUpdates.
Internally, doRemoveChildAt does quite a bit of cleanup, and that includes some
calls to nsIDocument::GetRootElement(). Before this patch, those calls will
misleadingly return the still-present mCachedRootElement member-var. We'd
really like those invocations to find an empty cached variable, and fall back
to checking the actual updated child list.
MozReview-Commit-ID: 8hhKcWyUVYQ
--HG--
extra : rebase_source : 238057c864e01c2af8c985250ed5e948b29bc338
I wasn't able to measure any performance improvement on talos. I
haven't tried to measure anything more specific.
However, it seems like avoiding a hashtable lookup should be worthwhile.
(At one point I thought I saw nsINode::GetProperty show up as
significant in a profile, but then I concluded I was mislead, I think
because I had focused on a very small slice of the profile and the
numbers weren't significant. I don't entirely remember since this was a
while ago.)
MozReview-Commit-ID: A9OoL9qV02D
--HG--
extra : transplant_source : 2%B15e1%F3%D7%BD%EFW%9C%97%BC5%BC%BB%943%E57
This is only called during URI resolution, and the proptable bit should make
this relatively fast.
--HG--
extra : rebase_source : 866dd136e6630db3ff7423e30d59151a01c258a6
This is only called during URI resolution, and the proptable bit should make
this relatively fast.
--HG--
extra : rebase_source : 866dd136e6630db3ff7423e30d59151a01c258a6
Doing QI from nsIEditor to nsIEditorIMESupport doesn't make sense because editor should always support all methods and attributes of nsIEditorIMESupport (it does NOT mean that all nsIEditor implementation need to support IME).
This patch moves all of them to nsIEditor for avoiding redundant QIs.
MozReview-Commit-ID: DzIKuGHG4iy
--HG--
extra : rebase_source : cc5e9a6ae4572ebe461d9770ffa5c23d33dc8526
hasFeature() always returning true matches the current DOM spec. SVG 2
has removed requiredFeatures. Chrome has had both of these always
return true since 2014, and they seem to have had no problems.
Even requiredFeatures="" (empty string) now returns true, matching
Chrome.
MozReview-Commit-ID: 1LEu3iK4R94