Diff
Modified: trunk/LayoutTests/ChangeLog (182512 => 182513)
--- trunk/LayoutTests/ChangeLog 2015-04-08 01:08:15 UTC (rev 182512)
+++ trunk/LayoutTests/ChangeLog 2015-04-08 01:51:10 UTC (rev 182513)
@@ -1,3 +1,17 @@
+2015-04-07 Commit Queue <[email protected]>
+
+ Unreviewed, rolling out r182511.
+ https://bugs.webkit.org/show_bug.cgi?id=143507
+
+ caused debug test failures (Requested by alexchristensen on
+ #webkit).
+
+ Reverted changeset:
+
+ "Block popups from content extensions."
+ https://bugs.webkit.org/show_bug.cgi?id=143497
+ http://trac.webkit.org/changeset/182511
+
2015-04-07 Alex Christensen <[email protected]>
Block popups from content extensions.
Deleted: trunk/LayoutTests/http/tests/contentextensions/popups-expected.txt (182512 => 182513)
--- trunk/LayoutTests/http/tests/contentextensions/popups-expected.txt 2015-04-08 01:08:15 UTC (rev 182512)
+++ trunk/LayoutTests/http/tests/contentextensions/popups-expected.txt 2015-04-08 01:51:10 UTC (rev 182513)
@@ -1,4 +0,0 @@
-ALERT: about:blank successfully blocked
-ALERT: data url should not be blocked
-ALERT: data url should not be blocked
-
Deleted: trunk/LayoutTests/http/tests/contentextensions/popups.html (182512 => 182513)
--- trunk/LayoutTests/http/tests/contentextensions/popups.html 2015-04-08 01:08:15 UTC (rev 182512)
+++ trunk/LayoutTests/http/tests/contentextensions/popups.html 2015-04-08 01:51:10 UTC (rev 182513)
@@ -1,18 +0,0 @@
-<html>
-<body>
-<script>
-if (window.testRunner) {
- testRunner.dumpAsText();
- testRunner.setCanOpenWindows(true);
- testRunner.setCloseRemainingWindowsWhenComplete(true);
-}
-
-win = window.open("about:blank");
-alert(win ? "FAIL" : "about:blank successfully blocked");
-win = window.open("data:text/html, hello");
-alert(win ? "data url should not be blocked" : "FAIL");
-win = window.open("data:text/html, about");
-alert(win ? "data url should not be blocked" : "FAIL");
-</script>
-</body>
-</html>
Deleted: trunk/LayoutTests/http/tests/contentextensions/popups.html.json (182512 => 182513)
--- trunk/LayoutTests/http/tests/contentextensions/popups.html.json 2015-04-08 01:08:15 UTC (rev 182512)
+++ trunk/LayoutTests/http/tests/contentextensions/popups.html.json 2015-04-08 01:51:10 UTC (rev 182513)
@@ -1,11 +0,0 @@
-[
- {
- "action": {
- "type": "block"
- },
- "trigger": {
- "url-filter": "about",
- "resource-type":["popup"]
- }
- }
-]
Modified: trunk/Source/WebCore/ChangeLog (182512 => 182513)
--- trunk/Source/WebCore/ChangeLog 2015-04-08 01:08:15 UTC (rev 182512)
+++ trunk/Source/WebCore/ChangeLog 2015-04-08 01:51:10 UTC (rev 182513)
@@ -1,3 +1,17 @@
+2015-04-07 Commit Queue <[email protected]>
+
+ Unreviewed, rolling out r182511.
+ https://bugs.webkit.org/show_bug.cgi?id=143507
+
+ caused debug test failures (Requested by alexchristensen on
+ #webkit).
+
+ Reverted changeset:
+
+ "Block popups from content extensions."
+ https://bugs.webkit.org/show_bug.cgi?id=143497
+ http://trac.webkit.org/changeset/182511
+
2015-04-07 Myles C. Maxfield <[email protected]>
[Cocoa] System fonts do not get correct tracking
Modified: trunk/Source/WebCore/loader/ResourceLoadInfo.cpp (182512 => 182513)
--- trunk/Source/WebCore/loader/ResourceLoadInfo.cpp 2015-04-08 01:08:15 UTC (rev 182512)
+++ trunk/Source/WebCore/loader/ResourceLoadInfo.cpp 2015-04-08 01:51:10 UTC (rev 182513)
@@ -85,8 +85,6 @@
return static_cast<uint16_t>(ResourceType::SVGDocument);
if (name == "media")
return static_cast<uint16_t>(ResourceType::Media);
- if (name == "popup")
- return static_cast<uint16_t>(ResourceType::Popup);
return static_cast<uint16_t>(ResourceType::Invalid);
}
Modified: trunk/Source/WebCore/loader/ResourceLoadInfo.h (182512 => 182513)
--- trunk/Source/WebCore/loader/ResourceLoadInfo.h 2015-04-08 01:08:15 UTC (rev 182512)
+++ trunk/Source/WebCore/loader/ResourceLoadInfo.h 2015-04-08 01:51:10 UTC (rev 182513)
@@ -42,13 +42,12 @@
SVGDocument = 0x0040,
Media = 0x0080,
PlugInStream = 0x0100,
- Popup = 0x0200,
};
enum class LoadType : uint16_t {
Invalid = 0x0000,
- FirstParty = 0x0400,
- ThirdParty = 0x0800,
+ FirstParty = 0x0200,
+ ThirdParty = 0x0400,
};
typedef uint16_t ResourceFlags;
Modified: trunk/Source/WebCore/page/DOMWindow.cpp (182512 => 182513)
--- trunk/Source/WebCore/page/DOMWindow.cpp 2015-04-08 01:08:15 UTC (rev 182512)
+++ trunk/Source/WebCore/page/DOMWindow.cpp 2015-04-08 01:51:10 UTC (rev 182513)
@@ -35,8 +35,6 @@
#include "CSSRuleList.h"
#include "Chrome.h"
#include "ChromeClient.h"
-#include "ContentExtensionActions.h"
-#include "ContentExtensionRule.h"
#include "Crypto.h"
#include "DOMApplicationCache.h"
#include "DOMSelection.h"
@@ -83,7 +81,6 @@
#include "PageTransitionEvent.h"
#include "Performance.h"
#include "PlatformScreen.h"
-#include "ResourceLoadInfo.h"
#include "RuntimeEnabledFeatures.h"
#include "ScheduledAction.h"
#include "Screen.h"
@@ -2124,38 +2121,24 @@
DOMWindow& activeWindow, DOMWindow& firstWindow)
{
if (!isCurrentlyDisplayedInFrame())
- return nullptr;
+ return 0;
Document* activeDocument = activeWindow.document();
if (!activeDocument)
- return nullptr;
+ return 0;
Frame* firstFrame = firstWindow.frame();
if (!firstFrame)
- return nullptr;
+ return 0;
-#if ENABLE(CONTENT_EXTENSIONS)
- if (firstFrame
- && firstFrame->mainFrame().page()
- && firstFrame->mainFrame().page()->userContentController()
- && firstFrame->mainFrame().document()) {
- ResourceLoadInfo resourceLoadInfo = {URL(ParsedURLString, urlString), firstFrame->mainFrame().document()->url(), ResourceType::Popup};
- Vector<ContentExtensions::Action> actions = firstFrame->mainFrame().page()->userContentController()->actionsForResourceLoad(resourceLoadInfo);
- for (const ContentExtensions::Action& action : actions) {
- if (action.type() == ContentExtensions::ActionType::BlockLoad)
- return nullptr;
- }
- }
-#endif
-
if (!firstWindow.allowPopUp()) {
// Because FrameTree::find() returns true for empty strings, we must check for empty frame names.
// Otherwise, illegitimate window.open() calls with no name will pass right through the popup blocker.
if (frameName.isEmpty() || !m_frame->tree().find(frameName))
- return nullptr;
+ return 0;
}
// Get the target frame for the special cases of _top and _parent.
// In those cases, we schedule a location change right now and return early.
- Frame* targetFrame = nullptr;
+ Frame* targetFrame = 0;
if (frameName == "_top")
targetFrame = &m_frame->tree().top();
else if (frameName == "_parent") {
@@ -2166,7 +2149,7 @@
}
if (targetFrame) {
if (!activeDocument->canNavigate(targetFrame))
- return nullptr;
+ return 0;
URL completedURL = firstFrame->document()->completeURL(urlString);
@@ -2186,7 +2169,7 @@
WindowFeatures windowFeatures(windowFeaturesString);
RefPtr<Frame> result = createWindow(urlString, frameName, windowFeatures, activeWindow, firstFrame, m_frame);
- return result ? result->document()->domWindow() : nullptr;
+ return result ? result->document()->domWindow() : 0;
}
void DOMWindow::showModalDialog(const String& urlString, const String& dialogFeaturesString, DOMWindow& activeWindow, DOMWindow& firstWindow, std::function<void (DOMWindow&)> prepareDialogFunction)
Modified: trunk/Source/WebCore/page/UserContentController.cpp (182512 => 182513)
--- trunk/Source/WebCore/page/UserContentController.cpp 2015-04-08 01:08:15 UTC (rev 182512)
+++ trunk/Source/WebCore/page/UserContentController.cpp 2015-04-08 01:51:10 UTC (rev 182513)
@@ -212,13 +212,6 @@
m_contentExtensionBackend->processContentExtensionRulesForLoad(request, resourceType, initiatingDocumentLoader);
}
-Vector<ContentExtensions::Action> UserContentController::actionsForResourceLoad(const ResourceLoadInfo& resourceLoadInfo)
-{
- if (!m_contentExtensionBackend)
- return Vector<ContentExtensions::Action>();
-
- return m_contentExtensionBackend->actionsForResourceLoad(resourceLoadInfo);
-}
#endif
void UserContentController::removeAllUserContent()
Modified: trunk/Source/WebCore/page/UserContentController.h (182512 => 182513)
--- trunk/Source/WebCore/page/UserContentController.h 2015-04-08 01:08:15 UTC (rev 182512)
+++ trunk/Source/WebCore/page/UserContentController.h 2015-04-08 01:51:10 UTC (rev 182513)
@@ -93,7 +93,6 @@
WEBCORE_EXPORT void removeAllUserContentExtensions();
void processContentExtensionRulesForLoad(ResourceRequest&, ResourceType, DocumentLoader& initiatingDocumentLoader);
- Vector<ContentExtensions::Action> actionsForResourceLoad(const ResourceLoadInfo&);
#endif
private:
Modified: trunk/Tools/ChangeLog (182512 => 182513)
--- trunk/Tools/ChangeLog 2015-04-08 01:08:15 UTC (rev 182512)
+++ trunk/Tools/ChangeLog 2015-04-08 01:51:10 UTC (rev 182513)
@@ -1,3 +1,17 @@
+2015-04-07 Commit Queue <[email protected]>
+
+ Unreviewed, rolling out r182511.
+ https://bugs.webkit.org/show_bug.cgi?id=143507
+
+ caused debug test failures (Requested by alexchristensen on
+ #webkit).
+
+ Reverted changeset:
+
+ "Block popups from content extensions."
+ https://bugs.webkit.org/show_bug.cgi?id=143497
+ http://trac.webkit.org/changeset/182511
+
2015-04-07 Alex Christensen <[email protected]>
Block popups from content extensions.
Modified: trunk/Tools/TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp (182512 => 182513)
--- trunk/Tools/TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp 2015-04-08 01:08:15 UTC (rev 182512)
+++ trunk/Tools/TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp 2015-04-08 01:51:10 UTC (rev 182513)
@@ -457,7 +457,7 @@
TEST_F(ContentExtensionTest, ResourceType)
{
- auto backend = makeBackend("[{\"action\":{\"type\":\"block\"},\"trigger\":{\"url-filter\":\"block_all_types.org\",\"resource-type\":[\"document\",\"image\",\"style-sheet\",\"script\",\"font\",\"raw\",\"svg-document\",\"media\",\"popup\"]}},"
+ auto backend = makeBackend("[{\"action\":{\"type\":\"block\"},\"trigger\":{\"url-filter\":\"block_all_types.org\",\"resource-type\":[\"document\",\"image\",\"style-sheet\",\"script\",\"font\",\"raw\",\"svg-document\",\"media\"]}},"
"{\"action\":{\"type\":\"block\"},\"trigger\":{\"url-filter\":\"block_only_images\",\"resource-type\":[\"image\"]}}]");
testRequest(backend, mainDocumentRequest("http://block_all_types.org", ResourceType::Document), { ContentExtensions::ActionType::BlockLoad });
@@ -468,7 +468,6 @@
testRequest(backend, mainDocumentRequest("http://block_all_types.org", ResourceType::Raw), { ContentExtensions::ActionType::BlockLoad });
testRequest(backend, mainDocumentRequest("http://block_all_types.org", ResourceType::SVGDocument), { ContentExtensions::ActionType::BlockLoad });
testRequest(backend, mainDocumentRequest("http://block_all_types.org", ResourceType::Media), { ContentExtensions::ActionType::BlockLoad });
- testRequest(backend, mainDocumentRequest("http://block_all_types.org", ResourceType::Popup), { ContentExtensions::ActionType::BlockLoad });
testRequest(backend, mainDocumentRequest("http://block_only_images.org", ResourceType::Image), { ContentExtensions::ActionType::BlockLoad });
testRequest(backend, mainDocumentRequest("http://block_only_images.org", ResourceType::Document), { });
}