gecko-dev/dom/html
Emilio Cobos Álvarez 94de7e9ddf Bug 1847546 - Don't do duplicate work on style elements from the innerHTML setter. r=smaug
Right now, when binding to the tree we queue a runnable to update the
stylesheet, even though mEnableUpdates is false.

Even though the redundant update is nowadays always cached, it's just
wasted work, and the code is simpler without it.

This will be tested by bug 1771113, which is what made me look at this.

We need to tweak a bit the dispatch of applicable state change events
for DevTools, because for a case like:

  div.attachShadow({ mode: "open" }).innerHTML = `<style>...</style>`;

Before we'd go through the stylesheet cache here due to the redundant
update:

  https://searchfox.org/mozilla-central/rev/fb43eb3bdf5b51000bc7dfe3474cbe56ca2ab63c/layout/style/SharedStyleSheetCache.cpp#161-165

But now we won't, and the code in StyleSheet.cpp wasn't quite correct /
didn't dispatch the event.

Nobody listens to style-sheet-applicable-state-changed, so remove that
code while at it.

Differential Revision: https://phabricator.services.mozilla.com/D185559
2023-08-07 20:21:34 +00:00
..
crashtests Bug 1840088 - Crash test. r=emilio 2023-06-26 12:49:57 +00:00
input Bug 1828326 - Tenfold performance improvement of date calculations. r=anba,emilio,smaug 2023-07-19 09:45:16 +00:00
reftests Bug 1444491 - Update existing internal tests based on the autofocus algorithm updates r=emilio 2023-02-15 20:08:37 +00:00
test Bug 1266437 - Drop "OS" modifier r=smaug,m_kato,karlt,Gijs 2023-08-07 01:03:58 +00:00
ConstraintValidation.cpp
ConstraintValidation.h
ElementInternals.cpp Bug 1556358 - Part 2: Save and restore custom element form data. r=edgar 2023-06-28 04:31:22 +00:00
ElementInternals.h Bug 1556358 - Part 2: Save and restore custom element form data. r=edgar 2023-06-28 04:31:22 +00:00
HTMLAllCollection.cpp
HTMLAllCollection.h
HTMLAnchorElement.cpp Bug 1839922 - Remove usage of {Has,Get}Attr(kNameSpaceID_None, ..). r=edgar 2023-06-23 10:01:32 +00:00
HTMLAnchorElement.h Bug 1829225 - Make BeforeSetAttr take the parsed nsAttrValue. r=smaug 2023-04-21 09:25:17 +00:00
HTMLAreaElement.cpp Bug 1839922 - Remove usage of {Has,Get}Attr(kNameSpaceID_None, ..). r=edgar 2023-06-23 10:01:32 +00:00
HTMLAreaElement.h Bug 1829189 - Make OnAttrSetButNotChanged and AfterSetAttr infallible. r=smaug 2023-04-21 08:56:27 +00:00
HTMLAudioElement.cpp Bug 1839922 - Remove usage of {Has,Get}Attr(kNameSpaceID_None, ..). r=edgar 2023-06-23 10:01:32 +00:00
HTMLAudioElement.h
HTMLBodyElement.cpp Bug 1846277 - Remove nsGlobalWindow.h. r=dom-core,necko-reviewers,jesup,farre 2023-08-02 20:41:48 +00:00
HTMLBodyElement.h Bug 1839223 - Remove nsMappedAttributes. r=smaug 2023-06-22 17:22:03 +00:00
HTMLBRElement.cpp Bug 1839223 - Remove nsMappedAttributes. r=smaug 2023-06-22 17:22:03 +00:00
HTMLBRElement.h Bug 1839223 - Remove nsMappedAttributes. r=smaug 2023-06-22 17:22:03 +00:00
HTMLButtonElement.cpp Bug 1842974 - Remove dom.dialog_element.enabled pref r=emilio 2023-07-17 10:02:53 +00:00
HTMLButtonElement.h Bug 1829225 - Make BeforeSetAttr take the parsed nsAttrValue. r=smaug 2023-04-21 09:25:17 +00:00
HTMLCanvasElement.cpp Bug 1837070 - Ensure we flush OffscreenCanvas when the display list is recreated. r=lsalzman 2023-07-23 20:42:41 +00:00
HTMLCanvasElement.h Bug 1837070 - Ensure we flush OffscreenCanvas when the display list is recreated. r=lsalzman 2023-07-23 20:42:41 +00:00
HTMLDataElement.cpp
HTMLDataElement.h
HTMLDataListElement.cpp Bug 1839922 - Remove usage of {Has,Get}Attr(kNameSpaceID_None, ..). r=edgar 2023-06-23 10:01:32 +00:00
HTMLDataListElement.h
HTMLDetailsElement.cpp Bug 1829189 - Make OnAttrSetButNotChanged and AfterSetAttr infallible. r=smaug 2023-04-21 08:56:27 +00:00
HTMLDetailsElement.h Bug 1829189 - Make OnAttrSetButNotChanged and AfterSetAttr infallible. r=smaug 2023-04-21 08:56:27 +00:00
HTMLDialogElement.cpp Bug 1811129 - Implement the new dialog initial focus algorithm r=emilio 2023-08-02 13:35:47 +00:00
HTMLDialogElement.h Bug 1811129 - Implement the new dialog initial focus algorithm r=emilio 2023-08-02 13:35:47 +00:00
HTMLDivElement.cpp Bug 1839223 - Remove nsMappedAttributes. r=smaug 2023-06-22 17:22:03 +00:00
HTMLDivElement.h Bug 1839223 - Remove nsMappedAttributes. r=smaug 2023-06-22 17:22:03 +00:00
HTMLDNSPrefetch.cpp Bug 1596845 - Turn nsIDNSService dns flags into a cenum r=necko-reviewers,geckoview-reviewers,kershaw,m_kato 2022-12-23 09:26:17 +00:00
HTMLDNSPrefetch.h Bug 1596845 - Turn nsIDNSService dns flags into a cenum r=necko-reviewers,geckoview-reviewers,kershaw,m_kato 2022-12-23 09:26:17 +00:00
HTMLElement.cpp Bug 1556358 - Part 3: Restore FACE state in SessionStore. r=edgar,farre 2023-06-28 16:28:27 +00:00
HTMLElement.h Bug 1556358 - Part 2: Save and restore custom element form data. r=edgar 2023-06-28 04:31:22 +00:00
HTMLEmbedElement.cpp Bug 1839223 - Remove nsMappedAttributes. r=smaug 2023-06-22 17:22:03 +00:00
HTMLEmbedElement.h Bug 1839223 - Remove nsMappedAttributes. r=smaug 2023-06-22 17:22:03 +00:00
HTMLFieldSetElement.cpp Bug 1839642 - Notify all fieldset's elements properly when fieldset's disabled state is changed; r=smaug 2023-06-26 09:46:58 +00:00
HTMLFieldSetElement.h Bug 1839642 - Overriding method in HTMLFieldSetElement don't need to be virtual; r=smaug 2023-06-26 09:46:58 +00:00
HTMLFontElement.cpp Bug 1839223 - Remove nsMappedAttributes. r=smaug 2023-06-22 17:22:03 +00:00
HTMLFontElement.h Bug 1839223 - Remove nsMappedAttributes. r=smaug 2023-06-22 17:22:03 +00:00
HTMLFormControlsCollection.cpp Bug 1837540 - Make radio button group navigation follow tree-order. r=sefeng,smaug 2023-08-03 01:52:19 +00:00
HTMLFormControlsCollection.h
HTMLFormElement.cpp Bug 1837540 - Make radio button group navigation follow tree-order. r=sefeng,smaug 2023-08-03 01:52:19 +00:00
HTMLFormElement.h Bug 1837540 - Make radio button group navigation follow tree-order. r=sefeng,smaug 2023-08-03 01:52:19 +00:00
HTMLFormSubmission.cpp Bug 1820403 - Skip parts of form submission when the method is dialog. r=dom-core,sefeng 2023-07-18 13:00:27 +00:00
HTMLFormSubmission.h Bug 1820403 - Skip parts of form submission when the method is dialog. r=dom-core,sefeng 2023-07-18 13:00:27 +00:00
HTMLFormSubmissionConstants.h Bug 1842974 - Remove dom.dialog_element.enabled pref r=emilio 2023-07-17 10:02:53 +00:00
HTMLFrameElement.cpp
HTMLFrameElement.h Bug 1839223 - Remove nsMappedAttributes. r=smaug 2023-06-22 17:22:03 +00:00
HTMLFrameSetElement.cpp Bug 1846277 - Remove nsGlobalWindow.h. r=dom-core,necko-reviewers,jesup,farre 2023-08-02 20:41:48 +00:00
HTMLFrameSetElement.h Bug 1829225 - Make BeforeSetAttr take the parsed nsAttrValue. r=smaug 2023-04-21 09:25:17 +00:00
HTMLHeadingElement.cpp Bug 1839223 - Remove nsMappedAttributes. r=smaug 2023-06-22 17:22:03 +00:00
HTMLHeadingElement.h Bug 1839223 - Remove nsMappedAttributes. r=smaug 2023-06-22 17:22:03 +00:00
HTMLHRElement.cpp Bug 1839223 - Remove nsMappedAttributes. r=smaug 2023-06-22 17:22:03 +00:00
HTMLHRElement.h Bug 1839223 - Remove nsMappedAttributes. r=smaug 2023-06-22 17:22:03 +00:00
HTMLIFrameElement.cpp Bug 1839922 - Remove usage of {Has,Get}Attr(kNameSpaceID_None, ..). r=edgar 2023-06-23 10:01:32 +00:00
HTMLIFrameElement.h Bug 1839223 - Remove nsMappedAttributes. r=smaug 2023-06-22 17:22:03 +00:00
HTMLImageElement.cpp Bug 1844432 - Cache parsed src attribute URI. r=smaug 2023-07-24 10:07:49 +00:00
HTMLImageElement.h Bug 1844432 - Cache parsed src attribute URI. r=smaug 2023-07-24 10:07:49 +00:00
HTMLInputElement.cpp Bug 1266437 - Drop "OS" modifier r=smaug,m_kato,karlt,Gijs 2023-08-07 01:03:58 +00:00
HTMLInputElement.h Bug 1841801 - Make dirname apply to hidden, tel, url, email. r=dom-core,edgar 2023-07-24 09:44:20 +00:00
HTMLLabelElement.cpp Bug 1839922 - Remove usage of {Has,Get}Attr(kNameSpaceID_None, ..). r=edgar 2023-06-23 10:01:32 +00:00
HTMLLabelElement.h
HTMLLegendElement.cpp
HTMLLegendElement.h
HTMLLIElement.cpp Bug 1839223 - Remove nsMappedAttributes. r=smaug 2023-06-22 17:22:03 +00:00
HTMLLIElement.h Bug 1839223 - Remove nsMappedAttributes. r=smaug 2023-06-22 17:22:03 +00:00
HTMLLinkElement.cpp Bug 1847546 - Don't do duplicate work on style elements from the innerHTML setter. r=smaug 2023-08-07 20:21:34 +00:00
HTMLLinkElement.h Bug 1829225 - Make BeforeSetAttr take the parsed nsAttrValue. r=smaug 2023-04-21 09:25:17 +00:00
HTMLMapElement.cpp
HTMLMapElement.h
HTMLMarqueeElement.cpp Bug 1839223 - Remove nsMappedAttributes. r=smaug 2023-06-22 17:22:03 +00:00
HTMLMarqueeElement.h Bug 1839223 - Remove nsMappedAttributes. r=smaug 2023-06-22 17:22:03 +00:00
HTMLMediaElement.cpp Backed out changeset 675cf3cb3d33 (bug 1397646) for causing mochitest failures on test_fetch_basic_http.html. CLOSED TREE 2023-08-07 07:46:50 +03:00
HTMLMediaElement.h Backed out 3 changesets (bug 1693250) for causing high frequency failures on test_recreate_audio_sink_clock_time.html. CLOSED TREE 2023-07-18 06:01:09 +03:00
HTMLMenuElement.cpp
HTMLMenuElement.h
HTMLMetaElement.cpp Bug 1829570 - part 2: Add an overload of AsyncEventDispatcher::RunDOMEventWhenSafe r=smaug 2023-05-15 01:07:29 +00:00
HTMLMetaElement.h Bug 1829570 - part 2: Add an overload of AsyncEventDispatcher::RunDOMEventWhenSafe r=smaug 2023-05-15 01:07:29 +00:00
HTMLMeterElement.cpp
HTMLMeterElement.h
HTMLModElement.cpp
HTMLModElement.h
HTMLObjectElement.cpp Backed out changeset b387df97a255 (bug 392994) for causing failures on test_interactive_content_in_label.html. CLOSED TREE 2023-07-19 09:19:56 +03:00
HTMLObjectElement.h Bug 1839223 - Remove nsMappedAttributes. r=smaug 2023-06-22 17:22:03 +00:00
HTMLOptGroupElement.cpp Bug 1829189 - Make OnAttrSetButNotChanged and AfterSetAttr infallible. r=smaug 2023-04-21 08:56:27 +00:00
HTMLOptGroupElement.h Bug 1829189 - Make OnAttrSetButNotChanged and AfterSetAttr infallible. r=smaug 2023-04-21 08:56:27 +00:00
HTMLOptionElement.cpp Bug 1839922 - Remove usage of {Has,Get}Attr(kNameSpaceID_None, ..). r=edgar 2023-06-23 10:01:32 +00:00
HTMLOptionElement.h Bug 1839922 - Remove usage of {Has,Get}Attr(kNameSpaceID_None, ..). r=edgar 2023-06-23 10:01:32 +00:00
HTMLOptionsCollection.cpp Bug 1839223 - Remove nsMappedAttributes. r=smaug 2023-06-22 17:22:03 +00:00
HTMLOptionsCollection.h
HTMLOutputElement.cpp
HTMLOutputElement.h
HTMLParagraphElement.cpp Bug 1839223 - Remove nsMappedAttributes. r=smaug 2023-06-22 17:22:03 +00:00
HTMLParagraphElement.h Bug 1839223 - Remove nsMappedAttributes. r=smaug 2023-06-22 17:22:03 +00:00
HTMLPictureElement.cpp
HTMLPictureElement.h
HTMLPreElement.cpp Bug 1839223 - Remove nsMappedAttributes. r=smaug 2023-06-22 17:22:03 +00:00
HTMLPreElement.h Bug 1839223 - Remove nsMappedAttributes. r=smaug 2023-06-22 17:22:03 +00:00
HTMLProgressElement.cpp
HTMLProgressElement.h
HTMLScriptElement.cpp Backed out 5 changesets (bug 1839316) for causing leaks. CLOSED TREE 2023-08-07 16:43:03 +03:00
HTMLScriptElement.h Backed out 5 changesets (bug 1839316) for causing leaks. CLOSED TREE 2023-08-07 16:43:03 +03:00
HTMLSelectElement.cpp Bug 1839922 - Remove usage of {Has,Get}Attr(kNameSpaceID_None, ..). r=edgar 2023-06-23 10:01:32 +00:00
HTMLSelectElement.h Bug 1839223 - Remove nsMappedAttributes. r=smaug 2023-06-22 17:22:03 +00:00
HTMLSharedElement.cpp Bug 1839922 - Remove usage of {Has,Get}Attr(kNameSpaceID_None, ..). r=edgar 2023-06-23 10:01:32 +00:00
HTMLSharedElement.h Bug 1831863 - Drive by clean-ups to HTMLSharedElement. r=smaug 2023-05-10 16:47:18 +00:00
HTMLSharedListElement.cpp Bug 1839223 - Remove nsMappedAttributes. r=smaug 2023-06-22 17:22:03 +00:00
HTMLSharedListElement.h Bug 1839223 - Remove nsMappedAttributes. r=smaug 2023-06-22 17:22:03 +00:00
HTMLSlotElement.cpp Bug 1829225 - Make BeforeSetAttr take the parsed nsAttrValue. r=smaug 2023-04-21 09:25:17 +00:00
HTMLSlotElement.h Bug 1829225 - Make BeforeSetAttr take the parsed nsAttrValue. r=smaug 2023-04-21 09:25:17 +00:00
HTMLSourceElement.cpp Bug 1839223 - Remove nsMappedAttributes. r=smaug 2023-06-22 17:22:03 +00:00
HTMLSourceElement.h Bug 1839223 - Remove nsMappedAttributes. r=smaug 2023-06-22 17:22:03 +00:00
HTMLSpanElement.cpp Bug 1839223 - Remove nsMappedAttributes. r=smaug 2023-06-22 17:22:03 +00:00
HTMLSpanElement.h
HTMLStyleElement.cpp Bug 1847546 - Don't do duplicate work on style elements from the innerHTML setter. r=smaug 2023-08-07 20:21:34 +00:00
HTMLStyleElement.h Bug 1829189 - Make OnAttrSetButNotChanged and AfterSetAttr infallible. r=smaug 2023-04-21 08:56:27 +00:00
HTMLSummaryElement.cpp
HTMLSummaryElement.h
HTMLTableCaptionElement.cpp Bug 1839223 - Remove nsMappedAttributes. r=smaug 2023-06-22 17:22:03 +00:00
HTMLTableCaptionElement.h Bug 1839223 - Remove nsMappedAttributes. r=smaug 2023-06-22 17:22:03 +00:00
HTMLTableCellElement.cpp Bug 1839922 - Remove usage of {Has,Get}Attr(kNameSpaceID_None, ..). r=edgar 2023-06-23 10:01:32 +00:00
HTMLTableCellElement.h Bug 1839223 - Remove nsMappedAttributes. r=smaug 2023-06-22 17:22:03 +00:00
HTMLTableColElement.cpp Bug 1839223 - Remove nsMappedAttributes. r=smaug 2023-06-22 17:22:03 +00:00
HTMLTableColElement.h Bug 1839223 - Remove nsMappedAttributes. r=smaug 2023-06-22 17:22:03 +00:00
HTMLTableElement.cpp Bug 1840088 - Add back type check to HTMLTableElement::BuildInheritedAttributes(). r=nika 2023-06-23 17:59:17 +00:00
HTMLTableElement.h Bug 1839223 - Remove nsMappedAttributes. r=smaug 2023-06-22 17:22:03 +00:00
HTMLTableRowElement.cpp Bug 1839223 - Remove nsMappedAttributes. r=smaug 2023-06-22 17:22:03 +00:00
HTMLTableRowElement.h Bug 1839223 - Remove nsMappedAttributes. r=smaug 2023-06-22 17:22:03 +00:00
HTMLTableSectionElement.cpp Bug 1839223 - Remove nsMappedAttributes. r=smaug 2023-06-22 17:22:03 +00:00
HTMLTableSectionElement.h Bug 1839223 - Remove nsMappedAttributes. r=smaug 2023-06-22 17:22:03 +00:00
HTMLTemplateElement.cpp Bug 1839223 - Remove nsMappedAttributes. r=smaug 2023-06-22 17:22:03 +00:00
HTMLTemplateElement.h
HTMLTextAreaElement.cpp Bug 1842027 - Don't localize <input type=number>'s default value unless for display. r=masayuki 2023-07-12 16:55:36 +00:00
HTMLTextAreaElement.h Bug 1842027 - Don't localize <input type=number>'s default value unless for display. r=masayuki 2023-07-12 16:55:36 +00:00
HTMLTimeElement.cpp
HTMLTimeElement.h
HTMLTitleElement.cpp
HTMLTitleElement.h
HTMLTrackElement.cpp Bug 1839922 - Remove usage of {Has,Get}Attr(kNameSpaceID_None, ..). r=edgar 2023-06-23 10:01:32 +00:00
HTMLTrackElement.h Bug 1829189 - Make OnAttrSetButNotChanged and AfterSetAttr infallible. r=smaug 2023-04-21 08:56:27 +00:00
HTMLUnknownElement.cpp
HTMLUnknownElement.h
HTMLVideoElement.cpp Bug 1839922 - Remove usage of {Has,Get}Attr(kNameSpaceID_None, ..). r=edgar 2023-06-23 10:01:32 +00:00
HTMLVideoElement.h Bug 1839223 - Remove nsMappedAttributes. r=smaug 2023-06-22 17:22:03 +00:00
ImageDocument.cpp Bug 1846141 - Turn browser.zoom.siteSpecific into an static pref. r=nika 2023-08-01 00:14:36 +00:00
ImageDocument.h Bug 1844752, initialize nsNodeInfoManager::mPrincipal with the correct principal when available, r=dom-core,emilio,peterv 2023-07-31 23:44:15 +00:00
MediaDocument.cpp Bug 1844752, initialize nsNodeInfoManager::mPrincipal with the correct principal when available, r=dom-core,emilio,peterv 2023-07-31 23:44:15 +00:00
MediaDocument.h Bug 1844752, initialize nsNodeInfoManager::mPrincipal with the correct principal when available, r=dom-core,emilio,peterv 2023-07-31 23:44:15 +00:00
MediaError.cpp Bug 1838415 - Introduce RFPTarget::MediaError. r=tjr 2023-06-26 07:17:39 +00:00
MediaError.h
moz.build Backed out 5 changesets (bug 1839316) for causing leaks. CLOSED TREE 2023-08-07 16:43:03 +03:00
nsBrowserElement.cpp
nsBrowserElement.h
nsDOMStringMap.cpp Bug 1839922 - Remove usage of {Has,Get}Attr(kNameSpaceID_None, ..). r=edgar 2023-06-23 10:01:32 +00:00
nsDOMStringMap.h
nsGenericHTMLElement.cpp Bug 1846277 - Remove nsGlobalWindow.h. r=dom-core,necko-reviewers,jesup,farre 2023-08-02 20:41:48 +00:00
nsGenericHTMLElement.h Backed out 2 changesets (bug 1843035) for causing assertion failures in dom/html/nsGenericHTMLElement.cpp CLOSED TREE 2023-07-18 17:30:09 +03:00
nsGenericHTMLFrameElement.cpp Bug 1839922 - Remove usage of {Has,Get}Attr(kNameSpaceID_None, ..). r=edgar 2023-06-23 10:01:32 +00:00
nsGenericHTMLFrameElement.h Bug 1829189 - Make OnAttrSetButNotChanged and AfterSetAttr infallible. r=smaug 2023-04-21 08:56:27 +00:00
nsHTMLContentSink.cpp Bug 1444491 - Check the number of script blocking style sheets in autofocus algorithm r=hsivonen 2023-02-15 20:08:38 +00:00
nsHTMLDocument.cpp Bug 1846277 - Untangle nsGlobalWindow*.h includes. r=dom-core,media-playback-reviewers,sessionstore-reviewers,padenot,farre 2023-08-02 20:41:49 +00:00
nsHTMLDocument.h Bug 1844752, initialize nsNodeInfoManager::mPrincipal with the correct principal when available, r=dom-core,emilio,peterv 2023-07-31 23:44:15 +00:00
nsIConstraintValidation.cpp
nsIConstraintValidation.h
nsIFormControl.h Bug 1839555 - Get rid of nsIFormControl::AllowDrop r=dom-core,peterv 2023-06-24 00:58:44 +00:00
nsIHTMLCollection.h
nsIRadioGroupContainer.h
nsIRadioVisitor.h
nsRadioVisitor.cpp
nsRadioVisitor.h
PlayPromise.cpp
PlayPromise.h
RadioNodeList.cpp
RadioNodeList.h
TextControlElement.h Bug 1842027 - Don't localize <input type=number>'s default value unless for display. r=masayuki 2023-07-12 16:55:36 +00:00
TextControlState.cpp Bug 1842546 - Removed dom.input_events.beforeinput.enabled pref. r=dom-core,webidl,smaug,masayuki 2023-07-17 08:50:11 +00:00
TextControlState.h Bug 1842027 - Don't localize <input type=number>'s default value unless for display. r=masayuki 2023-07-12 16:55:36 +00:00
TextInputListener.h Bug 1833181 - Avoid attr lookups to check whether input value is empty. r=smaug 2023-05-15 17:16:41 +00:00
TextTrackManager.cpp Bug 1846277 - Remove nsGlobalWindow.h. r=dom-core,necko-reviewers,jesup,farre 2023-08-02 20:41:48 +00:00
TextTrackManager.h
TimeRanges.cpp Bug 1703812, 1817997, 1821362: apply code formatting via Lando 2023-05-24 13:28:38 +00:00
TimeRanges.h Bug 1817997 - Write a version of GetSeekableTimeRanges that uses double and not TimeUnit. r=alwu 2023-05-24 13:18:43 +00:00
ValidityState.cpp
ValidityState.h
VideoDocument.cpp Bug 1844752, initialize nsNodeInfoManager::mPrincipal with the correct principal when available, r=dom-core,emilio,peterv 2023-07-31 23:44:15 +00:00