WebKit Bugzilla
Attachment 340132 Details for
Bug 185381
: Remove Document#selectedStylesheetSet/preferredStylesheetSet
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-185381-20180510173929.patch (text/plain), 30.45 KB, created by
Chris Nardi
on 2018-05-10 14:39:28 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Chris Nardi
Created:
2018-05-10 14:39:28 PDT
Size:
30.45 KB
patch
obsolete
>Subversion Revision: 231306 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index bee00c2c6c681b3d725ec9f576ded3cec8bd05ff..2f2ea1fc0ae25a9d67dfa4931be2bf1336a02b35 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,26 @@ >+2018-05-10 Chris Nardi <cnardi@chromium.org> >+ >+ Remove Document#selectedStylesheetSet/preferredStylesheetSet >+ https://bugs.webkit.org/show_bug.cgi?id=185381 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Document#selectedStylesheetSet/preferredStylesheetSet are non-standard methods that >+ are only implemented WebKit. Blink removed these methods in https://crbug.com/690609. >+ The standard versions of these methods are are no longer in the spec. Remove them >+ entirely from our implementation. >+ >+ Updated existing tests and imported/w3c/web-platform-tests/cssom/historical.html. >+ >+ * dom/Document.cpp: >+ (WebCore::Document::processHttpEquiv): >+ * dom/Document.h: >+ * dom/Document.idl: >+ * style/StyleScope.cpp: >+ (WebCore::Style::Scope::collectActiveStyleSheets): >+ * style/StyleScope.h: >+ (WebCore::Style::Scope::preferredStylesheetSetName const): >+ > 2018-05-03 Ryan Haddad <ryanhaddad@apple.com> > > Unreviewed, rolling out r231253. >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 6bb98eaeb9de0d45de9fee6354edc6120bd15fb7..9155591a2f326c4fe2f70fbe0c4ce483d1e4471a 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,18 @@ >+2018-05-10 Chris Nardi <cnardi@chromium.org> >+ >+ Remove Document#selectedStylesheetSet/preferredStylesheetSet >+ https://bugs.webkit.org/show_bug.cgi?id=185381 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Remove methods for Document#selectedStylesheetSet/preferredStylesheetSet. >+ >+ * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocument.h: >+ * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentGtk.cpp: >+ (webkit_dom_document_set_property): >+ (webkit_dom_document_get_property): >+ (webkitDOMDocumentInstallProperties): >+ > 2018-05-03 Ryan Haddad <ryanhaddad@apple.com> > > Unreviewed, rolling out r231253. >diff --git a/Source/WebKitLegacy/mac/ChangeLog b/Source/WebKitLegacy/mac/ChangeLog >index 3676e65a3ed703707de0044039e0201ca5f72df5..a6ed07ec9d01b13fa7777b0d5cf16ff5ca2fa514 100644 >--- a/Source/WebKitLegacy/mac/ChangeLog >+++ b/Source/WebKitLegacy/mac/ChangeLog >@@ -1,3 +1,15 @@ >+2018-05-10 Chris Nardi <cnardi@chromium.org> >+ >+ Remove Document#selectedStylesheetSet/preferredStylesheetSet >+ https://bugs.webkit.org/show_bug.cgi?id=185381 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Remove methods for Document#selectedStylesheetSet/preferredStylesheetSet. >+ >+ * DOM/DOMDocument.h: >+ * DOM/DOMDocument.mm: >+ > 2018-05-01 Eric Carlson <eric.carlson@apple.com> > > [MediaStream] remove WK1 support >diff --git a/Source/WebCore/dom/Document.cpp b/Source/WebCore/dom/Document.cpp >index 50b239a36f2c657a5fd7bacb4073523f24e1a315..3a5e2b799f32dc0762bcf6d061badc29c8c985b2 100644 >--- a/Source/WebCore/dom/Document.cpp >+++ b/Source/WebCore/dom/Document.cpp >@@ -3345,7 +3345,6 @@ void Document::processHttpEquiv(const String& equiv, const String& content, bool > // For more info, see the test at: > // http://www.hixie.ch/tests/evil/css/import/main/preferred.html > // -dwh >- styleScope().setSelectedStylesheetSetName(content); > styleScope().setPreferredStylesheetSetName(content); > break; > >@@ -3638,21 +3637,6 @@ StyleSheetList& Document::styleSheets() > return *m_styleSheetList; > } > >-String Document::preferredStylesheetSet() const >-{ >- return styleScope().preferredStylesheetSetName(); >-} >- >-String Document::selectedStylesheetSet() const >-{ >- return styleScope().selectedStylesheetSetName(); >-} >- >-void Document::setSelectedStylesheetSet(const String& aString) >-{ >- styleScope().setSelectedStylesheetSetName(aString); >-} >- > void Document::evaluateMediaQueryList() > { > if (m_mediaQueryMatcher) >diff --git a/Source/WebCore/dom/Document.h b/Source/WebCore/dom/Document.h >index 9c8338da06eb521aaf23f59f8635b4e69f0cf023..271b828ac456314ac2d0819b6c119abf6ddf4500 100644 >--- a/Source/WebCore/dom/Document.h >+++ b/Source/WebCore/dom/Document.h >@@ -728,10 +728,6 @@ public: > > MouseEventWithHitTestResults prepareMouseEvent(const HitTestRequest&, const LayoutPoint&, const PlatformMouseEvent&); > >- WEBCORE_EXPORT String preferredStylesheetSet() const; >- WEBCORE_EXPORT String selectedStylesheetSet() const; >- WEBCORE_EXPORT void setSelectedStylesheetSet(const String&); >- > enum class FocusRemovalEventsMode { Dispatch, DoNotDispatch }; > WEBCORE_EXPORT bool setFocusedElement(Element*, FocusDirection = FocusDirectionNone, > FocusRemovalEventsMode = FocusRemovalEventsMode::Dispatch); >diff --git a/Source/WebCore/dom/Document.idl b/Source/WebCore/dom/Document.idl >index 413e53e216fa41d3a3df82e3229edaccbb14d5d6..edf34a9e0a71b2bb7b04317e47f047ad93942897 100644 >--- a/Source/WebCore/dom/Document.idl >+++ b/Source/WebCore/dom/Document.idl >@@ -168,10 +168,6 @@ typedef ( > readonly attribute VisibilityState visibilityState; > attribute EventHandler onvisibilitychange; > >- // FIXME: Those were dropped from the CSSOM specification. >- readonly attribute DOMString? preferredStylesheetSet; >- attribute DOMString? selectedStylesheetSet; >- > // FIXME: Those have been dropped from the DOM specification. > readonly attribute DOMString? xmlEncoding; > attribute DOMString? xmlVersion; >diff --git a/Source/WebCore/style/StyleScope.cpp b/Source/WebCore/style/StyleScope.cpp >index 0e52e107a09ede5afb21fe032de0c448f15bae75..f22fd8332a24daa609fb5a51a93c96899ef6556e 100644 >--- a/Source/WebCore/style/StyleScope.cpp >+++ b/Source/WebCore/style/StyleScope.cpp >@@ -199,15 +199,6 @@ void Scope::setPreferredStylesheetSetName(const String& name) > didChangeActiveStyleSheetCandidates(); > } > >-void Scope::setSelectedStylesheetSetName(const String& name) >-{ >- if (m_selectedStylesheetSetName == name) >- return; >- m_selectedStylesheetSetName = name; >- didChangeActiveStyleSheetCandidates(); >-} >- >- > void Scope::addPendingSheet(const Element& element) > { > ASSERT(!hasPendingSheet(element)); >@@ -349,10 +340,8 @@ void Scope::collectActiveStyleSheets(Vector<RefPtr<StyleSheet>>& sheets) > if (linkElement.styleSheetIsLoading()) { > // it is loading but we should still decide which style sheet set to use > if (!enabledViaScript && !title.isEmpty() && m_preferredStylesheetSetName.isEmpty()) { >- if (!linkElement.attributeWithoutSynchronization(relAttr).contains("alternate")) { >+ if (!linkElement.attributeWithoutSynchronization(relAttr).contains("alternate")) > m_preferredStylesheetSetName = title; >- m_selectedStylesheetSetName = title; >- } > } > continue; > } >@@ -379,7 +368,7 @@ void Scope::collectActiveStyleSheets(Vector<RefPtr<StyleSheet>>& sheets) > // us as the preferred set. Otherwise, just ignore > // this sheet. > if (is<HTMLStyleElement>(element) || !rel.contains("alternate")) >- m_preferredStylesheetSetName = m_selectedStylesheetSetName = title; >+ m_preferredStylesheetSetName = title; > } > if (title != m_preferredStylesheetSetName) > sheet = nullptr; >diff --git a/Source/WebCore/style/StyleScope.h b/Source/WebCore/style/StyleScope.h >index b73e16c67d6b1488344e8a911b7eb6d326c33a36..2287a718932cecac93656063e87746008d5319b3 100644 >--- a/Source/WebCore/style/StyleScope.h >+++ b/Source/WebCore/style/StyleScope.h >@@ -78,9 +78,7 @@ public: > void removeStyleSheetCandidateNode(Node&); > > String preferredStylesheetSetName() const { return m_preferredStylesheetSetName; } >- String selectedStylesheetSetName() const { return m_selectedStylesheetSetName; } > void setPreferredStylesheetSetName(const String&); >- void setSelectedStylesheetSetName(const String&); > > void addPendingSheet(const Element&); > void removePendingSheet(const Element&); >@@ -178,7 +176,6 @@ private: > ListHashSet<Node*> m_styleSheetCandidateNodes; > > String m_preferredStylesheetSetName; >- String m_selectedStylesheetSetName; > > bool m_usesStyleBasedEditability { false }; > bool m_isUpdatingStyleResolver { false }; >diff --git a/Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocument.h b/Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocument.h >index 669a6a1678004d1d8d5e67d03aa638d34b91a16b..f4eae97feba7f3fc79aff05b8cf26d0f63eeb09b 100644 >--- a/Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocument.h >+++ b/Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocument.h >@@ -937,39 +937,6 @@ webkit_dom_document_get_ready_state(WebKitDOMDocument* self); > WEBKIT_DEPRECATED gchar* > webkit_dom_document_get_character_set(WebKitDOMDocument* self); > >-/** >- * webkit_dom_document_get_preferred_stylesheet_set: >- * @self: A #WebKitDOMDocument >- * >- * Returns: A #gchar >- * >- * Deprecated: 2.22: Use JavaScriptCore API instead >-**/ >-WEBKIT_DEPRECATED gchar* >-webkit_dom_document_get_preferred_stylesheet_set(WebKitDOMDocument* self); >- >-/** >- * webkit_dom_document_get_selected_stylesheet_set: >- * @self: A #WebKitDOMDocument >- * >- * Returns: A #gchar >- * >- * Deprecated: 2.22: Use JavaScriptCore API instead >-**/ >-WEBKIT_DEPRECATED gchar* >-webkit_dom_document_get_selected_stylesheet_set(WebKitDOMDocument* self); >- >-/** >- * webkit_dom_document_set_selected_stylesheet_set: >- * @self: A #WebKitDOMDocument >- * @value: A #gchar >- * >- * >- * Deprecated: 2.22: Use JavaScriptCore API instead >-**/ >-WEBKIT_DEPRECATED void >-webkit_dom_document_set_selected_stylesheet_set(WebKitDOMDocument* self, const gchar* value); >- > /** > * webkit_dom_document_get_active_element: > * @self: A #WebKitDOMDocument >diff --git a/Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentGtk.cpp b/Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentGtk.cpp >index 0557aa6ca85d033ed1f31613f01d896608722b94..2b4e86ababeaec8fc5ffcf29d46d790230f65300 100644 >--- a/Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentGtk.cpp >+++ b/Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentGtk.cpp >@@ -130,8 +130,6 @@ enum { > DOM_DOCUMENT_PROP_CHARSET, > DOM_DOCUMENT_PROP_READY_STATE, > DOM_DOCUMENT_PROP_CHARACTER_SET, >- DOM_DOCUMENT_PROP_PREFERRED_STYLESHEET_SET, >- DOM_DOCUMENT_PROP_SELECTED_STYLESHEET_SET, > DOM_DOCUMENT_PROP_ACTIVE_ELEMENT, > DOM_DOCUMENT_PROP_COMPAT_MODE, > DOM_DOCUMENT_PROP_WEBKIT_IS_FULL_SCREEN, >@@ -180,9 +178,6 @@ static void webkit_dom_document_set_property(GObject* object, guint propertyId, > case DOM_DOCUMENT_PROP_CHARSET: > webkit_dom_document_set_charset(self, g_value_get_string(value)); > break; >- case DOM_DOCUMENT_PROP_SELECTED_STYLESHEET_SET: >- webkit_dom_document_set_selected_stylesheet_set(self, g_value_get_string(value)); >- break; > default: > G_OBJECT_WARN_INVALID_PROPERTY_ID(object, propertyId, pspec); > break; >@@ -290,12 +285,6 @@ static void webkit_dom_document_get_property(GObject* object, guint propertyId, > case DOM_DOCUMENT_PROP_CHARACTER_SET: > g_value_take_string(value, webkit_dom_document_get_character_set(self)); > break; >- case DOM_DOCUMENT_PROP_PREFERRED_STYLESHEET_SET: >- g_value_take_string(value, webkit_dom_document_get_preferred_stylesheet_set(self)); >- break; >- case DOM_DOCUMENT_PROP_SELECTED_STYLESHEET_SET: >- g_value_take_string(value, webkit_dom_document_get_selected_stylesheet_set(self)); >- break; > case DOM_DOCUMENT_PROP_ACTIVE_ELEMENT: > g_value_set_object(value, webkit_dom_document_get_active_element(self)); > break; >@@ -678,26 +667,6 @@ void webkitDOMDocumentInstallProperties(GObjectClass* gobjectClass) > "", > WEBKIT_PARAM_READABLE)); > >- g_object_class_install_property( >- gobjectClass, >- DOM_DOCUMENT_PROP_PREFERRED_STYLESHEET_SET, >- g_param_spec_string( >- "preferred-stylesheet-set", >- "Document:preferred-stylesheet-set", >- "read-only gchar* Document:preferred-stylesheet-set", >- "", >- WEBKIT_PARAM_READABLE)); >- >- g_object_class_install_property( >- gobjectClass, >- DOM_DOCUMENT_PROP_SELECTED_STYLESHEET_SET, >- g_param_spec_string( >- "selected-stylesheet-set", >- "Document:selected-stylesheet-set", >- "read-write gchar* Document:selected-stylesheet-set", >- "", >- WEBKIT_PARAM_READWRITE)); >- > g_object_class_install_property( > gobjectClass, > DOM_DOCUMENT_PROP_ACTIVE_ELEMENT, >@@ -1785,34 +1754,6 @@ gchar* webkit_dom_document_get_character_set(WebKitDOMDocument* self) > return result; > } > >-gchar* webkit_dom_document_get_preferred_stylesheet_set(WebKitDOMDocument* self) >-{ >- WebCore::JSMainThreadNullState state; >- g_return_val_if_fail(WEBKIT_DOM_IS_DOCUMENT(self), 0); >- WebCore::Document* item = WebKit::core(self); >- gchar* result = convertToUTF8String(item->preferredStylesheetSet()); >- return result; >-} >- >-gchar* webkit_dom_document_get_selected_stylesheet_set(WebKitDOMDocument* self) >-{ >- WebCore::JSMainThreadNullState state; >- g_return_val_if_fail(WEBKIT_DOM_IS_DOCUMENT(self), 0); >- WebCore::Document* item = WebKit::core(self); >- gchar* result = convertToUTF8String(item->selectedStylesheetSet()); >- return result; >-} >- >-void webkit_dom_document_set_selected_stylesheet_set(WebKitDOMDocument* self, const gchar* value) >-{ >- WebCore::JSMainThreadNullState state; >- g_return_if_fail(WEBKIT_DOM_IS_DOCUMENT(self)); >- g_return_if_fail(value); >- WebCore::Document* item = WebKit::core(self); >- WTF::String convertedValue = WTF::String::fromUTF8(value); >- item->setSelectedStylesheetSet(convertedValue); >-} >- > WebKitDOMElement* webkit_dom_document_get_active_element(WebKitDOMDocument* self) > { > WebCore::JSMainThreadNullState state; >diff --git a/Source/WebKitLegacy/mac/DOM/DOMDocument.h b/Source/WebKitLegacy/mac/DOM/DOMDocument.h >index a8c570c37dc1de1911493a47aa97062982d284c8..ebed397761a5fbf2468a3f23dac529cbce1d8678 100644 >--- a/Source/WebKitLegacy/mac/DOM/DOMDocument.h >+++ b/Source/WebKitLegacy/mac/DOM/DOMDocument.h >@@ -81,8 +81,6 @@ WEBKIT_CLASS_AVAILABLE_MAC(10_4) > @property (readonly, copy) NSString *defaultCharset WEBKIT_AVAILABLE_MAC(10_5); > @property (readonly, copy) NSString *readyState WEBKIT_AVAILABLE_MAC(10_5); > @property (readonly, copy) NSString *characterSet WEBKIT_AVAILABLE_MAC(10_5); >-@property (readonly, copy) NSString *preferredStylesheetSet WEBKIT_AVAILABLE_MAC(10_5); >-@property (copy) NSString *selectedStylesheetSet WEBKIT_AVAILABLE_MAC(10_5); > @property (readonly, strong) DOMElement *activeElement WEBKIT_AVAILABLE_MAC(10_6); > > - (DOMElement *)createElement:(NSString *)tagName; >diff --git a/Source/WebKitLegacy/mac/DOM/DOMDocument.mm b/Source/WebKitLegacy/mac/DOM/DOMDocument.mm >index 30b8c4535485b5631e1aeb66e45b05e5f1c17cf7..a5c8177e3b946d6f489093d04a9f726e78d9d983 100644 >--- a/Source/WebKitLegacy/mac/DOM/DOMDocument.mm >+++ b/Source/WebKitLegacy/mac/DOM/DOMDocument.mm >@@ -324,24 +324,6 @@ > return IMPL->characterSetWithUTF8Fallback(); > } > >-- (NSString *)preferredStylesheetSet >-{ >- WebCore::JSMainThreadNullState state; >- return IMPL->preferredStylesheetSet(); >-} >- >-- (NSString *)selectedStylesheetSet >-{ >- WebCore::JSMainThreadNullState state; >- return IMPL->selectedStylesheetSet(); >-} >- >-- (void)setSelectedStylesheetSet:(NSString *)newSelectedStylesheetSet >-{ >- WebCore::JSMainThreadNullState state; >- IMPL->setSelectedStylesheetSet(newSelectedStylesheetSet); >-} >- > - (DOMElement *)activeElement > { > WebCore::JSMainThreadNullState state; >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index c57160d41e115d5ef61d39eb1913042213754364..46b1decbe7d172e2950c5ba7e0db0848f27a2d73 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,21 @@ >+2018-05-10 Chris Nardi <cnardi@chromium.org> >+ >+ Remove Document#selectedStylesheetSet/preferredStylesheetSet >+ https://bugs.webkit.org/show_bug.cgi?id=185381 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Update tests to remove selectedStylesheetSet/preferredStylesheetSet. >+ >+ * fast/css/link-disabled-attr-expected.txt: >+ * fast/css/link-disabled-attr.html: >+ * fast/dom/assign-to-prototype-accessor-on-prototype-should-throw-expected.txt: >+ * fast/dom/assign-to-prototype-accessor-on-prototype-should-throw.html: >+ * fast/dom/document-attribute-js-null-expected.txt: >+ * fast/dom/document-attribute-js-null.html: >+ * fast/shadow-dom/selected-stylesheet-in-shadow-tree-expected.txt: Removed. >+ * fast/shadow-dom/selected-stylesheet-in-shadow-tree.html: Removed. >+ > 2018-05-03 Miguel Gomez <magomez@igalia.com> > > Unreviewed GTK+ gardening after r231300. >diff --git a/LayoutTests/imported/w3c/ChangeLog b/LayoutTests/imported/w3c/ChangeLog >index 513f5482822a7829d61498ba2593221ca950a7bb..8a7581992c6c7bc23c9e4b445a401667444ad6ce 100644 >--- a/LayoutTests/imported/w3c/ChangeLog >+++ b/LayoutTests/imported/w3c/ChangeLog >@@ -1,3 +1,15 @@ >+2018-05-10 Chris Nardi <cnardi@chromium.org> >+ >+ Remove Document#selectedStylesheetSet/preferredStylesheetSet >+ https://bugs.webkit.org/show_bug.cgi?id=185381 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Refresh historical CSSOM test from upstream to test this change. >+ >+ * web-platform-tests/cssom/historical-expected.txt: >+ * web-platform-tests/cssom/historical.html: >+ > 2018-05-02 Youenn Fablet <youenn@apple.com> > > Rebase imported/w3c/web-platform-tests/service-workers/service-worker/fetch-request-redirect.https.html expectation >diff --git a/LayoutTests/fast/css/link-disabled-attr-expected.txt b/LayoutTests/fast/css/link-disabled-attr-expected.txt >index 7e81e5236d75306123cc9cf113e3c10890c2d36e..686a0252495efe2f27022f2a16dcd8ab1edc8444 100644 >--- a/LayoutTests/fast/css/link-disabled-attr-expected.txt >+++ b/LayoutTests/fast/css/link-disabled-attr-expected.txt >@@ -19,10 +19,6 @@ altsheet > FAIL link.disabled should be true. Was false. > PASS link.sheet is non-null. > FAIL getComputedStyle(testElement).backgroundColor should be rgb(0, 128, 0). Was rgba(0, 0, 0, 0). >-FAIL link.disabled should be true. Was false. >-PASS getComputedStyle(testElement).backgroundColor is originalBG >-PASS link.disabled is false >-FAIL getComputedStyle(testElement).backgroundColor should be rgb(0, 128, 0). Was rgba(0, 0, 0, 0). > PASS getComputedStyle(testElement).backgroundColor is originalBG > PASS successfullyParsed is true > >diff --git a/LayoutTests/fast/css/link-disabled-attr.html b/LayoutTests/fast/css/link-disabled-attr.html >index a2ca7735bfc8ee899cb83213b7e51a73c7e13457..7c24cdd1d19467bc9f4ca740413554aa1b26a89d 100644 >--- a/LayoutTests/fast/css/link-disabled-attr.html >+++ b/LayoutTests/fast/css/link-disabled-attr.html >@@ -75,19 +75,6 @@ function altSheetLoaded(e) { > shouldBeNonNull("link.sheet"); > shouldBe("getComputedStyle(testElement).backgroundColor", "'rgb(0, 128, 0)'"); > >- // Enabling a stylsheet set modifies disabled status of style sheets. >- >- document.selectedStyleSheetSet = "nosuchset"; >- shouldBeTrue("link.disabled"); >- shouldBe("getComputedStyle(testElement).backgroundColor", "originalBG"); >- >- document.selectedStyleSheetSet = "altset"; >- shouldBeFalse("link.disabled"); >- shouldBe("getComputedStyle(testElement).backgroundColor", "'rgb(0, 128, 0)'"); >- >- // Disabling a stylesheet *after* its stylesheet set has been selected >- // de-activates it. >- > link.disabled = true; > shouldBe("getComputedStyle(testElement).backgroundColor", "originalBG"); > >diff --git a/LayoutTests/fast/dom/assign-to-prototype-accessor-on-prototype-should-throw-expected.txt b/LayoutTests/fast/dom/assign-to-prototype-accessor-on-prototype-should-throw-expected.txt >index a037fbe0a3f6959494e7b81d90b7a99899c03979..b98316009283bf5bb9fb071503960134af3398d5 100644 >--- a/LayoutTests/fast/dom/assign-to-prototype-accessor-on-prototype-should-throw-expected.txt >+++ b/LayoutTests/fast/dom/assign-to-prototype-accessor-on-prototype-should-throw-expected.txt >@@ -4,7 +4,6 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE > > > PASS document.prototype.oncopy = "fail" threw exception TypeError: undefined is not an object (evaluating 'document.prototype.oncopy = "fail"'). >-PASS Document.prototype.selectedStylesheetSet = "fail" threw exception TypeError: The Document.selectedStylesheetSet setter can only be used on instances of Document. > PASS HTMLElement.prototype.innerText = "fail" threw exception TypeError: The HTMLElement.innerText setter can only be used on instances of HTMLElement. > PASS successfullyParsed is true > >diff --git a/LayoutTests/fast/dom/assign-to-prototype-accessor-on-prototype-should-throw.html b/LayoutTests/fast/dom/assign-to-prototype-accessor-on-prototype-should-throw.html >index 56d39622717e213f4cd327403f5a239ca1c2ccd5..cdef9ee986feb9d69d88e795e4fd9126f535ae81 100644 >--- a/LayoutTests/fast/dom/assign-to-prototype-accessor-on-prototype-should-throw.html >+++ b/LayoutTests/fast/dom/assign-to-prototype-accessor-on-prototype-should-throw.html >@@ -6,7 +6,6 @@ > description("Makes sure that assigning to a DOM property directly on the prototype throws a TypeError."); > > shouldThrow('document.prototype.oncopy = "fail"'); >-shouldThrow('Document.prototype.selectedStylesheetSet = "fail"'); > shouldThrow('HTMLElement.prototype.innerText = "fail"'); > > </script> >diff --git a/LayoutTests/fast/dom/document-attribute-js-null-expected.txt b/LayoutTests/fast/dom/document-attribute-js-null-expected.txt >index 72100f778ec7f9e42b7cf31b9fb94bfd91df4a39..15561f910376cb6d0de72ed8962795f72182f267 100644 >--- a/LayoutTests/fast/dom/document-attribute-js-null-expected.txt >+++ b/LayoutTests/fast/dom/document-attribute-js-null-expected.txt >@@ -1,7 +1,6 @@ > This test setting various attributes of documents to JavaScript null. > > TEST SUCCEEDED: Got the expected exception (9). [tested Document.xmlVersion] >-TEST SUCCEEDED: The value was null. [tested Document.selectedStylesheetSet] > > TEST SUCCEEDED: The value was the string 'null'. [tested HTMLDocument.title] > TEST SUCCEEDED: The value was the empty string. [tested HTMLDocument.cookie] >diff --git a/LayoutTests/fast/dom/document-attribute-js-null.html b/LayoutTests/fast/dom/document-attribute-js-null.html >index 7bc218b1c3c3ef06d8002f9c7555c4bd995704d0..f3fc96802f498165bb7b8029e37c5e23b22a57f7 100644 >--- a/LayoutTests/fast/dom/document-attribute-js-null.html >+++ b/LayoutTests/fast/dom/document-attribute-js-null.html >@@ -64,8 +64,7 @@ > typeName: 'Document', > docToUse: xmlDoc, > attributes: [ >- {name: 'xmlVersion', expectedExceptionCode: 9}, >- {name: 'selectedStylesheetSet', expectedNull: null} >+ {name: 'xmlVersion', expectedExceptionCode: 9} > ] > }, > { >diff --git a/LayoutTests/fast/shadow-dom/selected-stylesheet-in-shadow-tree-expected.txt b/LayoutTests/fast/shadow-dom/selected-stylesheet-in-shadow-tree-expected.txt >deleted file mode 100644 >index d7fe0d46e7d9ba200257bafe56f360fec5c2f3fd..0000000000000000000000000000000000000000 >--- a/LayoutTests/fast/shadow-dom/selected-stylesheet-in-shadow-tree-expected.txt >+++ /dev/null >@@ -1,8 +0,0 @@ >- >-PASS The title attribute on the style element in a document must set the preferred stylesheet. >-PASS The title attribute on the style element inside a closed shadow tree must not set the preferred stylesheet. >-PASS The title attribute on the style element inside an open shadow tree must not set the preferred stylesheet. >-PASS The title attribute on the link element in a document must set the preferred stylesheet. >-PASS The title attribute on the link element inside a closed shadow tree must not set the preferred stylesheet. >-PASS The title attribute on the link element inside an open shadow tree must not set the preferred stylesheet. >- >diff --git a/LayoutTests/fast/shadow-dom/selected-stylesheet-in-shadow-tree.html b/LayoutTests/fast/shadow-dom/selected-stylesheet-in-shadow-tree.html >deleted file mode 100644 >index b2e3a2c1b1306bdcc69ab93218c0a954b17024a2..0000000000000000000000000000000000000000 >--- a/LayoutTests/fast/shadow-dom/selected-stylesheet-in-shadow-tree.html >+++ /dev/null >@@ -1,99 +0,0 @@ >-<!DOCTYPE html> >-<html> >-<head> >-<title>Shadow DOM: Link and style elements inside a shadow tree should not affect the preferred stylesheet</title> >-<meta name="author" title="Ryosuke Niwa" href="mailto:rniwa@webkit.org"> >-<meta name="assert" content="Link and style elements inside a shadow tree should not affect the preferred stylesheet"> >-<script src='../../resources/testharness.js'></script> >-<script src='../../resources/testharnessreport.js'></script> >-</head> >-<body> >-<script> >- >-function make_iframe(markup, testFunction) { >- return () => { >- const iframe = document.createElement('iframe'); >- return new Promise(function (resolve) { >- iframe.onload = () => { resolve(iframe.contentDocument); }; >- document.body.appendChild(iframe); >- }).then(function (doc) { >- doc.open(); >- doc.write(markup); >- doc.close(); >- return testFunction(doc, doc.querySelector('div')); >- }).then(() => iframe.remove(), error => { >- iframe.remove(); >- return Promise.reject(error); >- }); >- }; >-} >- >-// Some browsers don't synchronously update the selected stylesheet. >-function wait_for_stylesheet_to_be_selected() { >- return new Promise(function (resolve) { >- setTimeout(resolve, 0); >- }); >-} >- >-promise_test(make_iframe(`<!DOCTYPE html><body>`, (doc) => { >- doc.body.innerHTML = `<style title="foo">div { color: red; }</style>`; >- return wait_for_stylesheet_to_be_selected().then(() => { >- assert_equals(doc.preferredStylesheetSet, 'foo'); >- assert_equals(doc.selectedStylesheetSet, 'foo'); >- }); >-}), 'The title attribute on the style element in a document must set the preferred stylesheet.'); >- >-promise_test(make_iframe(`<!DOCTYPE html><body><div>`, (doc) => { >- doc.querySelector('div').attachShadow({mode: 'closed'}).innerHTML = `<style title="foo"></style>`; >- return wait_for_stylesheet_to_be_selected().then(() => { >- assert_equals(doc.preferredStylesheetSet, null); >- assert_equals(doc.selectedStylesheetSet, null); >- }); >-}), 'The title attribute on the style element inside a closed shadow tree must not set the preferred stylesheet.'); >- >-promise_test(make_iframe(`<!DOCTYPE html><body><div>`, (doc) => { >- doc.querySelector('div').attachShadow({mode: 'open'}).innerHTML = `<style title="foo"></style>`; >- return wait_for_stylesheet_to_be_selected().then(() => { >- assert_equals(doc.preferredStylesheetSet, null); >- assert_equals(doc.selectedStylesheetSet, null); >- }); >-}), 'The title attribute on the style element inside an open shadow tree must not set the preferred stylesheet.'); >- >-function insert_link_and_wait(parent, title) { >- return new Promise((resolve, reject) => { >- const link = parent.ownerDocument.createElement('link'); >- link.rel = 'stylesheet'; >- link.title = title; >- link.href = 'resources/green-host.css'; >- link.onload = resolve; >- parent.appendChild(link); >- setTimeout(() => reject('Failed to load the stylesheet'), 1000); >- }).then(() => wait_for_stylesheet_to_be_selected()); >-} >- >-promise_test(make_iframe(`<!DOCTYPE html><body>`, (doc) => { >- return insert_link_and_wait(doc.body, 'foo').then(() => { >- assert_equals(doc.preferredStylesheetSet, 'foo'); >- assert_equals(doc.selectedStylesheetSet, 'foo'); >- }); >-}), 'The title attribute on the link element in a document must set the preferred stylesheet.'); >- >-promise_test(make_iframe(`<!DOCTYPE html><body><div>`, (doc) => { >- const root = doc.querySelector('div').attachShadow({mode: 'closed'}); >- return insert_link_and_wait(root, 'foo').then(() => { >- assert_equals(doc.preferredStylesheetSet, null); >- assert_equals(doc.selectedStylesheetSet, null); >- }); >-}), 'The title attribute on the link element inside a closed shadow tree must not set the preferred stylesheet.'); >- >-promise_test(make_iframe(`<!DOCTYPE html><body><div>`, (doc) => { >- const root = doc.querySelector('div').attachShadow({mode: 'open'}); >- return insert_link_and_wait(root, 'foo').then(() => { >- assert_equals(doc.preferredStylesheetSet, null); >- assert_equals(doc.selectedStylesheetSet, null); >- }); >-}), 'The title attribute on the link element inside an open shadow tree must not set the preferred stylesheet.'); >- >-</script> >-</html> >-</body> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/cssom/historical-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/cssom/historical-expected.txt >index d7bdffd6a6e3ff482264282de79d219e54c12df4..b4e50d307c34fa7406a34930e6ff8862c55c9471 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/cssom/historical-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/cssom/historical-expected.txt >@@ -8,4 +8,6 @@ PASS Historical Element member: cascadedStyle > PASS Historical Element member: defaultStyle > PASS Historical Element member: rawComputedStyle > PASS Historical Element member: usedStyle >+PASS Historical Element member: selectedStylesheetSet >+PASS Historical Element member: preferredStylesheetSet > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/cssom/historical.html b/LayoutTests/imported/w3c/web-platform-tests/cssom/historical.html >index ef31d14d3cf05dd5ae069c88ceceeccd79220869..ddd264c891957a91e5ad17cf9acdb414284f73c5 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/cssom/historical.html >+++ b/LayoutTests/imported/w3c/web-platform-tests/cssom/historical.html >@@ -1,5 +1,6 @@ > <!DOCTYPE html> > <title>Historical features</title> >+<link rel="help" href="https://drafts.csswg.org/cssom/#changes-from-5-december-2013"> > <script src="/resources/testharness.js"></script> > <script src="/resources/testharnessreport.js"></script> > <div id=log></div> >@@ -10,6 +11,8 @@ > "preferredStyleSheetSet", > "styleSheetSets", > "enableStyleSheetsForSet", >+ "selectedStylesheetSet", >+ "preferredStylesheetSet", > ].forEach(function(name) { > test(function() { > assert_false(name in document);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185381
:
340132
|
340133
|
340137
|
340369
|
340371
|
340381
|
340383