Title: [211654] trunk
Revision
211654
Author
cdu...@apple.com
Date
2017-02-03 14:40:28 -0800 (Fri, 03 Feb 2017)

Log Message

Drop Mac App Store workaround for window.getComputedStyle()
https://bugs.webkit.org/show_bug.cgi?id=166891
<rdar://problem/28282452>

Reviewed by Sam Weinig.

Drop Mac App Store workaround for window.getComputedStyle() now that
<rdar://problem/28020681> has been fixed.

* page/DOMWindow.cpp:
* page/DOMWindow.h:
* page/DOMWindow.idl:
* platform/RuntimeApplicationChecks.h:
* platform/RuntimeApplicationChecks.mm:
(WebCore::MacApplication::isAppStore): Deleted.

Modified Paths

Diff

Modified: trunk/LayoutTests/fast/dom/Window/getComputedStyle-missing-parameter-expected.txt (211653 => 211654)


--- trunk/LayoutTests/fast/dom/Window/getComputedStyle-missing-parameter-expected.txt	2017-02-03 22:18:19 UTC (rev 211653)
+++ trunk/LayoutTests/fast/dom/Window/getComputedStyle-missing-parameter-expected.txt	2017-02-03 22:40:28 UTC (rev 211654)
@@ -4,7 +4,7 @@
 
 
 PASS window.getComputedStyle() threw exception TypeError: Not enough arguments.
-PASS window.getComputedStyle(null) threw exception TypeError: Type error.
+PASS window.getComputedStyle(null) threw exception TypeError: Argument 1 ('element') to Window.getComputedStyle must be an instance of Element.
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: trunk/Source/WebCore/ChangeLog (211653 => 211654)


--- trunk/Source/WebCore/ChangeLog	2017-02-03 22:18:19 UTC (rev 211653)
+++ trunk/Source/WebCore/ChangeLog	2017-02-03 22:40:28 UTC (rev 211654)
@@ -1,5 +1,23 @@
 2017-02-03  Chris Dumez  <cdu...@apple.com>
 
+        Drop Mac App Store workaround for window.getComputedStyle()
+        https://bugs.webkit.org/show_bug.cgi?id=166891
+        <rdar://problem/28282452>
+
+        Reviewed by Sam Weinig.
+
+        Drop Mac App Store workaround for window.getComputedStyle() now that
+        <rdar://problem/28020681> has been fixed.
+
+        * page/DOMWindow.cpp:
+        * page/DOMWindow.h:
+        * page/DOMWindow.idl:
+        * platform/RuntimeApplicationChecks.h:
+        * platform/RuntimeApplicationChecks.mm:
+        (WebCore::MacApplication::isAppStore): Deleted.
+
+2017-02-03  Chris Dumez  <cdu...@apple.com>
+
         Dismiss HTML form validation popover when pressing Escape key
         https://bugs.webkit.org/show_bug.cgi?id=167716
         <rdar://problem/29872943>

Modified: trunk/Source/WebCore/page/DOMWindow.cpp (211653 => 211654)


--- trunk/Source/WebCore/page/DOMWindow.cpp	2017-02-03 22:18:19 UTC (rev 211653)
+++ trunk/Source/WebCore/page/DOMWindow.cpp	2017-02-03 22:40:28 UTC (rev 211654)
@@ -1457,18 +1457,6 @@
     return CSSComputedStyleDeclaration::create(element, false, pseudoElt);
 }
 
-// FIXME: Drop this overload once <rdar://problem/28016778> has been fixed.
-ExceptionOr<RefPtr<CSSStyleDeclaration>> DOMWindow::getComputedStyle(Document&, const String&)
-{
-#if PLATFORM(MAC)
-    if (MacApplication::isAppStore()) {
-        printErrorMessage(ASCIILiteral("Passing a non-Element as first parameter to window.getComputedStyle() is invalid and always returns null"));
-        return nullptr;
-    }
-#endif
-    return Exception { TypeError };
-}
-
 RefPtr<CSSRuleList> DOMWindow::getMatchedCSSRules(Element* element, const String& pseudoElement, bool authorOnly) const
 {
     if (!isCurrentlyDisplayedInFrame())

Modified: trunk/Source/WebCore/page/DOMWindow.h (211653 => 211654)


--- trunk/Source/WebCore/page/DOMWindow.h	2017-02-03 22:18:19 UTC (rev 211653)
+++ trunk/Source/WebCore/page/DOMWindow.h	2017-02-03 22:40:28 UTC (rev 211654)
@@ -205,7 +205,6 @@
     // DOM Level 2 Style Interface
 
     WEBCORE_EXPORT Ref<CSSStyleDeclaration> getComputedStyle(Element&, const String& pseudoElt) const;
-    ExceptionOr<RefPtr<CSSStyleDeclaration>> getComputedStyle(Document&, const String& pseudoElt);
 
     // WebKit extensions
 

Modified: trunk/Source/WebCore/page/DOMWindow.idl (211653 => 211654)


--- trunk/Source/WebCore/page/DOMWindow.idl	2017-02-03 22:18:19 UTC (rev 211653)
+++ trunk/Source/WebCore/page/DOMWindow.idl	2017-02-03 22:40:28 UTC (rev 211654)
@@ -137,9 +137,6 @@
 
     [NewObject] CSSStyleDeclaration getComputedStyle(Element element, optional DOMString? pseudoElement = null);
 
-    // FIXME: Drop the following overload of getComputedStyle once <rdar://problem/28020681> has been fixed.
-    [NewObject, MayThrowException] CSSStyleDeclaration? getComputedStyle(Document document, optional DOMString? pseudoElement = null);
-
     CSSRuleList getMatchedCSSRules(optional Element? element = null, optional DOMString? pseudoElement = null);
 
     [Replaceable] readonly attribute unrestricted double devicePixelRatio;

Modified: trunk/Source/WebCore/platform/RuntimeApplicationChecks.h (211653 => 211654)


--- trunk/Source/WebCore/platform/RuntimeApplicationChecks.h	2017-02-03 22:18:19 UTC (rev 211653)
+++ trunk/Source/WebCore/platform/RuntimeApplicationChecks.h	2017-02-03 22:40:28 UTC (rev 211654)
@@ -52,7 +52,6 @@
 bool isSolidStateNetworksDownloader();
 WEBCORE_EXPORT bool isVersions();
 WEBCORE_EXPORT bool isHRBlock();
-WEBCORE_EXPORT bool isAppStore();
 
 } // MacApplication
 

Modified: trunk/Source/WebCore/platform/RuntimeApplicationChecks.mm (211653 => 211654)


--- trunk/Source/WebCore/platform/RuntimeApplicationChecks.mm	2017-02-03 22:18:19 UTC (rev 211653)
+++ trunk/Source/WebCore/platform/RuntimeApplicationChecks.mm	2017-02-03 22:40:28 UTC (rev 211654)
@@ -154,12 +154,6 @@
     return isSolidStateNetworksDownloader;
 }
 
-bool MacApplication::isAppStore()
-{
-    static bool isAppStore = applicationBundleIsEqualTo("com.apple.appstore");
-    return isAppStore;
-}
-
 #endif // PLATFORM(MAC)
 
 #if PLATFORM(IOS)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to