WebKit Bugzilla
Attachment 340369 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]
Do not remove API methods
bug-185381-20180514184800.patch (text/plain), 31.35 KB, created by
Chris Nardi
on 2018-05-14 15:47:59 PDT
(
hide
)
Description:
Do not remove API methods
Filename:
MIME Type:
Creator:
Chris Nardi
Created:
2018-05-14 15:47:59 PDT
Size:
31.35 KB
patch
obsolete
>Subversion Revision: 231306 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index bee00c2c6c681b3d725ec9f576ded3cec8bd05ff..9362d9ccb9aa7583cf62795361ac5566c64b009f 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,26 @@ >+2018-05-14 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..bb105e174aa903ac85531628002088171def0ac6 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,20 @@ >+2018-05-14 Chris Nardi <cnardi@chromium.org> >+ >+ Remove Document#selectedStylesheetSet/preferredStylesheetSet >+ https://bugs.webkit.org/show_bug.cgi?id=185381 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Make API methods for Document#selectedStylesheetSet/preferredStylesheetSet do nothing. >+ >+ * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocument.h: >+ * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentGtk.cpp: >+ (webkit_dom_document_set_property): >+ (webkit_dom_document_get_property): >+ (webkit_dom_document_get_preferred_stylesheet_set): >+ (webkit_dom_document_get_selected_stylesheet_set): >+ (webkit_dom_document_set_selected_stylesheet_set): >+ > 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..864fa0febeb050b2e888ba0c8677d2dd0c0aa010 100644 >--- a/Source/WebKitLegacy/mac/ChangeLog >+++ b/Source/WebKitLegacy/mac/ChangeLog >@@ -1,3 +1,17 @@ >+2018-05-14 Chris Nardi <cnardi@chromium.org> >+ >+ Remove Document#selectedStylesheetSet/preferredStylesheetSet >+ https://bugs.webkit.org/show_bug.cgi?id=185381 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Make API methods for Document#selectedStylesheetSet/preferredStylesheetSet do nothing. >+ >+ * DOM/DOMDocument.mm: >+ (-[DOMDocument preferredStylesheetSet]): >+ (-[DOMDocument selectedStylesheetSet]): >+ (-[DOMDocument setSelectedStylesheetSet:]): >+ > 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..63a59d8f7a6a164617735f06130de0325db7a7e0 100644 >--- a/Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocument.h >+++ b/Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocument.h >@@ -941,6 +941,8 @@ webkit_dom_document_get_character_set(WebKitDOMDocument* self); > * webkit_dom_document_get_preferred_stylesheet_set: > * @self: A #WebKitDOMDocument > * >+ * This function has been removed and does nothing. >+ * > * Returns: A #gchar > * > * Deprecated: 2.22: Use JavaScriptCore API instead >@@ -952,6 +954,8 @@ webkit_dom_document_get_preferred_stylesheet_set(WebKitDOMDocument* self); > * webkit_dom_document_get_selected_stylesheet_set: > * @self: A #WebKitDOMDocument > * >+ * This function has been removed and does nothing. >+ * > * Returns: A #gchar > * > * Deprecated: 2.22: Use JavaScriptCore API instead >@@ -964,6 +968,7 @@ webkit_dom_document_get_selected_stylesheet_set(WebKitDOMDocument* self); > * @self: A #WebKitDOMDocument > * @value: A #gchar > * >+ * This function has been removed and does nothing. > * > * Deprecated: 2.22: Use JavaScriptCore API instead > **/ >diff --git a/Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentGtk.cpp b/Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentGtk.cpp >index 0557aa6ca85d033ed1f31613f01d896608722b94..6490dea815023601ce036aa234ba93fa536c2eda 100644 >--- a/Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentGtk.cpp >+++ b/Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentGtk.cpp >@@ -181,7 +181,7 @@ static void webkit_dom_document_set_property(GObject* object, guint propertyId, > 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)); >+ g_warning("%s: The selected-stylesheet-set property has been removed and no longer works.", __func__); > break; > default: > G_OBJECT_WARN_INVALID_PROPERTY_ID(object, propertyId, pspec); >@@ -291,10 +291,10 @@ static void webkit_dom_document_get_property(GObject* object, guint propertyId, > 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)); >+ g_warning("%s: The preferred-stylesheet-set property has been removed and no longer works.", __func__); > break; > case DOM_DOCUMENT_PROP_SELECTED_STYLESHEET_SET: >- g_value_take_string(value, webkit_dom_document_get_selected_stylesheet_set(self)); >+ g_warning("%s: The selected-stylesheet-set property has been removed and no longer works.", __func__); > break; > case DOM_DOCUMENT_PROP_ACTIVE_ELEMENT: > g_value_set_object(value, webkit_dom_document_get_active_element(self)); >@@ -1787,30 +1787,20 @@ gchar* webkit_dom_document_get_character_set(WebKitDOMDocument* self) > > 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; >+ g_warning("%s: this function has been removed and does nothing", __func__); >+ return nullptr; > } > > 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; >+ g_warning("%s: this function has been removed and does nothing", __func__); >+ return nullptr; > } > > 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); >+ g_warning("%s: this function has been removed and does nothing", __func__); >+ return nullptr; > } > > WebKitDOMElement* webkit_dom_document_get_active_element(WebKitDOMDocument* self) >diff --git a/Source/WebKitLegacy/mac/DOM/DOMDocument.mm b/Source/WebKitLegacy/mac/DOM/DOMDocument.mm >index 30b8c4535485b5631e1aeb66e45b05e5f1c17cf7..4fdf06ccbc64f9449af37ae6d2f1b232b9cc4adf 100644 >--- a/Source/WebKitLegacy/mac/DOM/DOMDocument.mm >+++ b/Source/WebKitLegacy/mac/DOM/DOMDocument.mm >@@ -326,20 +326,17 @@ > > - (NSString *)preferredStylesheetSet > { >- WebCore::JSMainThreadNullState state; >- return IMPL->preferredStylesheetSet(); >+ return nil; > } > > - (NSString *)selectedStylesheetSet > { >- WebCore::JSMainThreadNullState state; >- return IMPL->selectedStylesheetSet(); >+ return nil; > } > > - (void)setSelectedStylesheetSet:(NSString *)newSelectedStylesheetSet > { >- WebCore::JSMainThreadNullState state; >- IMPL->setSelectedStylesheetSet(newSelectedStylesheetSet); >+ return; > } > > - (DOMElement *)activeElement >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index c57160d41e115d5ef61d39eb1913042213754364..cc5ba663af4b81ecbb779e767709649d20a5fc5a 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,23 @@ >+2018-05-14 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/link-element-in-shadow-tree-expected.txt: >+ * fast/shadow-dom/link-element-in-shadow-tree.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..24ca100423ba862b7803f137944aa57b7e1706a4 100644 >--- a/LayoutTests/imported/w3c/ChangeLog >+++ b/LayoutTests/imported/w3c/ChangeLog >@@ -1,3 +1,15 @@ >+2018-05-14 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/link-element-in-shadow-tree-expected.txt b/LayoutTests/fast/shadow-dom/link-element-in-shadow-tree-expected.txt >index fedfae8bb08bacd83e6040ab6e04f1bcd8a639cb..db1dddc1fefc426b7fe3defeb2c23dc20e74fb40 100644 >--- a/LayoutTests/fast/shadow-dom/link-element-in-shadow-tree-expected.txt >+++ b/LayoutTests/fast/shadow-dom/link-element-in-shadow-tree-expected.txt >@@ -7,6 +7,4 @@ PASS Style rules loaded inside a shadow tree with closed mode must apply to a di > PASS Style rules loaded inside a shadow tree with open mode must apply to a div in the shadow tree > PASS :host style rules loaded inside a shadow tree with closed mode must apply to the host element > PASS :host style rules loaded inside a shadow tree with open mode must apply to the host element >-PASS Link elements should load stylesheets inside a connected shadow tree with closed mode >-PASS Link elements should load stylesheets inside a connected shadow tree with open mode > >diff --git a/LayoutTests/fast/shadow-dom/link-element-in-shadow-tree.html b/LayoutTests/fast/shadow-dom/link-element-in-shadow-tree.html >index fadb539cfb2b4bb110b8625c9cca394e7153175a..eaa4a98fa44a7aaa8ea0b23e62174ab43b7da051 100644 >--- a/LayoutTests/fast/shadow-dom/link-element-in-shadow-tree.html >+++ b/LayoutTests/fast/shadow-dom/link-element-in-shadow-tree.html >@@ -119,25 +119,6 @@ function test_loaded_stylesheet_rule_in_shadow_tree_applies_to_host(mode) { > > test_loaded_stylesheet_rule_in_shadow_tree_applies_to_host('closed'); > test_loaded_stylesheet_rule_in_shadow_tree_applies_to_host('open'); >- >-function test_title_is_ignored_in_shadow_tree(mode) { >- promise_test(() => { >- let doc; >- return create_iframe().then((contentWindow) => { >- doc = contentWindow.document; >- const host = doc.createElement('div'); >- const shadowRoot = host.attachShadow({mode: mode}); >- shadowRoot.innerHTML = `<style title="foo"></style>`; >- doc.body.appendChild(host); >- }).then(() => { >- assert_equals(doc.selectedStylesheetSet, null); >- }); >- }, `Link elements should load stylesheets inside a connected shadow tree with ${mode} mode`); >-} >- >-test_title_is_ignored_in_shadow_tree('closed'); >-test_title_is_ignored_in_shadow_tree('open'); >- > </script> > </html> > </body> >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..f4341dea16ad0477ac703201003c8e04591742fe 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/cssom/historical-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/cssom/historical-expected.txt >@@ -4,6 +4,8 @@ PASS Historical Document member: lastStyleSheetSet > PASS Historical Document member: preferredStyleSheetSet > PASS Historical Document member: styleSheetSets > PASS Historical Document member: enableStyleSheetsForSet >+PASS Historical Document member: selectedStylesheetSet >+PASS Historical Document member: preferredStylesheetSet > PASS Historical Element member: cascadedStyle > PASS Historical Element member: defaultStyle > PASS Historical Element member: rawComputedStyle >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