| Differences between
and this patch
- a/Source/WebCore/CMakeLists.txt -1 / +1 lines
Lines 1816-1822 set(WebCore_SOURCES a/Source/WebCore/CMakeLists.txt_sec1
1816
    platform/FileStream.cpp
1816
    platform/FileStream.cpp
1817
    platform/FileSystem.cpp
1817
    platform/FileSystem.cpp
1818
    platform/HistogramSupport.cpp
1818
    platform/HistogramSupport.cpp
1819
    platform/KURL.cpp
1819
    platform/URL.cpp
1820
    platform/KillRingNone.cpp
1820
    platform/KillRingNone.cpp
1821
    platform/Language.cpp
1821
    platform/Language.cpp
1822
    platform/Length.cpp
1822
    platform/Length.cpp
- a/Source/WebCore/ChangeLog +9 lines
Lines 1-3 a/Source/WebCore/ChangeLog_sec1
1
2013-09-26  Darin Adler  <darin@apple.com>
2
3
        rename KURL to URL
4
        https://bugs.webkit.org/show_bug.cgi?id=16214
5
6
        Reviewed by Andreas Kling.
7
8
        * many files: Renamed, using script.
9
1
2013-09-27  Zalan Bujtas  <zalan@apple.com>
10
2013-09-27  Zalan Bujtas  <zalan@apple.com>
2
11
3
        Unexpected word wrapping for wrapped content then raw content.
12
        Unexpected word wrapping for wrapped content then raw content.
- a/Source/WebCore/GNUmakefile.list.am -3 / +3 lines
Lines 6057-6065 platform_sources += \ a/Source/WebCore/GNUmakefile.list.am_sec1
6057
	Source/WebCore/platform/HistogramSupport.cpp \
6057
	Source/WebCore/platform/HistogramSupport.cpp \
6058
	Source/WebCore/platform/HistogramSupport.h \
6058
	Source/WebCore/platform/HistogramSupport.h \
6059
	Source/WebCore/platform/HostWindow.h \
6059
	Source/WebCore/platform/HostWindow.h \
6060
	Source/WebCore/platform/KURL.cpp \
6060
	Source/WebCore/platform/URL.cpp \
6061
	Source/WebCore/platform/KURL.h \
6061
	Source/WebCore/platform/URL.h \
6062
	Source/WebCore/platform/KURLHash.h \
6062
	Source/WebCore/platform/URLHash.h \
6063
	Source/WebCore/platform/KillRing.h \
6063
	Source/WebCore/platform/KillRing.h \
6064
	Source/WebCore/platform/KillRingNone.cpp \
6064
	Source/WebCore/platform/KillRingNone.cpp \
6065
	Source/WebCore/platform/Language.cpp \
6065
	Source/WebCore/platform/Language.cpp \
- a/Source/WebCore/Modules/filesystem/DOMFileSystem.cpp -7 / +7 lines
Lines 55-61 a/Source/WebCore/Modules/filesystem/DOMFileSystem.cpp_sec1
55
namespace WebCore {
55
namespace WebCore {
56
56
57
// static
57
// static
58
PassRefPtr<DOMFileSystem> DOMFileSystem::create(ScriptExecutionContext* context, const String& name, FileSystemType type, const KURL& rootURL, PassOwnPtr<AsyncFileSystem> asyncFileSystem)
58
PassRefPtr<DOMFileSystem> DOMFileSystem::create(ScriptExecutionContext* context, const String& name, FileSystemType type, const URL& rootURL, PassOwnPtr<AsyncFileSystem> asyncFileSystem)
59
{
59
{
60
    RefPtr<DOMFileSystem> fileSystem(adoptRef(new DOMFileSystem(context, name, type, rootURL, asyncFileSystem)));
60
    RefPtr<DOMFileSystem> fileSystem(adoptRef(new DOMFileSystem(context, name, type, rootURL, asyncFileSystem)));
61
    fileSystem->suspendIfNeeded();
61
    fileSystem->suspendIfNeeded();
Lines 83-92 PassRefPtr<DOMFileSystem> DOMFileSystem::createIsolatedFileSystem(ScriptExecutio a/Source/WebCore/Modules/filesystem/DOMFileSystem.cpp_sec2
83
    rootURL.append(filesystemId);
83
    rootURL.append(filesystemId);
84
    rootURL.append("/");
84
    rootURL.append("/");
85
85
86
    return DOMFileSystem::create(context, filesystemName.toString(), FileSystemTypeIsolated, KURL(ParsedURLString, rootURL.toString()), AsyncFileSystem::create());
86
    return DOMFileSystem::create(context, filesystemName.toString(), FileSystemTypeIsolated, URL(ParsedURLString, rootURL.toString()), AsyncFileSystem::create());
87
}
87
}
88
88
89
DOMFileSystem::DOMFileSystem(ScriptExecutionContext* context, const String& name, FileSystemType type, const KURL& rootURL, PassOwnPtr<AsyncFileSystem> asyncFileSystem)
89
DOMFileSystem::DOMFileSystem(ScriptExecutionContext* context, const String& name, FileSystemType type, const URL& rootURL, PassOwnPtr<AsyncFileSystem> asyncFileSystem)
90
    : DOMFileSystemBase(context, name, type, rootURL, asyncFileSystem)
90
    : DOMFileSystemBase(context, name, type, rootURL, asyncFileSystem)
91
    , ActiveDOMObject(context)
91
    , ActiveDOMObject(context)
92
{
92
{
Lines 150-156 namespace { a/Source/WebCore/Modules/filesystem/DOMFileSystem.cpp_sec3
150
150
151
class SnapshotFileCallback : public FileSystemCallbacksBase {
151
class SnapshotFileCallback : public FileSystemCallbacksBase {
152
public:
152
public:
153
    static PassOwnPtr<SnapshotFileCallback> create(PassRefPtr<DOMFileSystem> filesystem, const String& name, const KURL& url, PassRefPtr<FileCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback)
153
    static PassOwnPtr<SnapshotFileCallback> create(PassRefPtr<DOMFileSystem> filesystem, const String& name, const URL& url, PassRefPtr<FileCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback)
154
    {
154
    {
155
        return adoptPtr(new SnapshotFileCallback(filesystem, name, url, successCallback, errorCallback));
155
        return adoptPtr(new SnapshotFileCallback(filesystem, name, url, successCallback, errorCallback));
156
    }
156
    }
Lines 184-190 public: a/Source/WebCore/Modules/filesystem/DOMFileSystem.cpp_sec4
184
    }
184
    }
185
185
186
private:
186
private:
187
    SnapshotFileCallback(PassRefPtr<DOMFileSystem> filesystem, const String& name,  const KURL& url, PassRefPtr<FileCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback)
187
    SnapshotFileCallback(PassRefPtr<DOMFileSystem> filesystem, const String& name,  const URL& url, PassRefPtr<FileCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback)
188
        : FileSystemCallbacksBase(errorCallback)
188
        : FileSystemCallbacksBase(errorCallback)
189
        , m_filesystem(filesystem)
189
        , m_filesystem(filesystem)
190
        , m_name(name)
190
        , m_name(name)
Lines 195-201 private: a/Source/WebCore/Modules/filesystem/DOMFileSystem.cpp_sec5
195
195
196
    RefPtr<DOMFileSystem> m_filesystem;
196
    RefPtr<DOMFileSystem> m_filesystem;
197
    String m_name;
197
    String m_name;
198
    KURL m_url;
198
    URL m_url;
199
    RefPtr<FileCallback> m_successCallback;
199
    RefPtr<FileCallback> m_successCallback;
200
};
200
};
201
201
Lines 203-209 private: a/Source/WebCore/Modules/filesystem/DOMFileSystem.cpp_sec6
203
203
204
void DOMFileSystem::createFile(const FileEntry* fileEntry, PassRefPtr<FileCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback)
204
void DOMFileSystem::createFile(const FileEntry* fileEntry, PassRefPtr<FileCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback)
205
{
205
{
206
    KURL fileSystemURL = createFileSystemURL(fileEntry);
206
    URL fileSystemURL = createFileSystemURL(fileEntry);
207
    m_asyncFileSystem->createSnapshotFileAndReadMetadata(fileSystemURL, SnapshotFileCallback::create(this, fileEntry->name(), fileSystemURL, successCallback, errorCallback));
207
    m_asyncFileSystem->createSnapshotFileAndReadMetadata(fileSystemURL, SnapshotFileCallback::create(this, fileEntry->name(), fileSystemURL, successCallback, errorCallback));
208
}
208
}
209
209
- a/Source/WebCore/Modules/filesystem/DOMFileSystem.h -2 / +2 lines
Lines 47-53 class FileWriterCallback; a/Source/WebCore/Modules/filesystem/DOMFileSystem.h_sec1
47
47
48
class DOMFileSystem : public DOMFileSystemBase, public ActiveDOMObject {
48
class DOMFileSystem : public DOMFileSystemBase, public ActiveDOMObject {
49
public:
49
public:
50
    static PassRefPtr<DOMFileSystem> create(ScriptExecutionContext*, const String& name, FileSystemType, const KURL& rootURL, PassOwnPtr<AsyncFileSystem>);
50
    static PassRefPtr<DOMFileSystem> create(ScriptExecutionContext*, const String& name, FileSystemType, const URL& rootURL, PassOwnPtr<AsyncFileSystem>);
51
51
52
    // Creates a new isolated file system for the given filesystemId.
52
    // Creates a new isolated file system for the given filesystemId.
53
    static PassRefPtr<DOMFileSystem> createIsolatedFileSystem(ScriptExecutionContext*, const String& filesystemId);
53
    static PassRefPtr<DOMFileSystem> createIsolatedFileSystem(ScriptExecutionContext*, const String& filesystemId);
Lines 72-78 public: a/Source/WebCore/Modules/filesystem/DOMFileSystem.h_sec2
72
    }
72
    }
73
73
74
private:
74
private:
75
    DOMFileSystem(ScriptExecutionContext*, const String& name, FileSystemType, const KURL& rootURL, PassOwnPtr<AsyncFileSystem>);
75
    DOMFileSystem(ScriptExecutionContext*, const String& name, FileSystemType, const URL& rootURL, PassOwnPtr<AsyncFileSystem>);
76
76
77
    // ActiveDOMObject methods.
77
    // ActiveDOMObject methods.
78
    virtual void stop() OVERRIDE;
78
    virtual void stop() OVERRIDE;
- a/Source/WebCore/Modules/filesystem/DOMFileSystemBase.cpp -5 / +5 lines
Lines 57-63 const size_t DOMFileSystemBase::temporaryPathPrefixLength = sizeof(DOMFileSystem a/Source/WebCore/Modules/filesystem/DOMFileSystemBase.cpp_sec1
57
const char DOMFileSystemBase::isolatedPathPrefix[] = "isolated";
57
const char DOMFileSystemBase::isolatedPathPrefix[] = "isolated";
58
const size_t DOMFileSystemBase::isolatedPathPrefixLength = sizeof(DOMFileSystemBase::isolatedPathPrefix) - 1;
58
const size_t DOMFileSystemBase::isolatedPathPrefixLength = sizeof(DOMFileSystemBase::isolatedPathPrefix) - 1;
59
59
60
DOMFileSystemBase::DOMFileSystemBase(ScriptExecutionContext* context, const String& name, FileSystemType type, const KURL& rootURL, PassOwnPtr<AsyncFileSystem> asyncFileSystem)
60
DOMFileSystemBase::DOMFileSystemBase(ScriptExecutionContext* context, const String& name, FileSystemType type, const URL& rootURL, PassOwnPtr<AsyncFileSystem> asyncFileSystem)
61
    : m_context(context)
61
    : m_context(context)
62
    , m_name(name)
62
    , m_name(name)
63
    , m_type(type)
63
    , m_type(type)
Lines 79-85 bool DOMFileSystemBase::isValidType(FileSystemType type) a/Source/WebCore/Modules/filesystem/DOMFileSystemBase.cpp_sec2
79
}
79
}
80
80
81
// static
81
// static
82
bool DOMFileSystemBase::crackFileSystemURL(const KURL& url, FileSystemType& type, String& filePath)
82
bool DOMFileSystemBase::crackFileSystemURL(const URL& url, FileSystemType& type, String& filePath)
83
{
83
{
84
    if (!url.protocolIs("filesystem"))
84
    if (!url.protocolIs("filesystem"))
85
        return false;
85
        return false;
Lines 105-114 bool DOMFileSystemBase::supportsToURL() const a/Source/WebCore/Modules/filesystem/DOMFileSystemBase.cpp_sec3
105
    return true;
105
    return true;
106
}
106
}
107
107
108
KURL DOMFileSystemBase::createFileSystemURL(const String& fullPath) const
108
URL DOMFileSystemBase::createFileSystemURL(const String& fullPath) const
109
{
109
{
110
    ASSERT(DOMFilePath::isAbsolute(fullPath));
110
    ASSERT(DOMFilePath::isAbsolute(fullPath));
111
    KURL url = m_filesystemRootURL;
111
    URL url = m_filesystemRootURL;
112
    // Remove the extra leading slash.
112
    // Remove the extra leading slash.
113
    url.setPath(url.path() + encodeWithURLEscapeSequences(fullPath.substring(1)));
113
    url.setPath(url.path() + encodeWithURLEscapeSequences(fullPath.substring(1)));
114
    return url;
114
    return url;
Lines 120-126 SecurityOrigin* DOMFileSystemBase::securityOrigin() const a/Source/WebCore/Modules/filesystem/DOMFileSystemBase.cpp_sec4
120
    return m_context->securityOrigin();
120
    return m_context->securityOrigin();
121
}
121
}
122
122
123
KURL DOMFileSystemBase::createFileSystemURL(const EntryBase* entry) const
123
URL DOMFileSystemBase::createFileSystemURL(const EntryBase* entry) const
124
{
124
{
125
    return createFileSystemURL(entry->fullPath());
125
    return createFileSystemURL(entry->fullPath());
126
}
126
}
- a/Source/WebCore/Modules/filesystem/DOMFileSystemBase.h -8 / +8 lines
Lines 36-42 a/Source/WebCore/Modules/filesystem/DOMFileSystemBase.h_sec1
36
#include "AsyncFileSystem.h"
36
#include "AsyncFileSystem.h"
37
#include "FileSystemFlags.h"
37
#include "FileSystemFlags.h"
38
#include "FileSystemType.h"
38
#include "FileSystemType.h"
39
#include "KURL.h"
39
#include "URL.h"
40
#include <wtf/PassRefPtr.h>
40
#include <wtf/PassRefPtr.h>
41
#include <wtf/RefCounted.h>
41
#include <wtf/RefCounted.h>
42
#include <wtf/text/WTFString.h>
42
#include <wtf/text/WTFString.h>
Lines 66-72 public: a/Source/WebCore/Modules/filesystem/DOMFileSystemBase.h_sec2
66
    static const char isolatedPathPrefix[];
66
    static const char isolatedPathPrefix[];
67
    static const size_t isolatedPathPrefixLength;
67
    static const size_t isolatedPathPrefixLength;
68
68
69
    static PassRefPtr<DOMFileSystemBase> create(ScriptExecutionContext* context, const String& name, FileSystemType type, const KURL& rootURL, PassOwnPtr<AsyncFileSystem> asyncFileSystem)
69
    static PassRefPtr<DOMFileSystemBase> create(ScriptExecutionContext* context, const String& name, FileSystemType type, const URL& rootURL, PassOwnPtr<AsyncFileSystem> asyncFileSystem)
70
    {
70
    {
71
        return adoptRef(new DOMFileSystemBase(context, name, type, rootURL, asyncFileSystem));
71
        return adoptRef(new DOMFileSystemBase(context, name, type, rootURL, asyncFileSystem));
72
    }
72
    }
Lines 74-80 public: a/Source/WebCore/Modules/filesystem/DOMFileSystemBase.h_sec3
74
74
75
    const String& name() const { return m_name; }
75
    const String& name() const { return m_name; }
76
    FileSystemType type() const { return m_type; }
76
    FileSystemType type() const { return m_type; }
77
    KURL rootURL() const { return m_filesystemRootURL; }
77
    URL rootURL() const { return m_filesystemRootURL; }
78
    AsyncFileSystem* asyncFileSystem() const { return m_asyncFileSystem.get(); }
78
    AsyncFileSystem* asyncFileSystem() const { return m_asyncFileSystem.get(); }
79
    SecurityOrigin* securityOrigin() const;
79
    SecurityOrigin* securityOrigin() const;
80
80
Lines 85-94 public: a/Source/WebCore/Modules/filesystem/DOMFileSystemBase.h_sec4
85
    bool clonable() const { return m_clonable; }
85
    bool clonable() const { return m_clonable; }
86
86
87
    static bool isValidType(FileSystemType);
87
    static bool isValidType(FileSystemType);
88
    static bool crackFileSystemURL(const KURL&, FileSystemType&, String& filePath);
88
    static bool crackFileSystemURL(const URL&, FileSystemType&, String& filePath);
89
    bool supportsToURL() const;
89
    bool supportsToURL() const;
90
    KURL createFileSystemURL(const EntryBase*) const;
90
    URL createFileSystemURL(const EntryBase*) const;
91
    KURL createFileSystemURL(const String& fullPath) const;
91
    URL createFileSystemURL(const String& fullPath) const;
92
92
93
    // Actual FileSystem API implementations. All the validity checks on virtual paths are done at this level.
93
    // Actual FileSystem API implementations. All the validity checks on virtual paths are done at this level.
94
    // They return false for immediate errors that don't involve lower AsyncFileSystem layer (e.g. for name validation errors). Otherwise they return true (but later may call back with an runtime error).
94
    // They return false for immediate errors that don't involve lower AsyncFileSystem layer (e.g. for name validation errors). Otherwise they return true (but later may call back with an runtime error).
Lines 103-115 public: a/Source/WebCore/Modules/filesystem/DOMFileSystemBase.h_sec5
103
    bool readDirectory(PassRefPtr<DirectoryReaderBase>, const String& path, PassRefPtr<EntriesCallback>, PassRefPtr<ErrorCallback>);
103
    bool readDirectory(PassRefPtr<DirectoryReaderBase>, const String& path, PassRefPtr<EntriesCallback>, PassRefPtr<ErrorCallback>);
104
104
105
protected:
105
protected:
106
    DOMFileSystemBase(ScriptExecutionContext*, const String& name, FileSystemType, const KURL& rootURL, PassOwnPtr<AsyncFileSystem>);
106
    DOMFileSystemBase(ScriptExecutionContext*, const String& name, FileSystemType, const URL& rootURL, PassOwnPtr<AsyncFileSystem>);
107
    friend class DOMFileSystemSync;
107
    friend class DOMFileSystemSync;
108
108
109
    ScriptExecutionContext* m_context;
109
    ScriptExecutionContext* m_context;
110
    String m_name;
110
    String m_name;
111
    FileSystemType m_type;
111
    FileSystemType m_type;
112
    KURL m_filesystemRootURL;
112
    URL m_filesystemRootURL;
113
    bool m_clonable;
113
    bool m_clonable;
114
114
115
    mutable OwnPtr<AsyncFileSystem> m_asyncFileSystem;
115
    mutable OwnPtr<AsyncFileSystem> m_asyncFileSystem;
- a/Source/WebCore/Modules/filesystem/DOMFileSystemSync.cpp -5 / +5 lines
Lines 56-62 PassRefPtr<DOMFileSystemSync> DOMFileSystemSync::create(DOMFileSystemBase* fileS a/Source/WebCore/Modules/filesystem/DOMFileSystemSync.cpp_sec1
56
    return adoptRef(new DOMFileSystemSync(fileSystem->m_context, fileSystem->name(), fileSystem->type(), fileSystem->rootURL(), fileSystem->m_asyncFileSystem.release()));
56
    return adoptRef(new DOMFileSystemSync(fileSystem->m_context, fileSystem->name(), fileSystem->type(), fileSystem->rootURL(), fileSystem->m_asyncFileSystem.release()));
57
}
57
}
58
58
59
DOMFileSystemSync::DOMFileSystemSync(ScriptExecutionContext* context, const String& name, FileSystemType type, const KURL& rootURL, PassOwnPtr<AsyncFileSystem> asyncFileSystem)
59
DOMFileSystemSync::DOMFileSystemSync(ScriptExecutionContext* context, const String& name, FileSystemType type, const URL& rootURL, PassOwnPtr<AsyncFileSystem> asyncFileSystem)
60
    : DOMFileSystemBase(context, name, type, rootURL, asyncFileSystem)
60
    : DOMFileSystemBase(context, name, type, rootURL, asyncFileSystem)
61
{
61
{
62
}
62
}
Lines 98-104 public: a/Source/WebCore/Modules/filesystem/DOMFileSystemSync.cpp_sec2
98
        friend class WTF::RefCounted<CreateFileResult>;
98
        friend class WTF::RefCounted<CreateFileResult>;
99
    };
99
    };
100
100
101
    static PassOwnPtr<CreateFileHelper> create(PassRefPtr<CreateFileResult> result, const String& name, const KURL& url, FileSystemType type)
101
    static PassOwnPtr<CreateFileHelper> create(PassRefPtr<CreateFileResult> result, const String& name, const URL& url, FileSystemType type)
102
    {
102
    {
103
        return adoptPtr(new CreateFileHelper(result, name, url, type));
103
        return adoptPtr(new CreateFileHelper(result, name, url, type));
104
    }
104
    }
Lines 136-142 public: a/Source/WebCore/Modules/filesystem/DOMFileSystemSync.cpp_sec3
136
        }
136
        }
137
    }
137
    }
138
private:
138
private:
139
    CreateFileHelper(PassRefPtr<CreateFileResult> result, const String& name, const KURL& url, FileSystemType type)
139
    CreateFileHelper(PassRefPtr<CreateFileResult> result, const String& name, const URL& url, FileSystemType type)
140
        : m_result(result)
140
        : m_result(result)
141
        , m_name(name)
141
        , m_name(name)
142
        , m_url(url)
142
        , m_url(url)
Lines 146-152 private: a/Source/WebCore/Modules/filesystem/DOMFileSystemSync.cpp_sec4
146
146
147
    RefPtr<CreateFileResult> m_result;
147
    RefPtr<CreateFileResult> m_result;
148
    String m_name;
148
    String m_name;
149
    KURL m_url;
149
    URL m_url;
150
    FileSystemType m_type;
150
    FileSystemType m_type;
151
};
151
};
152
152
Lines 155-161 private: a/Source/WebCore/Modules/filesystem/DOMFileSystemSync.cpp_sec5
155
PassRefPtr<File> DOMFileSystemSync::createFile(const FileEntrySync* fileEntry, ExceptionCode& ec)
155
PassRefPtr<File> DOMFileSystemSync::createFile(const FileEntrySync* fileEntry, ExceptionCode& ec)
156
{
156
{
157
    ec = 0;
157
    ec = 0;
158
    KURL fileSystemURL = createFileSystemURL(fileEntry);
158
    URL fileSystemURL = createFileSystemURL(fileEntry);
159
    RefPtr<CreateFileHelper::CreateFileResult> result(CreateFileHelper::CreateFileResult::create());
159
    RefPtr<CreateFileHelper::CreateFileResult> result(CreateFileHelper::CreateFileResult::create());
160
    m_asyncFileSystem->createSnapshotFileAndReadMetadata(fileSystemURL, CreateFileHelper::create(result, fileEntry->name(), fileSystemURL, type()));
160
    m_asyncFileSystem->createSnapshotFileAndReadMetadata(fileSystemURL, CreateFileHelper::create(result, fileEntry->name(), fileSystemURL, type()));
161
    if (!m_asyncFileSystem->waitForOperationToComplete()) {
161
    if (!m_asyncFileSystem->waitForOperationToComplete()) {
- a/Source/WebCore/Modules/filesystem/DOMFileSystemSync.h -2 / +2 lines
Lines 46-52 typedef int ExceptionCode; a/Source/WebCore/Modules/filesystem/DOMFileSystemSync.h_sec1
46
46
47
class DOMFileSystemSync : public DOMFileSystemBase {
47
class DOMFileSystemSync : public DOMFileSystemBase {
48
public:
48
public:
49
    static PassRefPtr<DOMFileSystemSync> create(ScriptExecutionContext* context, const String& name, FileSystemType type, const KURL& rootURL, PassOwnPtr<AsyncFileSystem> asyncFileSystem)
49
    static PassRefPtr<DOMFileSystemSync> create(ScriptExecutionContext* context, const String& name, FileSystemType type, const URL& rootURL, PassOwnPtr<AsyncFileSystem> asyncFileSystem)
50
    {
50
    {
51
        return adoptRef(new DOMFileSystemSync(context, name, type, rootURL, asyncFileSystem));
51
        return adoptRef(new DOMFileSystemSync(context, name, type, rootURL, asyncFileSystem));
52
    }
52
    }
Lines 61-67 public: a/Source/WebCore/Modules/filesystem/DOMFileSystemSync.h_sec2
61
    PassRefPtr<FileWriterSync> createWriter(const FileEntrySync*, ExceptionCode&);
61
    PassRefPtr<FileWriterSync> createWriter(const FileEntrySync*, ExceptionCode&);
62
62
63
private:
63
private:
64
    DOMFileSystemSync(ScriptExecutionContext*, const String& name, FileSystemType, const KURL& rootURL, PassOwnPtr<AsyncFileSystem>);
64
    DOMFileSystemSync(ScriptExecutionContext*, const String& name, FileSystemType, const URL& rootURL, PassOwnPtr<AsyncFileSystem>);
65
};
65
};
66
66
67
}
67
}
- a/Source/WebCore/Modules/filesystem/DOMWindowFileSystem.cpp -1 / +1 lines
Lines 84-90 void DOMWindowFileSystem::webkitResolveLocalFileSystemURL(DOMWindow* window, con a/Source/WebCore/Modules/filesystem/DOMWindowFileSystem.cpp_sec1
84
        return;
84
        return;
85
85
86
    SecurityOrigin* securityOrigin = document->securityOrigin();
86
    SecurityOrigin* securityOrigin = document->securityOrigin();
87
    KURL completedURL = document->completeURL(url);
87
    URL completedURL = document->completeURL(url);
88
    if (!AsyncFileSystem::isAvailable() || !securityOrigin->canAccessFileSystem() || !securityOrigin->canRequest(completedURL)) {
88
    if (!AsyncFileSystem::isAvailable() || !securityOrigin->canAccessFileSystem() || !securityOrigin->canRequest(completedURL)) {
89
        DOMFileSystem::scheduleCallback(document, errorCallback, FileError::create(FileError::SECURITY_ERR));
89
        DOMFileSystem::scheduleCallback(document, errorCallback, FileError::create(FileError::SECURITY_ERR));
90
        return;
90
        return;
- a/Source/WebCore/Modules/filesystem/FileSystemCallbacks.cpp -2 / +2 lines
Lines 147-153 FileSystemCallbacks::FileSystemCallbacks(PassRefPtr<FileSystemCallback> successC a/Source/WebCore/Modules/filesystem/FileSystemCallbacks.cpp_sec1
147
{
147
{
148
}
148
}
149
149
150
void FileSystemCallbacks::didOpenFileSystem(const String& name, const KURL& rootURL, PassOwnPtr<AsyncFileSystem> asyncFileSystem)
150
void FileSystemCallbacks::didOpenFileSystem(const String& name, const URL& rootURL, PassOwnPtr<AsyncFileSystem> asyncFileSystem)
151
{
151
{
152
    if (m_successCallback) {
152
    if (m_successCallback) {
153
        ASSERT(asyncFileSystem);
153
        ASSERT(asyncFileSystem);
Lines 211-217 ResolveURICallbacks::ResolveURICallbacks(PassRefPtr<EntryCallback> successCallba a/Source/WebCore/Modules/filesystem/FileSystemCallbacks.cpp_sec2
211
{
211
{
212
}
212
}
213
213
214
void ResolveURICallbacks::didOpenFileSystem(const String& name, const KURL& rootURL, PassOwnPtr<AsyncFileSystem> asyncFileSystem)
214
void ResolveURICallbacks::didOpenFileSystem(const String& name, const URL& rootURL, PassOwnPtr<AsyncFileSystem> asyncFileSystem)
215
{
215
{
216
    ASSERT(asyncFileSystem);
216
    ASSERT(asyncFileSystem);
217
    RefPtr<DirectoryEntry> root = DOMFileSystem::create(m_scriptExecutionContext.get(), name, m_type, rootURL, asyncFileSystem)->root();
217
    RefPtr<DirectoryEntry> root = DOMFileSystem::create(m_scriptExecutionContext.get(), name, m_type, rootURL, asyncFileSystem)->root();
- a/Source/WebCore/Modules/filesystem/FileSystemCallbacks.h -2 / +2 lines
Lines 102-108 private: a/Source/WebCore/Modules/filesystem/FileSystemCallbacks.h_sec1
102
class FileSystemCallbacks : public FileSystemCallbacksBase {
102
class FileSystemCallbacks : public FileSystemCallbacksBase {
103
public:
103
public:
104
    static PassOwnPtr<FileSystemCallbacks> create(PassRefPtr<FileSystemCallback>, PassRefPtr<ErrorCallback>, ScriptExecutionContext*, FileSystemType);
104
    static PassOwnPtr<FileSystemCallbacks> create(PassRefPtr<FileSystemCallback>, PassRefPtr<ErrorCallback>, ScriptExecutionContext*, FileSystemType);
105
    virtual void didOpenFileSystem(const String& name, const KURL& rootURL, PassOwnPtr<AsyncFileSystem>);
105
    virtual void didOpenFileSystem(const String& name, const URL& rootURL, PassOwnPtr<AsyncFileSystem>);
106
106
107
private:
107
private:
108
    FileSystemCallbacks(PassRefPtr<FileSystemCallback>, PassRefPtr<ErrorCallback>, ScriptExecutionContext*, FileSystemType);
108
    FileSystemCallbacks(PassRefPtr<FileSystemCallback>, PassRefPtr<ErrorCallback>, ScriptExecutionContext*, FileSystemType);
Lines 114-120 private: a/Source/WebCore/Modules/filesystem/FileSystemCallbacks.h_sec2
114
class ResolveURICallbacks : public FileSystemCallbacksBase {
114
class ResolveURICallbacks : public FileSystemCallbacksBase {
115
public:
115
public:
116
    static PassOwnPtr<ResolveURICallbacks> create(PassRefPtr<EntryCallback>, PassRefPtr<ErrorCallback>, ScriptExecutionContext*, FileSystemType, const String& filePath);
116
    static PassOwnPtr<ResolveURICallbacks> create(PassRefPtr<EntryCallback>, PassRefPtr<ErrorCallback>, ScriptExecutionContext*, FileSystemType, const String& filePath);
117
    virtual void didOpenFileSystem(const String& name, const KURL& rootURL, PassOwnPtr<AsyncFileSystem>);
117
    virtual void didOpenFileSystem(const String& name, const URL& rootURL, PassOwnPtr<AsyncFileSystem>);
118
118
119
private:
119
private:
120
    ResolveURICallbacks(PassRefPtr<EntryCallback>, PassRefPtr<ErrorCallback>, ScriptExecutionContext*, FileSystemType, const String& filePath);
120
    ResolveURICallbacks(PassRefPtr<EntryCallback>, PassRefPtr<ErrorCallback>, ScriptExecutionContext*, FileSystemType, const String& filePath);
- a/Source/WebCore/Modules/filesystem/WorkerGlobalScopeFileSystem.cpp -2 / +2 lines
Lines 87-93 PassRefPtr<DOMFileSystemSync> WorkerGlobalScopeFileSystem::webkitRequestFileSyst a/Source/WebCore/Modules/filesystem/WorkerGlobalScopeFileSystem.cpp_sec1
87
87
88
void WorkerGlobalScopeFileSystem::webkitResolveLocalFileSystemURL(WorkerGlobalScope* worker, const String& url, PassRefPtr<EntryCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback)
88
void WorkerGlobalScopeFileSystem::webkitResolveLocalFileSystemURL(WorkerGlobalScope* worker, const String& url, PassRefPtr<EntryCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback)
89
{
89
{
90
    KURL completedURL = worker->completeURL(url);
90
    URL completedURL = worker->completeURL(url);
91
    ScriptExecutionContext* secureContext = worker->scriptExecutionContext();
91
    ScriptExecutionContext* secureContext = worker->scriptExecutionContext();
92
    if (!AsyncFileSystem::isAvailable() || !secureContext->securityOrigin()->canAccessFileSystem() || !secureContext->securityOrigin()->canRequest(completedURL)) {
92
    if (!AsyncFileSystem::isAvailable() || !secureContext->securityOrigin()->canAccessFileSystem() || !secureContext->securityOrigin()->canRequest(completedURL)) {
93
        DOMFileSystem::scheduleCallback(worker, errorCallback, FileError::create(FileError::SECURITY_ERR));
93
        DOMFileSystem::scheduleCallback(worker, errorCallback, FileError::create(FileError::SECURITY_ERR));
Lines 107-113 void WorkerGlobalScopeFileSystem::webkitResolveLocalFileSystemURL(WorkerGlobalSc a/Source/WebCore/Modules/filesystem/WorkerGlobalScopeFileSystem.cpp_sec2
107
PassRefPtr<EntrySync> WorkerGlobalScopeFileSystem::webkitResolveLocalFileSystemSyncURL(WorkerGlobalScope* worker, const String& url, ExceptionCode& ec)
107
PassRefPtr<EntrySync> WorkerGlobalScopeFileSystem::webkitResolveLocalFileSystemSyncURL(WorkerGlobalScope* worker, const String& url, ExceptionCode& ec)
108
{
108
{
109
    ec = 0;
109
    ec = 0;
110
    KURL completedURL = worker->completeURL(url);
110
    URL completedURL = worker->completeURL(url);
111
    ScriptExecutionContext* secureContext = worker->scriptExecutionContext();
111
    ScriptExecutionContext* secureContext = worker->scriptExecutionContext();
112
    if (!AsyncFileSystem::isAvailable() || !secureContext->securityOrigin()->canAccessFileSystem() || !secureContext->securityOrigin()->canRequest(completedURL)) {
112
    if (!AsyncFileSystem::isAvailable() || !secureContext->securityOrigin()->canAccessFileSystem() || !secureContext->securityOrigin()->canRequest(completedURL)) {
113
        ec = FileException::SECURITY_ERR;
113
        ec = FileException::SECURITY_ERR;
- a/Source/WebCore/Modules/mediasource/MediaSourceRegistry.cpp -3 / +3 lines
Lines 33-40 a/Source/WebCore/Modules/mediasource/MediaSourceRegistry.cpp_sec1
33
33
34
#if ENABLE(MEDIA_SOURCE)
34
#if ENABLE(MEDIA_SOURCE)
35
35
36
#include "KURL.h"
37
#include "MediaSourceBase.h"
36
#include "MediaSourceBase.h"
37
#include "URL.h"
38
#include <wtf/MainThread.h>
38
#include <wtf/MainThread.h>
39
39
40
namespace WebCore {
40
namespace WebCore {
Lines 46-52 MediaSourceRegistry& MediaSourceRegistry::registry() a/Source/WebCore/Modules/mediasource/MediaSourceRegistry.cpp_sec2
46
    return instance;
46
    return instance;
47
}
47
}
48
48
49
void MediaSourceRegistry::registerURL(SecurityOrigin*, const KURL& url, URLRegistrable* registrable)
49
void MediaSourceRegistry::registerURL(SecurityOrigin*, const URL& url, URLRegistrable* registrable)
50
{
50
{
51
    ASSERT(&registrable->registry() == this);
51
    ASSERT(&registrable->registry() == this);
52
    ASSERT(isMainThread());
52
    ASSERT(isMainThread());
Lines 56-62 void MediaSourceRegistry::registerURL(SecurityOrigin*, const KURL& url, URLRegis a/Source/WebCore/Modules/mediasource/MediaSourceRegistry.cpp_sec3
56
    m_mediaSources.set(url.string(), source);
56
    m_mediaSources.set(url.string(), source);
57
}
57
}
58
58
59
void MediaSourceRegistry::unregisterURL(const KURL& url)
59
void MediaSourceRegistry::unregisterURL(const URL& url)
60
{
60
{
61
    ASSERT(isMainThread());
61
    ASSERT(isMainThread());
62
    HashMap<String, RefPtr<MediaSourceBase> >::iterator iter = m_mediaSources.find(url.string());
62
    HashMap<String, RefPtr<MediaSourceBase> >::iterator iter = m_mediaSources.find(url.string());
- a/Source/WebCore/Modules/mediasource/MediaSourceRegistry.h -3 / +3 lines
Lines 40-46 a/Source/WebCore/Modules/mediasource/MediaSourceRegistry.h_sec1
40
40
41
namespace WebCore {
41
namespace WebCore {
42
42
43
class KURL;
43
class URL;
44
class MediaSourceBase;
44
class MediaSourceBase;
45
45
46
class MediaSourceRegistry : public URLRegistry {
46
class MediaSourceRegistry : public URLRegistry {
Lines 49-56 public: a/Source/WebCore/Modules/mediasource/MediaSourceRegistry.h_sec2
49
    static MediaSourceRegistry& registry();
49
    static MediaSourceRegistry& registry();
50
50
51
    // Registers a blob URL referring to the specified media source.
51
    // Registers a blob URL referring to the specified media source.
52
    virtual void registerURL(SecurityOrigin*, const KURL&, URLRegistrable*) OVERRIDE;
52
    virtual void registerURL(SecurityOrigin*, const URL&, URLRegistrable*) OVERRIDE;
53
    virtual void unregisterURL(const KURL&) OVERRIDE;
53
    virtual void unregisterURL(const URL&) OVERRIDE;
54
    virtual URLRegistrable* lookup(const String&) OVERRIDE;
54
    virtual URLRegistrable* lookup(const String&) OVERRIDE;
55
55
56
private:
56
private:
- a/Source/WebCore/Modules/mediastream/MediaStreamRegistry.cpp -3 / +3 lines
Lines 27-33 a/Source/WebCore/Modules/mediastream/MediaStreamRegistry.cpp_sec1
27
27
28
#if ENABLE(MEDIA_STREAM)
28
#if ENABLE(MEDIA_STREAM)
29
29
30
#include "KURL.h"
30
#include "URL.h"
31
#include "MediaStream.h"
31
#include "MediaStream.h"
32
#include <wtf/MainThread.h>
32
#include <wtf/MainThread.h>
33
33
Lines 41-54 MediaStreamRegistry& MediaStreamRegistry::registry() a/Source/WebCore/Modules/mediastream/MediaStreamRegistry.cpp_sec2
41
    return instance;
41
    return instance;
42
}
42
}
43
43
44
void MediaStreamRegistry::registerURL(SecurityOrigin*, const KURL& url, URLRegistrable* stream)
44
void MediaStreamRegistry::registerURL(SecurityOrigin*, const URL& url, URLRegistrable* stream)
45
{
45
{
46
    ASSERT(&stream->registry() == this);
46
    ASSERT(&stream->registry() == this);
47
    ASSERT(isMainThread());
47
    ASSERT(isMainThread());
48
    m_streamDescriptors.set(url.string(), static_cast<MediaStream*>(stream)->descriptor());
48
    m_streamDescriptors.set(url.string(), static_cast<MediaStream*>(stream)->descriptor());
49
}
49
}
50
50
51
void MediaStreamRegistry::unregisterURL(const KURL& url)
51
void MediaStreamRegistry::unregisterURL(const URL& url)
52
{
52
{
53
    ASSERT(isMainThread());
53
    ASSERT(isMainThread());
54
    m_streamDescriptors.remove(url.string());
54
    m_streamDescriptors.remove(url.string());
- a/Source/WebCore/Modules/mediastream/MediaStreamRegistry.h -3 / +3 lines
Lines 34-40 a/Source/WebCore/Modules/mediastream/MediaStreamRegistry.h_sec1
34
34
35
namespace WebCore {
35
namespace WebCore {
36
36
37
class KURL;
37
class URL;
38
class MediaStream;
38
class MediaStream;
39
class MediaStreamDescriptor;
39
class MediaStreamDescriptor;
40
40
Lines 44-51 public: a/Source/WebCore/Modules/mediastream/MediaStreamRegistry.h_sec2
44
    static MediaStreamRegistry& registry();
44
    static MediaStreamRegistry& registry();
45
45
46
    // Registers a blob URL referring to the specified stream data.
46
    // Registers a blob URL referring to the specified stream data.
47
    virtual void registerURL(SecurityOrigin*, const KURL&, URLRegistrable*) OVERRIDE;
47
    virtual void registerURL(SecurityOrigin*, const URL&, URLRegistrable*) OVERRIDE;
48
    virtual void unregisterURL(const KURL&) OVERRIDE;
48
    virtual void unregisterURL(const URL&) OVERRIDE;
49
49
50
    MediaStreamDescriptor* lookupMediaStreamDescriptor(const String& url);
50
    MediaStreamDescriptor* lookupMediaStreamDescriptor(const String& url);
51
51
- a/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp -1 / +1 lines
Lines 99-105 PassRefPtr<RTCConfiguration> RTCPeerConnection::parseConfiguration(const Diction a/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp_sec1
99
            ec = TYPE_MISMATCH_ERR;
99
            ec = TYPE_MISMATCH_ERR;
100
            return 0;
100
            return 0;
101
        }
101
        }
102
        KURL url(KURL(), urlString);
102
        URL url(URL(), urlString);
103
        if (!url.isValid() || !(url.protocolIs("turn") || url.protocolIs("stun"))) {
103
        if (!url.isValid() || !(url.protocolIs("turn") || url.protocolIs("stun"))) {
104
            ec = TYPE_MISMATCH_ERR;
104
            ec = TYPE_MISMATCH_ERR;
105
            return 0;
105
            return 0;
- a/Source/WebCore/Modules/navigatorcontentutils/NavigatorContentUtils.cpp -2 / +2 lines
Lines 86-93 static bool verifyCustomHandlerURL(const String& baseURL, const String& url, Exc a/Source/WebCore/Modules/navigatorcontentutils/NavigatorContentUtils.cpp_sec1
86
    String newURL = url;
86
    String newURL = url;
87
    newURL.remove(index, WTF_ARRAY_LENGTH(token) - 1);
87
    newURL.remove(index, WTF_ARRAY_LENGTH(token) - 1);
88
88
89
    KURL base(ParsedURLString, baseURL);
89
    URL base(ParsedURLString, baseURL);
90
    KURL kurl(base, newURL);
90
    URL kurl(base, newURL);
91
91
92
    if (kurl.isEmpty() || !kurl.isValid()) {
92
    if (kurl.isEmpty() || !kurl.isValid()) {
93
        ec = SYNTAX_ERR;
93
        ec = SYNTAX_ERR;
- a/Source/WebCore/Modules/notifications/Notification.cpp -2 / +2 lines
Lines 71-77 Notification::Notification(const String& title, const String& body, const String a/Source/WebCore/Modules/notifications/Notification.cpp_sec1
71
        return;
71
        return;
72
    }
72
    }
73
73
74
    m_icon = iconURI.isEmpty() ? KURL() : scriptExecutionContext()->completeURL(iconURI);
74
    m_icon = iconURI.isEmpty() ? URL() : scriptExecutionContext()->completeURL(iconURI);
75
    if (!m_icon.isEmpty() && !m_icon.isValid()) {
75
    if (!m_icon.isEmpty() && !m_icon.isValid()) {
76
        ec = SYNTAX_ERR;
76
        ec = SYNTAX_ERR;
77
        return;
77
        return;
Lines 120-126 PassRefPtr<Notification> Notification::create(ScriptExecutionContext* context, c a/Source/WebCore/Modules/notifications/Notification.cpp_sec2
120
    if (options.get("dir", argument))
120
    if (options.get("dir", argument))
121
        notification->setDir(argument);
121
        notification->setDir(argument);
122
    if (options.get("icon", argument)) {
122
    if (options.get("icon", argument)) {
123
        KURL iconURI = argument.isEmpty() ? KURL() : context->completeURL(argument);
123
        URL iconURI = argument.isEmpty() ? URL() : context->completeURL(argument);
124
        if (!iconURI.isEmpty() && iconURI.isValid())
124
        if (!iconURI.isEmpty() && iconURI.isValid())
125
            notification->setIconURL(iconURI);
125
            notification->setIconURL(iconURI);
126
    }
126
    }
- a/Source/WebCore/Modules/notifications/Notification.h -4 / +4 lines
Lines 35-41 a/Source/WebCore/Modules/notifications/Notification.h_sec1
35
#include "ActiveDOMObject.h"
35
#include "ActiveDOMObject.h"
36
#include "EventNames.h"
36
#include "EventNames.h"
37
#include "EventTarget.h"
37
#include "EventTarget.h"
38
#include "KURL.h"
38
#include "URL.h"
39
#include "NotificationClient.h"
39
#include "NotificationClient.h"
40
#include "SharedBuffer.h"
40
#include "SharedBuffer.h"
41
#include "TextDirection.h"
41
#include "TextDirection.h"
Lines 83-90 public: a/Source/WebCore/Modules/notifications/Notification.h_sec2
83
#endif
83
#endif
84
    void close();
84
    void close();
85
85
86
    KURL iconURL() const { return m_icon; }
86
    URL iconURL() const { return m_icon; }
87
    void setIconURL(const KURL& url) { m_icon = url; }
87
    void setIconURL(const URL& url) { m_icon = url; }
88
88
89
    String title() const { return m_title; }
89
    String title() const { return m_title; }
90
    String body() const { return m_body; }
90
    String body() const { return m_body; }
Lines 164-170 private: a/Source/WebCore/Modules/notifications/Notification.h_sec3
164
#endif
164
#endif
165
165
166
    // Text notifications.
166
    // Text notifications.
167
    KURL m_icon;
167
    URL m_icon;
168
    String m_title;
168
    String m_title;
169
    String m_body;
169
    String m_body;
170
    String m_direction;
170
    String m_direction;
- a/Source/WebCore/Modules/notifications/NotificationClient.h -1 / +1 lines
Lines 39-45 a/Source/WebCore/Modules/notifications/NotificationClient.h_sec1
39
namespace WebCore {
39
namespace WebCore {
40
40
41
class Document;
41
class Document;
42
class KURL;
42
class URL;
43
class Notification;
43
class Notification;
44
class Page;
44
class Page;
45
class ScriptExecutionContext;
45
class ScriptExecutionContext;
- a/Source/WebCore/Modules/speech/SpeechGrammar.cpp -2 / +2 lines
Lines 38-44 PassRefPtr<SpeechGrammar> SpeechGrammar::create() a/Source/WebCore/Modules/speech/SpeechGrammar.cpp_sec1
38
    return adoptRef(new SpeechGrammar);
38
    return adoptRef(new SpeechGrammar);
39
}
39
}
40
40
41
PassRefPtr<SpeechGrammar> SpeechGrammar::create(const KURL& src, double weight)
41
PassRefPtr<SpeechGrammar> SpeechGrammar::create(const URL& src, double weight)
42
{
42
{
43
    return adoptRef(new SpeechGrammar(src, weight));
43
    return adoptRef(new SpeechGrammar(src, weight));
44
}
44
}
Lines 54-60 SpeechGrammar::SpeechGrammar() a/Source/WebCore/Modules/speech/SpeechGrammar.cpp_sec2
54
{
54
{
55
}
55
}
56
56
57
SpeechGrammar::SpeechGrammar(const KURL& src, double weight)
57
SpeechGrammar::SpeechGrammar(const URL& src, double weight)
58
    : m_src(src)
58
    : m_src(src)
59
    , m_weight(weight)
59
    , m_weight(weight)
60
{
60
{
- a/Source/WebCore/Modules/speech/SpeechGrammar.h -6 / +6 lines
Lines 28-34 a/Source/WebCore/Modules/speech/SpeechGrammar.h_sec1
28
28
29
#if ENABLE(SCRIPTED_SPEECH)
29
#if ENABLE(SCRIPTED_SPEECH)
30
30
31
#include "KURL.h"
31
#include "URL.h"
32
#include <wtf/RefCounted.h>
32
#include <wtf/RefCounted.h>
33
#include <wtf/text/WTFString.h>
33
#include <wtf/text/WTFString.h>
34
34
Lines 39-48 class ScriptExecutionContext; a/Source/WebCore/Modules/speech/SpeechGrammar.h_sec2
39
class SpeechGrammar : public RefCounted<SpeechGrammar> {
39
class SpeechGrammar : public RefCounted<SpeechGrammar> {
40
public:
40
public:
41
    static PassRefPtr<SpeechGrammar> create(); // FIXME: The spec is not clear on what the constructor should look like.
41
    static PassRefPtr<SpeechGrammar> create(); // FIXME: The spec is not clear on what the constructor should look like.
42
    static PassRefPtr<SpeechGrammar> create(const KURL& src, double weight);
42
    static PassRefPtr<SpeechGrammar> create(const URL& src, double weight);
43
43
44
    const KURL& src(ScriptExecutionContext*) const { return m_src; }
44
    const URL& src(ScriptExecutionContext*) const { return m_src; }
45
    const KURL& src() const { return m_src; }
45
    const URL& src() const { return m_src; }
46
    void setSrc(ScriptExecutionContext*, const String& src);
46
    void setSrc(ScriptExecutionContext*, const String& src);
47
47
48
    double weight() const { return m_weight; }
48
    double weight() const { return m_weight; }
Lines 50-58 public: a/Source/WebCore/Modules/speech/SpeechGrammar.h_sec3
50
50
51
private:
51
private:
52
    SpeechGrammar();
52
    SpeechGrammar();
53
    SpeechGrammar(const KURL& src, double weight);
53
    SpeechGrammar(const URL& src, double weight);
54
54
55
    KURL m_src;
55
    URL m_src;
56
    double m_weight;
56
    double m_weight;
57
};
57
};
58
58
- a/Source/WebCore/Modules/speech/SpeechGrammarList.cpp -1 / +1 lines
Lines 55-61 void SpeechGrammarList::addFromUri(ScriptExecutionContext* scriptExecutionContex a/Source/WebCore/Modules/speech/SpeechGrammarList.cpp_sec1
55
void SpeechGrammarList::addFromString(const String& string, double weight)
55
void SpeechGrammarList::addFromString(const String& string, double weight)
56
{
56
{
57
    String urlString = String("data:application/xml,") + encodeWithURLEscapeSequences(string);
57
    String urlString = String("data:application/xml,") + encodeWithURLEscapeSequences(string);
58
    m_grammars.append(SpeechGrammar::create(KURL(KURL(), urlString), weight));
58
    m_grammars.append(SpeechGrammar::create(URL(URL(), urlString), weight));
59
}
59
}
60
60
61
SpeechGrammarList::SpeechGrammarList()
61
SpeechGrammarList::SpeechGrammarList()
- a/Source/WebCore/Modules/websockets/ThreadableWebSocketChannel.h -2 / +2 lines
Lines 45-51 class ArrayBufferView; a/Source/WebCore/Modules/websockets/ThreadableWebSocketChannel.h_sec1
45
namespace WebCore {
45
namespace WebCore {
46
46
47
class Blob;
47
class Blob;
48
class KURL;
48
class URL;
49
class ScriptExecutionContext;
49
class ScriptExecutionContext;
50
class WebSocketChannelClient;
50
class WebSocketChannelClient;
51
51
Lines 61-67 public: a/Source/WebCore/Modules/websockets/ThreadableWebSocketChannel.h_sec2
61
        InvalidMessage
61
        InvalidMessage
62
    };
62
    };
63
63
64
    virtual void connect(const KURL&, const String& protocol) = 0;
64
    virtual void connect(const URL&, const String& protocol) = 0;
65
    virtual String subprotocol() = 0; // Will be available after didConnect() callback is invoked.
65
    virtual String subprotocol() = 0; // Will be available after didConnect() callback is invoked.
66
    virtual String extensions() = 0; // Will be available after didConnect() callback is invoked.
66
    virtual String extensions() = 0; // Will be available after didConnect() callback is invoked.
67
    virtual SendResult send(const String& message) = 0;
67
    virtual SendResult send(const String& message) = 0;
- a/Source/WebCore/Modules/websockets/WebSocket.cpp -2 / +2 lines
Lines 213-219 void WebSocket::connect(const String& url, const String& protocol, ExceptionCode a/Source/WebCore/Modules/websockets/WebSocket.cpp_sec1
213
void WebSocket::connect(const String& url, const Vector<String>& protocols, ExceptionCode& ec)
213
void WebSocket::connect(const String& url, const Vector<String>& protocols, ExceptionCode& ec)
214
{
214
{
215
    LOG(Network, "WebSocket %p connect() url='%s'", this, url.utf8().data());
215
    LOG(Network, "WebSocket %p connect() url='%s'", this, url.utf8().data());
216
    m_url = KURL(KURL(), url);
216
    m_url = URL(URL(), url);
217
217
218
    if (!m_url.isValid()) {
218
    if (!m_url.isValid()) {
219
        scriptExecutionContext()->addConsoleMessage(JSMessageSource, ErrorMessageLevel, "Invalid url for WebSocket " + m_url.stringCenterEllipsizedToLength());
219
        scriptExecutionContext()->addConsoleMessage(JSMessageSource, ErrorMessageLevel, "Invalid url for WebSocket " + m_url.stringCenterEllipsizedToLength());
Lines 398-404 void WebSocket::close(int code, const String& reason, ExceptionCode& ec) a/Source/WebCore/Modules/websockets/WebSocket.cpp_sec2
398
        m_channel->close(code, reason);
398
        m_channel->close(code, reason);
399
}
399
}
400
400
401
const KURL& WebSocket::url() const
401
const URL& WebSocket::url() const
402
{
402
{
403
    return m_url;
403
    return m_url;
404
}
404
}
- a/Source/WebCore/Modules/websockets/WebSocket.h -3 / +3 lines
Lines 37-43 a/Source/WebCore/Modules/websockets/WebSocket.h_sec1
37
#include "EventListener.h"
37
#include "EventListener.h"
38
#include "EventNames.h"
38
#include "EventNames.h"
39
#include "EventTarget.h"
39
#include "EventTarget.h"
40
#include "KURL.h"
40
#include "URL.h"
41
#include "WebSocketChannel.h"
41
#include "WebSocketChannel.h"
42
#include "WebSocketChannelClient.h"
42
#include "WebSocketChannelClient.h"
43
#include <wtf/Forward.h>
43
#include <wtf/Forward.h>
Lines 82-88 public: a/Source/WebCore/Modules/websockets/WebSocket.h_sec2
82
    void close(ExceptionCode& ec) { close(WebSocketChannel::CloseEventCodeNotSpecified, String(), ec); }
82
    void close(ExceptionCode& ec) { close(WebSocketChannel::CloseEventCodeNotSpecified, String(), ec); }
83
    void close(int code, ExceptionCode& ec) { close(code, String(), ec); }
83
    void close(int code, ExceptionCode& ec) { close(code, String(), ec); }
84
84
85
    const KURL& url() const;
85
    const URL& url() const;
86
    State readyState() const;
86
    State readyState() const;
87
    unsigned long bufferedAmount() const;
87
    unsigned long bufferedAmount() const;
88
88
Lines 136-142 private: a/Source/WebCore/Modules/websockets/WebSocket.h_sec3
136
    RefPtr<ThreadableWebSocketChannel> m_channel;
136
    RefPtr<ThreadableWebSocketChannel> m_channel;
137
137
138
    State m_state;
138
    State m_state;
139
    KURL m_url;
139
    URL m_url;
140
    unsigned long m_bufferedAmount;
140
    unsigned long m_bufferedAmount;
141
    unsigned long m_bufferedAmountAfterClose;
141
    unsigned long m_bufferedAmountAfterClose;
142
    BinaryType m_binaryType;
142
    BinaryType m_binaryType;
- a/Source/WebCore/Modules/websockets/WebSocketChannel.cpp -1 / +1 lines
Lines 99-105 WebSocketChannel::~WebSocketChannel() a/Source/WebCore/Modules/websockets/WebSocketChannel.cpp_sec1
99
{
99
{
100
}
100
}
101
101
102
void WebSocketChannel::connect(const KURL& url, const String& protocol)
102
void WebSocketChannel::connect(const URL& url, const String& protocol)
103
{
103
{
104
    LOG(Network, "WebSocketChannel %p connect()", this);
104
    LOG(Network, "WebSocketChannel %p connect()", this);
105
    ASSERT(!m_handle);
105
    ASSERT(!m_handle);
- a/Source/WebCore/Modules/websockets/WebSocketChannel.h -1 / +1 lines
Lines 68-74 public: a/Source/WebCore/Modules/websockets/WebSocketChannel.h_sec1
68
    bool send(const char* data, int length);
68
    bool send(const char* data, int length);
69
69
70
    // ThreadableWebSocketChannel functions.
70
    // ThreadableWebSocketChannel functions.
71
    virtual void connect(const KURL&, const String& protocol) OVERRIDE;
71
    virtual void connect(const URL&, const String& protocol) OVERRIDE;
72
    virtual String subprotocol() OVERRIDE;
72
    virtual String subprotocol() OVERRIDE;
73
    virtual String extensions() OVERRIDE;
73
    virtual String extensions() OVERRIDE;
74
    virtual ThreadableWebSocketChannel::SendResult send(const String& message) OVERRIDE;
74
    virtual ThreadableWebSocketChannel::SendResult send(const String& message) OVERRIDE;
- a/Source/WebCore/Modules/websockets/WebSocketHandshake.cpp -10 / +10 lines
Lines 41-47 a/Source/WebCore/Modules/websockets/WebSocketHandshake.cpp_sec1
41
#include "Document.h"
41
#include "Document.h"
42
#include "HTTPHeaderMap.h"
42
#include "HTTPHeaderMap.h"
43
#include "HTTPParsers.h"
43
#include "HTTPParsers.h"
44
#include "KURL.h"
44
#include "URL.h"
45
#include "Logging.h"
45
#include "Logging.h"
46
#include "ResourceRequest.h"
46
#include "ResourceRequest.h"
47
#include "ScriptCallStack.h"
47
#include "ScriptCallStack.h"
Lines 63-69 namespace WebCore { a/Source/WebCore/Modules/websockets/WebSocketHandshake.cpp_sec2
63
63
64
static const char randomCharacterInSecWebSocketKey[] = "!\"#$%&'()*+,-./:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~";
64
static const char randomCharacterInSecWebSocketKey[] = "!\"#$%&'()*+,-./:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~";
65
65
66
static String resourceName(const KURL& url)
66
static String resourceName(const URL& url)
67
{
67
{
68
    StringBuilder name;
68
    StringBuilder name;
69
    name.append(url.path());
69
    name.append(url.path());
Lines 79-85 static String resourceName(const KURL& url) a/Source/WebCore/Modules/websockets/WebSocketHandshake.cpp_sec3
79
    return result;
79
    return result;
80
}
80
}
81
81
82
static String hostName(const KURL& url, bool secure)
82
static String hostName(const URL& url, bool secure)
83
{
83
{
84
    ASSERT(url.protocolIs("wss") == secure);
84
    ASSERT(url.protocolIs("wss") == secure);
85
    StringBuilder builder;
85
    StringBuilder builder;
Lines 121-127 String WebSocketHandshake::getExpectedWebSocketAccept(const String& secWebSocket a/Source/WebCore/Modules/websockets/WebSocketHandshake.cpp_sec4
121
    return base64Encode(reinterpret_cast<const char*>(hash.data()), sha1HashSize);
121
    return base64Encode(reinterpret_cast<const char*>(hash.data()), sha1HashSize);
122
}
122
}
123
123
124
WebSocketHandshake::WebSocketHandshake(const KURL& url, const String& protocol, ScriptExecutionContext* context)
124
WebSocketHandshake::WebSocketHandshake(const URL& url, const String& protocol, ScriptExecutionContext* context)
125
    : m_url(url)
125
    : m_url(url)
126
    , m_clientProtocol(protocol)
126
    , m_clientProtocol(protocol)
127
    , m_secure(m_url.protocolIs("wss"))
127
    , m_secure(m_url.protocolIs("wss"))
Lines 136-147 WebSocketHandshake::~WebSocketHandshake() a/Source/WebCore/Modules/websockets/WebSocketHandshake.cpp_sec5
136
{
136
{
137
}
137
}
138
138
139
const KURL& WebSocketHandshake::url() const
139
const URL& WebSocketHandshake::url() const
140
{
140
{
141
    return m_url;
141
    return m_url;
142
}
142
}
143
143
144
void WebSocketHandshake::setURL(const KURL& url)
144
void WebSocketHandshake::setURL(const URL& url)
145
{
145
{
146
    m_url = url.copy();
146
    m_url = url.copy();
147
}
147
}
Lines 198-204 CString WebSocketHandshake::clientHandshakeMessage() const a/Source/WebCore/Modules/websockets/WebSocketHandshake.cpp_sec6
198
    if (!m_clientProtocol.isEmpty())
198
    if (!m_clientProtocol.isEmpty())
199
        fields.append("Sec-WebSocket-Protocol: " + m_clientProtocol);
199
        fields.append("Sec-WebSocket-Protocol: " + m_clientProtocol);
200
200
201
    KURL url = httpURLForAuthenticationAndCookies();
201
    URL url = httpURLForAuthenticationAndCookies();
202
    if (m_context->isDocument()) {
202
    if (m_context->isDocument()) {
203
        Document* document = toDocument(m_context);
203
        Document* document = toDocument(m_context);
204
        String cookie = cookieRequestHeaderFieldValue(document, url);
204
        String cookie = cookieRequestHeaderFieldValue(document, url);
Lines 251-257 ResourceRequest WebSocketHandshake::clientHandshakeRequest() const a/Source/WebCore/Modules/websockets/WebSocketHandshake.cpp_sec7
251
    if (!m_clientProtocol.isEmpty())
251
    if (!m_clientProtocol.isEmpty())
252
        request.addHTTPHeaderField("Sec-WebSocket-Protocol", m_clientProtocol);
252
        request.addHTTPHeaderField("Sec-WebSocket-Protocol", m_clientProtocol);
253
253
254
    KURL url = httpURLForAuthenticationAndCookies();
254
    URL url = httpURLForAuthenticationAndCookies();
255
    if (m_context->isDocument()) {
255
    if (m_context->isDocument()) {
256
        Document* document = toDocument(m_context);
256
        Document* document = toDocument(m_context);
257
        String cookie = cookieRequestHeaderFieldValue(document, url);
257
        String cookie = cookieRequestHeaderFieldValue(document, url);
Lines 386-394 void WebSocketHandshake::addExtensionProcessor(PassOwnPtr<WebSocketExtensionProc a/Source/WebCore/Modules/websockets/WebSocketHandshake.cpp_sec8
386
    m_extensionDispatcher.addProcessor(processor);
386
    m_extensionDispatcher.addProcessor(processor);
387
}
387
}
388
388
389
KURL WebSocketHandshake::httpURLForAuthenticationAndCookies() const
389
URL WebSocketHandshake::httpURLForAuthenticationAndCookies() const
390
{
390
{
391
    KURL url = m_url.copy();
391
    URL url = m_url.copy();
392
    bool couldSetProtocol = url.setProtocol(m_secure ? "https" : "http");
392
    bool couldSetProtocol = url.setProtocol(m_secure ? "https" : "http");
393
    ASSERT_UNUSED(couldSetProtocol, couldSetProtocol);
393
    ASSERT_UNUSED(couldSetProtocol, couldSetProtocol);
394
    return url;
394
    return url;
- a/Source/WebCore/Modules/websockets/WebSocketHandshake.h -6 / +6 lines
Lines 33-39 a/Source/WebCore/Modules/websockets/WebSocketHandshake.h_sec1
33
33
34
#if ENABLE(WEB_SOCKETS)
34
#if ENABLE(WEB_SOCKETS)
35
35
36
#include "KURL.h"
36
#include "URL.h"
37
#include "ResourceResponse.h"
37
#include "ResourceResponse.h"
38
#include "WebSocketExtensionDispatcher.h"
38
#include "WebSocketExtensionDispatcher.h"
39
#include "WebSocketExtensionProcessor.h"
39
#include "WebSocketExtensionProcessor.h"
Lines 51-61 public: a/Source/WebCore/Modules/websockets/WebSocketHandshake.h_sec2
51
    enum Mode {
51
    enum Mode {
52
        Incomplete, Normal, Failed, Connected
52
        Incomplete, Normal, Failed, Connected
53
    };
53
    };
54
    WebSocketHandshake(const KURL&, const String& protocol, ScriptExecutionContext*);
54
    WebSocketHandshake(const URL&, const String& protocol, ScriptExecutionContext*);
55
    ~WebSocketHandshake();
55
    ~WebSocketHandshake();
56
56
57
    const KURL& url() const;
57
    const URL& url() const;
58
    void setURL(const KURL&);
58
    void setURL(const URL&);
59
    const String host() const;
59
    const String host() const;
60
60
61
    const String& clientProtocol() const;
61
    const String& clientProtocol() const;
Lines 91-97 public: a/Source/WebCore/Modules/websockets/WebSocketHandshake.h_sec3
91
    static String getExpectedWebSocketAccept(const String& secWebSocketKey);
91
    static String getExpectedWebSocketAccept(const String& secWebSocketKey);
92
92
93
private:
93
private:
94
    KURL httpURLForAuthenticationAndCookies() const;
94
    URL httpURLForAuthenticationAndCookies() const;
95
95
96
    int readStatusLine(const char* header, size_t headerLength, int& statusCode, String& statusText);
96
    int readStatusLine(const char* header, size_t headerLength, int& statusCode, String& statusText);
97
97
Lines 100-106 private: a/Source/WebCore/Modules/websockets/WebSocketHandshake.h_sec4
100
    void processHeaders();
100
    void processHeaders();
101
    bool checkResponseHeaders();
101
    bool checkResponseHeaders();
102
102
103
    KURL m_url;
103
    URL m_url;
104
    String m_clientProtocol;
104
    String m_clientProtocol;
105
    bool m_secure;
105
    bool m_secure;
106
    ScriptExecutionContext* m_context;
106
    ScriptExecutionContext* m_context;
- a/Source/WebCore/Modules/websockets/WorkerThreadableWebSocketChannel.cpp -5 / +5 lines
Lines 66-72 WorkerThreadableWebSocketChannel::~WorkerThreadableWebSocketChannel() a/Source/WebCore/Modules/websockets/WorkerThreadableWebSocketChannel.cpp_sec1
66
        m_bridge->disconnect();
66
        m_bridge->disconnect();
67
}
67
}
68
68
69
void WorkerThreadableWebSocketChannel::connect(const KURL& url, const String& protocol)
69
void WorkerThreadableWebSocketChannel::connect(const URL& url, const String& protocol)
70
{
70
{
71
    if (m_bridge)
71
    if (m_bridge)
72
        m_bridge->connect(url, protocol);
72
        m_bridge->connect(url, protocol);
Lines 160-166 WorkerThreadableWebSocketChannel::Peer::~Peer() a/Source/WebCore/Modules/websockets/WorkerThreadableWebSocketChannel.cpp_sec2
160
        m_mainWebSocketChannel->disconnect();
160
        m_mainWebSocketChannel->disconnect();
161
}
161
}
162
162
163
void WorkerThreadableWebSocketChannel::Peer::connect(const KURL& url, const String& protocol)
163
void WorkerThreadableWebSocketChannel::Peer::connect(const URL& url, const String& protocol)
164
{
164
{
165
    ASSERT(isMainThread());
165
    ASSERT(isMainThread());
166
    if (!m_mainWebSocketChannel)
166
    if (!m_mainWebSocketChannel)
Lines 428-434 void WorkerThreadableWebSocketChannel::Bridge::initialize() a/Source/WebCore/Modules/websockets/WorkerThreadableWebSocketChannel.cpp_sec3
428
        m_workerClientWrapper->setFailedWebSocketChannelCreation();
428
        m_workerClientWrapper->setFailedWebSocketChannelCreation();
429
}
429
}
430
430
431
void WorkerThreadableWebSocketChannel::mainThreadConnect(ScriptExecutionContext* context, Peer* peer, const KURL& url, const String& protocol)
431
void WorkerThreadableWebSocketChannel::mainThreadConnect(ScriptExecutionContext* context, Peer* peer, const URL& url, const String& protocol)
432
{
432
{
433
    ASSERT(isMainThread());
433
    ASSERT(isMainThread());
434
    ASSERT_UNUSED(context, context->isDocument());
434
    ASSERT_UNUSED(context, context->isDocument());
Lines 437-443 void WorkerThreadableWebSocketChannel::mainThreadConnect(ScriptExecutionContext* a/Source/WebCore/Modules/websockets/WorkerThreadableWebSocketChannel.cpp_sec4
437
    peer->connect(url, protocol);
437
    peer->connect(url, protocol);
438
}
438
}
439
439
440
void WorkerThreadableWebSocketChannel::Bridge::connect(const KURL& url, const String& protocol)
440
void WorkerThreadableWebSocketChannel::Bridge::connect(const URL& url, const String& protocol)
441
{
441
{
442
    ASSERT(m_workerClientWrapper);
442
    ASSERT(m_workerClientWrapper);
443
    if (!m_peer)
443
    if (!m_peer)
Lines 464-470 void WorkerThreadableWebSocketChannel::mainThreadSendArrayBuffer(ScriptExecution a/Source/WebCore/Modules/websockets/WorkerThreadableWebSocketChannel.cpp_sec5
464
    peer->send(*arrayBuffer);
464
    peer->send(*arrayBuffer);
465
}
465
}
466
466
467
void WorkerThreadableWebSocketChannel::mainThreadSendBlob(ScriptExecutionContext* context, Peer* peer, const KURL& url, const String& type, long long size)
467
void WorkerThreadableWebSocketChannel::mainThreadSendBlob(ScriptExecutionContext* context, Peer* peer, const URL& url, const String& type, long long size)
468
{
468
{
469
    ASSERT(isMainThread());
469
    ASSERT(isMainThread());
470
    ASSERT_UNUSED(context, context->isDocument());
470
    ASSERT_UNUSED(context, context->isDocument());
- a/Source/WebCore/Modules/websockets/WorkerThreadableWebSocketChannel.h -6 / +6 lines
Lines 45-51 a/Source/WebCore/Modules/websockets/WorkerThreadableWebSocketChannel.h_sec1
45
45
46
namespace WebCore {
46
namespace WebCore {
47
47
48
class KURL;
48
class URL;
49
class ScriptExecutionContext;
49
class ScriptExecutionContext;
50
class ThreadableWebSocketChannelClientWrapper;
50
class ThreadableWebSocketChannelClientWrapper;
51
class WorkerGlobalScope;
51
class WorkerGlobalScope;
Lines 62-68 public: a/Source/WebCore/Modules/websockets/WorkerThreadableWebSocketChannel.h_sec2
62
    virtual ~WorkerThreadableWebSocketChannel();
62
    virtual ~WorkerThreadableWebSocketChannel();
63
63
64
    // ThreadableWebSocketChannel functions.
64
    // ThreadableWebSocketChannel functions.
65
    virtual void connect(const KURL&, const String& protocol) OVERRIDE;
65
    virtual void connect(const URL&, const String& protocol) OVERRIDE;
66
    virtual String subprotocol() OVERRIDE;
66
    virtual String subprotocol() OVERRIDE;
67
    virtual String extensions() OVERRIDE;
67
    virtual String extensions() OVERRIDE;
68
    virtual ThreadableWebSocketChannel::SendResult send(const String& message) OVERRIDE;
68
    virtual ThreadableWebSocketChannel::SendResult send(const String& message) OVERRIDE;
Lines 86-92 public: a/Source/WebCore/Modules/websockets/WorkerThreadableWebSocketChannel.h_sec3
86
        }
86
        }
87
        ~Peer();
87
        ~Peer();
88
88
89
        void connect(const KURL&, const String& protocol);
89
        void connect(const URL&, const String& protocol);
90
        void send(const String& message);
90
        void send(const String& message);
91
        void send(const JSC::ArrayBuffer&);
91
        void send(const JSC::ArrayBuffer&);
92
        void send(const Blob&);
92
        void send(const Blob&);
Lines 132-138 private: a/Source/WebCore/Modules/websockets/WorkerThreadableWebSocketChannel.h_sec4
132
        }
132
        }
133
        ~Bridge();
133
        ~Bridge();
134
        void initialize();
134
        void initialize();
135
        void connect(const KURL&, const String& protocol);
135
        void connect(const URL&, const String& protocol);
136
        ThreadableWebSocketChannel::SendResult send(const String& message);
136
        ThreadableWebSocketChannel::SendResult send(const String& message);
137
        ThreadableWebSocketChannel::SendResult send(const JSC::ArrayBuffer&, unsigned byteOffset, unsigned byteLength);
137
        ThreadableWebSocketChannel::SendResult send(const JSC::ArrayBuffer&, unsigned byteOffset, unsigned byteLength);
138
        ThreadableWebSocketChannel::SendResult send(const Blob&);
138
        ThreadableWebSocketChannel::SendResult send(const Blob&);
Lines 169-178 private: a/Source/WebCore/Modules/websockets/WorkerThreadableWebSocketChannel.h_sec5
169
169
170
    WorkerThreadableWebSocketChannel(WorkerGlobalScope*, WebSocketChannelClient*, const String& taskMode);
170
    WorkerThreadableWebSocketChannel(WorkerGlobalScope*, WebSocketChannelClient*, const String& taskMode);
171
171
172
    static void mainThreadConnect(ScriptExecutionContext*, Peer*, const KURL&, const String& protocol);
172
    static void mainThreadConnect(ScriptExecutionContext*, Peer*, const URL&, const String& protocol);
173
    static void mainThreadSend(ScriptExecutionContext*, Peer*, const String& message);
173
    static void mainThreadSend(ScriptExecutionContext*, Peer*, const String& message);
174
    static void mainThreadSendArrayBuffer(ScriptExecutionContext*, Peer*, PassOwnPtr<Vector<char> >);
174
    static void mainThreadSendArrayBuffer(ScriptExecutionContext*, Peer*, PassOwnPtr<Vector<char> >);
175
    static void mainThreadSendBlob(ScriptExecutionContext*, Peer*, const KURL&, const String& type, long long size);
175
    static void mainThreadSendBlob(ScriptExecutionContext*, Peer*, const URL&, const String& type, long long size);
176
    static void mainThreadBufferedAmount(ScriptExecutionContext*, Peer*);
176
    static void mainThreadBufferedAmount(ScriptExecutionContext*, Peer*);
177
    static void mainThreadClose(ScriptExecutionContext*, Peer*, int code, const String& reason);
177
    static void mainThreadClose(ScriptExecutionContext*, Peer*, int code, const String& reason);
178
    static void mainThreadFail(ScriptExecutionContext*, Peer*, const String& reason);
178
    static void mainThreadFail(ScriptExecutionContext*, Peer*, const String& reason);
- a/Source/WebCore/Target.pri -3 / +3 lines
Lines 1026-1032 SOURCES += \ a/Source/WebCore/Target.pri_sec1
1026
    platform/image-decoders/gif/GIFImageDecoder.cpp \
1026
    platform/image-decoders/gif/GIFImageDecoder.cpp \
1027
    platform/image-decoders/gif/GIFImageReader.cpp\
1027
    platform/image-decoders/gif/GIFImageReader.cpp\
1028
    platform/KillRingNone.cpp \
1028
    platform/KillRingNone.cpp \
1029
    platform/KURL.cpp \
1029
    platform/URL.cpp \
1030
    platform/Language.cpp \
1030
    platform/Language.cpp \
1031
    platform/Length.cpp \
1031
    platform/Length.cpp \
1032
    platform/LengthBox.cpp \
1032
    platform/LengthBox.cpp \
Lines 2243-2249 HEADERS += \ a/Source/WebCore/Target.pri_sec2
2243
    platform/image-decoders/gif/GIFImageReader.h \
2243
    platform/image-decoders/gif/GIFImageReader.h \
2244
    platform/image-decoders/png/PNGImageDecoder.h \
2244
    platform/image-decoders/png/PNGImageDecoder.h \
2245
    platform/KillRing.h \
2245
    platform/KillRing.h \
2246
    platform/KURL.h \
2246
    platform/URL.h \
2247
    platform/Length.h \
2247
    platform/Length.h \
2248
    platform/LengthBox.h \
2248
    platform/LengthBox.h \
2249
    platform/leveldb/LevelDBComparator.h \
2249
    platform/leveldb/LevelDBComparator.h \
Lines 2904-2910 SOURCES += \ a/Source/WebCore/Target.pri_sec3
2904
    platform/graphics/qt/GlyphPageTreeNodeQt.cpp \
2904
    platform/graphics/qt/GlyphPageTreeNodeQt.cpp \
2905
    platform/graphics/qt/SimpleFontDataQt.cpp \
2905
    platform/graphics/qt/SimpleFontDataQt.cpp \
2906
    platform/graphics/qt/TileQt.cpp \
2906
    platform/graphics/qt/TileQt.cpp \
2907
    platform/qt/KURLQt.cpp \
2907
    platform/qt/URLQt.cpp \
2908
    platform/qt/MIMETypeRegistryQt.cpp \
2908
    platform/qt/MIMETypeRegistryQt.cpp \
2909
    platform/qt/PasteboardQt.cpp \
2909
    platform/qt/PasteboardQt.cpp \
2910
    platform/qt/PlatformKeyboardEventQt.cpp \
2910
    platform/qt/PlatformKeyboardEventQt.cpp \
- a/Source/WebCore/WebCore.exp.in -209 / +186 lines
Lines 67-73 __ZN3WTF10StringImplcvP8NSStringEv a/Source/WebCore/WebCore.exp.in_sec1
67
__ZN3WTF12AtomicString3addEPK10__CFString
67
__ZN3WTF12AtomicString3addEPK10__CFString
68
__ZN3WTF6StringC1EP8NSString
68
__ZN3WTF6StringC1EP8NSString
69
__ZN3WTF6StringC1EPK10__CFString
69
__ZN3WTF6StringC1EPK10__CFString
70
__ZN7WebCore8GradientD1Ev
71
__ZN7WebCore10ClientRectC1ERKNS_7IntRectE
70
__ZN7WebCore10ClientRectC1ERKNS_7IntRectE
72
__ZN7WebCore10ClientRectC1ERKNS_9FloatRectE
71
__ZN7WebCore10ClientRectC1ERKNS_9FloatRectE
73
__ZN7WebCore10ClientRectC1Ev
72
__ZN7WebCore10ClientRectC1Ev
Lines 89-94 __ZN7WebCore10ScrollView21setDelegatesScrollingEb a/Source/WebCore/WebCore.exp.in_sec2
89
__ZN7WebCore10ScrollView23setPaintsEntireContentsEb
88
__ZN7WebCore10ScrollView23setPaintsEntireContentsEb
90
__ZN7WebCore10ScrollView23setScrollbarsSuppressedEbb
89
__ZN7WebCore10ScrollView23setScrollbarsSuppressedEbb
91
__ZN7WebCore10ScrollView24windowResizerRectChangedEv
90
__ZN7WebCore10ScrollView24windowResizerRectChangedEv
91
__ZN7WebCore10ScrollView4hideEv
92
__ZN7WebCore10ScrollView4showEv
92
__ZN7WebCore10ScrollView5paintEPNS_15GraphicsContextERKNS_7IntRectE
93
__ZN7WebCore10ScrollView5paintEPNS_15GraphicsContextERKNS_7IntRectE
93
__ZN7WebCore10ScrollView8addChildEN3WTF10PassRefPtrINS_6WidgetEEE
94
__ZN7WebCore10ScrollView8addChildEN3WTF10PassRefPtrINS_6WidgetEEE
94
__ZN7WebCore10StorageMap10removeItemERKN3WTF6StringERS2_
95
__ZN7WebCore10StorageMap10removeItemERKN3WTF6StringERS2_
Lines 99-109 __ZN7WebCore10StorageMap6createEj a/Source/WebCore/WebCore.exp.in_sec3
99
__ZN7WebCore10StorageMap7setItemERKN3WTF6StringES4_RS2_Rb
100
__ZN7WebCore10StorageMap7setItemERKN3WTF6StringES4_RS2_Rb
100
__ZN7WebCore10deleteFileERKN3WTF6StringE
101
__ZN7WebCore10deleteFileERKN3WTF6StringE
101
__ZN7WebCore10fileExistsERKN3WTF6StringE
102
__ZN7WebCore10fileExistsERKN3WTF6StringE
102
__ZN7WebCore10setCookiesEPNS_8DocumentERKNS_4KURLERKN3WTF6StringE
103
__ZN7WebCore10setCookiesEPNS_8DocumentERKNS_3URLERKN3WTF6StringE
103
__ZN7WebCore10toDocumentEN3JSC7JSValueE
104
__ZN7WebCore10toDocumentEN3JSC7JSValueE
105
__ZN7WebCore11BitmapImage13getCGImageRefEv
104
__ZN7WebCore11BitmapImageC1EP7CGImagePNS_13ImageObserverE
106
__ZN7WebCore11BitmapImageC1EP7CGImagePNS_13ImageObserverE
105
__ZN7WebCore11BitmapImageC1EPNS_13ImageObserverE
107
__ZN7WebCore11BitmapImageC1EPNS_13ImageObserverE
106
__ZN7WebCore11BitmapImage13getCGImageRefEv
107
__ZN7WebCore11CachedFrame23cachedFramePlatformDataEv
108
__ZN7WebCore11CachedFrame23cachedFramePlatformDataEv
108
__ZN7WebCore11CachedFrame26setCachedFramePlatformDataEN3WTF10PassOwnPtrINS_23CachedFramePlatformDataEEE
109
__ZN7WebCore11CachedFrame26setCachedFramePlatformDataEN3WTF10PassOwnPtrINS_23CachedFramePlatformDataEEE
109
__ZN7WebCore11FileChooser10chooseFileERKN3WTF6StringE
110
__ZN7WebCore11FileChooser10chooseFileERKN3WTF6StringE
Lines 111-124 __ZN7WebCore11FileChooser11chooseFilesERKN3WTF6VectorINS1_6StringELm0ENS1_15Cras a/Source/WebCore/WebCore.exp.in_sec4
111
__ZN7WebCore11FileChooserD1Ev
112
__ZN7WebCore11FileChooserD1Ev
112
__ZN7WebCore11FrameLoader11loadArchiveEN3WTF10PassRefPtrINS_7ArchiveEEE
113
__ZN7WebCore11FrameLoader11loadArchiveEN3WTF10PassRefPtrINS_7ArchiveEEE
113
__ZN7WebCore11FrameLoader11shouldCloseEv
114
__ZN7WebCore11FrameLoader11shouldCloseEv
114
__ZN7WebCore11FrameLoader11urlSelectedERKNS_4KURLERKN3WTF6StringENS4_10PassRefPtrINS_5EventEEEbbNS_18ShouldSendReferrerE
115
__ZN7WebCore11FrameLoader11urlSelectedERKNS_3URLERKN3WTF6StringENS4_10PassRefPtrINS_5EventEEEbbNS_18ShouldSendReferrerE
115
__ZN7WebCore11FrameLoader12shouldReloadERKNS_4KURLES3_
116
__ZN7WebCore11FrameLoader14detachChildrenEv
116
__ZN7WebCore11FrameLoader14detachChildrenEv
117
__ZN7WebCore11FrameLoader14stopAllLoadersENS_26ClearProvisionalItemPolicyE
117
__ZN7WebCore11FrameLoader14stopAllLoadersENS_26ClearProvisionalItemPolicyE
118
__ZN7WebCore11FrameLoader16detachFromParentEv
118
__ZN7WebCore11FrameLoader16detachFromParentEv
119
__ZN7WebCore11FrameLoader16loadFrameRequestERKNS_16FrameLoadRequestEbbN3WTF10PassRefPtrINS_5EventEEENS5_INS_9FormStateEEENS_18ShouldSendReferrerE
119
__ZN7WebCore11FrameLoader16loadFrameRequestERKNS_16FrameLoadRequestEbbN3WTF10PassRefPtrINS_5EventEEENS5_INS_9FormStateEEENS_18ShouldSendReferrerE
120
__ZN7WebCore11FrameLoader17stopForUserCancelEb
120
__ZN7WebCore11FrameLoader17stopForUserCancelEb
121
__ZN7WebCore11FrameLoader21loadURLIntoChildFrameERKNS_4KURLERKN3WTF6StringEPNS_5FrameE
121
__ZN7WebCore11FrameLoader21loadURLIntoChildFrameERKNS_3URLERKN3WTF6StringEPNS_5FrameE
122
__ZN7WebCore11FrameLoader22findFrameForNavigationERKN3WTF12AtomicStringEPNS_8DocumentE
122
__ZN7WebCore11FrameLoader22findFrameForNavigationERKN3WTF12AtomicStringEPNS_8DocumentE
123
__ZN7WebCore11FrameLoader23timeOfLastCompletedLoadEv
123
__ZN7WebCore11FrameLoader23timeOfLastCompletedLoadEv
124
__ZN7WebCore11FrameLoader26reloadWithOverrideEncodingERKN3WTF6StringE
124
__ZN7WebCore11FrameLoader26reloadWithOverrideEncodingERKN3WTF6StringE
Lines 146-158 __ZN7WebCore11HistoryItem20setOriginalURLStringERKN3WTF6StringE a/Source/WebCore/WebCore.exp.in_sec5
146
__ZN7WebCore11HistoryItem20setTransientPropertyERKN3WTF6StringEP11objc_object
146
__ZN7WebCore11HistoryItem20setTransientPropertyERKN3WTF6StringEP11objc_object
147
__ZN7WebCore11HistoryItem21decodeBackForwardTreeERKN3WTF6StringES4_S4_RNS1_7DecoderE
147
__ZN7WebCore11HistoryItem21decodeBackForwardTreeERKN3WTF6StringES4_S4_RNS1_7DecoderE
148
__ZN7WebCore11HistoryItem22mergeAutoCompleteHintsEPS0_
148
__ZN7WebCore11HistoryItem22mergeAutoCompleteHintsEPS0_
149
__ZN7WebCore11HistoryItem6setURLERKNS_4KURLE
150
__ZN7WebCore11HistoryItem7visitedERKN3WTF6StringEdNS_18VisitCountBehaviorE
149
__ZN7WebCore11HistoryItem7visitedERKN3WTF6StringEdNS_18VisitCountBehaviorE
151
__ZN7WebCore11HistoryItem8formDataEv
150
__ZN7WebCore11HistoryItem8formDataEv
152
__ZN7WebCore11HistoryItem8setTitleERKN3WTF6StringE
151
__ZN7WebCore11HistoryItem8setTitleERKN3WTF6StringE
153
__ZN7WebCore11HistoryItemC1ERKN3WTF6StringES4_S4_d
152
__ZN7WebCore11HistoryItemC1ERKN3WTF6StringES4_S4_d
154
__ZN7WebCore11HistoryItemC1ERKN3WTF6StringES4_d
153
__ZN7WebCore11HistoryItemC1ERKN3WTF6StringES4_d
155
__ZN7WebCore11HistoryItemC1ERKNS_4KURLERKN3WTF6StringES7_S7_
154
__ZN7WebCore11HistoryItemC1ERKNS_3URLERKN3WTF6StringES7_S7_
156
__ZN7WebCore11HistoryItemC1Ev
155
__ZN7WebCore11HistoryItemC1Ev
157
__ZN7WebCore11HistoryItemD1Ev
156
__ZN7WebCore11HistoryItemD1Ev
158
__ZN7WebCore11JSDOMWindow6s_infoE
157
__ZN7WebCore11JSDOMWindow6s_infoE
Lines 160-166 __ZN7WebCore11MemoryCache11setDisabledEb a/Source/WebCore/WebCore.exp.in_sec6
160
__ZN7WebCore11MemoryCache13getStatisticsEv
159
__ZN7WebCore11MemoryCache13getStatisticsEv
161
__ZN7WebCore11MemoryCache13setCapacitiesEjjj
160
__ZN7WebCore11MemoryCache13setCapacitiesEjjj
162
__ZN7WebCore11MemoryCache14evictResourcesEv
161
__ZN7WebCore11MemoryCache14evictResourcesEv
163
__ZN7WebCore11MemoryCache14resourceForURLERKNS_4KURLE
162
__ZN7WebCore11MemoryCache14resourceForURLERKNS_3URLE
164
__ZN7WebCore11MemoryCache18resourceForRequestERKNS_15ResourceRequestE
163
__ZN7WebCore11MemoryCache18resourceForRequestERKNS_15ResourceRequestE
165
__ZN7WebCore11MemoryCache19getOriginsWithCacheERN3WTF7HashSetINS1_6RefPtrINS_14SecurityOriginEEENS_18SecurityOriginHashENS1_10HashTraitsIS5_EEEE
164
__ZN7WebCore11MemoryCache19getOriginsWithCacheERN3WTF7HashSetINS1_6RefPtrINS_14SecurityOriginEEENS_18SecurityOriginHashENS1_10HashTraitsIS5_EEEE
166
__ZN7WebCore11MemoryCache25removeResourcesWithOriginEPNS_14SecurityOriginE
165
__ZN7WebCore11MemoryCache25removeResourcesWithOriginEPNS_14SecurityOriginE
Lines 168-175 __ZN7WebCore11PageConsole21shouldPrintExceptionsEv a/Source/WebCore/WebCore.exp.in_sec7
168
__ZN7WebCore11PageConsole24setShouldPrintExceptionsEb
167
__ZN7WebCore11PageConsole24setShouldPrintExceptionsEb
169
__ZN7WebCore11SQLResultOkE
168
__ZN7WebCore11SQLResultOkE
170
__ZN7WebCore11URLWithDataEP6NSDataP5NSURL
169
__ZN7WebCore11URLWithDataEP6NSDataP5NSURL
171
__ZN7WebCore11getURLBytesEPK7__CFURLRN3WTF7CStringE
172
__ZN7WebCore11getURLBytesEPK7__CFURLRN3WTF6VectorIcLm512ENS3_15CrashOnOverflowEEE
170
__ZN7WebCore11getURLBytesEPK7__CFURLRN3WTF6VectorIcLm512ENS3_15CrashOnOverflowEEE
171
__ZN7WebCore11getURLBytesEPK7__CFURLRN3WTF7CStringE
173
__ZN7WebCore11iBeamCursorEv
172
__ZN7WebCore11iBeamCursorEv
174
__ZN7WebCore11memoryCacheEv
173
__ZN7WebCore11memoryCacheEv
175
__ZN7WebCore11startOfLineERKNS_15VisiblePositionE
174
__ZN7WebCore11startOfLineERKNS_15VisiblePositionE
Lines 234-240 __ZN7WebCore12TextIteratorD1Ev a/Source/WebCore/WebCore.exp.in_sec8
234
__ZN7WebCore12UTF8EncodingEv
233
__ZN7WebCore12UTF8EncodingEv
235
__ZN7WebCore12cacheStorageEv
234
__ZN7WebCore12cacheStorageEv
236
__ZN7WebCore12createMarkupEPKNS_5RangeEPN3WTF6VectorIPNS_4NodeELm0ENS3_15CrashOnOverflowEEENS_23EAnnotateForInterchangeEbNS_13EAbsoluteURLsE
235
__ZN7WebCore12createMarkupEPKNS_5RangeEPN3WTF6VectorIPNS_4NodeELm0ENS3_15CrashOnOverflowEEENS_23EAnnotateForInterchangeEbNS_13EAbsoluteURLsE
237
__ZN7WebCore12deleteCookieERKNS_21NetworkStorageSessionERKNS_4KURLERKN3WTF6StringE
236
__ZN7WebCore12deleteCookieERKNS_21NetworkStorageSessionERKNS_3URLERKN3WTF6StringE
238
__ZN7WebCore12gcControllerEv
237
__ZN7WebCore12gcControllerEv
239
__ZN7WebCore12iconDatabaseEv
238
__ZN7WebCore12iconDatabaseEv
240
__ZN7WebCore13AXObjectCache10rootObjectEv
239
__ZN7WebCore13AXObjectCache10rootObjectEv
Lines 261-266 __ZN7WebCore13GraphicsLayer18setBackgroundColorERKNS_5ColorE a/Source/WebCore/WebCore.exp.in_sec9
261
__ZN7WebCore13GraphicsLayer20setReplicatedByLayerEPS0_
260
__ZN7WebCore13GraphicsLayer20setReplicatedByLayerEPS0_
262
__ZN7WebCore13GraphicsLayer54noteDeviceOrPageScaleFactorChangedIncludingDescendantsEv
261
__ZN7WebCore13GraphicsLayer54noteDeviceOrPageScaleFactorChangedIncludingDescendantsEv
263
__ZN7WebCore13GraphicsLayer6createEPNS_20GraphicsLayerFactoryEPNS_19GraphicsLayerClientE
262
__ZN7WebCore13GraphicsLayer6createEPNS_20GraphicsLayerFactoryEPNS_19GraphicsLayerClientE
263
__ZN7WebCore13GraphicsLayer7setSizeERKNS_9FloatSizeE
264
__ZN7WebCore13GraphicsLayer8addChildEPS0_
264
__ZN7WebCore13GraphicsLayer8addChildEPS0_
265
__ZN7WebCore13GraphicsLayerC2EPNS_19GraphicsLayerClientE
265
__ZN7WebCore13GraphicsLayerC2EPNS_19GraphicsLayerClientE
266
__ZN7WebCore13GraphicsLayerD2Ev
266
__ZN7WebCore13GraphicsLayerD2Ev
Lines 282-292 __ZN7WebCore13QualifiedNameD1Ev a/Source/WebCore/WebCore.exp.in_sec10
282
__ZN7WebCore13ResourceErrorC1EP7NSError
282
__ZN7WebCore13ResourceErrorC1EP7NSError
283
__ZN7WebCore13ResourceErrorC1EP9__CFError
283
__ZN7WebCore13ResourceErrorC1EP9__CFError
284
__ZN7WebCore13SQLResultDoneE
284
__ZN7WebCore13SQLResultDoneE
285
__ZN7WebCore13ScriptGCEvent11getHeapSizeERNS_8HeapInfoE
285
__ZN7WebCore13StyledElement22setInlineStylePropertyENS_13CSSPropertyIDERKN3WTF6StringEb
286
__ZN7WebCore13StyledElement22setInlineStylePropertyENS_13CSSPropertyIDERKN3WTF6StringEb
286
__ZN7WebCore13StyledElement22setInlineStylePropertyENS_13CSSPropertyIDEdNS_17CSSPrimitiveValue9UnitTypesEb
287
__ZN7WebCore13StyledElement22setInlineStylePropertyENS_13CSSPropertyIDEdNS_17CSSPrimitiveValue9UnitTypesEb
287
__ZN7WebCore13cookiesForDOMERKNS_21NetworkStorageSessionERKNS_4KURLES5_
288
__ZN7WebCore13cookiesForDOMERKNS_21NetworkStorageSessionERKNS_3URLES5_
288
__ZN7WebCore13createWrapperEPN3JSC9ExecStateEPNS_17JSDOMGlobalObjectEPNS_4NodeE
289
__ZN7WebCore13createWrapperEPN3JSC9ExecStateEPNS_17JSDOMGlobalObjectEPNS_4NodeE
289
__ZN7WebCore13directoryNameERKN3WTF6StringE
290
__ZN7WebCore13directoryNameERKN3WTF6StringE
291
__ZN7WebCore13getRawCookiesERKNS_21NetworkStorageSessionERKNS_3URLES5_RN3WTF6VectorINS_6CookieELm0ENS6_15CrashOnOverflowEEE
290
__ZN7WebCore13listDirectoryERKN3WTF6StringES3_
292
__ZN7WebCore13listDirectoryERKN3WTF6StringES3_
291
__ZN7WebCore13pointerCursorEv
293
__ZN7WebCore13pointerCursorEv
292
__ZN7WebCore13toJSDOMWindowEN3JSC7JSValueE
294
__ZN7WebCore13toJSDOMWindowEN3JSC7JSValueE
Lines 390-399 __ZN7WebCore14ScrollbarTheme5themeEv a/Source/WebCore/WebCore.exp.in_sec11
390
__ZN7WebCore14SecurityOrigin16createFromStringERKN3WTF6StringE
392
__ZN7WebCore14SecurityOrigin16createFromStringERKN3WTF6StringE
391
__ZN7WebCore14SecurityOrigin28createFromDatabaseIdentifierERKN3WTF6StringE
393
__ZN7WebCore14SecurityOrigin28createFromDatabaseIdentifierERKN3WTF6StringE
392
__ZN7WebCore14SecurityOrigin6createERKN3WTF6StringES4_i
394
__ZN7WebCore14SecurityOrigin6createERKN3WTF6StringES4_i
393
__ZN7WebCore14SecurityOrigin6createERKNS_4KURLE
395
__ZN7WebCore14SecurityOrigin6createERKNS_3URLE
394
__ZN7WebCore14SecurityPolicy18setLocalLoadPolicyENS0_15LocalLoadPolicyE
396
__ZN7WebCore14SecurityPolicy18setLocalLoadPolicyENS0_15LocalLoadPolicyE
395
__ZN7WebCore14SecurityPolicy18shouldHideReferrerERKNS_4KURLERKN3WTF6StringE
397
__ZN7WebCore14SecurityPolicy22generateReferrerHeaderENS_14ReferrerPolicyERKNS_3URLERKN3WTF6StringE
396
__ZN7WebCore14SecurityPolicy22generateReferrerHeaderENS_14ReferrerPolicyERKNS_4KURLERKN3WTF6StringE
397
__ZN7WebCore14SecurityPolicy27resetOriginAccessWhitelistsEv
398
__ZN7WebCore14SecurityPolicy27resetOriginAccessWhitelistsEv
398
__ZN7WebCore14SecurityPolicy29addOriginAccessWhitelistEntryERKNS_14SecurityOriginERKN3WTF6StringES7_b
399
__ZN7WebCore14SecurityPolicy29addOriginAccessWhitelistEntryERKNS_14SecurityOriginERKN3WTF6StringES7_b
399
__ZN7WebCore14SecurityPolicy32removeOriginAccessWhitelistEntryERKNS_14SecurityOriginERKN3WTF6StringES7_b
400
__ZN7WebCore14SecurityPolicy32removeOriginAccessWhitelistEntryERKNS_14SecurityOriginERKN3WTF6StringES7_b
Lines 405-411 __ZN7WebCore14StorageTracker32syncFileSystemAndTrackerDatabaseEv a/Source/WebCore/WebCore.exp.in_sec12
405
__ZN7WebCore14StorageTracker7originsERN3WTF6VectorINS1_6RefPtrINS_14SecurityOriginEEELm0ENS1_15CrashOnOverflowEEE
406
__ZN7WebCore14StorageTracker7originsERN3WTF6VectorINS1_6RefPtrINS_14SecurityOriginEEELm0ENS1_15CrashOnOverflowEEE
406
__ZN7WebCore14StorageTracker7trackerEv
407
__ZN7WebCore14StorageTracker7trackerEv
407
__ZN7WebCore14SubframeLoader12allowPluginsENS_28ReasonForCallingAllowPluginsE
408
__ZN7WebCore14SubframeLoader12allowPluginsENS_28ReasonForCallingAllowPluginsE
408
__ZN7WebCore14cookiesEnabledERKNS_21NetworkStorageSessionERKNS_4KURLES5_
409
__ZN7WebCore14cookiesEnabledERKNS_21NetworkStorageSessionERKNS_3URLES5_
409
__ZN7WebCore14decodeHostNameEP8NSString
410
__ZN7WebCore14decodeHostNameEP8NSString
410
__ZN7WebCore14encodeHostNameEP8NSString
411
__ZN7WebCore14encodeHostNameEP8NSString
411
__ZN7WebCore14endOfParagraphERKNS_15VisiblePositionENS_27EditingBoundaryCrossingRuleE
412
__ZN7WebCore14endOfParagraphERKNS_15VisiblePositionENS_27EditingBoundaryCrossingRuleE
Lines 417-423 __ZN7WebCore15AffineTransform8multiplyERKS0_ a/Source/WebCore/WebCore.exp.in_sec13
417
__ZN7WebCore15AffineTransform9translateEdd
418
__ZN7WebCore15AffineTransform9translateEdd
418
__ZN7WebCore15AffineTransformC1Edddddd
419
__ZN7WebCore15AffineTransformC1Edddddd
419
__ZN7WebCore15AffineTransformC1Ev
420
__ZN7WebCore15AffineTransformC1Ev
420
__ZN7WebCore15ArchiveResource6createEN3WTF10PassRefPtrINS_12SharedBufferEEERKNS_4KURLERKNS1_6StringESA_SA_RKNS_16ResourceResponseE
421
__ZN7WebCore15ArchiveResource6createEN3WTF10PassRefPtrINS_12SharedBufferEEERKNS_3URLERKNS1_6StringESA_SA_RKNS_16ResourceResponseE
422
__ZN7WebCore15BackForwardList10removeItemEPNS_11HistoryItemE
423
__ZN7WebCore15BackForwardList10setEnabledEb
424
__ZN7WebCore15BackForwardList11currentItemEv
425
__ZN7WebCore15BackForwardList11forwardItemEv
426
__ZN7WebCore15BackForwardList11setCapacityEi
427
__ZN7WebCore15BackForwardList12containsItemEPNS_11HistoryItemE
428
__ZN7WebCore15BackForwardList17backListWithLimitEiRN3WTF6VectorINS1_6RefPtrINS_11HistoryItemEEELm0ENS1_15CrashOnOverflowEEE
429
__ZN7WebCore15BackForwardList20forwardListWithLimitEiRN3WTF6VectorINS1_6RefPtrINS_11HistoryItemEEELm0ENS1_15CrashOnOverflowEEE
430
__ZN7WebCore15BackForwardList6closedEv
431
__ZN7WebCore15BackForwardList6goBackEv
432
__ZN7WebCore15BackForwardList7enabledEv
433
__ZN7WebCore15BackForwardList7entriesEv
434
__ZN7WebCore15BackForwardList8backItemEv
435
__ZN7WebCore15BackForwardList8capacityEv
436
__ZN7WebCore15BackForwardList9goForwardEv
437
__ZN7WebCore15BackForwardListC1EPNS_4PageE
421
__ZN7WebCore15DOMWrapperWorld13clearWrappersEv
438
__ZN7WebCore15DOMWrapperWorld13clearWrappersEv
422
__ZN7WebCore15DOMWrapperWorldD1Ev
439
__ZN7WebCore15DOMWrapperWorldD1Ev
423
__ZN7WebCore15DatabaseManager10initializeERKN3WTF6StringE
440
__ZN7WebCore15DatabaseManager10initializeERKN3WTF6StringE
Lines 435-443 __ZN7WebCore15DatabaseManager7originsERN3WTF6VectorINS1_6RefPtrINS_14SecurityOri a/Source/WebCore/WebCore.exp.in_sec14
435
__ZN7WebCore15DatabaseManager8setQuotaEPNS_14SecurityOriginEy
452
__ZN7WebCore15DatabaseManager8setQuotaEPNS_14SecurityOriginEy
436
__ZN7WebCore15DatabaseManager9setClientEPNS_21DatabaseManagerClientE
453
__ZN7WebCore15DatabaseManager9setClientEPNS_21DatabaseManagerClientE
437
__ZN7WebCore15FocusController10setFocusedEb
454
__ZN7WebCore15FocusController10setFocusedEb
438
__ZN7WebCore15FocusController17setFocusedElementEPNS_7ElementEN3WTF10PassRefPtrINS_5FrameEEENS_14FocusDirectionE
439
__ZN7WebCore15FocusController15setFocusedFrameEN3WTF10PassRefPtrINS_5FrameEEE
455
__ZN7WebCore15FocusController15setFocusedFrameEN3WTF10PassRefPtrINS_5FrameEEE
440
__ZN7WebCore15FocusController15setInitialFocusENS_14FocusDirectionEPNS_13KeyboardEventE
456
__ZN7WebCore15FocusController15setInitialFocusENS_14FocusDirectionEPNS_13KeyboardEventE
457
__ZN7WebCore15FocusController17setFocusedElementEPNS_7ElementEN3WTF10PassRefPtrINS_5FrameEEENS_14FocusDirectionE
441
__ZN7WebCore15FocusController28setContainingWindowIsVisibleEb
458
__ZN7WebCore15FocusController28setContainingWindowIsVisibleEb
442
__ZN7WebCore15FocusController9setActiveEb
459
__ZN7WebCore15FocusController9setActiveEb
443
__ZN7WebCore15GraphicsContext10strokeRectERKNS_9FloatRectEf
460
__ZN7WebCore15GraphicsContext10strokeRectERKNS_9FloatRectEf
Lines 497-503 __ZN7WebCore15StringTruncator5widthERKN3WTF6StringERKNS_4FontENS0_24EnableRoundi a/Source/WebCore/WebCore.exp.in_sec15
497
__ZN7WebCore15VisiblePositionC1ERKNS_8PositionENS_9EAffinityE
514
__ZN7WebCore15VisiblePositionC1ERKNS_8PositionENS_9EAffinityE
498
__ZN7WebCore15defaultLanguageEv
515
__ZN7WebCore15defaultLanguageEv
499
__ZN7WebCore15localizedStringEPKc
516
__ZN7WebCore15localizedStringEPKc
500
__ZN7WebCore15mimeTypeFromURLERKNS_4KURLE
517
__ZN7WebCore15mimeTypeFromURLERKNS_3URLE
501
__ZN7WebCore15originalURLDataEP5NSURL
518
__ZN7WebCore15originalURLDataEP5NSURL
502
__ZN7WebCore15pathGetFileNameERKN3WTF6StringE
519
__ZN7WebCore15pathGetFileNameERKN3WTF6StringE
503
__ZN7WebCore15reportExceptionEPN3JSC9ExecStateENS0_7JSValueEPNS_12CachedScriptE
520
__ZN7WebCore15reportExceptionEPN3JSC9ExecStateENS0_7JSValueEPNS_12CachedScriptE
Lines 507-513 __ZN7WebCore15visitedLinkHashEPKtj a/Source/WebCore/WebCore.exp.in_sec16
507
__ZN7WebCore15visitedLinkHashERKN3WTF6StringE
524
__ZN7WebCore15visitedLinkHashERKN3WTF6StringE
508
__ZN7WebCore16ApplicationCache18diskUsageForOriginEPNS_14SecurityOriginE
525
__ZN7WebCore16ApplicationCache18diskUsageForOriginEPNS_14SecurityOriginE
509
__ZN7WebCore16ApplicationCache20deleteCacheForOriginEPNS_14SecurityOriginE
526
__ZN7WebCore16ApplicationCache20deleteCacheForOriginEPNS_14SecurityOriginE
510
__ZN7WebCore16CSSParserContextC1ERNS_8DocumentERKNS_4KURLERKN3WTF6StringE
527
__ZN7WebCore16CSSParserContextC1ERNS_8DocumentERKNS_3URLERKN3WTF6StringE
511
__ZN7WebCore16DatabaseStrategy17getDatabaseServerEv
528
__ZN7WebCore16DatabaseStrategy17getDatabaseServerEv
512
__ZN7WebCore16DeviceMotionData12Acceleration6createEbdbdbd
529
__ZN7WebCore16DeviceMotionData12Acceleration6createEbdbdbd
513
__ZN7WebCore16DeviceMotionData12RotationRate6createEbdbdbd
530
__ZN7WebCore16DeviceMotionData12RotationRate6createEbdbdbd
Lines 593-599 __ZN7WebCore17SubresourceLoader6createEPNS_5FrameEPNS_14CachedResourceERKNS_15Re a/Source/WebCore/WebCore.exp.in_sec17
593
__ZN7WebCore17cacheDOMStructureEPNS_17JSDOMGlobalObjectEPN3JSC9StructureEPKNS2_9ClassInfoE
610
__ZN7WebCore17cacheDOMStructureEPNS_17JSDOMGlobalObjectEPN3JSC9StructureEPKNS2_9ClassInfoE
594
__ZN7WebCore17languageDidChangeEv
611
__ZN7WebCore17languageDidChangeEv
595
__ZN7WebCore17openTemporaryFileERKN3WTF6StringERi
612
__ZN7WebCore17openTemporaryFileERKN3WTF6StringERi
596
__ZN7WebCore17setCookiesFromDOMERKNS_21NetworkStorageSessionERKNS_4KURLES5_RKN3WTF6StringE
613
__ZN7WebCore17setCookiesFromDOMERKNS_21NetworkStorageSessionERKNS_3URLES5_RKN3WTF6StringE
597
__ZN7WebCore17userVisibleStringEP5NSURL
614
__ZN7WebCore17userVisibleStringEP5NSURL
598
__ZN7WebCore18DOMWindowExtensionC1EPNS_5FrameEPNS_15DOMWrapperWorldE
615
__ZN7WebCore18DOMWindowExtensionC1EPNS_5FrameEPNS_15DOMWrapperWorldE
599
__ZN7WebCore18PlatformPasteboard10uniqueNameEv
616
__ZN7WebCore18PlatformPasteboard10uniqueNameEv
Lines 616-655 __ZN7WebCore18StyleSheetContentsD1Ev a/Source/WebCore/WebCore.exp.in_sec18
616
__ZN7WebCore18isStartOfParagraphERKNS_15VisiblePositionENS_27EditingBoundaryCrossingRuleE
633
__ZN7WebCore18isStartOfParagraphERKNS_15VisiblePositionENS_27EditingBoundaryCrossingRuleE
617
__ZN7WebCore18makeAllDirectoriesERKN3WTF6StringE
634
__ZN7WebCore18makeAllDirectoriesERKN3WTF6StringE
618
__ZN7WebCore18pluginScriptObjectEPN3JSC9ExecStateEPNS_13JSHTMLElementE
635
__ZN7WebCore18pluginScriptObjectEPN3JSC9ExecStateEPNS_13JSHTMLElementE
619
__ZN7WebCore18proxyServersForURLERKNS_4KURLEPKNS_17NetworkingContextE
636
__ZN7WebCore18proxyServersForURLERKNS_3URLEPKNS_17NetworkingContextE
620
__ZNK7WebCore19AnimationController11isSuspendedEv
621
__ZN7WebCore19AnimationController16resumeAnimationsEv
637
__ZN7WebCore19AnimationController16resumeAnimationsEv
622
__ZN7WebCore19AnimationController17suspendAnimationsEv
638
__ZN7WebCore19AnimationController17suspendAnimationsEv
623
__ZN7WebCore19AnimationController20pauseAnimationAtTimeEPNS_12RenderObjectERKN3WTF12AtomicStringEd
639
__ZN7WebCore19AnimationController20pauseAnimationAtTimeEPNS_12RenderObjectERKN3WTF12AtomicStringEd
624
__ZN7WebCore19AnimationController21pauseTransitionAtTimeEPNS_12RenderObjectERKN3WTF6StringEd
640
__ZN7WebCore19AnimationController21pauseTransitionAtTimeEPNS_12RenderObjectERKN3WTF6StringEd
625
__ZN7WebCore19AnimationController36setAllowsNewAnimationsWhileSuspendedEb
641
__ZN7WebCore19AnimationController36setAllowsNewAnimationsWhileSuspendedEb
626
__ZNK7WebCore19AnimationController33allowsNewAnimationsWhileSuspendedEv
627
__ZN7WebCore15BackForwardList10removeItemEPNS_11HistoryItemE
628
__ZN7WebCore15BackForwardList10setEnabledEb
629
__ZN7WebCore15BackForwardList11currentItemEv
630
__ZN7WebCore15BackForwardList11forwardItemEv
631
__ZN7WebCore15BackForwardList11setCapacityEi
632
__ZN7WebCore15BackForwardList12containsItemEPNS_11HistoryItemE
633
__ZN7WebCore15BackForwardList17backListWithLimitEiRN3WTF6VectorINS1_6RefPtrINS_11HistoryItemEEELm0ENS1_15CrashOnOverflowEEE
634
__ZN7WebCore15BackForwardList20forwardListWithLimitEiRN3WTF6VectorINS1_6RefPtrINS_11HistoryItemEEELm0ENS1_15CrashOnOverflowEEE
635
__ZN7WebCore15BackForwardList6closedEv
636
__ZN7WebCore15BackForwardList6goBackEv
637
__ZN7WebCore15BackForwardList7enabledEv
638
__ZN7WebCore15BackForwardList7entriesEv
639
__ZN7WebCore15BackForwardList8backItemEv
640
__ZN7WebCore15BackForwardList8capacityEv
641
__ZN7WebCore15BackForwardList9goForwardEv
642
__ZN7WebCore15BackForwardListC1EPNS_4PageE
643
__ZN7WebCore19HTMLTextAreaElement8setValueERKN3WTF6StringE
642
__ZN7WebCore19HTMLTextAreaElement8setValueERKN3WTF6StringE
644
__ZN7WebCore19LayerFlushScheduler10invalidateEv
643
__ZN7WebCore19LayerFlushScheduler10invalidateEv
644
__ZN7WebCore19LayerFlushScheduler23runLoopObserverCallbackEv
645
__ZN7WebCore19LayerFlushScheduler6resumeEv
645
__ZN7WebCore19LayerFlushScheduler6resumeEv
646
__ZN7WebCore19LayerFlushScheduler7suspendEv
646
__ZN7WebCore19LayerFlushScheduler7suspendEv
647
__ZN7WebCore19LayerFlushScheduler8scheduleEv
647
__ZN7WebCore19LayerFlushScheduler8scheduleEv
648
__ZN7WebCore19LayerFlushSchedulerC1EPNS_25LayerFlushSchedulerClientE
648
__ZN7WebCore19LayerFlushSchedulerC2EPNS_25LayerFlushSchedulerClientE
649
__ZN7WebCore19LayerFlushSchedulerC2EPNS_25LayerFlushSchedulerClientE
649
__ZN7WebCore19LayerFlushSchedulerD1Ev
650
__ZN7WebCore19LayerFlushSchedulerD1Ev
650
__ZN7WebCore19LayerFlushSchedulerD2Ev
651
__ZN7WebCore19LayerFlushSchedulerD2Ev
651
__ZN7WebCore19LayerFlushScheduler23runLoopObserverCallbackEv
652
__ZN7WebCore19LayerFlushSchedulerC1EPNS_25LayerFlushSchedulerClientE
653
__ZN7WebCore19ResourceRequestBase11setHTTPBodyEN3WTF10PassRefPtrINS_8FormDataEEE
652
__ZN7WebCore19ResourceRequestBase11setHTTPBodyEN3WTF10PassRefPtrINS_8FormDataEEE
654
__ZN7WebCore19ResourceRequestBase13setHTTPMethodERKN3WTF6StringE
653
__ZN7WebCore19ResourceRequestBase13setHTTPMethodERKN3WTF6StringE
655
__ZN7WebCore19ResourceRequestBase18setHTTPHeaderFieldEPKcRKN3WTF6StringE
654
__ZN7WebCore19ResourceRequestBase18setHTTPHeaderFieldEPKcRKN3WTF6StringE
Lines 658-664 __ZN7WebCore19ResourceRequestBase22defaultTimeoutIntervalEv a/Source/WebCore/WebCore.exp.in_sec19
658
__ZN7WebCore19ResourceRequestBase24s_defaultTimeoutIntervalE
657
__ZN7WebCore19ResourceRequestBase24s_defaultTimeoutIntervalE
659
__ZN7WebCore19ResourceRequestBase25setDefaultTimeoutIntervalEd
658
__ZN7WebCore19ResourceRequestBase25setDefaultTimeoutIntervalEd
660
__ZN7WebCore19ResourceRequestBase50setResponseContentDispositionEncodingFallbackArrayERKN3WTF6StringES4_S4_
659
__ZN7WebCore19ResourceRequestBase50setResponseContentDispositionEncodingFallbackArrayERKN3WTF6StringES4_S4_
661
__ZN7WebCore19ResourceRequestBase6setURLERKNS_4KURLE
660
__ZN7WebCore19ResourceRequestBase6setURLERKNS_3URLE
662
__ZN7WebCore19TextResourceDecoder5flushEv
661
__ZN7WebCore19TextResourceDecoder5flushEv
663
__ZN7WebCore19TextResourceDecoder6decodeEPKcm
662
__ZN7WebCore19TextResourceDecoder6decodeEPKcm
664
__ZN7WebCore19TextResourceDecoderC1ERKN3WTF6StringERKNS_12TextEncodingEb
663
__ZN7WebCore19TextResourceDecoderC1ERKN3WTF6StringERKNS_12TextEncodingEb
Lines 672-678 __ZN7WebCore20DisplaySleepDisablerD1Ev a/Source/WebCore/WebCore.exp.in_sec20
672
__ZN7WebCore20RenderEmbeddedObject29setPluginUnavailabilityReasonENS0_26PluginUnavailabilityReasonE
671
__ZN7WebCore20RenderEmbeddedObject29setPluginUnavailabilityReasonENS0_26PluginUnavailabilityReasonE
673
__ZN7WebCore20RenderEmbeddedObject37setUnavailablePluginIndicatorIsHiddenEb
672
__ZN7WebCore20RenderEmbeddedObject37setUnavailablePluginIndicatorIsHiddenEb
674
__ZN7WebCore20RenderEmbeddedObject44setPluginUnavailabilityReasonWithDescriptionENS0_26PluginUnavailabilityReasonERKN3WTF6StringE
673
__ZN7WebCore20RenderEmbeddedObject44setPluginUnavailabilityReasonWithDescriptionENS0_26PluginUnavailabilityReasonERKN3WTF6StringE
675
__ZNK7WebCore20RenderEmbeddedObject21isReplacementObscuredEv
676
__ZN7WebCore20ResourceHandleClient16didReceiveBufferEPNS_14ResourceHandleEN3WTF10PassRefPtrINS_12SharedBufferEEEi
674
__ZN7WebCore20ResourceHandleClient16didReceiveBufferEPNS_14ResourceHandleEN3WTF10PassRefPtrINS_12SharedBufferEEEi
677
__ZN7WebCore20ResourceHandleClient20willSendRequestAsyncEPNS_14ResourceHandleERKNS_15ResourceRequestERKNS_16ResourceResponseE
675
__ZN7WebCore20ResourceHandleClient20willSendRequestAsyncEPNS_14ResourceHandleERKNS_15ResourceRequestERKNS_16ResourceResponseE
678
__ZN7WebCore20ResourceHandleClient22willCacheResponseAsyncEPNS_14ResourceHandleEP19NSCachedURLResponse
676
__ZN7WebCore20ResourceHandleClient22willCacheResponseAsyncEPNS_14ResourceHandleEP19NSCachedURLResponse
Lines 688-696 __ZN7WebCore20ResourceResponseBase18setHTTPHeaderFieldERKN3WTF12AtomicStringERKN a/Source/WebCore/WebCore.exp.in_sec21
688
__ZN7WebCore20ResourceResponseBase19setTextEncodingNameERKN3WTF6StringE
686
__ZN7WebCore20ResourceResponseBase19setTextEncodingNameERKN3WTF6StringE
689
__ZN7WebCore20ResourceResponseBase20setSuggestedFilenameERKN3WTF6StringE
687
__ZN7WebCore20ResourceResponseBase20setSuggestedFilenameERKN3WTF6StringE
690
__ZN7WebCore20ResourceResponseBase24setExpectedContentLengthEx
688
__ZN7WebCore20ResourceResponseBase24setExpectedContentLengthEx
691
__ZN7WebCore20ResourceResponseBase6setURLERKNS_4KURLE
689
__ZN7WebCore20ResourceResponseBase6setURLERKNS_3URLE
692
__ZN7WebCore20ResourceResponseBaseC2Ev
690
__ZN7WebCore20ResourceResponseBaseC2Ev
693
__ZN7WebCore20ResourceResponseBaseC2ERKNS_4KURLERKN3WTF6StringExS7_S7_
694
__ZN7WebCore20UserGestureIndicator7s_stateE
691
__ZN7WebCore20UserGestureIndicator7s_stateE
695
__ZN7WebCore20UserGestureIndicatorC1ENS_26ProcessingUserGestureStateE
692
__ZN7WebCore20UserGestureIndicatorC1ENS_26ProcessingUserGestureStateE
696
__ZN7WebCore20UserGestureIndicatorD1Ev
693
__ZN7WebCore20UserGestureIndicatorD1Ev
Lines 711-717 __ZN7WebCore21ResourceLoadScheduler21resumePendingRequestsEv a/Source/WebCore/WebCore.exp.in_sec22
711
__ZN7WebCore21ResourceLoadScheduler22suspendPendingRequestsEv
708
__ZN7WebCore21ResourceLoadScheduler22suspendPendingRequestsEv
712
__ZN7WebCore21ResourceLoadScheduler23scheduleSubresourceLoadEPNS_5FrameEPNS_14CachedResourceERKNS_15ResourceRequestENS_20ResourceLoadPriorityERKNS_21ResourceLoaderOptionsE
709
__ZN7WebCore21ResourceLoadScheduler23scheduleSubresourceLoadEPNS_5FrameEPNS_14CachedResourceERKNS_15ResourceRequestENS_20ResourceLoadPriorityERKNS_21ResourceLoaderOptionsE
713
__ZN7WebCore21ResourceLoadScheduler24schedulePluginStreamLoadEPNS_5FrameEPNS_32NetscapePlugInStreamLoaderClientERKNS_15ResourceRequestE
710
__ZN7WebCore21ResourceLoadScheduler24schedulePluginStreamLoadEPNS_5FrameEPNS_32NetscapePlugInStreamLoaderClientERKNS_15ResourceRequestE
714
__ZN7WebCore21ResourceLoadScheduler27crossOriginRedirectReceivedEPNS_14ResourceLoaderERKNS_4KURLE
715
__ZN7WebCore21ResourceLoadScheduler32notifyDidScheduleResourceRequestEPNS_14ResourceLoaderE
711
__ZN7WebCore21ResourceLoadScheduler32notifyDidScheduleResourceRequestEPNS_14ResourceLoaderE
716
__ZN7WebCore21ResourceLoadScheduler6removeEPNS_14ResourceLoaderE
712
__ZN7WebCore21ResourceLoadScheduler6removeEPNS_14ResourceLoaderE
717
__ZN7WebCore21ResourceLoadSchedulerC2Ev
713
__ZN7WebCore21ResourceLoadSchedulerC2Ev
Lines 803-815 __ZN7WebCore27AuthenticationChallengeBaseC2Ev a/Source/WebCore/WebCore.exp.in_sec23
803
__ZN7WebCore27CSSComputedStyleDeclarationC1EN3WTF10PassRefPtrINS_4NodeEEEbRKNS1_6StringE
799
__ZN7WebCore27CSSComputedStyleDeclarationC1EN3WTF10PassRefPtrINS_4NodeEEEbRKNS1_6StringE
804
__ZN7WebCore27DeviceOrientationClientMock14setOrientationEN3WTF10PassRefPtrINS_21DeviceOrientationDataEEE
800
__ZN7WebCore27DeviceOrientationClientMock14setOrientationEN3WTF10PassRefPtrINS_21DeviceOrientationDataEEE
805
__ZN7WebCore27DeviceOrientationClientMockC1Ev
801
__ZN7WebCore27DeviceOrientationClientMockC1Ev
806
__ZN7WebCore27protocolHostAndPortAreEqualERKNS_4KURLES2_
802
__ZN7WebCore27protocolHostAndPortAreEqualERKNS_3URLES2_
807
__ZN7WebCore27startObservingCookieChangesEPFvvE
803
__ZN7WebCore27startObservingCookieChangesEPFvvE
808
__ZN7WebCore28DocumentStyleSheetCollection12addUserSheetEN3WTF10PassRefPtrINS_18StyleSheetContentsEEE
804
__ZN7WebCore28DocumentStyleSheetCollection12addUserSheetEN3WTF10PassRefPtrINS_18StyleSheetContentsEEE
809
__ZN7WebCore28DocumentStyleSheetCollection14addAuthorSheetEN3WTF10PassRefPtrINS_18StyleSheetContentsEEE
805
__ZN7WebCore28DocumentStyleSheetCollection14addAuthorSheetEN3WTF10PassRefPtrINS_18StyleSheetContentsEEE
810
__ZN7WebCore28encodeWithURLEscapeSequencesERKN3WTF6StringE
806
__ZN7WebCore28encodeWithURLEscapeSequencesERKN3WTF6StringE
811
__ZN7WebCore28removeLanguageChangeObserverEPv
807
__ZN7WebCore28removeLanguageChangeObserverEPv
812
__ZN7WebCore29cookieRequestHeaderFieldValueERKNS_21NetworkStorageSessionERKNS_4KURLES5_
808
__ZN7WebCore29cookieRequestHeaderFieldValueERKNS_21NetworkStorageSessionERKNS_3URLES5_
813
__ZN7WebCore29isCharacterSmartReplaceExemptEib
809
__ZN7WebCore29isCharacterSmartReplaceExemptEib
814
__ZN7WebCore30hostNameNeedsDecodingWithRangeEP8NSString8_NSRange
810
__ZN7WebCore30hostNameNeedsDecodingWithRangeEP8NSString8_NSRange
815
__ZN7WebCore30hostNameNeedsEncodingWithRangeEP8NSString8_NSRange
811
__ZN7WebCore30hostNameNeedsEncodingWithRangeEP8NSString8_NSRange
Lines 819-824 __ZN7WebCore31CrossOriginPreflightResultCache6sharedEv a/Source/WebCore/WebCore.exp.in_sec24
819
__ZN7WebCore33stripLeadingAndTrailingHTMLSpacesERKN3WTF6StringE
815
__ZN7WebCore33stripLeadingAndTrailingHTMLSpacesERKN3WTF6StringE
820
__ZN7WebCore37WidgetHierarchyUpdatesSuspensionScope11moveWidgetsEv
816
__ZN7WebCore37WidgetHierarchyUpdatesSuspensionScope11moveWidgetsEv
821
__ZN7WebCore37WidgetHierarchyUpdatesSuspensionScope35s_widgetHierarchyUpdateSuspendCountE
817
__ZN7WebCore37WidgetHierarchyUpdatesSuspensionScope35s_widgetHierarchyUpdateSuspendCountE
818
__ZN7WebCore3URL10invalidateEv
819
__ZN7WebCore3URLC1ENS_18ParsedURLStringTagERKN3WTF6StringE
820
__ZN7WebCore3URLC1EP5NSURL
821
__ZN7WebCore3URLC1EPK7__CFURL
822
__ZN7WebCore3URLC1ERKS0_RKN3WTF6StringE
822
__ZN7WebCore3macERKNS_10CredentialE
823
__ZN7WebCore3macERKNS_10CredentialE
823
__ZN7WebCore3macERKNS_23AuthenticationChallengeE
824
__ZN7WebCore3macERKNS_23AuthenticationChallengeE
824
__ZN7WebCore40restrictMinimumScaleFactorToViewportSizeERNS_18ViewportAttributesENS_7IntSizeEf
825
__ZN7WebCore40restrictMinimumScaleFactorToViewportSizeERNS_18ViewportAttributesENS_7IntSizeEf
Lines 833-843 __ZN7WebCore4FontC1Ev a/Source/WebCore/WebCore.exp.in_sec25
833
__ZN7WebCore4FontaSERKS0_
834
__ZN7WebCore4FontaSERKS0_
834
__ZN7WebCore4Icon18createIconForFilesERKN3WTF6VectorINS1_6StringELm0ENS1_15CrashOnOverflowEEE
835
__ZN7WebCore4Icon18createIconForFilesERKN3WTF6VectorINS1_6StringELm0ENS1_15CrashOnOverflowEEE
835
__ZN7WebCore4IconD1Ev
836
__ZN7WebCore4IconD1Ev
836
__ZN7WebCore4KURL10invalidateEv
837
__ZN7WebCore4KURLC1ENS_18ParsedURLStringTagERKN3WTF6StringE
838
__ZN7WebCore4KURLC1EP5NSURL
839
__ZN7WebCore4KURLC1EPK7__CFURL
840
__ZN7WebCore4KURLC1ERKS0_RKN3WTF6StringE
841
__ZN7WebCore4Node10renderRectEPb
837
__ZN7WebCore4Node10renderRectEPb
842
__ZN7WebCore4Node11appendChildEN3WTF10PassRefPtrIS0_EERiNS_14AttachBehaviorE
838
__ZN7WebCore4Node11appendChildEN3WTF10PassRefPtrIS0_EERiNS_14AttachBehaviorE
843
__ZN7WebCore4Node11removeChildEPS0_Ri
839
__ZN7WebCore4Node11removeChildEPS0_Ri
Lines 1041-1062 __ZN7WebCore7RunLoop9TimerBaseD2Ev a/Source/WebCore/WebCore.exp.in_sec26
1041
__ZN7WebCore7TextRun19allowsRoundingHacksEv
1037
__ZN7WebCore7TextRun19allowsRoundingHacksEv
1042
__ZN7WebCore7TextRun21s_allowsRoundingHacksE
1038
__ZN7WebCore7TextRun21s_allowsRoundingHacksE
1043
__ZN7WebCore7TextRun22setAllowsRoundingHacksEb
1039
__ZN7WebCore7TextRun22setAllowsRoundingHacksEb
1044
__ZN7WebCore7cookiesEPKNS_8DocumentERKNS_4KURLE
1040
__ZN7WebCore7cookiesEPKNS_8DocumentERKNS_3URLE
1045
__ZN7WebCore7jsArrayEPN3JSC9ExecStateEPNS_17JSDOMGlobalObjectEN3WTF10PassRefPtrINS_13DOMStringListEEE
1041
__ZN7WebCore7jsArrayEPN3JSC9ExecStateEPNS_17JSDOMGlobalObjectEN3WTF10PassRefPtrINS_13DOMStringListEEE
1046
__ZN7WebCore7makeRGBEiii
1042
__ZN7WebCore7makeRGBEiii
1047
__ZN7WebCore7replaceERN3WTF6StringERKNS_17RegularExpressionERKS1_
1043
__ZN7WebCore7replaceERN3WTF6StringERKNS_17RegularExpressionERKS1_
1048
__ZN7WebCore7toInt64EPN3JSC9ExecStateENS0_7JSValueENS_30IntegerConversionConfigurationE
1044
__ZN7WebCore7toInt64EPN3JSC9ExecStateENS0_7JSValueENS_30IntegerConversionConfigurationE
1049
__ZN7WebCore7toRangeEN3JSC7JSValueE
1045
__ZN7WebCore7toRangeEN3JSC7JSValueE
1050
__ZN7WebCore7toUInt8EPN3JSC9ExecStateENS0_7JSValueENS_30IntegerConversionConfigurationE
1046
__ZN7WebCore7toUInt8EPN3JSC9ExecStateENS0_7JSValueENS_30IntegerConversionConfigurationE
1047
__ZN7WebCore8BlobData10appendBlobERKNS_3URLExx
1051
__ZN7WebCore8BlobData14setContentTypeERKN3WTF6StringE
1048
__ZN7WebCore8BlobData14setContentTypeERKN3WTF6StringE
1052
__ZN7WebCore8CSSValue7destroyEv
1049
__ZN7WebCore8CSSValue7destroyEv
1053
__ZN7WebCore8Document11createRangeEv
1050
__ZN7WebCore8Document11createRangeEv
1054
__ZN7WebCore8Document12updateLayoutEv
1051
__ZN7WebCore8Document12updateLayoutEv
1055
__ZN7WebCore8Document13createElementERKNS_13QualifiedNameEb
1052
__ZN7WebCore8Document13createElementERKNS_13QualifiedNameEb
1056
__ZN7WebCore8Document14createTextNodeERKN3WTF6StringE
1053
__ZN7WebCore8Document14createTextNodeERKN3WTF6StringE
1057
__ZN7WebCore8Document17setFocusedElementEN3WTF10PassRefPtrINS_7ElementEEENS_14FocusDirectionE
1058
__ZN7WebCore8Document16isPageBoxVisibleEi
1054
__ZN7WebCore8Document16isPageBoxVisibleEi
1059
__ZN7WebCore8Document16shortcutIconURLsEv
1055
__ZN7WebCore8Document16shortcutIconURLsEv
1056
__ZN7WebCore8Document17setFocusedElementEN3WTF10PassRefPtrINS_7ElementEEENS_14FocusDirectionE
1060
__ZN7WebCore8Document20styleResolverChangedENS_23StyleResolverUpdateFlagE
1057
__ZN7WebCore8Document20styleResolverChangedENS_23StyleResolverUpdateFlagE
1061
__ZN7WebCore8Document22createDocumentFragmentEv
1058
__ZN7WebCore8Document22createDocumentFragmentEv
1062
__ZN7WebCore8Document23didAddWheelEventHandlerEv
1059
__ZN7WebCore8Document23didAddWheelEventHandlerEv
Lines 1075-1082 __ZN7WebCore8FormData6decodeERN3WTF7DecoderE a/Source/WebCore/WebCore.exp.in_sec27
1075
__ZN7WebCore8FormDataD1Ev
1072
__ZN7WebCore8FormDataD1Ev
1076
__ZN7WebCore8Gradient12addColorStopEfRKNS_5ColorE
1073
__ZN7WebCore8Gradient12addColorStopEfRKNS_5ColorE
1077
__ZN7WebCore8GradientC1ERKNS_10FloatPointES3_
1074
__ZN7WebCore8GradientC1ERKNS_10FloatPointES3_
1075
__ZN7WebCore8GradientD1Ev
1078
__ZN7WebCore8PositionC1EN3WTF10PassRefPtrINS_4NodeEEEiNS0_10AnchorTypeE
1076
__ZN7WebCore8PositionC1EN3WTF10PassRefPtrINS_4NodeEEEiNS0_10AnchorTypeE
1077
__ZN7WebCore8Settings13gQTKitEnabledE
1079
__ZN7WebCore8Settings14setJavaEnabledEb
1078
__ZN7WebCore8Settings14setJavaEnabledEb
1079
__ZN7WebCore8Settings15setQTKitEnabledEb
1080
__ZN7WebCore8Settings16setImagesEnabledEb
1080
__ZN7WebCore8Settings16setImagesEnabledEb
1081
__ZN7WebCore8Settings16setScriptEnabledEb
1081
__ZN7WebCore8Settings16setScriptEnabledEb
1082
__ZN7WebCore8Settings16setUsesPageCacheEb
1082
__ZN7WebCore8Settings16setUsesPageCacheEb
Lines 1104-1110 __ZN7WebCore8Settings24setTextAreasAreResizableEb a/Source/WebCore/WebCore.exp.in_sec28
1104
__ZN7WebCore8Settings24setUsesOverlayScrollbarsEb
1104
__ZN7WebCore8Settings24setUsesOverlayScrollbarsEb
1105
__ZN7WebCore8Settings25setMinimumLogicalFontSizeEi
1105
__ZN7WebCore8Settings25setMinimumLogicalFontSizeEi
1106
__ZN7WebCore8Settings25setPrivateBrowsingEnabledEb
1106
__ZN7WebCore8Settings25setPrivateBrowsingEnabledEb
1107
__ZN7WebCore8Settings25setUserStyleSheetLocationERKNS_4KURLE
1107
__ZN7WebCore8Settings25setUserStyleSheetLocationERKNS_3URLE
1108
__ZN7WebCore8Settings26defaultMinDOMTimerIntervalEv
1108
__ZN7WebCore8Settings26defaultMinDOMTimerIntervalEv
1109
__ZN7WebCore8Settings27setJavaEnabledForLocalFilesEb
1109
__ZN7WebCore8Settings27setJavaEnabledForLocalFilesEb
1110
__ZN7WebCore8Settings27setLoadsImagesAutomaticallyEb
1110
__ZN7WebCore8Settings27setLoadsImagesAutomaticallyEb
Lines 1142-1148 __ZN7WebCore9FontCache29purgeInactiveFontDataIfNeededEv a/Source/WebCore/WebCore.exp.in_sec29
1142
__ZN7WebCore9FrameTree11appendChildEN3WTF10PassRefPtrINS_5FrameEEE
1142
__ZN7WebCore9FrameTree11appendChildEN3WTF10PassRefPtrINS_5FrameEEE
1143
__ZN7WebCore9FrameTree7setNameERKN3WTF12AtomicStringE
1143
__ZN7WebCore9FrameTree7setNameERKN3WTF12AtomicStringE
1144
__ZN7WebCore9FrameTree9clearNameEv
1144
__ZN7WebCore9FrameTree9clearNameEv
1145
__ZN7WebCore9FrameView6createERNS_5FrameE
1146
__ZN7WebCore9FrameView11forceLayoutEb
1145
__ZN7WebCore9FrameView11forceLayoutEb
1147
__ZN7WebCore9FrameView12setMediaTypeERKN3WTF6StringE
1146
__ZN7WebCore9FrameView12setMediaTypeERKN3WTF6StringE
1148
__ZN7WebCore9FrameView12tiledBackingEv
1147
__ZN7WebCore9FrameView12tiledBackingEv
Lines 1162-1173 __ZN7WebCore9FrameView17setTracksRepaintsEb a/Source/WebCore/WebCore.exp.in_sec30
1162
__ZN7WebCore9FrameView17willEndLiveResizeEv
1161
__ZN7WebCore9FrameView17willEndLiveResizeEv
1163
__ZN7WebCore9FrameView18enableAutoSizeModeEbRKNS_7IntSizeES3_
1162
__ZN7WebCore9FrameView18enableAutoSizeModeEbRKNS_7IntSizeES3_
1164
__ZN7WebCore9FrameView18updateControlTintsEv
1163
__ZN7WebCore9FrameView18updateControlTintsEv
1165
__ZN7WebCore9FrameView19willStartLiveResizeEv
1166
__ZN7WebCore9FrameView19scrollElementToRectEPNS_7ElementERKNS_7IntRectE
1164
__ZN7WebCore9FrameView19scrollElementToRectEPNS_7ElementERKNS_7IntRectE
1167
__ZN7WebCore9FrameView20setCanHaveScrollbarsEb
1165
__ZN7WebCore9FrameView19willStartLiveResizeEv
1168
__ZN7WebCore9FrameView20enterCompositingModeEv
1166
__ZN7WebCore9FrameView20enterCompositingModeEv
1169
__ZN7WebCore9FrameView20removeScrollableAreaEPNS_14ScrollableAreaE
1167
__ZN7WebCore9FrameView20removeScrollableAreaEPNS_14ScrollableAreaE
1170
__ZN7WebCore9FrameView20resetTrackedRepaintsEv
1168
__ZN7WebCore9FrameView20resetTrackedRepaintsEv
1169
__ZN7WebCore9FrameView20setCanHaveScrollbarsEb
1171
__ZN7WebCore9FrameView21flushDeferredRepaintsEv
1170
__ZN7WebCore9FrameView21flushDeferredRepaintsEv
1172
__ZN7WebCore9FrameView21resumeAnimatingImagesEv
1171
__ZN7WebCore9FrameView21resumeAnimatingImagesEv
1173
__ZN7WebCore9FrameView22setBaseBackgroundColorERKNS_5ColorE
1172
__ZN7WebCore9FrameView22setBaseBackgroundColorERKNS_5ColorE
Lines 1177-1189 __ZN7WebCore9FrameView24paintContentsForSnapshotEPNS_15GraphicsContextERKNS_7Int a/Source/WebCore/WebCore.exp.in_sec31
1177
__ZN7WebCore9FrameView24setScrollPinningBehaviorENS_21ScrollPinningBehaviorE
1176
__ZN7WebCore9FrameView24setScrollPinningBehaviorENS_21ScrollPinningBehaviorE
1178
__ZN7WebCore9FrameView26adjustPageHeightDeprecatedEPffff
1177
__ZN7WebCore9FrameView26adjustPageHeightDeprecatedEPffff
1179
__ZN7WebCore9FrameView26adjustTiledBackingCoverageEv
1178
__ZN7WebCore9FrameView26adjustTiledBackingCoverageEv
1180
__ZN7WebCore9FrameView29setShouldUpdateWhileOffscreenEb
1181
__ZN7WebCore9FrameView29setAutoSizeFixedMinimumHeightEi
1179
__ZN7WebCore9FrameView29setAutoSizeFixedMinimumHeightEi
1180
__ZN7WebCore9FrameView29setShouldUpdateWhileOffscreenEb
1182
__ZN7WebCore9FrameView31setVisualUpdatesAllowedByClientEb
1181
__ZN7WebCore9FrameView31setVisualUpdatesAllowedByClientEb
1183
__ZN7WebCore9FrameView37setScrollingPerformanceLoggingEnabledEb
1182
__ZN7WebCore9FrameView37setScrollingPerformanceLoggingEnabledEb
1184
__ZN7WebCore9FrameView37updateLayoutAndStyleIfNeededRecursiveEv
1183
__ZN7WebCore9FrameView37updateLayoutAndStyleIfNeededRecursiveEv
1185
__ZN7WebCore9FrameView38scrollPositionChangedViaPlatformWidgetEv
1184
__ZN7WebCore9FrameView38scrollPositionChangedViaPlatformWidgetEv
1186
__ZN7WebCore9FrameView39flushCompositingStateIncludingSubframesEv
1185
__ZN7WebCore9FrameView39flushCompositingStateIncludingSubframesEv
1186
__ZN7WebCore9FrameView6createERNS_5FrameE
1187
__ZN7WebCore9HTMLNames10listingTagE
1187
__ZN7WebCore9HTMLNames10listingTagE
1188
__ZN7WebCore9HTMLNames11textareaTagE
1188
__ZN7WebCore9HTMLNames11textareaTagE
1189
__ZN7WebCore9HTMLNames12selectedAttrE
1189
__ZN7WebCore9HTMLNames12selectedAttrE
Lines 1253-1266 __ZN7WebCore9PageGroup16syncLocalStorageEv a/Source/WebCore/WebCore.exp.in_sec32
1253
__ZN7WebCore9PageGroup17closeLocalStorageEv
1253
__ZN7WebCore9PageGroup17closeLocalStorageEv
1254
__ZN7WebCore9PageGroup18addVisitedLinkHashEy
1254
__ZN7WebCore9PageGroup18addVisitedLinkHashEy
1255
__ZN7WebCore9PageGroup18numberOfPageGroupsEv
1255
__ZN7WebCore9PageGroup18numberOfPageGroupsEv
1256
__ZN7WebCore9PageGroup20addUserScriptToWorldEPNS_15DOMWrapperWorldERKN3WTF6StringERKNS_4KURLERKNS3_6VectorIS4_Lm0ENS3_15CrashOnOverflowEEESE_NS_23UserScriptInjectionTimeENS_25UserContentInjectedFramesE
1256
__ZN7WebCore9PageGroup20addUserScriptToWorldEPNS_15DOMWrapperWorldERKN3WTF6StringERKNS_3URLERKNS3_6VectorIS4_Lm0ENS3_15CrashOnOverflowEEESE_NS_23UserScriptInjectionTimeENS_25UserContentInjectedFramesE
1257
__ZN7WebCore9PageGroup20removeAllUserContentEv
1257
__ZN7WebCore9PageGroup20removeAllUserContentEv
1258
__ZN7WebCore9PageGroup21removeAllVisitedLinksEv
1258
__ZN7WebCore9PageGroup21removeAllVisitedLinksEv
1259
__ZN7WebCore9PageGroup24addUserStyleSheetToWorldEPNS_15DOMWrapperWorldERKN3WTF6StringERKNS_4KURLERKNS3_6VectorIS4_Lm0ENS3_15CrashOnOverflowEEESE_NS_25UserContentInjectedFramesENS_14UserStyleLevelENS_22UserStyleInjectionTimeE
1259
__ZN7WebCore9PageGroup24addUserStyleSheetToWorldEPNS_15DOMWrapperWorldERKN3WTF6StringERKNS_3URLERKNS3_6VectorIS4_Lm0ENS3_15CrashOnOverflowEEESE_NS_25UserContentInjectedFramesENS_14UserStyleLevelENS_22UserStyleInjectionTimeE
1260
__ZN7WebCore9PageGroup25removeUserScriptFromWorldEPNS_15DOMWrapperWorldERKNS_4KURLE
1260
__ZN7WebCore9PageGroup25removeUserScriptFromWorldEPNS_15DOMWrapperWorldERKNS_3URLE
1261
__ZN7WebCore9PageGroup26removeUserScriptsFromWorldEPNS_15DOMWrapperWorldE
1261
__ZN7WebCore9PageGroup26removeUserScriptsFromWorldEPNS_15DOMWrapperWorldE
1262
__ZN7WebCore9PageGroup26setShouldTrackVisitedLinksEb
1262
__ZN7WebCore9PageGroup26setShouldTrackVisitedLinksEb
1263
__ZN7WebCore9PageGroup29removeUserStyleSheetFromWorldEPNS_15DOMWrapperWorldERKNS_4KURLE
1263
__ZN7WebCore9PageGroup29removeUserStyleSheetFromWorldEPNS_15DOMWrapperWorldERKNS_3URLE
1264
__ZN7WebCore9PageGroup30closeIdleLocalStorageDatabasesEv
1264
__ZN7WebCore9PageGroup30closeIdleLocalStorageDatabasesEv
1265
__ZN7WebCore9PageGroup30removeUserStyleSheetsFromWorldEPNS_15DOMWrapperWorldE
1265
__ZN7WebCore9PageGroup30removeUserStyleSheetsFromWorldEPNS_15DOMWrapperWorldE
1266
__ZN7WebCore9PageGroup9pageGroupERKN3WTF6StringE
1266
__ZN7WebCore9PageGroup9pageGroupERKN3WTF6StringE
Lines 1286-1292 __ZN7WebCore9pageCacheEv a/Source/WebCore/WebCore.exp.in_sec33
1286
__ZN7WebCore9plainTextEPKNS_5RangeENS_20TextIteratorBehaviorEb
1286
__ZN7WebCore9plainTextEPKNS_5RangeENS_20TextIteratorBehaviorEb
1287
__ZN7WebCore9toElementEN3JSC7JSValueE
1287
__ZN7WebCore9toElementEN3JSC7JSValueE
1288
__ZN7WebCore9unionRectERKN3WTF6VectorINS_9FloatRectELm0ENS0_15CrashOnOverflowEEE
1288
__ZN7WebCore9unionRectERKN3WTF6VectorINS_9FloatRectELm0ENS0_15CrashOnOverflowEEE
1289
__ZN7WebCore13ScriptGCEvent11getHeapSizeERNS_8HeapInfoE
1290
__ZNK3JSC8Bindings10RootObject12globalObjectEv
1289
__ZNK3JSC8Bindings10RootObject12globalObjectEv
1291
__ZNK3WTF6String14createCFStringEv
1290
__ZNK3WTF6String14createCFStringEv
1292
__ZNK7WebCore10Credential11hasPasswordEv
1291
__ZNK7WebCore10Credential11hasPasswordEv
Lines 1315-1322 __ZNK7WebCore10ScrollView18contentsToRootViewERKNS_8IntPointE a/Source/WebCore/WebCore.exp.in_sec34
1315
__ZNK7WebCore10ScrollView18visibleContentRectENS_14ScrollableArea36VisibleContentRectIncludesScrollbarsE
1314
__ZNK7WebCore10ScrollView18visibleContentRectENS_14ScrollableArea36VisibleContentRectIncludesScrollbarsE
1316
__ZNK7WebCore10ScrollView23rootViewToTotalContentsERKNS_8IntPointE
1315
__ZNK7WebCore10ScrollView23rootViewToTotalContentsERKNS_8IntPointE
1317
__ZNK7WebCore10ScrollView30scrollOffsetRelativeToDocumentEv
1316
__ZNK7WebCore10ScrollView30scrollOffsetRelativeToDocumentEv
1318
__ZN7WebCore10ScrollView4hideEv
1319
__ZN7WebCore10ScrollView4showEv
1320
__ZNK7WebCore10StorageMap6lengthEv
1317
__ZNK7WebCore10StorageMap6lengthEv
1321
__ZNK7WebCore10StorageMap7getItemERKN3WTF6StringE
1318
__ZNK7WebCore10StorageMap7getItemERKN3WTF6StringE
1322
__ZNK7WebCore10StorageMap8containsERKN3WTF6StringE
1319
__ZNK7WebCore10StorageMap8containsERKN3WTF6StringE
Lines 1373-1379 __ZNK7WebCore12TextIterator4nodeEv a/Source/WebCore/WebCore.exp.in_sec35
1373
__ZNK7WebCore12TextIterator5rangeEv
1370
__ZNK7WebCore12TextIterator5rangeEv
1374
__ZNK7WebCore13ContainerNode14childNodeCountEv
1371
__ZNK7WebCore13ContainerNode14childNodeCountEv
1375
__ZNK7WebCore13ContainerNode9childNodeEj
1372
__ZNK7WebCore13ContainerNode9childNodeEj
1376
__ZN7WebCore13GraphicsLayer7setSizeERKNS_9FloatSizeE
1377
__ZNK7WebCore13GraphicsLayer18accumulatedOpacityEv
1373
__ZNK7WebCore13GraphicsLayer18accumulatedOpacityEv
1378
__ZNK7WebCore13GraphicsLayer18getDebugBorderInfoERNS_5ColorERf
1374
__ZNK7WebCore13GraphicsLayer18getDebugBorderInfoERNS_5ColorERf
1379
__ZNK7WebCore13GraphicsLayer26backingStoreMemoryEstimateEv
1375
__ZNK7WebCore13GraphicsLayer26backingStoreMemoryEstimateEv
Lines 1406-1412 __ZNK7WebCore13ResourceErrorcvP7NSErrorEv a/Source/WebCore/WebCore.exp.in_sec36
1406
__ZNK7WebCore14DocumentLoader10requestURLEv
1402
__ZNK7WebCore14DocumentLoader10requestURLEv
1407
__ZNK7WebCore14DocumentLoader11frameLoaderEv
1403
__ZNK7WebCore14DocumentLoader11frameLoaderEv
1408
__ZNK7WebCore14DocumentLoader11responseURLEv
1404
__ZNK7WebCore14DocumentLoader11responseURLEv
1409
__ZNK7WebCore14DocumentLoader11subresourceERKNS_4KURLE
1405
__ZNK7WebCore14DocumentLoader11subresourceERKNS_3URLE
1410
__ZNK7WebCore14DocumentLoader12mainResourceEv
1406
__ZNK7WebCore14DocumentLoader12mainResourceEv
1411
__ZNK7WebCore14DocumentLoader13urlForHistoryEv
1407
__ZNK7WebCore14DocumentLoader13urlForHistoryEv
1412
__ZNK7WebCore14DocumentLoader14unreachableURLEv
1408
__ZNK7WebCore14DocumentLoader14unreachableURLEv
Lines 1417-1423 __ZNK7WebCore14DocumentLoader17parsedArchiveDataEv a/Source/WebCore/WebCore.exp.in_sec37
1417
__ZNK7WebCore14DocumentLoader18mainResourceLoaderEv
1413
__ZNK7WebCore14DocumentLoader18mainResourceLoaderEv
1418
__ZNK7WebCore14DocumentLoader19isLoadingInAPISenseEv
1414
__ZNK7WebCore14DocumentLoader19isLoadingInAPISenseEv
1419
__ZNK7WebCore14DocumentLoader19originalRequestCopyEv
1415
__ZNK7WebCore14DocumentLoader19originalRequestCopyEv
1420
__ZNK7WebCore14DocumentLoader21archiveResourceForURLERKNS_4KURLE
1421
__ZNK7WebCore14DocumentLoader28urlForHistoryReflectsFailureEv
1416
__ZNK7WebCore14DocumentLoader28urlForHistoryReflectsFailureEv
1422
__ZNK7WebCore14DocumentLoader3urlEv
1417
__ZNK7WebCore14DocumentLoader3urlEv
1423
__ZNK7WebCore14DocumentLoader9isLoadingEv
1418
__ZNK7WebCore14DocumentLoader9isLoadingEv
Lines 1430-1435 __ZNK7WebCore14FrameSelection31getClippedVisibleTextRectanglesERN3WTF6VectorINS_ a/Source/WebCore/WebCore.exp.in_sec38
1430
__ZNK7WebCore14FrameSelection36rootEditableElementOrDocumentElementEv
1425
__ZNK7WebCore14FrameSelection36rootEditableElementOrDocumentElementEv
1431
__ZNK7WebCore14FrameSelection6boundsEb
1426
__ZNK7WebCore14FrameSelection6boundsEb
1432
__ZNK7WebCore14InsertionPoint8isActiveEv
1427
__ZNK7WebCore14InsertionPoint8isActiveEv
1428
__ZNK7WebCore14InspectorValue12toJSONStringEv
1433
__ZNK7WebCore14RenderListItem10markerTextEv
1429
__ZNK7WebCore14RenderListItem10markerTextEv
1434
__ZNK7WebCore14ResourceBuffer4dataEv
1430
__ZNK7WebCore14ResourceBuffer4dataEv
1435
__ZNK7WebCore14ResourceBuffer4sizeEv
1431
__ZNK7WebCore14ResourceBuffer4sizeEv
Lines 1443-1449 __ZNK7WebCore14ScrollableArea21mouseEnteredScrollbarEPNS_9ScrollbarE a/Source/WebCore/WebCore.exp.in_sec39
1443
__ZNK7WebCore14ScrollableArea22mouseExitedContentAreaEv
1439
__ZNK7WebCore14ScrollableArea22mouseExitedContentAreaEv
1444
__ZNK7WebCore14ScrollableArea23mouseEnteredContentAreaEv
1440
__ZNK7WebCore14ScrollableArea23mouseEnteredContentAreaEv
1445
__ZNK7WebCore14ScrollableArea23mouseMovedInContentAreaEv
1441
__ZNK7WebCore14ScrollableArea23mouseMovedInContentAreaEv
1446
__ZNK7WebCore14SecurityOrigin10canDisplayERKNS_4KURLE
1442
__ZNK7WebCore14SecurityOrigin10canDisplayERKNS_3URLE
1447
__ZNK7WebCore14SecurityOrigin11toRawStringEv
1443
__ZNK7WebCore14SecurityOrigin11toRawStringEv
1448
__ZNK7WebCore14SecurityOrigin12isolatedCopyEv
1444
__ZNK7WebCore14SecurityOrigin12isolatedCopyEv
1449
__ZNK7WebCore14SecurityOrigin16canAccessStorageEPKS0_NS0_25ShouldAllowFromThirdPartyE
1445
__ZNK7WebCore14SecurityOrigin16canAccessStorageEPKS0_NS0_25ShouldAllowFromThirdPartyE
Lines 1503-1512 __ZNK7WebCore17ResourceErrorBase8lazyInitEv a/Source/WebCore/WebCore.exp.in_sec40
1503
__ZNK7WebCore18PlatformPasteboard11changeCountEv
1499
__ZNK7WebCore18PlatformPasteboard11changeCountEv
1504
__ZNK7WebCore18RenderLayerBacking11contentsBoxEv
1500
__ZNK7WebCore18RenderLayerBacking11contentsBoxEv
1505
__ZNK7WebCore18RenderLayerBacking20compositingLayerTypeEv
1501
__ZNK7WebCore18RenderLayerBacking20compositingLayerTypeEv
1502
__ZNK7WebCore19AnimationController11isSuspendedEv
1506
__ZNK7WebCore19AnimationController24numberOfActiveAnimationsEPNS_8DocumentE
1503
__ZNK7WebCore19AnimationController24numberOfActiveAnimationsEPNS_8DocumentE
1504
__ZNK7WebCore19AnimationController33allowsNewAnimationsWhileSuspendedEv
1507
__ZNK7WebCore19InspectorController12getHighlightEPNS_9HighlightE
1505
__ZNK7WebCore19InspectorController12getHighlightEPNS_9HighlightE
1508
__ZNK7WebCore19InspectorController29buildObjectForHighlightedNodeEv
1506
__ZNK7WebCore19InspectorController29buildObjectForHighlightedNodeEv
1509
__ZNK7WebCore14InspectorValue12toJSONStringEv
1510
__ZNK7WebCore19ResourceRequestBase10httpMethodEv
1507
__ZNK7WebCore19ResourceRequestBase10httpMethodEv
1511
__ZNK7WebCore19ResourceRequestBase15httpHeaderFieldEPKc
1508
__ZNK7WebCore19ResourceRequestBase15httpHeaderFieldEPKc
1512
__ZNK7WebCore19ResourceRequestBase20firstPartyForCookiesEv
1509
__ZNK7WebCore19ResourceRequestBase20firstPartyForCookiesEv
Lines 1516-1521 __ZNK7WebCore19ResourceRequestBase7isEmptyEv a/Source/WebCore/WebCore.exp.in_sec41
1516
__ZNK7WebCore19ResourceRequestBase8httpBodyEv
1513
__ZNK7WebCore19ResourceRequestBase8httpBodyEv
1517
__ZNK7WebCore20CachedResourceLoader11isPreloadedERKN3WTF6StringE
1514
__ZNK7WebCore20CachedResourceLoader11isPreloadedERKN3WTF6StringE
1518
__ZNK7WebCore20HTMLTableCellElement9cellAboveEv
1515
__ZNK7WebCore20HTMLTableCellElement9cellAboveEv
1516
__ZNK7WebCore20RenderEmbeddedObject21isReplacementObscuredEv
1519
__ZNK7WebCore20ResourceResponseBase12isAttachmentEv
1517
__ZNK7WebCore20ResourceResponseBase12isAttachmentEv
1520
__ZNK7WebCore20ResourceResponseBase12lastModifiedEv
1518
__ZNK7WebCore20ResourceResponseBase12lastModifiedEv
1521
__ZNK7WebCore20ResourceResponseBase14httpStatusCodeEv
1519
__ZNK7WebCore20ResourceResponseBase14httpStatusCodeEv
Lines 1533-1539 __ZNK7WebCore21BackForwardController9backCountEv a/Source/WebCore/WebCore.exp.in_sec42
1533
__ZNK7WebCore21NetworkStorageSession13cookieStorageEv
1531
__ZNK7WebCore21NetworkStorageSession13cookieStorageEv
1534
__ZNK7WebCore21RenderLayerCompositor11scrollLayerEv
1532
__ZNK7WebCore21RenderLayerCompositor11scrollLayerEv
1535
__ZNK7WebCore21RenderLayerCompositor15rootRenderLayerEv
1533
__ZNK7WebCore21RenderLayerCompositor15rootRenderLayerEv
1536
__ZNK7WebCore21UserContentURLPattern7matchesERKNS_4KURLE
1534
__ZNK7WebCore21UserContentURLPattern7matchesERKNS_3URLE
1537
__ZNK7WebCore23ApplicationCacheStorage11maximumSizeEv
1535
__ZNK7WebCore23ApplicationCacheStorage11maximumSizeEv
1538
__ZNK7WebCore23AuthenticationChallenge20authenticationClientEv
1536
__ZNK7WebCore23AuthenticationChallenge20authenticationClientEv
1539
__ZNK7WebCore23FrameLoaderStateMachine15firstLayoutDoneEv
1537
__ZNK7WebCore23FrameLoaderStateMachine15firstLayoutDoneEv
Lines 1547-1579 __ZNK7WebCore27AuthenticationChallengeBase18proposedCredentialEv a/Source/WebCore/WebCore.exp.in_sec43
1547
__ZNK7WebCore27AuthenticationChallengeBase20previousFailureCountEv
1545
__ZNK7WebCore27AuthenticationChallengeBase20previousFailureCountEv
1548
__ZNK7WebCore27AuthenticationChallengeBase5errorEv
1546
__ZNK7WebCore27AuthenticationChallengeBase5errorEv
1549
__ZNK7WebCore27AuthenticationChallengeBase6isNullEv
1547
__ZNK7WebCore27AuthenticationChallengeBase6isNullEv
1548
__ZNK7WebCore3URL10protocolIsEPKc
1549
__ZNK7WebCore3URL11createCFURLEv
1550
__ZNK7WebCore3URL11isLocalFileEv
1551
__ZNK7WebCore3URL12baseAsStringEv
1552
__ZNK7WebCore3URL14fileSystemPathEv
1553
__ZNK7WebCore3URL17lastPathComponentEv
1554
__ZNK7WebCore3URL18fragmentIdentifierEv
1555
__ZNK7WebCore3URL21hasFragmentIdentifierEv
1556
__ZNK7WebCore3URL4hostEv
1557
__ZNK7WebCore3URL4passEv
1558
__ZNK7WebCore3URL4pathEv
1559
__ZNK7WebCore3URL4portEv
1560
__ZNK7WebCore3URL4userEv
1561
__ZNK7WebCore3URL5queryEv
1562
__ZNK7WebCore3URL8protocolEv
1563
__ZNK7WebCore3URLcvP5NSURLEv
1550
__ZNK7WebCore4Font5widthERKNS_7TextRunEPN3WTF7HashSetIPKNS_14SimpleFontDataENS4_7PtrHashIS8_EENS4_10HashTraitsIS8_EEEEPNS_13GlyphOverflowE
1564
__ZNK7WebCore4Font5widthERKNS_7TextRunEPN3WTF7HashSetIPKNS_14SimpleFontDataENS4_7PtrHashIS8_EENS4_10HashTraitsIS8_EEEEPNS_13GlyphOverflowE
1551
__ZNK7WebCore4Font8drawTextEPNS_15GraphicsContextERKNS_7TextRunERKNS_10FloatPointEiiNS0_24CustomFontNotReadyActionE
1565
__ZNK7WebCore4Font8drawTextEPNS_15GraphicsContextERKNS_7TextRunERKNS_10FloatPointEiiNS0_24CustomFontNotReadyActionE
1552
__ZNK7WebCore4FonteqERKS0_
1566
__ZNK7WebCore4FonteqERKS0_
1553
__ZNK7WebCore4KURL10protocolIsEPKc
1554
__ZNK7WebCore4KURL11createCFURLEv
1555
__ZNK7WebCore4KURL11isLocalFileEv
1556
__ZNK7WebCore4KURL12baseAsStringEv
1557
__ZNK7WebCore4KURL14fileSystemPathEv
1558
__ZNK7WebCore4KURL17lastPathComponentEv
1559
__ZNK7WebCore4KURL18fragmentIdentifierEv
1560
__ZNK7WebCore4KURL21hasFragmentIdentifierEv
1561
__ZNK7WebCore4KURL4hostEv
1562
__ZNK7WebCore4KURL4passEv
1563
__ZNK7WebCore4KURL4pathEv
1564
__ZNK7WebCore4KURL4portEv
1565
__ZNK7WebCore4KURL4userEv
1566
__ZNK7WebCore4KURL5queryEv
1567
__ZNK7WebCore4KURL8protocolEv
1568
__ZNK7WebCore4KURLcvP5NSURLEv
1569
__ZNK7WebCore4Node11textContentEb
1567
__ZNK7WebCore4Node11textContentEb
1570
__ZNK7WebCore4Node13ownerDocumentEv
1568
__ZNK7WebCore4Node13ownerDocumentEv
1571
__ZNK7WebCore4Node14isDescendantOfEPKS0_
1569
__ZNK7WebCore4Node14isDescendantOfEPKS0_
1572
__ZNK7WebCore4Node18getSubresourceURLsERN3WTF11ListHashSetINS_4KURLELm256ENS_8KURLHashEEE
1573
__ZNK7WebCore4Node28deprecatedShadowAncestorNodeEv
1570
__ZNK7WebCore4Node28deprecatedShadowAncestorNodeEv
1574
#if ENABLE(STYLE_SCOPED)
1575
__ZNK7WebCore4Node31numberOfScopedHTMLStyleChildrenEv
1576
#endif
1577
__ZNK7WebCore4Node9nodeIndexEv
1571
__ZNK7WebCore4Node9nodeIndexEv
1578
__ZNK7WebCore4Node9textRectsERN3WTF6VectorINS_7IntRectELm0ENS1_15CrashOnOverflowEEE
1572
__ZNK7WebCore4Node9textRectsERN3WTF6VectorINS_7IntRectELm0ENS1_15CrashOnOverflowEEE
1579
__ZNK7WebCore4Page10pluginDataEv
1573
__ZNK7WebCore4Page10pluginDataEv
Lines 1728-1736 _hasCaseInsensitiveSubstring a/Source/WebCore/WebCore.exp.in_sec44
1728
_hasCaseInsensitiveSuffix
1722
_hasCaseInsensitiveSuffix
1729
_stringIsCaseInsensitiveEqualToString
1723
_stringIsCaseInsensitiveEqualToString
1730
_suggestedFilenameWithMIMEType
1724
_suggestedFilenameWithMIMEType
1725
_wkCALayerEnumerateRectsBeingDrawnWithBlock
1726
_wkCFURLRequestAllowAllPostCaching
1731
_wkCGContextGetShouldSmoothFonts
1727
_wkCGContextGetShouldSmoothFonts
1732
_wkCGContextIsPDFContext
1728
_wkCGContextIsPDFContext
1733
_wkCGContextResetClip
1729
_wkCGContextResetClip
1730
_wkCGPathAddRoundedRect
1734
_wkCGPatternCreateWithImageAndTransform
1731
_wkCGPatternCreateWithImageAndTransform
1735
_wkCTRunGetInitialAdvance
1732
_wkCTRunGetInitialAdvance
1736
_wkCopyCFLocalizationPreferredName
1733
_wkCopyCFLocalizationPreferredName
Lines 1741-1746 _wkCopyNSURLResponseCertificateChain a/Source/WebCore/WebCore.exp.in_sec45
1741
_wkCopyNSURLResponseStatusLine
1738
_wkCopyNSURLResponseStatusLine
1742
_wkCopyRequestWithStorageSession
1739
_wkCopyRequestWithStorageSession
1743
_wkCreateCTLineWithUniCharProvider
1740
_wkCreateCTLineWithUniCharProvider
1741
_wkCreateCTTypesetterWithUniCharProviderAndOptions
1744
_wkCreateCustomCFReadStream
1742
_wkCreateCustomCFReadStream
1745
_wkCreatePrivateStorageSession
1743
_wkCreatePrivateStorageSession
1746
_wkDeleteAllHTTPCookies
1744
_wkDeleteAllHTTPCookies
Lines 1865-1873 __ZN7WebCore12EventHandler7mouseUpEP7NSEvent a/Source/WebCore/WebCore.exp.in_sec46
1865
__ZN7WebCore12EventHandler8keyEventEP7NSEvent
1863
__ZN7WebCore12EventHandler8keyEventEP7NSEvent
1866
__ZN7WebCore12EventHandler9mouseDownEP7NSEvent
1864
__ZN7WebCore12EventHandler9mouseDownEP7NSEvent
1867
__ZN7WebCore13toDeviceSpaceERKNS_9FloatRectEP8NSWindow
1865
__ZN7WebCore13toDeviceSpaceERKNS_9FloatRectEP8NSWindow
1868
__ZN7WebCore13getRawCookiesERKNS_21NetworkStorageSessionERKNS_4KURLES5_RN3WTF6VectorINS_6CookieELm0ENS6_15CrashOnOverflowEEE
1869
__ZN7WebCore15GraphicsContextC1EP9CGContext
1870
__ZN7WebCore15GraphicsContext15drawNativeImageEP7CGImageRKNS_9FloatSizeENS_10ColorSpaceERKNS_9FloatRectES9_NS_17CompositeOperatorENS_9BlendModeENS_16ImageOrientationE
1866
__ZN7WebCore15GraphicsContext15drawNativeImageEP7CGImageRKNS_9FloatSizeENS_10ColorSpaceERKNS_9FloatRectES9_NS_17CompositeOperatorENS_9BlendModeENS_16ImageOrientationE
1867
__ZN7WebCore15GraphicsContextC1EP9CGContext
1871
__ZN7WebCore15ResourceRequest39updateFromDelegatePreservingOldHTTPBodyERKS0_
1868
__ZN7WebCore15ResourceRequest39updateFromDelegatePreservingOldHTTPBodyERKS0_
1872
__ZN7WebCore16FontPlatformDataC1EP6NSFontfbbbNS_15FontOrientationENS_16FontWidthVariantE
1869
__ZN7WebCore16FontPlatformDataC1EP6NSFontfbbbNS_15FontOrientationENS_16FontWidthVariantE
1873
__ZN7WebCore16FontPlatformDataC2EP6NSFontfbbbNS_15FontOrientationENS_16FontWidthVariantE
1870
__ZN7WebCore16FontPlatformDataC2EP6NSFontfbbbNS_15FontOrientationENS_16FontWidthVariantE
Lines 1876-1883 __ZN7WebCore16enclosingIntRectERK7_NSRect a/Source/WebCore/WebCore.exp.in_sec47
1876
__ZN7WebCore19applicationIsSafariEv
1873
__ZN7WebCore19applicationIsSafariEv
1877
__ZN7WebCore20PlatformEventFactory24createPlatformMouseEventEP7NSEventP6NSView
1874
__ZN7WebCore20PlatformEventFactory24createPlatformMouseEventEP7NSEventP6NSView
1878
__ZN7WebCore20PlatformEventFactory27createPlatformKeyboardEventEP7NSEvent
1875
__ZN7WebCore20PlatformEventFactory27createPlatformKeyboardEventEP7NSEvent
1879
__ZN7WebCore20builtInPDFPluginNameEv
1880
__ZN7WebCore20applicationIsHRBlockEv
1876
__ZN7WebCore20applicationIsHRBlockEv
1877
__ZN7WebCore20builtInPDFPluginNameEv
1881
__ZN7WebCore21DeviceOrientationData6createEbdbdbdbb
1878
__ZN7WebCore21DeviceOrientationData6createEbdbdbdbb
1882
__ZN7WebCore21applicationIsApertureEv
1879
__ZN7WebCore21applicationIsApertureEv
1883
__ZN7WebCore21applicationIsVersionsEv
1880
__ZN7WebCore21applicationIsVersionsEv
Lines 1924-1931 __ZN7WebCore31contextMenuItemTagStartSpeakingEv a/Source/WebCore/WebCore.exp.in_sec48
1924
__ZN7WebCore32applicationIsAOLInstantMessengerEv
1921
__ZN7WebCore32applicationIsAOLInstantMessengerEv
1925
__ZN7WebCore32contextMenuItemTagInspectElementEv
1922
__ZN7WebCore32contextMenuItemTagInspectElementEv
1926
__ZN7WebCore32contextMenuItemTagSmartCopyPasteEv
1923
__ZN7WebCore32contextMenuItemTagSmartCopyPasteEv
1927
__ZN7WebCore33postScriptDocumentTypeDescriptionEv
1928
__ZN7WebCore33contextMenuItemTagTextReplacementEv
1924
__ZN7WebCore33contextMenuItemTagTextReplacementEv
1925
__ZN7WebCore33postScriptDocumentTypeDescriptionEv
1929
__ZN7WebCore33setDefaultThreadViolationBehaviorENS_23ThreadViolationBehaviorENS_20ThreadViolationRoundE
1926
__ZN7WebCore33setDefaultThreadViolationBehaviorENS_23ThreadViolationBehaviorENS_20ThreadViolationRoundE
1930
__ZN7WebCore34contextMenuItemTagDefaultDirectionEv
1927
__ZN7WebCore34contextMenuItemTagDefaultDirectionEv
1931
__ZN7WebCore35contextMenuItemTagShowSpellingPanelEb
1928
__ZN7WebCore35contextMenuItemTagShowSpellingPanelEb
Lines 1951-1958 __ZN7WebCore6Editor28stringSelectionForPasteboardEv a/Source/WebCore/WebCore.exp.in_sec49
1951
__ZN7WebCore6Widget17setPlatformWidgetEP6NSView
1948
__ZN7WebCore6Widget17setPlatformWidgetEP6NSView
1952
__ZN7WebCore6WidgetC2EP6NSView
1949
__ZN7WebCore6WidgetC2EP6NSView
1953
__ZN7WebCore7nsColorERKNS_5ColorE
1950
__ZN7WebCore7nsColorERKNS_5ColorE
1954
__ZN7WebCore8IntPointC1ERK8_NSPoint
1955
__ZN7WebCore8IntPointC1ERK7CGPoint
1951
__ZN7WebCore8IntPointC1ERK7CGPoint
1952
__ZN7WebCore8IntPointC1ERK8_NSPoint
1956
__ZN7WebCore9FloatRectC1ERK7_NSRect
1953
__ZN7WebCore9FloatRectC1ERK7_NSRect
1957
__ZNK7WebCore10FloatPointcv8_NSPointEv
1954
__ZNK7WebCore10FloatPointcv8_NSPointEv
1958
__ZNK7WebCore14ScrollableArea18visibleContentRectENS0_36VisibleContentRectIncludesScrollbarsE
1955
__ZNK7WebCore14ScrollableArea18visibleContentRectENS0_36VisibleContentRectIncludesScrollbarsE
Lines 1962-1971 __ZNK7WebCore7IntSizecv6CGSizeEv a/Source/WebCore/WebCore.exp.in_sec50
1962
__ZNK7WebCore8IntPointcv8_NSPointEv
1959
__ZNK7WebCore8IntPointcv8_NSPointEv
1963
__ZNK7WebCore9FloatRectcv7_NSRectEv
1960
__ZNK7WebCore9FloatRectcv7_NSRectEv
1964
_stringEncodingForResource
1961
_stringEncodingForResource
1962
_wkAVAssetResolvedURL
1965
_wkAccessibilityHandleFocusChanged
1963
_wkAccessibilityHandleFocusChanged
1966
_wkAdvanceDefaultButtonPulseAnimation
1964
_wkAdvanceDefaultButtonPulseAnimation
1967
_wkCopyAXTextMarkerRangeEnd
1965
_wkCopyAXTextMarkerRangeEnd
1968
_wkCopyAXTextMarkerRangeStart
1966
_wkCopyAXTextMarkerRangeStart
1967
_wkCopyDefaultSearchProviderDisplayName
1969
_wkCreateAXTextMarker
1968
_wkCreateAXTextMarker
1970
_wkCreateAXTextMarkerRange
1969
_wkCreateAXTextMarkerRange
1971
_wkCreateAXUIElementRef
1970
_wkCreateAXUIElementRef
Lines 1973-1978 _wkCreateMediaUIBackgroundView a/Source/WebCore/WebCore.exp.in_sec51
1973
_wkCreateMediaUIControl
1972
_wkCreateMediaUIControl
1974
_wkCreateURLNPasteboardFlavorTypeName
1973
_wkCreateURLNPasteboardFlavorTypeName
1975
_wkCreateURLPasteboardFlavorTypeName
1974
_wkCreateURLPasteboardFlavorTypeName
1975
_wkCreateVMPressureDispatchOnMainQueue
1976
_wkCursor
1976
_wkDrawBezeledTextArea
1977
_wkDrawBezeledTextArea
1977
_wkDrawBezeledTextFieldCell
1978
_wkDrawBezeledTextFieldCell
1978
_wkDrawCapsLockIndicator
1979
_wkDrawCapsLockIndicator
Lines 1980-1985 _wkDrawFocusRing a/Source/WebCore/WebCore.exp.in_sec52
1980
_wkDrawMediaSliderTrack
1981
_wkDrawMediaSliderTrack
1981
_wkDrawMediaUIPart
1982
_wkDrawMediaUIPart
1982
_wkDrawTextFieldCellFocusRing
1983
_wkDrawTextFieldCellFocusRing
1984
_wkExecutableWasLinkedOnOrBeforeSnowLeopard
1983
_wkGetAXTextMarkerRangeTypeID
1985
_wkGetAXTextMarkerRangeTypeID
1984
_wkGetAXTextMarkerTypeID
1986
_wkGetAXTextMarkerTypeID
1985
_wkGetBytesFromAXTextMarker
1987
_wkGetBytesFromAXTextMarker
Lines 2013-2019 _wkQTMovieResolvedURL a/Source/WebCore/WebCore.exp.in_sec53
2013
_wkQTMovieSelectPreferredAlternates
2015
_wkQTMovieSelectPreferredAlternates
2014
_wkQTMovieSetShowClosedCaptions
2016
_wkQTMovieSetShowClosedCaptions
2015
_wkQTMovieViewSetDrawSynchronously
2017
_wkQTMovieViewSetDrawSynchronously
2018
_wkRecommendedScrollerStyle
2016
_wkSetCGFontRenderingMode
2019
_wkSetCGFontRenderingMode
2020
_wkSetCrashReportApplicationSpecificInformation
2017
_wkSetDragImage
2021
_wkSetDragImage
2018
_wkSetMetadataURL
2022
_wkSetMetadataURL
2019
_wkSignedPublicKeyAndChallengeString
2023
_wkSignedPublicKeyAndChallengeString
Lines 2110-2119 __ZN7WebCore11ImageSource26s_acceleratedImageDecodingE a/Source/WebCore/WebCore.exp.in_sec54
2110
__ZN7WebCore11ImageSource33maximumImageSizeBeforeSubsamplingEv
2114
__ZN7WebCore11ImageSource33maximumImageSizeBeforeSubsamplingEv
2111
__ZN7WebCore11ImageSource36setMaximumImageSizeBeforeSubsamplingEj
2115
__ZN7WebCore11ImageSource36setMaximumImageSizeBeforeSubsamplingEj
2112
__ZN7WebCore11MathMLNames4initEv
2116
__ZN7WebCore11MathMLNames4initEv
2113
__ZN7WebCore11MemoryCache15addImageToCacheEP7CGImageRKNS_4KURLE
2114
__ZN7WebCore11MemoryCache18pruneDeadResourcesEv
2117
__ZN7WebCore11MemoryCache18pruneDeadResourcesEv
2115
__ZN7WebCore11MemoryCache18pruneLiveResourcesEb
2118
__ZN7WebCore11MemoryCache18pruneLiveResourcesEb
2116
__ZN7WebCore11MemoryCache20removeImageFromCacheERKNS_4KURLE
2117
__ZN7WebCore11isEndOfLineERKNS_15VisiblePositionE
2119
__ZN7WebCore11isEndOfLineERKNS_15VisiblePositionE
2118
__ZN7WebCore12EventHandler10mouseMovedEP8WebEvent
2120
__ZN7WebCore12EventHandler10mouseMovedEP8WebEvent
2119
__ZN7WebCore12EventHandler10wheelEventEP8WebEvent
2121
__ZN7WebCore12EventHandler10wheelEventEP8WebEvent
Lines 2200-2206 __ZN7WebCore28createCGColorWithDeviceWhiteEff a/Source/WebCore/WebCore.exp.in_sec55
2200
__ZN7WebCore31NonSharedCharacterBreakIteratorC1EPKti
2202
__ZN7WebCore31NonSharedCharacterBreakIteratorC1EPKti
2201
__ZN7WebCore31NonSharedCharacterBreakIteratorD1Ev
2203
__ZN7WebCore31NonSharedCharacterBreakIteratorD1Ev
2202
__ZN7WebCore31applicationIsDaijisenDictionaryEv
2204
__ZN7WebCore31applicationIsDaijisenDictionaryEv
2203
__ZN7WebCore32enableKURLSchemeCanonicalizationEb
2204
__ZN7WebCore33applicationIsTheEconomistOnIPhoneEv
2205
__ZN7WebCore33applicationIsTheEconomistOnIPhoneEv
2205
__ZN7WebCore41initializeHTTPConnectionSettingsOnStartupEv
2206
__ZN7WebCore41initializeHTTPConnectionSettingsOnStartupEv
2206
__ZN7WebCore4FontC1ERKNS_16FontPlatformDataEN3WTF10PassRefPtrINS_12FontSelectorEEE
2207
__ZN7WebCore4FontC1ERKNS_16FontPlatformDataEN3WTF10PassRefPtrINS_12FontSelectorEEE
Lines 2214-2220 __ZN7WebCore5Frame20documentScaleChangedEv a/Source/WebCore/WebCore.exp.in_sec56
2214
__ZN7WebCore5Frame20setViewportArgumentsERKNS_17ViewportArgumentsE
2215
__ZN7WebCore5Frame20setViewportArgumentsERKNS_17ViewportArgumentsE
2215
__ZN7WebCore5Frame21deepestNodeAtLocationEP7CGPoint
2216
__ZN7WebCore5Frame21deepestNodeAtLocationEP7CGPoint
2216
__ZN7WebCore5Frame21viewportOffsetChangedEv
2217
__ZN7WebCore5Frame21viewportOffsetChangedEv
2217
__ZN7WebCore5Frame26initWithSimpleHTMLDocumentERKN3WTF6StringERKNS_4KURLE
2218
__ZN7WebCore5Frame27nodeRespondingToClickEventsEP7CGPoint
2218
__ZN7WebCore5Frame27nodeRespondingToClickEventsEP7CGPoint
2219
__ZN7WebCore5Frame30setSingleLineSelectionBehaviorEb
2219
__ZN7WebCore5Frame30setSingleLineSelectionBehaviorEb
2220
__ZN7WebCore5Frame32dispatchPageHideEventBeforePauseEv
2220
__ZN7WebCore5Frame32dispatchPageHideEventBeforePauseEv
Lines 2251-2259 __ZN7WebCore9FrameView24renderedCharactersExceedEj a/Source/WebCore/WebCore.exp.in_sec57
2251
__ZN7WebCore9FrameView30graphicsLayerForPlatformWidgetEP7WAKView
2251
__ZN7WebCore9FrameView30graphicsLayerForPlatformWidgetEP7WAKView
2252
__ZN7WebCore9FrameView32setCustomFixedPositionLayoutRectERKNS_7IntRectE
2252
__ZN7WebCore9FrameView32setCustomFixedPositionLayoutRectERKNS_7IntRectE
2253
__ZN7WebCore9FrameView35setUseCustomFixedPositionLayoutRectEb
2253
__ZN7WebCore9FrameView35setUseCustomFixedPositionLayoutRectEb
2254
__ZN7WebCore9PageGroup17removeVisitedLinkERKNS_4KURLE
2255
__ZN7WebCore9PageGroup20addUserScriptToWorldEPNS_15DOMWrapperWorldERKN3WTF6StringERKNS_4KURLERKNS3_6VectorIS4_Lm0ENS3_15CrashOnOverflowEEESE_NS_23UserScriptInjectionTimeENS_25UserContentInjectedFramesE
2256
__ZN7WebCore9PageGroup24addUserStyleSheetToWorldEPNS_15DOMWrapperWorldERKN3WTF6StringERKNS_4KURLERKNS3_6VectorIS4_Lm0ENS3_15CrashOnOverflowEEESE_NS_25UserContentInjectedFramesENS_14UserStyleLevelENS_22UserStyleInjectionTimeE
2257
__ZN7WebCore9TileCache14drainLayerPoolEv
2254
__ZN7WebCore9TileCache14drainLayerPoolEv
2258
__ZN7WebCore9TileCache20setLayerPoolCapacityEj
2255
__ZN7WebCore9TileCache20setLayerPoolCapacityEj
2259
__ZNK7WebCore10FloatPointcv7CGPointEv
2256
__ZNK7WebCore10FloatPointcv7CGPointEv
Lines 2315-2366 __ZNK7WebCore7Element26fastAttributeLookupAllowedERKNS_13QualifiedNameE a/Source/WebCore/WebCore.exp.in_sec58
2315
__ZN7WebCore20LogNotYetImplementedE
2312
__ZN7WebCore20LogNotYetImplementedE
2316
__ZN7WebCore28notImplementedLoggingChannelEv
2313
__ZN7WebCore28notImplementedLoggingChannelEv
2317
__ZN7WebCore36initializeLoggingChannelsIfNecessaryEv
2314
__ZN7WebCore36initializeLoggingChannelsIfNecessaryEv
2318
#endif // !LOG_DISABLED
2315
#endif
2319
2316
2320
#if !ASSERT_DISABLED
2317
#if !ASSERT_DISABLED
2321
__ZN7WebCore27NoExceptionAssertionCheckerC1EPKci
2318
__ZN7WebCore27NoExceptionAssertionCheckerC1EPKci
2322
__ZN7WebCore27NoExceptionAssertionCheckerD1Ev
2319
__ZN7WebCore27NoExceptionAssertionCheckerD1Ev
2323
#endif // !ASSERT_DISABLED
2320
#endif
2324
2321
2325
#if !defined(NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES) && !PLATFORM(IOS)
2322
#if !defined(NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES) && !PLATFORM(IOS)
2326
__ZN7WebCore7IntSizeC1ERK7_NSSize
2323
__ZN7WebCore7IntSizeC1ERK7_NSSize
2327
__ZNK7WebCore7IntSizecv7_NSSizeEv
2324
__ZNK7WebCore7IntSizecv7_NSSizeEv
2328
#endif
2325
#endif
2329
2326
2330
_wkCALayerEnumerateRectsBeingDrawnWithBlock
2331
_wkCFURLRequestAllowAllPostCaching
2332
_wkCGPathAddRoundedRect
2333
_wkCreateCTTypesetterWithUniCharProviderAndOptions
2334
2335
#if !PLATFORM(IOS_SIMULATOR)
2327
#if !PLATFORM(IOS_SIMULATOR)
2336
_wkIOSurfaceContextCreate
2328
_wkIOSurfaceContextCreate
2337
_wkIOSurfaceContextCreateImage
2329
_wkIOSurfaceContextCreateImage
2338
#endif
2330
#endif
2339
2331
2340
#if !PLATFORM(IOS)
2341
_wkAVAssetResolvedURL
2342
_wkCopyDefaultSearchProviderDisplayName
2343
_wkSetCrashReportApplicationSpecificInformation
2344
_wkCreateVMPressureDispatchOnMainQueue
2345
_wkCursor
2346
_wkExecutableWasLinkedOnOrBeforeSnowLeopard
2347
_wkRecommendedScrollerStyle
2348
#endif
2349
2350
#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
2351
_wkCreateMemoryStatusPressureCriticalDispatchOnMainQueue
2352
#endif
2353
2354
#if USE(CONTENT_FILTERING)
2355
_wkFilterAddData
2356
_wkFilterCreateInstance
2357
_wkFilterDataComplete
2358
_wkFilterIsBuffering
2359
_wkFilterIsManagedSession
2360
_wkFilterWasBlocked
2361
#endif
2362
2363
#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
2332
#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
2333
__ZN7WebCore24TextAlternativeWithRangeC1EP18NSTextAlternatives8_NSRange
2334
__ZN7WebCore27AlternativeTextUIController15addAlternativesERKN3WTF9RetainPtrI18NSTextAlternativesEE
2335
__ZN7WebCore27AlternativeTextUIController16showAlternativesEP6NSViewRKNS_9FloatRectEyU13block_pointerFvP8NSStringE
2336
__ZN7WebCore27AlternativeTextUIController18removeAlternativesEy
2337
__ZN7WebCore27AlternativeTextUIController22alternativesForContextEy
2338
__ZN7WebCore27AlternativeTextUIController5clearEv
2339
__ZN7WebCore32collectDictationTextAlternativesEP18NSAttributedStringRN3WTF6VectorINS_24TextAlternativeWithRangeELm0ENS2_15CrashOnOverflowEEE
2364
_wkCGContextDrawsWithCorrectShadowOffsets
2340
_wkCGContextDrawsWithCorrectShadowOffsets
2365
_wkExecutableWasLinkedOnOrBeforeLion
2341
_wkExecutableWasLinkedOnOrBeforeLion
2366
_wkNSElasticDeltaForReboundDelta
2342
_wkNSElasticDeltaForReboundDelta
Lines 2368-2395 _wkNSElasticDeltaForTimeDelta a/Source/WebCore/WebCore.exp.in_sec59
2368
_wkNSReboundDeltaForElasticDelta
2344
_wkNSReboundDeltaForElasticDelta
2369
#endif
2345
#endif
2370
2346
2371
#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
2347
#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
2372
_wkCTFontTransformGlyphs
2348
_wkCreateMemoryStatusPressureCriticalDispatchOnMainQueue
2373
#endif
2349
#endif
2374
2350
2375
#if PLATFORM(MAC) && !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
2351
#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
2376
__ZN7WebCore27AlternativeTextUIController15addAlternativesERKN3WTF9RetainPtrI18NSTextAlternativesEE
2352
_wkCTFontTransformGlyphs
2377
__ZN7WebCore27AlternativeTextUIController22alternativesForContextEy
2378
__ZN7WebCore27AlternativeTextUIController5clearEv
2379
__ZN7WebCore27AlternativeTextUIController18removeAlternativesEy
2380
__ZN7WebCore27AlternativeTextUIController16showAlternativesEP6NSViewRKNS_9FloatRectEyU13block_pointerFvP8NSStringE
2381
__ZN7WebCore24TextAlternativeWithRangeC1EP18NSTextAlternatives8_NSRange
2382
__ZN7WebCore32collectDictationTextAlternativesEP18NSAttributedStringRN3WTF6VectorINS_24TextAlternativeWithRangeELm0ENS2_15CrashOnOverflowEEE
2383
#endif
2353
#endif
2384
2354
2385
#if ENABLE(3D_RENDERING)
2355
#if ENABLE(3D_RENDERING)
2386
_WebCoreHas3DRendering
2356
_WebCoreHas3DRendering
2387
#endif
2357
#endif
2388
2358
2389
#if ENABLE(CSS_FILTERS)
2390
__ZN7WebCore16FilterOperationsaSERKS0_
2391
#endif
2392
2393
#if USE(APPKIT)
2359
#if USE(APPKIT)
2394
__ZN7WebCore6Editor13lowercaseWordEv
2360
__ZN7WebCore6Editor13lowercaseWordEv
2395
__ZN7WebCore6Editor13uppercaseWordEv
2361
__ZN7WebCore6Editor13uppercaseWordEv
Lines 2401-2409 __ZN7WebCore8Settings20gAVFoundationEnabledE a/Source/WebCore/WebCore.exp.in_sec60
2401
__ZN7WebCore8Settings22setAVFoundationEnabledEb
2367
__ZN7WebCore8Settings22setAVFoundationEnabledEb
2402
#endif
2368
#endif
2403
2369
2404
#if PLATFORM(MAC)
2370
#if ENABLE(BLOB)
2405
__ZN7WebCore8Settings13gQTKitEnabledE
2371
__ZN7WebCore12blobRegistryEv
2406
__ZN7WebCore8Settings15setQTKitEnabledEb
2372
__ZN7WebCore14LoaderStrategy18createBlobRegistryEv
2373
__ZN7WebCore7RawDataC1Ev
2374
__ZN7WebCore8BlobData10appendDataEN3WTF10PassRefPtrINS_7RawDataEEExx
2375
__ZN7WebCore8BlobData10appendFileERKN3WTF6StringExxd
2376
__ZN7WebCore8BlobData6createEv
2377
__ZN7WebCore12BlobDataItem11toEndOfFileE
2378
__ZN7WebCore12BlobRegistryD2Ev
2379
__ZTVN7WebCore12BlobRegistryE
2380
__ZTVN7WebCore16BlobRegistryImplE
2381
#endif
2382
2383
#if ENABLE(CACHE_PARTITIONING)
2384
__ZN7WebCore15ResourceRequest13partitionNameERKN3WTF6StringE
2385
_wkCachePartitionKey
2407
#endif
2386
#endif
2408
2387
2409
#if USE(CFNETWORK)
2388
#if USE(CFNETWORK)
Lines 2421-2438 _wkSetCFURLRequestShouldContentSniff a/Source/WebCore/WebCore.exp.in_sec61
2421
_wkSetRequestStorageSession
2400
_wkSetRequestStorageSession
2422
#endif
2401
#endif
2423
2402
2424
#if ENABLE(BLOB)
2403
#if USE(CONTENT_FILTERING)
2425
__ZN7WebCore12blobRegistryEv
2404
_wkFilterAddData
2426
__ZN7WebCore14LoaderStrategy18createBlobRegistryEv
2405
_wkFilterCreateInstance
2427
__ZN7WebCore7RawDataC1Ev
2406
_wkFilterDataComplete
2428
__ZN7WebCore8BlobData10appendBlobERKNS_4KURLExx
2407
_wkFilterIsBuffering
2429
__ZN7WebCore8BlobData10appendDataEN3WTF10PassRefPtrINS_7RawDataEEExx
2408
_wkFilterIsManagedSession
2430
__ZN7WebCore8BlobData10appendFileERKN3WTF6StringExxd
2409
_wkFilterWasBlocked
2431
__ZN7WebCore8BlobData6createEv
2432
__ZN7WebCore12BlobDataItem11toEndOfFileE
2433
__ZN7WebCore12BlobRegistryD2Ev
2434
__ZTVN7WebCore12BlobRegistryE
2435
__ZTVN7WebCore16BlobRegistryImplE
2436
#endif
2410
#endif
2437
2411
2438
#if ENABLE(CONTEXT_MENUS)
2412
#if ENABLE(CONTEXT_MENUS)
Lines 2454-2466 __ZNK7WebCore15ContextMenuItem5titleEv a/Source/WebCore/WebCore.exp.in_sec62
2454
__ZNK7WebCore15ContextMenuItem6actionEv
2428
__ZNK7WebCore15ContextMenuItem6actionEv
2455
__ZNK7WebCore15ContextMenuItem7checkedEv
2429
__ZNK7WebCore15ContextMenuItem7checkedEv
2456
__ZNK7WebCore15ContextMenuItem7enabledEv
2430
__ZNK7WebCore15ContextMenuItem7enabledEv
2457
#endif // ENABLE(CONTEXT_MENUS)
2431
#endif
2432
2433
#if ENABLE(CSS_FILTERS)
2434
__ZN7WebCore16FilterOperationsaSERKS0_
2435
#endif
2458
2436
2459
#if ENABLE(CSS3_CONDITIONAL_RULES)
2437
#if ENABLE(CSS3_CONDITIONAL_RULES)
2460
.objc_class_name_DOMCSSSupportsRule
2438
.objc_class_name_DOMCSSSupportsRule
2461
__ZN7WebCore12DOMWindowCSS6createEv
2439
__ZN7WebCore12DOMWindowCSS6createEv
2462
__ZN7WebCore4toJSEPN3JSC9ExecStateEPNS_17JSDOMGlobalObjectEPNS_12DOMWindowCSSE
2440
__ZN7WebCore4toJSEPN3JSC9ExecStateEPNS_17JSDOMGlobalObjectEPNS_12DOMWindowCSSE
2463
#endif // ENABLE(CSS3_CONDITIONAL_RULES)
2441
#endif
2464
2442
2465
#if ENABLE(DASHBOARD_SUPPORT) || ENABLE(DRAGGABLE_REGION)
2443
#if ENABLE(DASHBOARD_SUPPORT) || ENABLE(DRAGGABLE_REGION)
2466
__ZNK7WebCore8Document16annotatedRegionsEv
2444
__ZNK7WebCore8Document16annotatedRegionsEv
Lines 2479-2484 __ZN7WebCore8DragDataC1EP11objc_objectRKNS_8IntPointES5_NS_13DragOperationENS_20 a/Source/WebCore/WebCore.exp.in_sec63
2479
__ZN7WebCore8DragDataC1ERKN3WTF6StringERKNS_8IntPointES7_NS_13DragOperationENS_20DragApplicationFlagsE
2457
__ZN7WebCore8DragDataC1ERKN3WTF6StringERKNS_8IntPointES7_NS_13DragOperationENS_20DragApplicationFlagsE
2480
#endif
2458
#endif
2481
2459
2460
#if ENABLE(ENCRYPTED_MEDIA_V2)
2461
__ZN7WebCore3CDM18registerCDMFactoryEPFN3WTF10PassOwnPtrINS_19CDMPrivateInterfaceEEEPS0_EPFbRKNS1_6StringEEPFbSA_SA_E
2462
#endif
2463
2482
#if ENABLE(FULLSCREEN_API)
2464
#if ENABLE(FULLSCREEN_API)
2483
__ZN7WebCore8Document22webkitCancelFullScreenEv
2465
__ZN7WebCore8Document22webkitCancelFullScreenEv
2484
__ZN7WebCore8Document33webkitDidExitFullScreenForElementEPNS_7ElementE
2466
__ZN7WebCore8Document33webkitDidExitFullScreenForElementEPNS_7ElementE
Lines 2528-2534 __ZN7WebCore12IconDatabaseC1Ev a/Source/WebCore/WebCore.exp.in_sec64
2528
__ZNK7WebCore12IconDatabase12databasePathEv
2510
__ZNK7WebCore12IconDatabase12databasePathEv
2529
__ZNK7WebCore12IconDatabase24shouldStopThreadActivityEv
2511
__ZNK7WebCore12IconDatabase24shouldStopThreadActivityEv
2530
__ZNK7WebCore12IconDatabase9isEnabledEv
2512
__ZNK7WebCore12IconDatabase9isEnabledEv
2531
#endif // ENABLE(ICONDATABASE)
2513
#endif
2532
2514
2533
#if ENABLE(INPUT_TYPE_COLOR)
2515
#if ENABLE(INPUT_TYPE_COLOR)
2534
__ZN7WebCore5ColorC1EP7CGColor
2516
__ZN7WebCore5ColorC1EP7CGColor
Lines 2596-2601 __ZNK7WebCore9FloatQuad12containsQuadERKS0_ a/Source/WebCore/WebCore.exp.in_sec65
2596
__ZNK7WebCore9FloatQuad13containsPointERKNS_10FloatPointE
2578
__ZNK7WebCore9FloatQuad13containsPointERKNS_10FloatPointE
2597
#endif
2579
#endif
2598
2580
2581
#if ENABLE(IOS_TEXT_AUTOSIZING)
2582
__ZN7WebCore12RenderObject19resetTextAutosizingEv
2583
__ZN7WebCore5Frame22setTextAutosizingWidthEf
2584
#endif
2585
2586
#if ENABLE(MEDIA_STREAM)
2587
__ZN7WebCore16UserMediaRequest22userMediaAccessGrantedEv
2588
__ZN7WebCore16UserMediaRequest21userMediaAccessDeniedEv
2589
__ZN7WebCore18provideUserMediaToEPNS_4PageEPNS_15UserMediaClientE
2590
__ZNK7WebCore16UserMediaRequest14securityOriginEv
2591
__ZN7WebCore21MockMediaStreamCenter29registerMockMediaStreamCenterEv
2592
#endif
2593
2599
#if ENABLE(NETSCAPE_PLUGIN_API)
2594
#if ENABLE(NETSCAPE_PLUGIN_API)
2600
__NPN_Construct
2595
__NPN_Construct
2601
__NPN_CreateObject
2596
__NPN_CreateObject
Lines 2689-2694 __ZNK7WebCore15ProtectionSpace20authenticationSchemeEv a/Source/WebCore/WebCore.exp.in_sec66
2689
__ZN7WebCore8createCFERKNS_15ProtectionSpaceE
2684
__ZN7WebCore8createCFERKNS_15ProtectionSpaceE
2690
#endif
2685
#endif
2691
2686
2687
#if ENABLE(PUBLIC_SUFFIX_LIST)
2688
__ZN7WebCore14isPublicSuffixERKN3WTF6StringE
2689
__ZN7WebCore28topPrivatelyControlledDomainERKN3WTF6StringE
2690
_wkIsPublicSuffix
2691
#endif
2692
2692
#if USE(QUICK_LOOK)
2693
#if USE(QUICK_LOOK)
2693
__ZN7WebCore27qlPreviewConverterUTIForURLEP5NSURL
2694
__ZN7WebCore27qlPreviewConverterUTIForURLEP5NSURL
2694
__ZN7WebCore30removeQLPreviewConverterForURLEP5NSURL
2695
__ZN7WebCore30removeQLPreviewConverterForURLEP5NSURL
Lines 2700-2717 __ZN7WebCore33QLPreviewGetSupportedMIMETypesSetEv a/Source/WebCore/WebCore.exp.in_sec67
2700
__ZN7WebCore9FrameView25serviceScriptedAnimationsEd
2701
__ZN7WebCore9FrameView25serviceScriptedAnimationsEd
2701
#endif
2702
#endif
2702
2703
2704
#if ENABLE(RUBBER_BANDING)
2705
__ZNK7WebCore9FrameView31setWantsLayerForTopOverHangAreaEb
2706
__ZNK7WebCore9FrameView34setWantsLayerForBottomOverHangAreaEb
2707
#endif
2708
2703
#if ENABLE(SHADOW_DOM)
2709
#if ENABLE(SHADOW_DOM)
2704
__ZN7WebCore4toJSEPN3JSC9ExecStateEPNS_17JSDOMGlobalObjectEPNS_10ShadowRootE
2710
__ZN7WebCore4toJSEPN3JSC9ExecStateEPNS_17JSDOMGlobalObjectEPNS_10ShadowRootE
2705
#endif
2711
#endif
2706
2712
2713
#if ENABLE(SPEECH_SYNTHESIS)
2714
__ZN7WebCore15SpeechSynthesis22setPlatformSynthesizerEN3WTF10PassOwnPtrINS_25PlatformSpeechSynthesizerEEE
2715
__ZN7WebCore24DOMWindowSpeechSynthesis15speechSynthesisEPNS_9DOMWindowE
2716
__ZN7WebCore25PlatformSpeechSynthesizerC2EPNS_31PlatformSpeechSynthesizerClientE
2717
__ZTVN7WebCore25PlatformSpeechSynthesizerE
2718
__ZN7WebCore25PlatformSpeechSynthesizerD2Ev
2719
__ZN7WebCore28PlatformSpeechSynthesisVoice6createERKN3WTF6StringES4_S4_bb
2720
#endif
2721
2707
#if ENABLE(SVG)
2722
#if ENABLE(SVG)
2708
__ZN7WebCore8Document13svgExtensionsEv
2723
__ZN7WebCore8Document13svgExtensionsEv
2709
__ZN7WebCore8Document19accessSVGExtensionsEv
2724
__ZN7WebCore8Document19accessSVGExtensionsEv
2710
#endif
2725
#endif
2711
2726
2712
#if ENABLE(IOS_TEXT_AUTOSIZING)
2727
#if ENABLE(STYLE_SCOPED)
2713
__ZN7WebCore12RenderObject19resetTextAutosizingEv
2728
__ZNK7WebCore4Node31numberOfScopedHTMLStyleChildrenEv
2714
__ZN7WebCore5Frame22setTextAutosizingWidthEf
2715
#endif
2729
#endif
2716
2730
2717
#if ENABLE(THREADED_SCROLLING)
2731
#if ENABLE(THREADED_SCROLLING)
Lines 2762-2810 __ZNK7WebCore16HTMLMediaElement6pausedEv a/Source/WebCore/WebCore.exp.in_sec68
2762
2776
2763
#if ENABLE(VIEW_MODE_CSS_MEDIA)
2777
#if ENABLE(VIEW_MODE_CSS_MEDIA)
2764
__ZN7WebCore4Page11setViewModeENS0_8ViewModeE
2778
__ZN7WebCore4Page11setViewModeENS0_8ViewModeE
2765
#endif // ENABLE(VIEW_MODE_CSS_MEDIA)
2779
#endif
2766
2780
2767
#if ENABLE(WORKERS)
2781
#if ENABLE(WORKERS)
2768
__ZN7WebCore12WorkerThread17workerThreadCountEv
2782
__ZN7WebCore12WorkerThread17workerThreadCountEv
2769
#endif
2783
#endif
2770
2784
2771
#if ENABLE(ENCRYPTED_MEDIA_V2)
2772
__ZN7WebCore3CDM18registerCDMFactoryEPFN3WTF10PassOwnPtrINS_19CDMPrivateInterfaceEEEPS0_EPFbRKNS1_6StringEEPFbSA_SA_E
2773
#endif
2774
2775
#if ENABLE(VIDEO_TRACK)
2785
#if ENABLE(VIDEO_TRACK)
2776
__ZN7WebCore9PageGroup18captionPreferencesEv
2786
__ZN7WebCore9PageGroup18captionPreferencesEv
2777
#endif
2787
#endif
2778
2779
#if ENABLE(SPEECH_SYNTHESIS)
2780
__ZN7WebCore15SpeechSynthesis22setPlatformSynthesizerEN3WTF10PassOwnPtrINS_25PlatformSpeechSynthesizerEEE
2781
__ZN7WebCore24DOMWindowSpeechSynthesis15speechSynthesisEPNS_9DOMWindowE
2782
__ZN7WebCore25PlatformSpeechSynthesizerC2EPNS_31PlatformSpeechSynthesizerClientE
2783
__ZTVN7WebCore25PlatformSpeechSynthesizerE
2784
__ZN7WebCore25PlatformSpeechSynthesizerD2Ev
2785
__ZN7WebCore28PlatformSpeechSynthesisVoice6createERKN3WTF6StringES4_S4_bb
2786
#endif
2787
2788
#if ENABLE(RUBBER_BANDING)
2789
__ZNK7WebCore9FrameView31setWantsLayerForTopOverHangAreaEb
2790
__ZNK7WebCore9FrameView34setWantsLayerForBottomOverHangAreaEb
2791
#endif
2792
2793
#if ENABLE(PUBLIC_SUFFIX_LIST)
2794
__ZN7WebCore14isPublicSuffixERKN3WTF6StringE
2795
__ZN7WebCore28topPrivatelyControlledDomainERKN3WTF6StringE
2796
_wkIsPublicSuffix
2797
#endif
2798
2799
#if ENABLE(CACHE_PARTITIONING)
2800
__ZN7WebCore15ResourceRequest13partitionNameERKN3WTF6StringE
2801
_wkCachePartitionKey
2802
#endif
2803
2804
#if ENABLE(MEDIA_STREAM)
2805
__ZN7WebCore16UserMediaRequest22userMediaAccessGrantedEv
2806
__ZN7WebCore16UserMediaRequest21userMediaAccessDeniedEv
2807
__ZN7WebCore18provideUserMediaToEPNS_4PageEPNS_15UserMediaClientE
2808
__ZNK7WebCore16UserMediaRequest14securityOriginEv
2809
__ZN7WebCore21MockMediaStreamCenter29registerMockMediaStreamCenterEv
2810
#endif
- a/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj -4 / +4 lines
Lines 7420-7426 a/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj_sec1
7420
    </ClCompile>
7420
    </ClCompile>
7421
    <ClCompile Include="..\platform\HistogramSupport.cpp" />
7421
    <ClCompile Include="..\platform\HistogramSupport.cpp" />
7422
    <ClCompile Include="..\platform\KillRingNone.cpp" />
7422
    <ClCompile Include="..\platform\KillRingNone.cpp" />
7423
    <ClCompile Include="..\platform\KURL.cpp" />
7423
    <ClCompile Include="..\platform\URL.cpp" />
7424
    <ClCompile Include="..\platform\Language.cpp" />
7424
    <ClCompile Include="..\platform\Language.cpp" />
7425
    <ClCompile Include="..\platform\Length.cpp" />
7425
    <ClCompile Include="..\platform\Length.cpp" />
7426
    <ClCompile Include="..\platform\LengthBox.cpp" />
7426
    <ClCompile Include="..\platform\LengthBox.cpp" />
Lines 7604-7610 a/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj_sec2
7604
    <ClCompile Include="..\platform\win\WindowMessageBroadcaster.cpp" />
7604
    <ClCompile Include="..\platform\win\WindowMessageBroadcaster.cpp" />
7605
    <ClCompile Include="..\platform\cf\CFURLExtras.cpp" />
7605
    <ClCompile Include="..\platform\cf\CFURLExtras.cpp" />
7606
    <ClCompile Include="..\platform\cf\FileSystemCF.cpp" />
7606
    <ClCompile Include="..\platform\cf\FileSystemCF.cpp" />
7607
    <ClCompile Include="..\platform\cf\KURLCFNet.cpp" />
7607
    <ClCompile Include="..\platform\cf\URLCF.cpp" />
7608
    <ClCompile Include="..\platform\cf\SharedBufferCF.cpp" />
7608
    <ClCompile Include="..\platform\cf\SharedBufferCF.cpp" />
7609
    <ClCompile Include="..\platform\cf\win\CertificateCFWin.cpp" />
7609
    <ClCompile Include="..\platform\cf\win\CertificateCFWin.cpp" />
7610
    <ClCompile Include="..\platform\graphics\BitmapImage.cpp" />
7610
    <ClCompile Include="..\platform\graphics\BitmapImage.cpp" />
Lines 19015-19022 a/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj_sec3
19015
    <ClInclude Include="..\platform\HistogramSupport.h" />
19015
    <ClInclude Include="..\platform\HistogramSupport.h" />
19016
    <ClInclude Include="..\platform\HostWindow.h" />
19016
    <ClInclude Include="..\platform\HostWindow.h" />
19017
    <ClInclude Include="..\platform\KillRing.h" />
19017
    <ClInclude Include="..\platform\KillRing.h" />
19018
    <ClInclude Include="..\platform\KURL.h" />
19018
    <ClInclude Include="..\platform\URL.h" />
19019
    <ClInclude Include="..\platform\KURLHash.h" />
19019
    <ClInclude Include="..\platform\URLHash.h" />
19020
    <ClInclude Include="..\platform\Language.h" />
19020
    <ClInclude Include="..\platform\Language.h" />
19021
    <ClInclude Include="..\platform\LayoutUnit.h" />
19021
    <ClInclude Include="..\platform\LayoutUnit.h" />
19022
    <ClInclude Include="..\platform\Length.h" />
19022
    <ClInclude Include="..\platform\Length.h" />
- a/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters -4 / +4 lines
Lines 1125-1131 a/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters_sec1
1125
    <ClCompile Include="..\platform\KillRingNone.cpp">
1125
    <ClCompile Include="..\platform\KillRingNone.cpp">
1126
      <Filter>platform</Filter>
1126
      <Filter>platform</Filter>
1127
    </ClCompile>
1127
    </ClCompile>
1128
    <ClCompile Include="..\platform\KURL.cpp">
1128
    <ClCompile Include="..\platform\URL.cpp">
1129
      <Filter>platform</Filter>
1129
      <Filter>platform</Filter>
1130
    </ClCompile>
1130
    </ClCompile>
1131
    <ClCompile Include="..\platform\Language.cpp">
1131
    <ClCompile Include="..\platform\Language.cpp">
Lines 5109-5115 a/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters_sec2
5109
    <ClCompile Include="..\platform\cf\FileSystemCF.cpp">
5109
    <ClCompile Include="..\platform\cf\FileSystemCF.cpp">
5110
      <Filter>platform\cf</Filter>
5110
      <Filter>platform\cf</Filter>
5111
    </ClCompile>
5111
    </ClCompile>
5112
    <ClCompile Include="..\platform\cf\KURLCFNet.cpp">
5112
    <ClCompile Include="..\platform\cf\URLCF.cpp">
5113
      <Filter>platform\cf</Filter>
5113
      <Filter>platform\cf</Filter>
5114
    </ClCompile>
5114
    </ClCompile>
5115
    <ClCompile Include="..\platform\cf\win\CertificateCFWin.cpp">
5115
    <ClCompile Include="..\platform\cf\win\CertificateCFWin.cpp">
Lines 8115-8124 a/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters_sec3
8115
    <ClInclude Include="..\platform\KillRing.h">
8115
    <ClInclude Include="..\platform\KillRing.h">
8116
      <Filter>platform</Filter>
8116
      <Filter>platform</Filter>
8117
    </ClInclude>
8117
    </ClInclude>
8118
    <ClInclude Include="..\platform\KURL.h">
8118
    <ClInclude Include="..\platform\URL.h">
8119
      <Filter>platform</Filter>
8119
      <Filter>platform</Filter>
8120
    </ClInclude>
8120
    </ClInclude>
8121
    <ClInclude Include="..\platform\KURLHash.h">
8121
    <ClInclude Include="..\platform\URLHash.h">
8122
      <Filter>platform</Filter>
8122
      <Filter>platform</Filter>
8123
    </ClInclude>
8123
    </ClInclude>
8124
    <ClInclude Include="..\platform\Language.h">
8124
    <ClInclude Include="..\platform\Language.h">
- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj -20 / +20 lines
Lines 652-658 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec1
652
		1A927FD21416A15B003A83C8 /* npapi.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A927FCF1416A15B003A83C8 /* npapi.h */; settings = {ATTRIBUTES = (Private, ); }; };
652
		1A927FD21416A15B003A83C8 /* npapi.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A927FCF1416A15B003A83C8 /* npapi.h */; settings = {ATTRIBUTES = (Private, ); }; };
653
		1A927FD31416A15B003A83C8 /* npruntime.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A927FD01416A15B003A83C8 /* npruntime.h */; settings = {ATTRIBUTES = (Private, ); }; };
653
		1A927FD31416A15B003A83C8 /* npruntime.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A927FD01416A15B003A83C8 /* npruntime.h */; settings = {ATTRIBUTES = (Private, ); }; };
654
		1A927FD41416A15B003A83C8 /* nptypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A927FD11416A15B003A83C8 /* nptypes.h */; settings = {ATTRIBUTES = (Private, ); }; };
654
		1A927FD41416A15B003A83C8 /* nptypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A927FD11416A15B003A83C8 /* nptypes.h */; settings = {ATTRIBUTES = (Private, ); }; };
655
		1A98956B0AA78F80005EF5EF /* KURLCFNet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A98956A0AA78F80005EF5EF /* KURLCFNet.cpp */; };
655
		1A98956B0AA78F80005EF5EF /* URLCF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A98956A0AA78F80005EF5EF /* URLCF.cpp */; };
656
		1AA21250163F0DA80000E63F /* AtomicStringCF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AA2124F163F0DA80000E63F /* AtomicStringCF.cpp */; };
656
		1AA21250163F0DA80000E63F /* AtomicStringCF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AA2124F163F0DA80000E63F /* AtomicStringCF.cpp */; };
657
		1AA7160A149BC4DB0016EC19 /* TileController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AA71608149BC4DA0016EC19 /* TileController.mm */; };
657
		1AA7160A149BC4DB0016EC19 /* TileController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AA71608149BC4DA0016EC19 /* TileController.mm */; };
658
		1AA7160B149BC4DB0016EC19 /* TileController.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AA71609149BC4DB0016EC19 /* TileController.h */; };
658
		1AA7160B149BC4DB0016EC19 /* TileController.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AA71609149BC4DB0016EC19 /* TileController.h */; };
Lines 1890-1898 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec2
1890
		657EDA081385CB97004E0645 /* MemoryPressureHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 657EDA061385CB97004E0645 /* MemoryPressureHandler.cpp */; };
1890
		657EDA081385CB97004E0645 /* MemoryPressureHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 657EDA061385CB97004E0645 /* MemoryPressureHandler.cpp */; };
1891
		657EDA0B1385CBD8004E0645 /* MemoryPressureHandlerMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 657EDA0A1385CBD8004E0645 /* MemoryPressureHandlerMac.mm */; };
1891
		657EDA0B1385CBD8004E0645 /* MemoryPressureHandlerMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 657EDA0A1385CBD8004E0645 /* MemoryPressureHandlerMac.mm */; };
1892
		658436860AE01B7400E53753 /* FrameLoadRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 658436850AE01B7400E53753 /* FrameLoadRequest.h */; settings = {ATTRIBUTES = (Private, ); }; };
1892
		658436860AE01B7400E53753 /* FrameLoadRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 658436850AE01B7400E53753 /* FrameLoadRequest.h */; settings = {ATTRIBUTES = (Private, ); }; };
1893
		6593923709AE4346002C531F /* KURL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6593923509AE4346002C531F /* KURL.cpp */; };
1893
		6593923709AE4346002C531F /* URL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6593923509AE4346002C531F /* URL.cpp */; };
1894
		6593923809AE4346002C531F /* KURL.h in Headers */ = {isa = PBXBuildFile; fileRef = 6593923609AE4346002C531F /* KURL.h */; settings = {ATTRIBUTES = (Private, ); }; };
1894
		6593923809AE4346002C531F /* URL.h in Headers */ = {isa = PBXBuildFile; fileRef = 6593923609AE4346002C531F /* URL.h */; settings = {ATTRIBUTES = (Private, ); }; };
1895
		6593923A09AE435C002C531F /* KURLMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 6593923909AE435C002C531F /* KURLMac.mm */; };
1895
		6593923A09AE435C002C531F /* URLMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 6593923909AE435C002C531F /* URLMac.mm */; };
1896
		6596F2B30B8731DF001326BD /* DOMHTMLInputElementInternal.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 85E711640AC5D5350053270F /* DOMHTMLInputElementInternal.h */; };
1896
		6596F2B30B8731DF001326BD /* DOMHTMLInputElementInternal.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 85E711640AC5D5350053270F /* DOMHTMLInputElementInternal.h */; };
1897
		6596F2C10B87325C001326BD /* DOMHTMLTextAreaElementInternal.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 85E7117F0AC5D5350053270F /* DOMHTMLTextAreaElementInternal.h */; };
1897
		6596F2C10B87325C001326BD /* DOMHTMLTextAreaElementInternal.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 85E7117F0AC5D5350053270F /* DOMHTMLTextAreaElementInternal.h */; };
1898
		659A7D130B6DB4D9001155B3 /* SubstituteData.h in Headers */ = {isa = PBXBuildFile; fileRef = 659A7D120B6DB4D9001155B3 /* SubstituteData.h */; settings = {ATTRIBUTES = (Private, ); }; };
1898
		659A7D130B6DB4D9001155B3 /* SubstituteData.h in Headers */ = {isa = PBXBuildFile; fileRef = 659A7D120B6DB4D9001155B3 /* SubstituteData.h */; settings = {ATTRIBUTES = (Private, ); }; };
Lines 5040-5046 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec3
5040
		BCBB8AB913F1AFB000734DF0 /* PODInterval.h in Headers */ = {isa = PBXBuildFile; fileRef = BCBB8AB513F1AFB000734DF0 /* PODInterval.h */; settings = {ATTRIBUTES = (Private, ); }; };
5040
		BCBB8AB913F1AFB000734DF0 /* PODInterval.h in Headers */ = {isa = PBXBuildFile; fileRef = BCBB8AB513F1AFB000734DF0 /* PODInterval.h */; settings = {ATTRIBUTES = (Private, ); }; };
5041
		BCBB8ABA13F1AFB000734DF0 /* PODIntervalTree.h in Headers */ = {isa = PBXBuildFile; fileRef = BCBB8AB613F1AFB000734DF0 /* PODIntervalTree.h */; settings = {ATTRIBUTES = (Private, ); }; };
5041
		BCBB8ABA13F1AFB000734DF0 /* PODIntervalTree.h in Headers */ = {isa = PBXBuildFile; fileRef = BCBB8AB613F1AFB000734DF0 /* PODIntervalTree.h */; settings = {ATTRIBUTES = (Private, ); }; };
5042
		BCBB8ABB13F1AFB000734DF0 /* PODRedBlackTree.h in Headers */ = {isa = PBXBuildFile; fileRef = BCBB8AB713F1AFB000734DF0 /* PODRedBlackTree.h */; settings = {ATTRIBUTES = (Private, ); }; };
5042
		BCBB8ABB13F1AFB000734DF0 /* PODRedBlackTree.h in Headers */ = {isa = PBXBuildFile; fileRef = BCBB8AB713F1AFB000734DF0 /* PODRedBlackTree.h */; settings = {ATTRIBUTES = (Private, ); }; };
5043
		BCBD21AB0E417AD400A070F2 /* KURLHash.h in Headers */ = {isa = PBXBuildFile; fileRef = BCBD21AA0E417AD400A070F2 /* KURLHash.h */; settings = {ATTRIBUTES = (Private, ); }; };
5043
		BCBD21AB0E417AD400A070F2 /* URLHash.h in Headers */ = {isa = PBXBuildFile; fileRef = BCBD21AA0E417AD400A070F2 /* URLHash.h */; settings = {ATTRIBUTES = (Private, ); }; };
5044
		BCBFB53C0DCD29CF0019B3E5 /* JSDOMWindowShell.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCBFB53A0DCD29CF0019B3E5 /* JSDOMWindowShell.cpp */; };
5044
		BCBFB53C0DCD29CF0019B3E5 /* JSDOMWindowShell.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCBFB53A0DCD29CF0019B3E5 /* JSDOMWindowShell.cpp */; };
5045
		BCBFB53D0DCD29CF0019B3E5 /* JSDOMWindowShell.h in Headers */ = {isa = PBXBuildFile; fileRef = BCBFB53B0DCD29CF0019B3E5 /* JSDOMWindowShell.h */; settings = {ATTRIBUTES = (Private, ); }; };
5045
		BCBFB53D0DCD29CF0019B3E5 /* JSDOMWindowShell.h in Headers */ = {isa = PBXBuildFile; fileRef = BCBFB53B0DCD29CF0019B3E5 /* JSDOMWindowShell.h */; settings = {ATTRIBUTES = (Private, ); }; };
5046
		BCC0657D0F3CE1B700CD2D87 /* ClientRect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCC065770F3CE1B700CD2D87 /* ClientRect.cpp */; };
5046
		BCC0657D0F3CE1B700CD2D87 /* ClientRect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCC065770F3CE1B700CD2D87 /* ClientRect.cpp */; };
Lines 7114-7120 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec4
7114
		1A927FCF1416A15B003A83C8 /* npapi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = npapi.h; sourceTree = "<group>"; };
7114
		1A927FCF1416A15B003A83C8 /* npapi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = npapi.h; sourceTree = "<group>"; };
7115
		1A927FD01416A15B003A83C8 /* npruntime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = npruntime.h; sourceTree = "<group>"; };
7115
		1A927FD01416A15B003A83C8 /* npruntime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = npruntime.h; sourceTree = "<group>"; };
7116
		1A927FD11416A15B003A83C8 /* nptypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nptypes.h; sourceTree = "<group>"; };
7116
		1A927FD11416A15B003A83C8 /* nptypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nptypes.h; sourceTree = "<group>"; };
7117
		1A98956A0AA78F80005EF5EF /* KURLCFNet.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = KURLCFNet.cpp; sourceTree = "<group>"; };
7117
		1A98956A0AA78F80005EF5EF /* URLCF.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = URLCF.cpp; sourceTree = "<group>"; };
7118
		1AA2124F163F0DA80000E63F /* AtomicStringCF.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AtomicStringCF.cpp; sourceTree = "<group>"; };
7118
		1AA2124F163F0DA80000E63F /* AtomicStringCF.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AtomicStringCF.cpp; sourceTree = "<group>"; };
7119
		1AA71608149BC4DA0016EC19 /* TileController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = TileController.mm; path = ca/mac/TileController.mm; sourceTree = "<group>"; };
7119
		1AA71608149BC4DA0016EC19 /* TileController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = TileController.mm; path = ca/mac/TileController.mm; sourceTree = "<group>"; };
7120
		1AA71609149BC4DB0016EC19 /* TileController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TileController.h; path = ca/mac/TileController.h; sourceTree = "<group>"; };
7120
		1AA71609149BC4DB0016EC19 /* TileController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TileController.h; path = ca/mac/TileController.h; sourceTree = "<group>"; };
Lines 8487-8495 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec5
8487
		657EDA071385CB97004E0645 /* MemoryPressureHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MemoryPressureHandler.h; sourceTree = "<group>"; };
8487
		657EDA071385CB97004E0645 /* MemoryPressureHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MemoryPressureHandler.h; sourceTree = "<group>"; };
8488
		657EDA0A1385CBD8004E0645 /* MemoryPressureHandlerMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MemoryPressureHandlerMac.mm; sourceTree = "<group>"; };
8488
		657EDA0A1385CBD8004E0645 /* MemoryPressureHandlerMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MemoryPressureHandlerMac.mm; sourceTree = "<group>"; };
8489
		658436850AE01B7400E53753 /* FrameLoadRequest.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FrameLoadRequest.h; sourceTree = "<group>"; };
8489
		658436850AE01B7400E53753 /* FrameLoadRequest.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FrameLoadRequest.h; sourceTree = "<group>"; };
8490
		6593923509AE4346002C531F /* KURL.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = KURL.cpp; sourceTree = "<group>"; };
8490
		6593923509AE4346002C531F /* URL.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = URL.cpp; sourceTree = "<group>"; };
8491
		6593923609AE4346002C531F /* KURL.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = KURL.h; sourceTree = "<group>"; };
8491
		6593923609AE4346002C531F /* URL.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = URL.h; sourceTree = "<group>"; };
8492
		6593923909AE435C002C531F /* KURLMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = KURLMac.mm; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
8492
		6593923909AE435C002C531F /* URLMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = URLMac.mm; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
8493
		659A7D120B6DB4D9001155B3 /* SubstituteData.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SubstituteData.h; sourceTree = "<group>"; };
8493
		659A7D120B6DB4D9001155B3 /* SubstituteData.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SubstituteData.h; sourceTree = "<group>"; };
8494
		659DDC8009E198BA001BF3C6 /* JSDocument.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSDocument.cpp; sourceTree = "<group>"; };
8494
		659DDC8009E198BA001BF3C6 /* JSDocument.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSDocument.cpp; sourceTree = "<group>"; };
8495
		659DDC8109E198BA001BF3C6 /* JSDocument.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSDocument.h; sourceTree = "<group>"; };
8495
		659DDC8109E198BA001BF3C6 /* JSDocument.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSDocument.h; sourceTree = "<group>"; };
Lines 11936-11942 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec6
11936
		BCBB8AB513F1AFB000734DF0 /* PODInterval.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PODInterval.h; sourceTree = "<group>"; };
11936
		BCBB8AB513F1AFB000734DF0 /* PODInterval.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PODInterval.h; sourceTree = "<group>"; };
11937
		BCBB8AB613F1AFB000734DF0 /* PODIntervalTree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PODIntervalTree.h; sourceTree = "<group>"; };
11937
		BCBB8AB613F1AFB000734DF0 /* PODIntervalTree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PODIntervalTree.h; sourceTree = "<group>"; };
11938
		BCBB8AB713F1AFB000734DF0 /* PODRedBlackTree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PODRedBlackTree.h; sourceTree = "<group>"; };
11938
		BCBB8AB713F1AFB000734DF0 /* PODRedBlackTree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PODRedBlackTree.h; sourceTree = "<group>"; };
11939
		BCBD21AA0E417AD400A070F2 /* KURLHash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KURLHash.h; sourceTree = "<group>"; };
11939
		BCBD21AA0E417AD400A070F2 /* URLHash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = URLHash.h; sourceTree = "<group>"; };
11940
		BCBFB53A0DCD29CF0019B3E5 /* JSDOMWindowShell.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMWindowShell.cpp; sourceTree = "<group>"; };
11940
		BCBFB53A0DCD29CF0019B3E5 /* JSDOMWindowShell.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMWindowShell.cpp; sourceTree = "<group>"; };
11941
		BCBFB53B0DCD29CF0019B3E5 /* JSDOMWindowShell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMWindowShell.h; sourceTree = "<group>"; };
11941
		BCBFB53B0DCD29CF0019B3E5 /* JSDOMWindowShell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMWindowShell.h; sourceTree = "<group>"; };
11942
		BCC065770F3CE1B700CD2D87 /* ClientRect.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ClientRect.cpp; sourceTree = "<group>"; };
11942
		BCC065770F3CE1B700CD2D87 /* ClientRect.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ClientRect.cpp; sourceTree = "<group>"; };
Lines 13955-13961 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec7
13955
				E1A8E56417552B2A007488E7 /* CFURLExtras.cpp */,
13955
				E1A8E56417552B2A007488E7 /* CFURLExtras.cpp */,
13956
				E1A8E56517552B2A007488E7 /* CFURLExtras.h */,
13956
				E1A8E56517552B2A007488E7 /* CFURLExtras.h */,
13957
				5160306B0CC4362300C8AC25 /* FileSystemCF.cpp */,
13957
				5160306B0CC4362300C8AC25 /* FileSystemCF.cpp */,
13958
				1A98956A0AA78F80005EF5EF /* KURLCFNet.cpp */,
13958
				1A98956A0AA78F80005EF5EF /* URLCF.cpp */,
13959
				29A309AB1561C99B00BBD8E5 /* RunLoopCF.cpp */,
13959
				29A309AB1561C99B00BBD8E5 /* RunLoopCF.cpp */,
13960
				512DD8E20D91E2B4000F89EE /* SharedBufferCF.cpp */,
13960
				512DD8E20D91E2B4000F89EE /* SharedBufferCF.cpp */,
13961
			);
13961
			);
Lines 15146-15152 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec8
15146
				C5392D341326AD0100043D35 /* HTMLConverter.mm */,
15146
				C5392D341326AD0100043D35 /* HTMLConverter.mm */,
15147
				935C476E09AC4D7300A6AAB4 /* KeyEventMac.mm */,
15147
				935C476E09AC4D7300A6AAB4 /* KeyEventMac.mm */,
15148
				521D46F511AEC98100514613 /* KillRingMac.mm */,
15148
				521D46F511AEC98100514613 /* KillRingMac.mm */,
15149
				6593923909AE435C002C531F /* KURLMac.mm */,
15149
				6593923909AE435C002C531F /* URLMac.mm */,
15150
				9352084409BD43B900F2038D /* Language.mm */,
15150
				9352084409BD43B900F2038D /* Language.mm */,
15151
				06E81ED60AB5D5E900C87837 /* LocalCurrentGraphicsContext.h */,
15151
				06E81ED60AB5D5E900C87837 /* LocalCurrentGraphicsContext.h */,
15152
				06E81EEB0AB5DA9700C87837 /* LocalCurrentGraphicsContext.mm */,
15152
				06E81EEB0AB5DA9700C87837 /* LocalCurrentGraphicsContext.mm */,
Lines 19856-19864 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec9
19856
				BC3BC29B0E91AB0F00835588 /* HostWindow.h */,
19856
				BC3BC29B0E91AB0F00835588 /* HostWindow.h */,
19857
				521D46F711AEC9B100514613 /* KillRing.h */,
19857
				521D46F711AEC9B100514613 /* KillRing.h */,
19858
				4306E4E514955543007F17AC /* KillRingNone.cpp */,
19858
				4306E4E514955543007F17AC /* KillRingNone.cpp */,
19859
				6593923509AE4346002C531F /* KURL.cpp */,
19859
				6593923509AE4346002C531F /* URL.cpp */,
19860
				6593923609AE4346002C531F /* KURL.h */,
19860
				6593923609AE4346002C531F /* URL.h */,
19861
				BCBD21AA0E417AD400A070F2 /* KURLHash.h */,
19861
				BCBD21AA0E417AD400A070F2 /* URLHash.h */,
19862
				E18772F0126E2629003DD586 /* Language.cpp */,
19862
				E18772F0126E2629003DD586 /* Language.cpp */,
19863
				85EC9AF90A71A2C600EEEAED /* Language.h */,
19863
				85EC9AF90A71A2C600EEEAED /* Language.h */,
19864
				141DC0471648348F00371E5A /* LayoutUnit.h */,
19864
				141DC0471648348F00371E5A /* LayoutUnit.h */,
Lines 23407-23414 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec10
23407
				316FE11A0E6E1DA700BF6088 /* KeyframeAnimation.h in Headers */,
23407
				316FE11A0E6E1DA700BF6088 /* KeyframeAnimation.h in Headers */,
23408
				BC5EBA110E823E4700B25965 /* KeyframeList.h in Headers */,
23408
				BC5EBA110E823E4700B25965 /* KeyframeList.h in Headers */,
23409
				521D46F811AEC9B100514613 /* KillRing.h in Headers */,
23409
				521D46F811AEC9B100514613 /* KillRing.h in Headers */,
23410
				6593923809AE4346002C531F /* KURL.h in Headers */,
23410
				6593923809AE4346002C531F /* URL.h in Headers */,
23411
				BCBD21AB0E417AD400A070F2 /* KURLHash.h in Headers */,
23411
				BCBD21AB0E417AD400A070F2 /* URLHash.h in Headers */,
23412
				450CEBF115073BBE002BB149 /* LabelableElement.h in Headers */,
23412
				450CEBF115073BBE002BB149 /* LabelableElement.h in Headers */,
23413
				A456FA2711AD4A830020B420 /* LabelsNodeList.h in Headers */,
23413
				A456FA2711AD4A830020B420 /* LabelsNodeList.h in Headers */,
23414
				85EC9AFB0A71A2C600EEEAED /* Language.h in Headers */,
23414
				85EC9AFB0A71A2C600EEEAED /* Language.h in Headers */,
Lines 26696-26704 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec11
26696
				BC5EBA100E823E4700B25965 /* KeyframeList.cpp in Sources */,
26696
				BC5EBA100E823E4700B25965 /* KeyframeList.cpp in Sources */,
26697
				521D46F611AEC98100514613 /* KillRingMac.mm in Sources */,
26697
				521D46F611AEC98100514613 /* KillRingMac.mm in Sources */,
26698
				4306E4E614955543007F17AC /* KillRingNone.cpp in Sources */,
26698
				4306E4E614955543007F17AC /* KillRingNone.cpp in Sources */,
26699
				6593923709AE4346002C531F /* KURL.cpp in Sources */,
26699
				6593923709AE4346002C531F /* URL.cpp in Sources */,
26700
				1A98956B0AA78F80005EF5EF /* KURLCFNet.cpp in Sources */,
26700
				1A98956B0AA78F80005EF5EF /* URLCF.cpp in Sources */,
26701
				6593923A09AE435C002C531F /* KURLMac.mm in Sources */,
26701
				6593923A09AE435C002C531F /* URLMac.mm in Sources */,
26702
				450CEBF015073BBE002BB149 /* LabelableElement.cpp in Sources */,
26702
				450CEBF015073BBE002BB149 /* LabelableElement.cpp in Sources */,
26703
				A456FA2611AD4A830020B420 /* LabelsNodeList.cpp in Sources */,
26703
				A456FA2611AD4A830020B420 /* LabelsNodeList.cpp in Sources */,
26704
				E18772F1126E2629003DD586 /* Language.cpp in Sources */,
26704
				E18772F1126E2629003DD586 /* Language.cpp in Sources */,
- a/Source/WebCore/accessibility/AccessibilityImageMapLink.cpp -2 / +2 lines
Lines 87-96 Element* AccessibilityImageMapLink::anchorElement() const a/Source/WebCore/accessibility/AccessibilityImageMapLink.cpp_sec1
87
    return m_areaElement.get();
87
    return m_areaElement.get();
88
}
88
}
89
89
90
KURL AccessibilityImageMapLink::url() const
90
URL AccessibilityImageMapLink::url() const
91
{
91
{
92
    if (!m_areaElement.get())
92
    if (!m_areaElement.get())
93
        return KURL();
93
        return URL();
94
    
94
    
95
    return m_areaElement->href();
95
    return m_areaElement->href();
96
}
96
}
- a/Source/WebCore/accessibility/AccessibilityImageMapLink.h -1 / +1 lines
Lines 56-62 public: a/Source/WebCore/accessibility/AccessibilityImageMapLink.h_sec1
56
    
56
    
57
    virtual Element* anchorElement() const;
57
    virtual Element* anchorElement() const;
58
    virtual Element* actionElement() const;
58
    virtual Element* actionElement() const;
59
    virtual KURL url() const;
59
    virtual URL url() const;
60
    virtual bool isLink() const { return true; } 
60
    virtual bool isLink() const { return true; } 
61
    virtual bool isLinked() const { return true; }
61
    virtual bool isLinked() const { return true; }
62
    virtual String title() const;
62
    virtual String title() const;
- a/Source/WebCore/accessibility/AccessibilityObject.h -1 / +1 lines
Lines 642-648 public: a/Source/WebCore/accessibility/AccessibilityObject.h_sec1
642
    unsigned selectionStart() const { return selectedTextRange().start; }
642
    unsigned selectionStart() const { return selectedTextRange().start; }
643
    unsigned selectionEnd() const { return selectedTextRange().length; }
643
    unsigned selectionEnd() const { return selectedTextRange().length; }
644
    
644
    
645
    virtual KURL url() const { return KURL(); }
645
    virtual URL url() const { return URL(); }
646
    virtual VisibleSelection selection() const { return VisibleSelection(); }
646
    virtual VisibleSelection selection() const { return VisibleSelection(); }
647
    virtual String selectedText() const { return String(); }
647
    virtual String selectedText() const { return String(); }
648
    virtual const AtomicString& accessKey() const { return nullAtom; }
648
    virtual const AtomicString& accessKey() const { return nullAtom; }
- a/Source/WebCore/accessibility/AccessibilityRenderObject.cpp -4 / +4 lines
Lines 896-908 AccessibilityObject* AccessibilityRenderObject::internalLinkElement() const a/Source/WebCore/accessibility/AccessibilityRenderObject.cpp_sec1
896
        return 0;
896
        return 0;
897
    HTMLAnchorElement* anchor = toHTMLAnchorElement(element);
897
    HTMLAnchorElement* anchor = toHTMLAnchorElement(element);
898
    
898
    
899
    KURL linkURL = anchor->href();
899
    URL linkURL = anchor->href();
900
    String fragmentIdentifier = linkURL.fragmentIdentifier();
900
    String fragmentIdentifier = linkURL.fragmentIdentifier();
901
    if (fragmentIdentifier.isEmpty())
901
    if (fragmentIdentifier.isEmpty())
902
        return 0;
902
        return 0;
903
    
903
    
904
    // check if URL is the same as current URL
904
    // check if URL is the same as current URL
905
    KURL documentURL = m_renderer->document().url();
905
    URL documentURL = m_renderer->document().url();
906
    if (!equalIgnoringFragmentIdentifier(documentURL, linkURL))
906
    if (!equalIgnoringFragmentIdentifier(documentURL, linkURL))
907
        return 0;
907
        return 0;
908
    
908
    
Lines 1448-1454 void AccessibilityRenderObject::setSelectedTextRange(const PlainTextRange& range a/Source/WebCore/accessibility/AccessibilityRenderObject.cpp_sec2
1448
        Position(node, range.start + range.length, Position::PositionIsOffsetInAnchor), DOWNSTREAM));
1448
        Position(node, range.start + range.length, Position::PositionIsOffsetInAnchor), DOWNSTREAM));
1449
}
1449
}
1450
1450
1451
KURL AccessibilityRenderObject::url() const
1451
URL AccessibilityRenderObject::url() const
1452
{
1452
{
1453
    if (isAnchor() && isHTMLAnchorElement(m_renderer->node())) {
1453
    if (isAnchor() && isHTMLAnchorElement(m_renderer->node())) {
1454
        if (HTMLAnchorElement* anchor = toHTMLAnchorElement(anchorElement()))
1454
        if (HTMLAnchorElement* anchor = toHTMLAnchorElement(anchorElement()))
Lines 1464-1470 KURL AccessibilityRenderObject::url() const a/Source/WebCore/accessibility/AccessibilityRenderObject.cpp_sec3
1464
    if (isInputImage())
1464
    if (isInputImage())
1465
        return toHTMLInputElement(m_renderer->node())->src();
1465
        return toHTMLInputElement(m_renderer->node())->src();
1466
    
1466
    
1467
    return KURL();
1467
    return URL();
1468
}
1468
}
1469
1469
1470
bool AccessibilityRenderObject::isUnvisited() const
1470
bool AccessibilityRenderObject::isUnvisited() const
- a/Source/WebCore/accessibility/AccessibilityRenderObject.h -1 / +1 lines
Lines 139-145 public: a/Source/WebCore/accessibility/AccessibilityRenderObject.h_sec1
139
    Document* topDocument() const;
139
    Document* topDocument() const;
140
    HTMLLabelElement* labelElementContainer() const;
140
    HTMLLabelElement* labelElementContainer() const;
141
    
141
    
142
    virtual KURL url() const;
142
    virtual URL url() const;
143
    virtual PlainTextRange selectedTextRange() const;
143
    virtual PlainTextRange selectedTextRange() const;
144
    virtual VisibleSelection selection() const;
144
    virtual VisibleSelection selection() const;
145
    virtual String stringValue() const;
145
    virtual String stringValue() const;
- a/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm -1 / +1 lines
Lines 979-985 static void appendStringToResult(NSMutableString *result, NSString *string) a/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm_sec1
979
    if (![self _prepareAccessibilityCall])
979
    if (![self _prepareAccessibilityCall])
980
        return nil;
980
        return nil;
981
    
981
    
982
    KURL url = m_object->url();
982
    URL url = m_object->url();
983
    if (url.isNull())
983
    if (url.isNull())
984
        return nil;
984
        return nil;
985
    return (NSURL*)url;
985
    return (NSURL*)url;
- a/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm -1 / +1 lines
Lines 2138-2144 static NSString* roleValueToNSString(AccessibilityRole value) a/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm_sec1
2138
    }
2138
    }
2139
    
2139
    
2140
    if ([attributeName isEqualToString: NSAccessibilityURLAttribute]) {
2140
    if ([attributeName isEqualToString: NSAccessibilityURLAttribute]) {
2141
        KURL url = m_object->url();
2141
        URL url = m_object->url();
2142
        if (url.isNull())
2142
        if (url.isNull())
2143
            return nil;
2143
            return nil;
2144
        return (NSURL*)url;
2144
        return (NSURL*)url;
- a/Source/WebCore/bindings/ScriptControllerBase.cpp -1 / +1 lines
Lines 73-79 ScriptValue ScriptController::executeScript(const ScriptSourceCode& sourceCode) a/Source/WebCore/bindings/ScriptControllerBase.cpp_sec1
73
    return evaluate(sourceCode);
73
    return evaluate(sourceCode);
74
}
74
}
75
75
76
bool ScriptController::executeIfJavaScriptURL(const KURL& url, ShouldReplaceDocumentIfJavaScriptURL shouldReplaceDocumentIfJavaScriptURL)
76
bool ScriptController::executeIfJavaScriptURL(const URL& url, ShouldReplaceDocumentIfJavaScriptURL shouldReplaceDocumentIfJavaScriptURL)
77
{
77
{
78
    if (!protocolIsJavaScript(url))
78
    if (!protocolIsJavaScript(url))
79
        return false;
79
        return false;
- a/Source/WebCore/bindings/gobject/ConvertToUTF8String.cpp -2 / +2 lines
Lines 21-27 a/Source/WebCore/bindings/gobject/ConvertToUTF8String.cpp_sec1
21
#include "config.h"
21
#include "config.h"
22
#include "ConvertToUTF8String.h"
22
#include "ConvertToUTF8String.h"
23
23
24
#include "KURL.h"
24
#include "URL.h"
25
#include <wtf/text/CString.h>
25
#include <wtf/text/CString.h>
26
#include <wtf/text/WTFString.h>
26
#include <wtf/text/WTFString.h>
27
27
Lines 32-38 gchar* convertToUTF8String(WTF::String const& s) a/Source/WebCore/bindings/gobject/ConvertToUTF8String.cpp_sec2
32
    return g_strdup(s.utf8().data());
32
    return g_strdup(s.utf8().data());
33
}
33
}
34
34
35
gchar* convertToUTF8String(WebCore::KURL const& s)
35
gchar* convertToUTF8String(WebCore::URL const& s)
36
{
36
{
37
    return g_strdup(s.string().utf8().data());
37
    return g_strdup(s.string().utf8().data());
38
}
38
}
- a/Source/WebCore/bindings/gobject/ConvertToUTF8String.h -2 / +2 lines
Lines 24-35 a/Source/WebCore/bindings/gobject/ConvertToUTF8String.h_sec1
24
#include <wtf/Forward.h>
24
#include <wtf/Forward.h>
25
25
26
namespace WebCore {
26
namespace WebCore {
27
class KURL;
27
class URL;
28
}
28
}
29
29
30
typedef char gchar;
30
typedef char gchar;
31
31
32
gchar* convertToUTF8String(WTF::String const& s);
32
gchar* convertToUTF8String(WTF::String const& s);
33
gchar* convertToUTF8String(WebCore::KURL const& s);
33
gchar* convertToUTF8String(WebCore::URL const& s);
34
34
35
#endif /* ConvertToUTF8String_h */
35
#endif /* ConvertToUTF8String_h */
- a/Source/WebCore/bindings/js/JSDOMBinding.cpp -3 / +3 lines
Lines 75-93 JSValue jsStringOrUndefined(ExecState* exec, const String& s) a/Source/WebCore/bindings/js/JSDOMBinding.cpp_sec1
75
    return jsStringWithCache(exec, s);
75
    return jsStringWithCache(exec, s);
76
}
76
}
77
77
78
JSValue jsString(ExecState* exec, const KURL& url)
78
JSValue jsString(ExecState* exec, const URL& url)
79
{
79
{
80
    return jsStringWithCache(exec, url.string());
80
    return jsStringWithCache(exec, url.string());
81
}
81
}
82
82
83
JSValue jsStringOrNull(ExecState* exec, const KURL& url)
83
JSValue jsStringOrNull(ExecState* exec, const URL& url)
84
{
84
{
85
    if (url.isNull())
85
    if (url.isNull())
86
        return jsNull();
86
        return jsNull();
87
    return jsStringWithCache(exec, url.string());
87
    return jsStringWithCache(exec, url.string());
88
}
88
}
89
89
90
JSValue jsStringOrUndefined(ExecState* exec, const KURL& url)
90
JSValue jsStringOrUndefined(ExecState* exec, const URL& url)
91
{
91
{
92
    if (url.isNull())
92
    if (url.isNull())
93
        return jsUndefined();
93
        return jsUndefined();
- a/Source/WebCore/bindings/js/JSDOMBinding.h -4 / +4 lines
Lines 61-67 class DOMStringList; a/Source/WebCore/bindings/js/JSDOMBinding.h_sec1
61
    class Document;
61
    class Document;
62
    class Frame;
62
    class Frame;
63
    class HTMLDocument;
63
    class HTMLDocument;
64
    class KURL;
64
    class URL;
65
    class Node;
65
    class Node;
66
66
67
    typedef int ExceptionCode;
67
    typedef int ExceptionCode;
Lines 243-259 class DOMStringList; a/Source/WebCore/bindings/js/JSDOMBinding.h_sec2
243
    void setDOMException(JSC::ExecState*, ExceptionCode);
243
    void setDOMException(JSC::ExecState*, ExceptionCode);
244
244
245
    JSC::JSValue jsStringWithCache(JSC::ExecState*, const String&);
245
    JSC::JSValue jsStringWithCache(JSC::ExecState*, const String&);
246
    JSC::JSValue jsString(JSC::ExecState*, const KURL&); // empty if the URL is null
246
    JSC::JSValue jsString(JSC::ExecState*, const URL&); // empty if the URL is null
247
    inline JSC::JSValue jsStringWithCache(JSC::ExecState* exec, const AtomicString& s)
247
    inline JSC::JSValue jsStringWithCache(JSC::ExecState* exec, const AtomicString& s)
248
    { 
248
    { 
249
        return jsStringWithCache(exec, s.string());
249
        return jsStringWithCache(exec, s.string());
250
    }
250
    }
251
        
251
        
252
    JSC::JSValue jsStringOrNull(JSC::ExecState*, const String&); // null if the string is null
252
    JSC::JSValue jsStringOrNull(JSC::ExecState*, const String&); // null if the string is null
253
    JSC::JSValue jsStringOrNull(JSC::ExecState*, const KURL&); // null if the URL is null
253
    JSC::JSValue jsStringOrNull(JSC::ExecState*, const URL&); // null if the URL is null
254
254
255
    JSC::JSValue jsStringOrUndefined(JSC::ExecState*, const String&); // undefined if the string is null
255
    JSC::JSValue jsStringOrUndefined(JSC::ExecState*, const String&); // undefined if the string is null
256
    JSC::JSValue jsStringOrUndefined(JSC::ExecState*, const KURL&); // undefined if the URL is null
256
    JSC::JSValue jsStringOrUndefined(JSC::ExecState*, const URL&); // undefined if the URL is null
257
257
258
    // See JavaScriptCore for explanation: Should be used for any string that is already owned by another
258
    // See JavaScriptCore for explanation: Should be used for any string that is already owned by another
259
    // object, to let the engine know that collecting the JSString wrapper is unlikely to save memory.
259
    // object, to let the engine know that collecting the JSString wrapper is unlikely to save memory.
- a/Source/WebCore/bindings/js/JSXMLHttpRequestCustom.cpp -1 / +1 lines
Lines 88-94 JSValue JSXMLHttpRequest::open(ExecState* exec) a/Source/WebCore/bindings/js/JSXMLHttpRequestCustom.cpp_sec1
88
    if (exec->argumentCount() < 2)
88
    if (exec->argumentCount() < 2)
89
        return exec->vm().throwException(exec, createNotEnoughArgumentsError(exec));
89
        return exec->vm().throwException(exec, createNotEnoughArgumentsError(exec));
90
90
91
    const KURL& url = impl()->scriptExecutionContext()->completeURL(exec->uncheckedArgument(1).toString(exec)->value(exec));
91
    const URL& url = impl()->scriptExecutionContext()->completeURL(exec->uncheckedArgument(1).toString(exec)->value(exec));
92
    String method = exec->uncheckedArgument(0).toString(exec)->value(exec);
92
    String method = exec->uncheckedArgument(0).toString(exec)->value(exec);
93
93
94
    ExceptionCode ec = 0;
94
    ExceptionCode ec = 0;
- a/Source/WebCore/bindings/js/ScriptController.h -1 / +1 lines
Lines 95-101 public: a/Source/WebCore/bindings/js/ScriptController.h_sec1
95
    ScriptValue executeScriptInWorld(DOMWrapperWorld*, const String& script, bool forceUserGesture = false);
95
    ScriptValue executeScriptInWorld(DOMWrapperWorld*, const String& script, bool forceUserGesture = false);
96
96
97
    // Returns true if argument is a JavaScript URL.
97
    // Returns true if argument is a JavaScript URL.
98
    bool executeIfJavaScriptURL(const KURL&, ShouldReplaceDocumentIfJavaScriptURL shouldReplaceDocumentIfJavaScriptURL = ReplaceDocumentIfJavaScriptURL);
98
    bool executeIfJavaScriptURL(const URL&, ShouldReplaceDocumentIfJavaScriptURL shouldReplaceDocumentIfJavaScriptURL = ReplaceDocumentIfJavaScriptURL);
99
99
100
    // This function must be called from the main thread. It is safe to call it repeatedly.
100
    // This function must be called from the main thread. It is safe to call it repeatedly.
101
    // Darwin is an exception to this rule: it is OK to call this function from any thread, even reentrantly.
101
    // Darwin is an exception to this rule: it is OK to call this function from any thread, even reentrantly.
- a/Source/WebCore/bindings/js/ScriptSourceCode.h -4 / +4 lines
Lines 34-40 a/Source/WebCore/bindings/js/ScriptSourceCode.h_sec1
34
#include "CachedResourceHandle.h"
34
#include "CachedResourceHandle.h"
35
#include "CachedScript.h"
35
#include "CachedScript.h"
36
#include "CachedScriptSourceProvider.h"
36
#include "CachedScriptSourceProvider.h"
37
#include "KURL.h"
37
#include "URL.h"
38
#include <parser/SourceProvider.h>
38
#include <parser/SourceProvider.h>
39
#include <wtf/text/TextPosition.h>
39
#include <wtf/text/TextPosition.h>
40
#include <wtf/RefPtr.h>
40
#include <wtf/RefPtr.h>
Lines 43-49 namespace WebCore { a/Source/WebCore/bindings/js/ScriptSourceCode.h_sec2
43
43
44
class ScriptSourceCode {
44
class ScriptSourceCode {
45
public:
45
public:
46
    ScriptSourceCode(const String& source, const KURL& url = KURL(), const TextPosition& startPosition = TextPosition::minimumPosition())
46
    ScriptSourceCode(const String& source, const URL& url = URL(), const TextPosition& startPosition = TextPosition::minimumPosition())
47
        : m_provider(JSC::StringSourceProvider::create(source, url.isNull() ? String() : url.string(), startPosition))
47
        : m_provider(JSC::StringSourceProvider::create(source, url.isNull() ? String() : url.string(), startPosition))
48
        , m_code(m_provider, startPosition.m_line.oneBasedInt(), startPosition.m_column.oneBasedInt())
48
        , m_code(m_provider, startPosition.m_line.oneBasedInt(), startPosition.m_column.oneBasedInt())
49
        , m_url(url)
49
        , m_url(url)
Lines 67-73 public: a/Source/WebCore/bindings/js/ScriptSourceCode.h_sec3
67
67
68
    CachedScript* cachedScript() const { return m_cachedScript.get(); }
68
    CachedScript* cachedScript() const { return m_cachedScript.get(); }
69
69
70
    const KURL& url() const { return m_url; }
70
    const URL& url() const { return m_url; }
71
    
71
    
72
private:
72
private:
73
    RefPtr<JSC::SourceProvider> m_provider;
73
    RefPtr<JSC::SourceProvider> m_provider;
Lines 76-82 private: a/Source/WebCore/bindings/js/ScriptSourceCode.h_sec4
76
76
77
    CachedResourceHandle<CachedScript> m_cachedScript;
77
    CachedResourceHandle<CachedScript> m_cachedScript;
78
78
79
    KURL m_url;
79
    URL m_url;
80
80
81
};
81
};
82
82
- a/Source/WebCore/bindings/js/SerializedScriptValue.cpp -2 / +2 lines
Lines 1383-1389 private: a/Source/WebCore/bindings/js/SerializedScriptValue.cpp_sec1
1383
        if (!readStringData(type))
1383
        if (!readStringData(type))
1384
            return 0;
1384
            return 0;
1385
        if (m_isDOMGlobalObject)
1385
        if (m_isDOMGlobalObject)
1386
            file = File::create(path->string(), KURL(KURL(), url->string()), type->string());
1386
            file = File::create(path->string(), URL(URL(), url->string()), type->string());
1387
        return true;
1387
        return true;
1388
    }
1388
    }
1389
1389
Lines 1577-1583 private: a/Source/WebCore/bindings/js/SerializedScriptValue.cpp_sec2
1577
                return JSValue();
1577
                return JSValue();
1578
            if (!m_isDOMGlobalObject)
1578
            if (!m_isDOMGlobalObject)
1579
                return jsNull();
1579
                return jsNull();
1580
            return getJSValue(Blob::create(KURL(KURL(), url->string()), type->string(), size).get());
1580
            return getJSValue(Blob::create(URL(URL(), url->string()), type->string(), size).get());
1581
        }
1581
        }
1582
        case StringTag: {
1582
        case StringTag: {
1583
            CachedStringRef cachedString;
1583
            CachedStringRef cachedString;
- a/Source/WebCore/bindings/scripts/CodeGeneratorCPP.pm -2 / +2 lines
Lines 290-296 sub AddIncludesForType a/Source/WebCore/bindings/scripts/CodeGeneratorCPP.pm_sec1
290
290
291
    if ($codeGenerator->IsStringType($type)) {
291
    if ($codeGenerator->IsStringType($type)) {
292
        $implIncludes{"wtf/text/AtomicString.h"} = 1;
292
        $implIncludes{"wtf/text/AtomicString.h"} = 1;
293
        $implIncludes{"KURL.h"} = 1;
293
        $implIncludes{"URL.h"} = 1;
294
        $implIncludes{"WebDOMString.h"} = 1;
294
        $implIncludes{"WebDOMString.h"} = 1;
295
        return;
295
        return;
296
    }
296
    }
Lines 573-579 sub AddReturnStatement a/Source/WebCore/bindings/scripts/CodeGeneratorCPP.pm_sec2
573
    my $typeInfo = shift;
573
    my $typeInfo = shift;
574
    my $returnValue = shift;
574
    my $returnValue = shift;
575
575
576
    # Used to invoke KURLs "const String&" operator
576
    # Used to invoke URLs "const String&" operator
577
    if ($codeGenerator->IsStringType($typeInfo->signature->type)) {
577
    if ($codeGenerator->IsStringType($typeInfo->signature->type)) {
578
        return "    return static_cast<const WTF::String&>($returnValue);\n";
578
        return "    return static_cast<const WTF::String&>($returnValue);\n";
579
    }
579
    }
- a/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm -2 / +2 lines
Lines 2501-2507 sub GenerateImplementation a/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm_sec1
2501
        push(@implContent, "    ${className}* thisObj = jsCast<$className*>(asObject(slotBase));\n");
2501
        push(@implContent, "    ${className}* thisObj = jsCast<$className*>(asObject(slotBase));\n");
2502
        push(@implContent, "    ASSERT_GC_OBJECT_INHERITS(thisObj, info());\n");
2502
        push(@implContent, "    ASSERT_GC_OBJECT_INHERITS(thisObj, info());\n");
2503
        if ($indexedGetterFunction->signature->type eq "DOMString") {
2503
        if ($indexedGetterFunction->signature->type eq "DOMString") {
2504
            $implIncludes{"KURL.h"} = 1;
2504
            $implIncludes{"URL.h"} = 1;
2505
            push(@implContent, "    return jsStringOrUndefined(exec, thisObj->impl()->item(index));\n");
2505
            push(@implContent, "    return jsStringOrUndefined(exec, thisObj->impl()->item(index));\n");
2506
        } else {
2506
        } else {
2507
            push(@implContent, "    return toJS(exec, thisObj->globalObject(), thisObj->impl()->item(index));\n");
2507
            push(@implContent, "    return toJS(exec, thisObj->globalObject(), thisObj->impl()->item(index));\n");
Lines 3436-3442 sub NativeToJSValue a/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm_sec2
3436
    }
3436
    }
3437
3437
3438
    if ($codeGenerator->IsStringType($type)) {
3438
    if ($codeGenerator->IsStringType($type)) {
3439
        AddToImplIncludes("KURL.h", $conditional);
3439
        AddToImplIncludes("URL.h", $conditional);
3440
        my $conv = $signature->extendedAttributes->{"TreatReturnedNullStringAs"};
3440
        my $conv = $signature->extendedAttributes->{"TreatReturnedNullStringAs"};
3441
        if (defined $conv) {
3441
        if (defined $conv) {
3442
            return "jsStringOrNull(exec, $value)" if $conv eq "Null";
3442
            return "jsStringOrNull(exec, $value)" if $conv eq "Null";
- a/Source/WebCore/bindings/scripts/CodeGeneratorObjC.pm -1 / +1 lines
Lines 618-624 sub AddIncludesForType a/Source/WebCore/bindings/scripts/CodeGeneratorObjC.pm_sec1
618
    }
618
    }
619
619
620
    if ($codeGenerator->IsStringType($type)) {
620
    if ($codeGenerator->IsStringType($type)) {
621
        $implIncludes{"KURL.h"} = 1;
621
        $implIncludes{"URL.h"} = 1;
622
        return;
622
        return;
623
    }
623
    }
624
624
- a/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestActiveDOMObject.cpp -1 / +1 lines
Lines 21-29 a/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestActiveDOMObject.cpp_sec1
21
#include "config.h"
21
#include "config.h"
22
#include "WebDOMTestActiveDOMObject.h"
22
#include "WebDOMTestActiveDOMObject.h"
23
23
24
#include "KURL.h"
25
#include "Node.h"
24
#include "Node.h"
26
#include "TestActiveDOMObject.h"
25
#include "TestActiveDOMObject.h"
26
#include "URL.h"
27
#include "WebDOMNode.h"
27
#include "WebDOMNode.h"
28
#include "WebDOMString.h"
28
#include "WebDOMString.h"
29
#include "WebExceptionHandler.h"
29
#include "WebExceptionHandler.h"
- a/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestCallback.cpp -1 / +1 lines
Lines 26-35 a/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestCallback.cpp_sec1
26
26
27
#include "DOMStringList.h"
27
#include "DOMStringList.h"
28
#include "Float32Array.h"
28
#include "Float32Array.h"
29
#include "KURL.h"
30
#include "SerializedScriptValue.h"
29
#include "SerializedScriptValue.h"
31
#include "TestCallback.h"
30
#include "TestCallback.h"
32
#include "TestNode.h"
31
#include "TestNode.h"
32
#include "URL.h"
33
#include "WebDOMDOMStringList.h"
33
#include "WebDOMDOMStringList.h"
34
#include "WebDOMFloat32Array.h"
34
#include "WebDOMFloat32Array.h"
35
#include "WebDOMString.h"
35
#include "WebDOMString.h"
- a/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestCustomNamedGetter.cpp -1 / +1 lines
Lines 21-28 a/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestCustomNamedGetter.cpp_sec1
21
#include "config.h"
21
#include "config.h"
22
#include "WebDOMTestCustomNamedGetter.h"
22
#include "WebDOMTestCustomNamedGetter.h"
23
23
24
#include "KURL.h"
25
#include "TestCustomNamedGetter.h"
24
#include "TestCustomNamedGetter.h"
25
#include "URL.h"
26
#include "WebDOMString.h"
26
#include "WebDOMString.h"
27
#include "WebExceptionHandler.h"
27
#include "WebExceptionHandler.h"
28
#include <wtf/GetPtr.h>
28
#include <wtf/GetPtr.h>
- a/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestEventConstructor.cpp -1 / +1 lines
Lines 21-28 a/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestEventConstructor.cpp_sec1
21
#include "config.h"
21
#include "config.h"
22
#include "WebDOMTestEventConstructor.h"
22
#include "WebDOMTestEventConstructor.h"
23
23
24
#include "KURL.h"
25
#include "TestEventConstructor.h"
24
#include "TestEventConstructor.h"
25
#include "URL.h"
26
#include "WebDOMString.h"
26
#include "WebDOMString.h"
27
#include "WebExceptionHandler.h"
27
#include "WebExceptionHandler.h"
28
#include <wtf/GetPtr.h>
28
#include <wtf/GetPtr.h>
- a/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestEventTarget.cpp -1 / +1 lines
Lines 22-30 a/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestEventTarget.cpp_sec1
22
#include "WebDOMTestEventTarget.h"
22
#include "WebDOMTestEventTarget.h"
23
23
24
#include "Event.h"
24
#include "Event.h"
25
#include "KURL.h"
26
#include "Node.h"
25
#include "Node.h"
27
#include "TestEventTarget.h"
26
#include "TestEventTarget.h"
27
#include "URL.h"
28
#include "WebDOMEvent.h"
28
#include "WebDOMEvent.h"
29
#include "WebDOMNode.h"
29
#include "WebDOMNode.h"
30
#include "WebDOMString.h"
30
#include "WebDOMString.h"
- a/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestException.cpp -1 / +1 lines
Lines 21-28 a/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestException.cpp_sec1
21
#include "config.h"
21
#include "config.h"
22
#include "WebDOMTestException.h"
22
#include "WebDOMTestException.h"
23
23
24
#include "KURL.h"
25
#include "TestException.h"
24
#include "TestException.h"
25
#include "URL.h"
26
#include "WebDOMString.h"
26
#include "WebDOMString.h"
27
#include "WebExceptionHandler.h"
27
#include "WebExceptionHandler.h"
28
#include <wtf/GetPtr.h>
28
#include <wtf/GetPtr.h>
- a/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestInterface.cpp -1 / +1 lines
Lines 24-33 a/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestInterface.cpp_sec1
24
24
25
#include "WebDOMTestInterface.h"
25
#include "WebDOMTestInterface.h"
26
26
27
#include "KURL.h"
28
#include "Node.h"
27
#include "Node.h"
29
#include "TestInterface.h"
28
#include "TestInterface.h"
30
#include "TestSupplemental.h"
29
#include "TestSupplemental.h"
30
#include "URL.h"
31
#include "WebDOMNode.h"
31
#include "WebDOMNode.h"
32
#include "WebDOMString.h"
32
#include "WebDOMString.h"
33
#include "WebExceptionHandler.h"
33
#include "WebExceptionHandler.h"
- a/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.cpp -1 / +1 lines
Lines 24-36 a/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.cpp_sec1
24
#include "Dictionary.h"
24
#include "Dictionary.h"
25
#include "Document.h"
25
#include "Document.h"
26
#include "HTMLNames.h"
26
#include "HTMLNames.h"
27
#include "KURL.h"
28
#include "Node.h"
27
#include "Node.h"
29
#include "SVGPoint.h"
28
#include "SVGPoint.h"
30
#include "SerializedScriptValue.h"
29
#include "SerializedScriptValue.h"
31
#include "TestEnumType.h"
30
#include "TestEnumType.h"
32
#include "TestNode.h"
31
#include "TestNode.h"
33
#include "TestObj.h"
32
#include "TestObj.h"
33
#include "URL.h"
34
#include "WebDOMDictionary.h"
34
#include "WebDOMDictionary.h"
35
#include "WebDOMDocument.h"
35
#include "WebDOMDocument.h"
36
#include "WebDOMNode.h"
36
#include "WebDOMNode.h"
- a/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestTypedefs.cpp -1 / +1 lines
Lines 21-30 a/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestTypedefs.cpp_sec1
21
#include "config.h"
21
#include "config.h"
22
#include "WebDOMTestTypedefs.h"
22
#include "WebDOMTestTypedefs.h"
23
23
24
#include "KURL.h"
25
#include "SVGPoint.h"
24
#include "SVGPoint.h"
26
#include "SerializedScriptValue.h"
25
#include "SerializedScriptValue.h"
27
#include "TestTypedefs.h"
26
#include "TestTypedefs.h"
27
#include "URL.h"
28
#include "WebDOMSVGPoint.h"
28
#include "WebDOMSVGPoint.h"
29
#include "WebDOMString.h"
29
#include "WebDOMString.h"
30
#include "WebExceptionHandler.h"
30
#include "WebExceptionHandler.h"
- a/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp -1 / +1 lines
Lines 22-29 a/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp_sec1
22
#include "JSTestEventConstructor.h"
22
#include "JSTestEventConstructor.h"
23
23
24
#include "JSDictionary.h"
24
#include "JSDictionary.h"
25
#include "KURL.h"
26
#include "TestEventConstructor.h"
25
#include "TestEventConstructor.h"
26
#include "URL.h"
27
#include <runtime/Error.h>
27
#include <runtime/Error.h>
28
#include <runtime/JSString.h>
28
#include <runtime/JSString.h>
29
#include <wtf/GetPtr.h>
29
#include <wtf/GetPtr.h>
- a/Source/WebCore/bindings/scripts/test/JS/JSTestException.cpp -1 / +1 lines
Lines 21-28 a/Source/WebCore/bindings/scripts/test/JS/JSTestException.cpp_sec1
21
#include "config.h"
21
#include "config.h"
22
#include "JSTestException.h"
22
#include "JSTestException.h"
23
23
24
#include "KURL.h"
25
#include "TestException.h"
24
#include "TestException.h"
25
#include "URL.h"
26
#include <runtime/JSString.h>
26
#include <runtime/JSString.h>
27
#include <wtf/GetPtr.h>
27
#include <wtf/GetPtr.h>
28
28
- a/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp -1 / +1 lines
Lines 35-41 a/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp_sec1
35
35
36
#if ENABLE(Condition11) || ENABLE(Condition12) || ENABLE(Condition22) || ENABLE(Condition23)
36
#if ENABLE(Condition11) || ENABLE(Condition12) || ENABLE(Condition22) || ENABLE(Condition23)
37
#include "JSNode.h"
37
#include "JSNode.h"
38
#include "KURL.h"
38
#include "URL.h"
39
#include <runtime/JSString.h>
39
#include <runtime/JSString.h>
40
#endif
40
#endif
41
41
- a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp -1 / +1 lines
Lines 41-47 a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec1
41
#include "JSTestObj.h"
41
#include "JSTestObj.h"
42
#include "JSTestSubObj.h"
42
#include "JSTestSubObj.h"
43
#include "JSbool.h"
43
#include "JSbool.h"
44
#include "KURL.h"
45
#include "SVGDocument.h"
44
#include "SVGDocument.h"
46
#include "SVGPoint.h"
45
#include "SVGPoint.h"
47
#include "SVGStaticPropertyTearOff.h"
46
#include "SVGStaticPropertyTearOff.h"
Lines 51-56 a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp_sec2
51
#include "SerializedScriptValue.h"
50
#include "SerializedScriptValue.h"
52
#include "Settings.h"
51
#include "Settings.h"
53
#include "TestObj.h"
52
#include "TestObj.h"
53
#include "URL.h"
54
#include "bool.h"
54
#include "bool.h"
55
#include <runtime/Error.h>
55
#include <runtime/Error.h>
56
#include <runtime/JSArray.h>
56
#include <runtime/JSArray.h>
- a/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp -1 / +1 lines
Lines 30-39 a/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp_sec1
30
#include "JSTestCallback.h"
30
#include "JSTestCallback.h"
31
#include "JSTestEventTarget.h"
31
#include "JSTestEventTarget.h"
32
#include "JSTestSubObj.h"
32
#include "JSTestSubObj.h"
33
#include "KURL.h"
34
#include "SVGPoint.h"
33
#include "SVGPoint.h"
35
#include "SerializedScriptValue.h"
34
#include "SerializedScriptValue.h"
36
#include "TestTypedefs.h"
35
#include "TestTypedefs.h"
36
#include "URL.h"
37
#include <runtime/Error.h>
37
#include <runtime/Error.h>
38
#include <runtime/JSArray.h>
38
#include <runtime/JSArray.h>
39
#include <runtime/JSString.h>
39
#include <runtime/JSString.h>
- a/Source/WebCore/bindings/scripts/test/ObjC/DOMTestActiveDOMObject.mm -1 / +1 lines
Lines 33-42 a/Source/WebCore/bindings/scripts/test/ObjC/DOMTestActiveDOMObject.mm_sec1
33
#import "DOMTestActiveDOMObjectInternal.h"
33
#import "DOMTestActiveDOMObjectInternal.h"
34
#import "ExceptionHandlers.h"
34
#import "ExceptionHandlers.h"
35
#import "JSMainThreadExecState.h"
35
#import "JSMainThreadExecState.h"
36
#import "KURL.h"
37
#import "Node.h"
36
#import "Node.h"
38
#import "TestActiveDOMObject.h"
37
#import "TestActiveDOMObject.h"
39
#import "ThreadCheck.h"
38
#import "ThreadCheck.h"
39
#import "URL.h"
40
#import "WebCoreObjCExtras.h"
40
#import "WebCoreObjCExtras.h"
41
#import "WebScriptObjectPrivate.h"
41
#import "WebScriptObjectPrivate.h"
42
#import <wtf/GetPtr.h>
42
#import <wtf/GetPtr.h>
- a/Source/WebCore/bindings/scripts/test/ObjC/DOMTestCallback.mm -1 / +1 lines
Lines 44-54 a/Source/WebCore/bindings/scripts/test/ObjC/DOMTestCallback.mm_sec1
44
#import "DOMTestNodeInternal.h"
44
#import "DOMTestNodeInternal.h"
45
#import "ExceptionHandlers.h"
45
#import "ExceptionHandlers.h"
46
#import "JSMainThreadExecState.h"
46
#import "JSMainThreadExecState.h"
47
#import "KURL.h"
48
#import "SerializedScriptValue.h"
47
#import "SerializedScriptValue.h"
49
#import "TestCallback.h"
48
#import "TestCallback.h"
50
#import "TestNode.h"
49
#import "TestNode.h"
51
#import "ThreadCheck.h"
50
#import "ThreadCheck.h"
51
#import "URL.h"
52
#import "WebCoreObjCExtras.h"
52
#import "WebCoreObjCExtras.h"
53
#import "WebScriptObjectPrivate.h"
53
#import "WebScriptObjectPrivate.h"
54
#import <wtf/GetPtr.h>
54
#import <wtf/GetPtr.h>
- a/Source/WebCore/bindings/scripts/test/ObjC/DOMTestCustomNamedGetter.mm -1 / +1 lines
Lines 33-41 a/Source/WebCore/bindings/scripts/test/ObjC/DOMTestCustomNamedGetter.mm_sec1
33
#import "DOMTestCustomNamedGetterInternal.h"
33
#import "DOMTestCustomNamedGetterInternal.h"
34
#import "ExceptionHandlers.h"
34
#import "ExceptionHandlers.h"
35
#import "JSMainThreadExecState.h"
35
#import "JSMainThreadExecState.h"
36
#import "KURL.h"
37
#import "TestCustomNamedGetter.h"
36
#import "TestCustomNamedGetter.h"
38
#import "ThreadCheck.h"
37
#import "ThreadCheck.h"
38
#import "URL.h"
39
#import "WebCoreObjCExtras.h"
39
#import "WebCoreObjCExtras.h"
40
#import "WebScriptObjectPrivate.h"
40
#import "WebScriptObjectPrivate.h"
41
#import <wtf/GetPtr.h>
41
#import <wtf/GetPtr.h>
- a/Source/WebCore/bindings/scripts/test/ObjC/DOMTestEventConstructor.mm -1 / +1 lines
Lines 34-42 a/Source/WebCore/bindings/scripts/test/ObjC/DOMTestEventConstructor.mm_sec1
34
#import "DOMTestEventConstructorInternal.h"
34
#import "DOMTestEventConstructorInternal.h"
35
#import "ExceptionHandlers.h"
35
#import "ExceptionHandlers.h"
36
#import "JSMainThreadExecState.h"
36
#import "JSMainThreadExecState.h"
37
#import "KURL.h"
38
#import "TestEventConstructor.h"
37
#import "TestEventConstructor.h"
39
#import "ThreadCheck.h"
38
#import "ThreadCheck.h"
39
#import "URL.h"
40
#import "WebCoreObjCExtras.h"
40
#import "WebCoreObjCExtras.h"
41
#import "WebScriptObjectPrivate.h"
41
#import "WebScriptObjectPrivate.h"
42
#import <wtf/GetPtr.h>
42
#import <wtf/GetPtr.h>
- a/Source/WebCore/bindings/scripts/test/ObjC/DOMTestEventTarget.mm -1 / +1 lines
Lines 36-46 a/Source/WebCore/bindings/scripts/test/ObjC/DOMTestEventTarget.mm_sec1
36
#import "EventListener.h"
36
#import "EventListener.h"
37
#import "ExceptionHandlers.h"
37
#import "ExceptionHandlers.h"
38
#import "JSMainThreadExecState.h"
38
#import "JSMainThreadExecState.h"
39
#import "KURL.h"
40
#import "Node.h"
39
#import "Node.h"
41
#import "ObjCEventListener.h"
40
#import "ObjCEventListener.h"
42
#import "TestEventTarget.h"
41
#import "TestEventTarget.h"
43
#import "ThreadCheck.h"
42
#import "ThreadCheck.h"
43
#import "URL.h"
44
#import "WebCoreObjCExtras.h"
44
#import "WebCoreObjCExtras.h"
45
#import "WebScriptObjectPrivate.h"
45
#import "WebScriptObjectPrivate.h"
46
#import <wtf/GetPtr.h>
46
#import <wtf/GetPtr.h>
- a/Source/WebCore/bindings/scripts/test/ObjC/DOMTestException.mm -1 / +1 lines
Lines 33-41 a/Source/WebCore/bindings/scripts/test/ObjC/DOMTestException.mm_sec1
33
#import "DOMTestExceptionInternal.h"
33
#import "DOMTestExceptionInternal.h"
34
#import "ExceptionHandlers.h"
34
#import "ExceptionHandlers.h"
35
#import "JSMainThreadExecState.h"
35
#import "JSMainThreadExecState.h"
36
#import "KURL.h"
37
#import "TestException.h"
36
#import "TestException.h"
38
#import "ThreadCheck.h"
37
#import "ThreadCheck.h"
38
#import "URL.h"
39
#import "WebCoreObjCExtras.h"
39
#import "WebCoreObjCExtras.h"
40
#import "WebScriptObjectPrivate.h"
40
#import "WebScriptObjectPrivate.h"
41
#import <wtf/GetPtr.h>
41
#import <wtf/GetPtr.h>
- a/Source/WebCore/bindings/scripts/test/ObjC/DOMTestInterface.mm -1 / +1 lines
Lines 37-48 a/Source/WebCore/bindings/scripts/test/ObjC/DOMTestInterface.mm_sec1
37
#import "DOMTestObjInternal.h"
37
#import "DOMTestObjInternal.h"
38
#import "ExceptionHandlers.h"
38
#import "ExceptionHandlers.h"
39
#import "JSMainThreadExecState.h"
39
#import "JSMainThreadExecState.h"
40
#import "KURL.h"
41
#import "Node.h"
40
#import "Node.h"
42
#import "TestInterface.h"
41
#import "TestInterface.h"
43
#import "TestObj.h"
42
#import "TestObj.h"
44
#import "TestSupplemental.h"
43
#import "TestSupplemental.h"
45
#import "ThreadCheck.h"
44
#import "ThreadCheck.h"
45
#import "URL.h"
46
#import "WebCoreObjCExtras.h"
46
#import "WebCoreObjCExtras.h"
47
#import "WebScriptObjectPrivate.h"
47
#import "WebScriptObjectPrivate.h"
48
#import <wtf/GetPtr.h>
48
#import <wtf/GetPtr.h>
- a/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm -1 / +1 lines
Lines 49-55 a/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm_sec1
49
#import "ExceptionHandlers.h"
49
#import "ExceptionHandlers.h"
50
#import "HTMLNames.h"
50
#import "HTMLNames.h"
51
#import "JSMainThreadExecState.h"
51
#import "JSMainThreadExecState.h"
52
#import "KURL.h"
53
#import "Node.h"
52
#import "Node.h"
54
#import "ObjCEventListener.h"
53
#import "ObjCEventListener.h"
55
#import "SVGDocument.h"
54
#import "SVGDocument.h"
Lines 64-69 a/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm_sec2
64
#import "TestObjectCConstructor.h"
63
#import "TestObjectCConstructor.h"
65
#import "TestSubObjConstructor.h"
64
#import "TestSubObjConstructor.h"
66
#import "ThreadCheck.h"
65
#import "ThreadCheck.h"
66
#import "URL.h"
67
#import "WebCoreObjCExtras.h"
67
#import "WebCoreObjCExtras.h"
68
#import "WebScriptObjectPrivate.h"
68
#import "WebScriptObjectPrivate.h"
69
#import "any.h"
69
#import "any.h"
- a/Source/WebCore/bindings/scripts/test/ObjC/DOMTestTypedefs.mm -1 / +1 lines
Lines 34-44 a/Source/WebCore/bindings/scripts/test/ObjC/DOMTestTypedefs.mm_sec1
34
#import "DOMTestTypedefsInternal.h"
34
#import "DOMTestTypedefsInternal.h"
35
#import "ExceptionHandlers.h"
35
#import "ExceptionHandlers.h"
36
#import "JSMainThreadExecState.h"
36
#import "JSMainThreadExecState.h"
37
#import "KURL.h"
38
#import "SVGPoint.h"
37
#import "SVGPoint.h"
39
#import "SerializedScriptValue.h"
38
#import "SerializedScriptValue.h"
40
#import "TestTypedefs.h"
39
#import "TestTypedefs.h"
41
#import "ThreadCheck.h"
40
#import "ThreadCheck.h"
41
#import "URL.h"
42
#import "WebCoreObjCExtras.h"
42
#import "WebCoreObjCExtras.h"
43
#import "WebScriptObjectPrivate.h"
43
#import "WebScriptObjectPrivate.h"
44
#import <wtf/GetPtr.h>
44
#import <wtf/GetPtr.h>
- a/Source/WebCore/css/CSSCursorImageValue.cpp -1 / +1 lines
Lines 190-196 bool CSSCursorImageValue::isSVGCursor() const a/Source/WebCore/css/CSSCursorImageValue.cpp_sec1
190
{
190
{
191
    if (m_imageValue->isImageValue()) {
191
    if (m_imageValue->isImageValue()) {
192
        RefPtr<CSSImageValue> imageValue = static_cast<CSSImageValue*>(m_imageValue.get());
192
        RefPtr<CSSImageValue> imageValue = static_cast<CSSImageValue*>(m_imageValue.get());
193
        KURL kurl(ParsedURLString, imageValue->url());
193
        URL kurl(ParsedURLString, imageValue->url());
194
        return kurl.hasFragmentIdentifier();
194
        return kurl.hasFragmentIdentifier();
195
    }
195
    }
196
    return false;
196
    return false;
- a/Source/WebCore/css/CSSFontFaceSrcValue.cpp -1 / +1 lines
Lines 80-86 String CSSFontFaceSrcValue::customCSSText() const a/Source/WebCore/css/CSSFontFaceSrcValue.cpp_sec1
80
    return result.toString();
80
    return result.toString();
81
}
81
}
82
82
83
void CSSFontFaceSrcValue::addSubresourceStyleURLs(ListHashSet<KURL>& urls, const StyleSheetContents* styleSheet) const
83
void CSSFontFaceSrcValue::addSubresourceStyleURLs(ListHashSet<URL>& urls, const StyleSheetContents* styleSheet) const
84
{
84
{
85
    if (!isLocal())
85
    if (!isLocal())
86
        addSubresourceURL(urls, styleSheet->completeURL(m_resource));
86
        addSubresourceURL(urls, styleSheet->completeURL(m_resource));
- a/Source/WebCore/css/CSSFontFaceSrcValue.h -1 / +1 lines
Lines 65-71 public: a/Source/WebCore/css/CSSFontFaceSrcValue.h_sec1
65
65
66
    String customCSSText() const;
66
    String customCSSText() const;
67
67
68
    void addSubresourceStyleURLs(ListHashSet<KURL>&, const StyleSheetContents*) const;
68
    void addSubresourceStyleURLs(ListHashSet<URL>&, const StyleSheetContents*) const;
69
69
70
    bool hasFailedOrCanceledSubresources() const;
70
    bool hasFailedOrCanceledSubresources() const;
71
71
- a/Source/WebCore/css/CSSParser.cpp -9 / +9 lines
Lines 254-260 const CSSParserContext& strictCSSParserContext() a/Source/WebCore/css/CSSParser.cpp_sec1
254
    return strictContext;
254
    return strictContext;
255
}
255
}
256
256
257
CSSParserContext::CSSParserContext(CSSParserMode mode, const KURL& baseURL)
257
CSSParserContext::CSSParserContext(CSSParserMode mode, const URL& baseURL)
258
    : baseURL(baseURL)
258
    : baseURL(baseURL)
259
    , mode(mode)
259
    , mode(mode)
260
    , isHTMLDocument(false)
260
    , isHTMLDocument(false)
Lines 272-278 CSSParserContext::CSSParserContext(CSSParserMode mode, const KURL& baseURL) a/Source/WebCore/css/CSSParser.cpp_sec2
272
{
272
{
273
}
273
}
274
274
275
CSSParserContext::CSSParserContext(Document& document, const KURL& baseURL, const String& charset)
275
CSSParserContext::CSSParserContext(Document& document, const URL& baseURL, const String& charset)
276
    : baseURL(baseURL.isNull() ? document.baseURL() : baseURL)
276
    : baseURL(baseURL.isNull() ? document.baseURL() : baseURL)
277
    , charset(charset)
277
    , charset(charset)
278
    , mode(document.inQuirksMode() ? CSSQuirksMode : CSSStrictMode)
278
    , mode(document.inQuirksMode() ? CSSQuirksMode : CSSStrictMode)
Lines 1615-1630 void CSSParser::clearProperties() a/Source/WebCore/css/CSSParser.cpp_sec3
1615
    m_hasFontFaceOnlyValues = false;
1615
    m_hasFontFaceOnlyValues = false;
1616
}
1616
}
1617
1617
1618
KURL CSSParser::completeURL(const CSSParserContext& context, const String& url)
1618
URL CSSParser::completeURL(const CSSParserContext& context, const String& url)
1619
{
1619
{
1620
    if (url.isNull())
1620
    if (url.isNull())
1621
        return KURL();
1621
        return URL();
1622
    if (context.charset.isEmpty())
1622
    if (context.charset.isEmpty())
1623
        return KURL(context.baseURL, url);
1623
        return URL(context.baseURL, url);
1624
    return KURL(context.baseURL, url, context.charset);
1624
    return URL(context.baseURL, url, context.charset);
1625
}
1625
}
1626
1626
1627
KURL CSSParser::completeURL(const String& url) const
1627
URL CSSParser::completeURL(const String& url) const
1628
{
1628
{
1629
    return completeURL(m_context, url);
1629
    return completeURL(m_context, url);
1630
}
1630
}
Lines 8784-8790 PassRefPtr<WebKitCSSMixFunctionValue> CSSParser::parseMixFunction(CSSParserValue a/Source/WebCore/css/CSSParser.cpp_sec4
8784
        unsigned argNumber = argsList->currentIndex();
8784
        unsigned argNumber = argsList->currentIndex();
8785
        if (!argNumber) {
8785
        if (!argNumber) {
8786
            if (arg->unit == CSSPrimitiveValue::CSS_URI) {
8786
            if (arg->unit == CSSPrimitiveValue::CSS_URI) {
8787
                KURL shaderURL = completeURL(arg->string);
8787
                URL shaderURL = completeURL(arg->string);
8788
                value = WebKitCSSShaderValue::create(shaderURL.string());
8788
                value = WebKitCSSShaderValue::create(shaderURL.string());
8789
            }
8789
            }
8790
        } else if (argNumber == 1 || argNumber == 2) {
8790
        } else if (argNumber == 1 || argNumber == 2) {
Lines 8974-8980 PassRefPtr<WebKitCSSFilterValue> CSSParser::parseCustomFilterFunctionWithInlineS a/Source/WebCore/css/CSSParser.cpp_sec5
8974
        if (arg->id == CSSValueNone)
8974
        if (arg->id == CSSValueNone)
8975
            value = cssValuePool().createIdentifierValue(CSSValueNone);
8975
            value = cssValuePool().createIdentifierValue(CSSValueNone);
8976
        else if (arg->unit == CSSPrimitiveValue::CSS_URI) {
8976
        else if (arg->unit == CSSPrimitiveValue::CSS_URI) {
8977
            KURL shaderURL = completeURL(arg->string);
8977
            URL shaderURL = completeURL(arg->string);
8978
            value = WebKitCSSShaderValue::create(shaderURL.string());
8978
            value = WebKitCSSShaderValue::create(shaderURL.string());
8979
            hadAtLeastOneCustomShader = true;
8979
            hadAtLeastOneCustomShader = true;
8980
        } else if (argsList->currentIndex() == 1 && arg->unit == CSSParserValue::Function) {
8980
        } else if (argsList->currentIndex() == 1 && arg->unit == CSSParserValue::Function) {
- a/Source/WebCore/css/CSSParser.h -2 / +2 lines
Lines 422-428 public: a/Source/WebCore/css/CSSParser.h_sec1
422
    PassRefPtr<CSSPrimitiveValue> createPrimitiveVariableNameValue(CSSParserValue*);
422
    PassRefPtr<CSSPrimitiveValue> createPrimitiveVariableNameValue(CSSParserValue*);
423
#endif
423
#endif
424
424
425
    static KURL completeURL(const CSSParserContext&, const String& url);
425
    static URL completeURL(const CSSParserContext&, const String& url);
426
426
427
    Location currentLocation();
427
    Location currentLocation();
428
428
Lines 502-508 private: a/Source/WebCore/css/CSSParser.h_sec2
502
    inline bool inStrictMode() const { return m_context.mode == CSSStrictMode || m_context.mode == SVGAttributeMode; }
502
    inline bool inStrictMode() const { return m_context.mode == CSSStrictMode || m_context.mode == SVGAttributeMode; }
503
    inline bool inQuirksMode() const { return m_context.mode == CSSQuirksMode; }
503
    inline bool inQuirksMode() const { return m_context.mode == CSSQuirksMode; }
504
    
504
    
505
    KURL completeURL(const String& url) const;
505
    URL completeURL(const String& url) const;
506
506
507
    void recheckAtKeyword(const UChar* str, int len);
507
    void recheckAtKeyword(const UChar* str, int len);
508
508
- a/Source/WebCore/css/CSSParserMode.h -4 / +4 lines
Lines 31-37 a/Source/WebCore/css/CSSParserMode.h_sec1
31
#ifndef CSSParserMode_h
31
#ifndef CSSParserMode_h
32
#define CSSParserMode_h
32
#define CSSParserMode_h
33
33
34
#include "KURL.h"
34
#include "URL.h"
35
35
36
namespace WebCore {
36
namespace WebCore {
37
37
Lines 57-66 inline bool isStrictParserMode(CSSParserMode cssParserMode) a/Source/WebCore/css/CSSParserMode.h_sec2
57
struct CSSParserContext {
57
struct CSSParserContext {
58
    WTF_MAKE_FAST_ALLOCATED;
58
    WTF_MAKE_FAST_ALLOCATED;
59
public:
59
public:
60
    CSSParserContext(CSSParserMode, const KURL& baseURL = KURL());
60
    CSSParserContext(CSSParserMode, const URL& baseURL = URL());
61
    CSSParserContext(Document&, const KURL& baseURL = KURL(), const String& charset = emptyString());
61
    CSSParserContext(Document&, const URL& baseURL = URL(), const String& charset = emptyString());
62
62
63
    KURL baseURL;
63
    URL baseURL;
64
    String charset;
64
    String charset;
65
    CSSParserMode mode;
65
    CSSParserMode mode;
66
    bool isHTMLDocument;
66
    bool isHTMLDocument;
- a/Source/WebCore/css/CSSPrimitiveValue.cpp -1 / +1 lines
Lines 1203-1209 bool CSSPrimitiveValue::hasVariableReference() const a/Source/WebCore/css/CSSPrimitiveValue.cpp_sec1
1203
}
1203
}
1204
#endif
1204
#endif
1205
1205
1206
void CSSPrimitiveValue::addSubresourceStyleURLs(ListHashSet<KURL>& urls, const StyleSheetContents* styleSheet) const
1206
void CSSPrimitiveValue::addSubresourceStyleURLs(ListHashSet<URL>& urls, const StyleSheetContents* styleSheet) const
1207
{
1207
{
1208
    if (m_primitiveUnitType == CSS_URI)
1208
    if (m_primitiveUnitType == CSS_URI)
1209
        addSubresourceURL(urls, styleSheet->completeURL(m_value.string));
1209
        addSubresourceURL(urls, styleSheet->completeURL(m_value.string));
- a/Source/WebCore/css/CSSPrimitiveValue.h -1 / +1 lines
Lines 330-336 public: a/Source/WebCore/css/CSSPrimitiveValue.h_sec1
330
330
331
    bool isQuirkValue() { return m_isQuirkValue; }
331
    bool isQuirkValue() { return m_isQuirkValue; }
332
332
333
    void addSubresourceStyleURLs(ListHashSet<KURL>&, const StyleSheetContents*) const;
333
    void addSubresourceStyleURLs(ListHashSet<URL>&, const StyleSheetContents*) const;
334
334
335
    Length viewportPercentageLength() const;
335
    Length viewportPercentageLength() const;
336
    
336
    
- a/Source/WebCore/css/CSSReflectValue.cpp -1 / +1 lines
Lines 49-55 String CSSReflectValue::customSerializeResolvingVariables(const HashMap<AtomicSt a/Source/WebCore/css/CSSReflectValue.cpp_sec1
49
}
49
}
50
#endif
50
#endif
51
51
52
void CSSReflectValue::addSubresourceStyleURLs(ListHashSet<KURL>& urls, const StyleSheetContents* styleSheet) const
52
void CSSReflectValue::addSubresourceStyleURLs(ListHashSet<URL>& urls, const StyleSheetContents* styleSheet) const
53
{
53
{
54
    if (m_mask)
54
    if (m_mask)
55
        m_mask->addSubresourceStyleURLs(urls, styleSheet);
55
        m_mask->addSubresourceStyleURLs(urls, styleSheet);
- a/Source/WebCore/css/CSSReflectValue.h -1 / +1 lines
Lines 52-58 public: a/Source/WebCore/css/CSSReflectValue.h_sec1
52
    String customSerializeResolvingVariables(const HashMap<AtomicString, String>&) const;
52
    String customSerializeResolvingVariables(const HashMap<AtomicString, String>&) const;
53
#endif
53
#endif
54
54
55
    void addSubresourceStyleURLs(ListHashSet<KURL>&, const StyleSheetContents*) const;
55
    void addSubresourceStyleURLs(ListHashSet<URL>&, const StyleSheetContents*) const;
56
56
57
    bool equals(const CSSReflectValue&) const;
57
    bool equals(const CSSReflectValue&) const;
58
58
- a/Source/WebCore/css/CSSStyleSheet.cpp -3 / +3 lines
Lines 84-90 PassRefPtr<CSSStyleSheet> CSSStyleSheet::create(PassRefPtr<StyleSheetContents> s a/Source/WebCore/css/CSSStyleSheet.cpp_sec1
84
    return adoptRef(new CSSStyleSheet(sheet, ownerNode, false));
84
    return adoptRef(new CSSStyleSheet(sheet, ownerNode, false));
85
}
85
}
86
86
87
PassRefPtr<CSSStyleSheet> CSSStyleSheet::createInline(Node& ownerNode, const KURL& baseURL, const String& encoding)
87
PassRefPtr<CSSStyleSheet> CSSStyleSheet::createInline(Node& ownerNode, const URL& baseURL, const String& encoding)
88
{
88
{
89
    CSSParserContext parserContext(ownerNode.document(), baseURL, encoding);
89
    CSSParserContext parserContext(ownerNode.document(), baseURL, encoding);
90
    RefPtr<StyleSheetContents> sheet = StyleSheetContents::create(baseURL.string(), parserContext);
90
    RefPtr<StyleSheetContents> sheet = StyleSheetContents::create(baseURL.string(), parserContext);
Lines 251-257 bool CSSStyleSheet::canAccessRules() const a/Source/WebCore/css/CSSStyleSheet.cpp_sec2
251
{
251
{
252
    if (m_isInlineStylesheet)
252
    if (m_isInlineStylesheet)
253
        return true;
253
        return true;
254
    KURL baseURL = m_contents->baseURL();
254
    URL baseURL = m_contents->baseURL();
255
    if (baseURL.isEmpty())
255
    if (baseURL.isEmpty())
256
        return true;
256
        return true;
257
    Document* document = ownerDocument();
257
    Document* document = ownerDocument();
Lines 363-369 String CSSStyleSheet::href() const a/Source/WebCore/css/CSSStyleSheet.cpp_sec3
363
    return m_contents->originalURL();
363
    return m_contents->originalURL();
364
}
364
}
365
365
366
KURL CSSStyleSheet::baseURL() const
366
URL CSSStyleSheet::baseURL() const
367
{
367
{
368
    return m_contents->baseURL();
368
    return m_contents->baseURL();
369
}
369
}
- a/Source/WebCore/css/CSSStyleSheet.h -2 / +2 lines
Lines 48-54 class CSSStyleSheet FINAL : public StyleSheet { a/Source/WebCore/css/CSSStyleSheet.h_sec1
48
public:
48
public:
49
    static PassRefPtr<CSSStyleSheet> create(PassRefPtr<StyleSheetContents>, CSSImportRule* ownerRule = 0);
49
    static PassRefPtr<CSSStyleSheet> create(PassRefPtr<StyleSheetContents>, CSSImportRule* ownerRule = 0);
50
    static PassRefPtr<CSSStyleSheet> create(PassRefPtr<StyleSheetContents>, Node* ownerNode);
50
    static PassRefPtr<CSSStyleSheet> create(PassRefPtr<StyleSheetContents>, Node* ownerNode);
51
    static PassRefPtr<CSSStyleSheet> createInline(Node&, const KURL&, const String& encoding = String());
51
    static PassRefPtr<CSSStyleSheet> createInline(Node&, const URL&, const String& encoding = String());
52
52
53
    virtual ~CSSStyleSheet();
53
    virtual ~CSSStyleSheet();
54
54
Lines 76-82 public: a/Source/WebCore/css/CSSStyleSheet.h_sec2
76
76
77
    virtual void clearOwnerNode() OVERRIDE;
77
    virtual void clearOwnerNode() OVERRIDE;
78
    virtual CSSImportRule* ownerRule() const OVERRIDE { return m_ownerRule; }
78
    virtual CSSImportRule* ownerRule() const OVERRIDE { return m_ownerRule; }
79
    virtual KURL baseURL() const OVERRIDE;
79
    virtual URL baseURL() const OVERRIDE;
80
    virtual bool isLoading() const OVERRIDE;
80
    virtual bool isLoading() const OVERRIDE;
81
    
81
    
82
    void clearOwnerRule() { m_ownerRule = 0; }
82
    void clearOwnerRule() { m_ownerRule = 0; }
- a/Source/WebCore/css/CSSValue.cpp -1 / +1 lines
Lines 111-117 CSSValue::Type CSSValue::cssValueType() const a/Source/WebCore/css/CSSValue.cpp_sec1
111
    return CSS_CUSTOM;
111
    return CSS_CUSTOM;
112
}
112
}
113
113
114
void CSSValue::addSubresourceStyleURLs(ListHashSet<KURL>& urls, const StyleSheetContents* styleSheet) const
114
void CSSValue::addSubresourceStyleURLs(ListHashSet<URL>& urls, const StyleSheetContents* styleSheet) const
115
{
115
{
116
    // This should get called for internal instances only.
116
    // This should get called for internal instances only.
117
    ASSERT(!isCSSOMSafe());
117
    ASSERT(!isCSSOMSafe());
- a/Source/WebCore/css/CSSValue.h -2 / +2 lines
Lines 22-28 a/Source/WebCore/css/CSSValue.h_sec1
22
#define CSSValue_h
22
#define CSSValue_h
23
23
24
#include "ExceptionCode.h"
24
#include "ExceptionCode.h"
25
#include "KURLHash.h"
25
#include "URLHash.h"
26
#include <wtf/ListHashSet.h>
26
#include <wtf/ListHashSet.h>
27
#include <wtf/RefCounted.h>
27
#include <wtf/RefCounted.h>
28
#include <wtf/RefPtr.h>
28
#include <wtf/RefPtr.h>
Lines 122-128 public: a/Source/WebCore/css/CSSValue.h_sec2
122
122
123
    PassRefPtr<CSSValue> cloneForCSSOM() const;
123
    PassRefPtr<CSSValue> cloneForCSSOM() const;
124
124
125
    void addSubresourceStyleURLs(ListHashSet<KURL>&, const StyleSheetContents*) const;
125
    void addSubresourceStyleURLs(ListHashSet<URL>&, const StyleSheetContents*) const;
126
126
127
    bool hasFailedOrCanceledSubresources() const;
127
    bool hasFailedOrCanceledSubresources() const;
128
128
- a/Source/WebCore/css/CSSValueList.cpp -1 / +1 lines
Lines 167-173 String CSSValueList::customSerializeResolvingVariables(const HashMap<AtomicStrin a/Source/WebCore/css/CSSValueList.cpp_sec1
167
}
167
}
168
#endif
168
#endif
169
169
170
void CSSValueList::addSubresourceStyleURLs(ListHashSet<KURL>& urls, const StyleSheetContents* styleSheet) const
170
void CSSValueList::addSubresourceStyleURLs(ListHashSet<URL>& urls, const StyleSheetContents* styleSheet) const
171
{
171
{
172
    size_t size = m_values.size();
172
    size_t size = m_values.size();
173
    for (size_t i = 0; i < size; ++i)
173
    for (size_t i = 0; i < size; ++i)
- a/Source/WebCore/css/CSSValueList.h -1 / +1 lines
Lines 66-72 public: a/Source/WebCore/css/CSSValueList.h_sec1
66
    String customSerializeResolvingVariables(const HashMap<AtomicString, String>&) const;
66
    String customSerializeResolvingVariables(const HashMap<AtomicString, String>&) const;
67
#endif
67
#endif
68
68
69
    void addSubresourceStyleURLs(ListHashSet<KURL>&, const StyleSheetContents*) const;
69
    void addSubresourceStyleURLs(ListHashSet<URL>&, const StyleSheetContents*) const;
70
70
71
    bool hasFailedOrCanceledSubresources() const;
71
    bool hasFailedOrCanceledSubresources() const;
72
    
72
    
- a/Source/WebCore/css/DeprecatedStyleBuilder.cpp -1 / +1 lines
Lines 1998-2004 public: a/Source/WebCore/css/DeprecatedStyleBuilder.cpp_sec1
1998
#if ENABLE(SVG)
1998
#if ENABLE(SVG)
1999
            else if (primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_URI) {
1999
            else if (primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_URI) {
2000
                String cssURLValue = primitiveValue->getStringValue();
2000
                String cssURLValue = primitiveValue->getStringValue();
2001
                KURL url = styleResolver->document().completeURL(cssURLValue);
2001
                URL url = styleResolver->document().completeURL(cssURLValue);
2002
                // FIXME: It doesn't work with forward or external SVG references (see https://bugs.webkit.org/show_bug.cgi?id=90405)
2002
                // FIXME: It doesn't work with forward or external SVG references (see https://bugs.webkit.org/show_bug.cgi?id=90405)
2003
                setValue(styleResolver->style(), ReferenceClipPathOperation::create(cssURLValue, url.fragmentIdentifier()));
2003
                setValue(styleResolver->style(), ReferenceClipPathOperation::create(cssURLValue, url.fragmentIdentifier()));
2004
            }
2004
            }
- a/Source/WebCore/css/StylePropertySet.cpp -1 / +1 lines
Lines 1041-1047 void MutableStylePropertySet::mergeAndOverrideOnConflict(const StylePropertySet& a/Source/WebCore/css/StylePropertySet.cpp_sec1
1041
        addParsedProperty(other.propertyAt(i).toCSSProperty());
1041
        addParsedProperty(other.propertyAt(i).toCSSProperty());
1042
}
1042
}
1043
1043
1044
void StylePropertySet::addSubresourceStyleURLs(ListHashSet<KURL>& urls, StyleSheetContents* contextStyleSheet) const
1044
void StylePropertySet::addSubresourceStyleURLs(ListHashSet<URL>& urls, StyleSheetContents* contextStyleSheet) const
1045
{
1045
{
1046
    unsigned size = propertyCount();
1046
    unsigned size = propertyCount();
1047
    for (unsigned i = 0; i < size; ++i)
1047
    for (unsigned i = 0; i < size; ++i)
- a/Source/WebCore/css/StylePropertySet.h -2 / +2 lines
Lines 37-43 class CSSRule; a/Source/WebCore/css/StylePropertySet.h_sec1
37
class CSSStyleDeclaration;
37
class CSSStyleDeclaration;
38
class ComputedStyleExtractor;
38
class ComputedStyleExtractor;
39
class ImmutableStylePropertySet;
39
class ImmutableStylePropertySet;
40
class KURL;
40
class URL;
41
class MutableStylePropertySet;
41
class MutableStylePropertySet;
42
class PropertySetCSSStyleDeclaration;
42
class PropertySetCSSStyleDeclaration;
43
class StyledElement;
43
class StyledElement;
Lines 98-104 public: a/Source/WebCore/css/StylePropertySet.h_sec2
98
98
99
    CSSParserMode cssParserMode() const { return static_cast<CSSParserMode>(m_cssParserMode); }
99
    CSSParserMode cssParserMode() const { return static_cast<CSSParserMode>(m_cssParserMode); }
100
100
101
    void addSubresourceStyleURLs(ListHashSet<KURL>&, StyleSheetContents* contextStyleSheet) const;
101
    void addSubresourceStyleURLs(ListHashSet<URL>&, StyleSheetContents* contextStyleSheet) const;
102
102
103
    PassRefPtr<MutableStylePropertySet> mutableCopy() const;
103
    PassRefPtr<MutableStylePropertySet> mutableCopy() const;
104
    PassRefPtr<ImmutableStylePropertySet> immutableCopyIfNeeded() const;
104
    PassRefPtr<ImmutableStylePropertySet> immutableCopyIfNeeded() const;
- a/Source/WebCore/css/StyleResolver.cpp -3 / +3 lines
Lines 3420-3427 PassRefPtr<CustomFilterProgram> StyleResolver::lookupCustomFilterProgram(WebKitC a/Source/WebCore/css/StyleResolver.cpp_sec1
3420
    CustomFilterProgramType programType, const CustomFilterProgramMixSettings& mixSettings, CustomFilterMeshType meshType)
3420
    CustomFilterProgramType programType, const CustomFilterProgramMixSettings& mixSettings, CustomFilterMeshType meshType)
3421
{
3421
{
3422
    CachedResourceLoader* cachedResourceLoader = m_state.document().cachedResourceLoader();
3422
    CachedResourceLoader* cachedResourceLoader = m_state.document().cachedResourceLoader();
3423
    KURL vertexShaderURL = vertexShader ? vertexShader->completeURL(cachedResourceLoader) : KURL();
3423
    URL vertexShaderURL = vertexShader ? vertexShader->completeURL(cachedResourceLoader) : URL();
3424
    KURL fragmentShaderURL = fragmentShader ? fragmentShader->completeURL(cachedResourceLoader) : KURL();
3424
    URL fragmentShaderURL = fragmentShader ? fragmentShader->completeURL(cachedResourceLoader) : URL();
3425
    RefPtr<StyleCustomFilterProgram> program;
3425
    RefPtr<StyleCustomFilterProgram> program;
3426
    if (m_customFilterProgramCache)
3426
    if (m_customFilterProgramCache)
3427
        program = m_customFilterProgramCache->lookup(CustomFilterProgramInfo(vertexShaderURL, fragmentShaderURL, programType, mixSettings, meshType));
3427
        program = m_customFilterProgramCache->lookup(CustomFilterProgramInfo(vertexShaderURL, fragmentShaderURL, programType, mixSettings, meshType));
Lines 3788-3794 bool StyleResolver::createFilterOperations(CSSValue* inValue, FilterOperations& a/Source/WebCore/css/StyleResolver.cpp_sec2
3788
                continue;
3788
                continue;
3789
3789
3790
            WebKitCSSSVGDocumentValue* svgDocumentValue = static_cast<WebKitCSSSVGDocumentValue*>(argument);
3790
            WebKitCSSSVGDocumentValue* svgDocumentValue = static_cast<WebKitCSSSVGDocumentValue*>(argument);
3791
            KURL url = m_state.document().completeURL(svgDocumentValue->url());
3791
            URL url = m_state.document().completeURL(svgDocumentValue->url());
3792
3792
3793
            RefPtr<ReferenceFilterOperation> operation = ReferenceFilterOperation::create(svgDocumentValue->url(), url.fragmentIdentifier(), operationType);
3793
            RefPtr<ReferenceFilterOperation> operation = ReferenceFilterOperation::create(svgDocumentValue->url(), url.fragmentIdentifier(), operationType);
3794
            if (SVGURIReference::isExternalURIReference(svgDocumentValue->url(), m_state.document())) {
3794
            if (SVGURIReference::isExternalURIReference(svgDocumentValue->url(), m_state.document())) {
- a/Source/WebCore/css/StyleResolver.h -1 / +1 lines
Lines 77-83 class DeprecatedStyleBuilder; a/Source/WebCore/css/StyleResolver.h_sec1
77
class Element;
77
class Element;
78
class Frame;
78
class Frame;
79
class FrameView;
79
class FrameView;
80
class KURL;
80
class URL;
81
class KeyframeList;
81
class KeyframeList;
82
class KeyframeValue;
82
class KeyframeValue;
83
class MediaQueryEvaluator;
83
class MediaQueryEvaluator;
- a/Source/WebCore/css/StyleRuleImport.cpp -3 / +3 lines
Lines 60-66 StyleRuleImport::~StyleRuleImport() a/Source/WebCore/css/StyleRuleImport.cpp_sec1
60
        m_cachedSheet->removeClient(&m_styleSheetClient);
60
        m_cachedSheet->removeClient(&m_styleSheetClient);
61
}
61
}
62
62
63
void StyleRuleImport::setCSSStyleSheet(const String& href, const KURL& baseURL, const String& charset, const CachedCSSStyleSheet* cachedStyleSheet)
63
void StyleRuleImport::setCSSStyleSheet(const String& href, const URL& baseURL, const String& charset, const CachedCSSStyleSheet* cachedStyleSheet)
64
{
64
{
65
    if (m_styleSheet)
65
    if (m_styleSheet)
66
        m_styleSheet->clearOwnerRule();
66
        m_styleSheet->clearOwnerRule();
Lines 100-109 void StyleRuleImport::requestStyleSheet() a/Source/WebCore/css/StyleRuleImport.cpp_sec2
100
    if (!cachedResourceLoader)
100
    if (!cachedResourceLoader)
101
        return;
101
        return;
102
102
103
    KURL absURL;
103
    URL absURL;
104
    if (!m_parentStyleSheet->baseURL().isNull())
104
    if (!m_parentStyleSheet->baseURL().isNull())
105
        // use parent styleheet's URL as the base URL
105
        // use parent styleheet's URL as the base URL
106
        absURL = KURL(m_parentStyleSheet->baseURL(), m_strHref);
106
        absURL = URL(m_parentStyleSheet->baseURL(), m_strHref);
107
    else
107
    else
108
        absURL = document->completeURL(m_strHref);
108
        absURL = document->completeURL(m_strHref);
109
109
- a/Source/WebCore/css/StyleRuleImport.h -2 / +2 lines
Lines 58-64 private: a/Source/WebCore/css/StyleRuleImport.h_sec1
58
    public:
58
    public:
59
        ImportedStyleSheetClient(StyleRuleImport* ownerRule) : m_ownerRule(ownerRule) { }
59
        ImportedStyleSheetClient(StyleRuleImport* ownerRule) : m_ownerRule(ownerRule) { }
60
        virtual ~ImportedStyleSheetClient() { }
60
        virtual ~ImportedStyleSheetClient() { }
61
        virtual void setCSSStyleSheet(const String& href, const KURL& baseURL, const String& charset, const CachedCSSStyleSheet* sheet)
61
        virtual void setCSSStyleSheet(const String& href, const URL& baseURL, const String& charset, const CachedCSSStyleSheet* sheet)
62
        {
62
        {
63
            m_ownerRule->setCSSStyleSheet(href, baseURL, charset, sheet);
63
            m_ownerRule->setCSSStyleSheet(href, baseURL, charset, sheet);
64
        }
64
        }
Lines 66-72 private: a/Source/WebCore/css/StyleRuleImport.h_sec2
66
        StyleRuleImport* m_ownerRule;
66
        StyleRuleImport* m_ownerRule;
67
    };
67
    };
68
68
69
    void setCSSStyleSheet(const String& href, const KURL& baseURL, const String& charset, const CachedCSSStyleSheet*);
69
    void setCSSStyleSheet(const String& href, const URL& baseURL, const String& charset, const CachedCSSStyleSheet*);
70
    friend class ImportedStyleSheetClient;
70
    friend class ImportedStyleSheetClient;
71
71
72
    StyleRuleImport(const String& href, PassRefPtr<MediaQuerySet>);
72
    StyleRuleImport(const String& href, PassRefPtr<MediaQuerySet>);
- a/Source/WebCore/css/StyleSheet.h -2 / +2 lines
Lines 22-28 a/Source/WebCore/css/StyleSheet.h_sec1
22
#define StyleSheet_h
22
#define StyleSheet_h
23
23
24
#include "CSSParserMode.h"
24
#include "CSSParserMode.h"
25
#include "KURLHash.h"
25
#include "URLHash.h"
26
#include <wtf/Forward.h>
26
#include <wtf/Forward.h>
27
#include <wtf/ListHashSet.h>
27
#include <wtf/ListHashSet.h>
28
#include <wtf/RefCounted.h>
28
#include <wtf/RefCounted.h>
Lines 49-55 public: a/Source/WebCore/css/StyleSheet.h_sec2
49
49
50
    virtual CSSImportRule* ownerRule() const { return 0; }
50
    virtual CSSImportRule* ownerRule() const { return 0; }
51
    virtual void clearOwnerNode() = 0;
51
    virtual void clearOwnerNode() = 0;
52
    virtual KURL baseURL() const = 0;
52
    virtual URL baseURL() const = 0;
53
    virtual bool isLoading() const = 0;
53
    virtual bool isLoading() const = 0;
54
    virtual bool isCSSStyleSheet() const { return false; }
54
    virtual bool isCSSStyleSheet() const { return false; }
55
    virtual bool isXSLStyleSheet() const { return false; }
55
    virtual bool isXSLStyleSheet() const { return false; }
- a/Source/WebCore/css/StyleSheetContents.cpp -2 / +2 lines
Lines 397-408 Document* StyleSheetContents::singleOwnerDocument() const a/Source/WebCore/css/StyleSheetContents.cpp_sec1
397
    return ownerNode ? &ownerNode->document() : 0;
397
    return ownerNode ? &ownerNode->document() : 0;
398
}
398
}
399
399
400
KURL StyleSheetContents::completeURL(const String& url) const
400
URL StyleSheetContents::completeURL(const String& url) const
401
{
401
{
402
    return CSSParser::completeURL(m_parserContext, url);
402
    return CSSParser::completeURL(m_parserContext, url);
403
}
403
}
404
404
405
void StyleSheetContents::addSubresourceStyleURLs(ListHashSet<KURL>& urls)
405
void StyleSheetContents::addSubresourceStyleURLs(ListHashSet<URL>& urls)
406
{
406
{
407
    Deque<StyleSheetContents*> styleSheetQueue;
407
    Deque<StyleSheetContents*> styleSheetQueue;
408
    styleSheetQueue.append(this);
408
    styleSheetQueue.append(this);
- a/Source/WebCore/css/StyleSheetContents.h -4 / +4 lines
Lines 22-28 a/Source/WebCore/css/StyleSheetContents.h_sec1
22
#define StyleSheetContents_h
22
#define StyleSheetContents_h
23
23
24
#include "CSSParserMode.h"
24
#include "CSSParserMode.h"
25
#include "KURL.h"
25
#include "URL.h"
26
#include <wtf/HashMap.h>
26
#include <wtf/HashMap.h>
27
#include <wtf/ListHashSet.h>
27
#include <wtf/ListHashSet.h>
28
#include <wtf/RefCounted.h>
28
#include <wtf/RefCounted.h>
Lines 80-87 public: a/Source/WebCore/css/StyleSheetContents.h_sec2
80
    bool loadCompleted() const { return m_loadCompleted; }
80
    bool loadCompleted() const { return m_loadCompleted; }
81
    bool hasFailedOrCanceledSubresources() const;
81
    bool hasFailedOrCanceledSubresources() const;
82
82
83
    KURL completeURL(const String& url) const;
83
    URL completeURL(const String& url) const;
84
    void addSubresourceStyleURLs(ListHashSet<KURL>&);
84
    void addSubresourceStyleURLs(ListHashSet<URL>&);
85
85
86
    void setIsUserStyleSheet(bool b) { m_isUserStyleSheet = b; }
86
    void setIsUserStyleSheet(bool b) { m_isUserStyleSheet = b; }
87
    bool isUserStyleSheet() const { return m_isUserStyleSheet; }
87
    bool isUserStyleSheet() const { return m_isUserStyleSheet; }
Lines 111-117 public: a/Source/WebCore/css/StyleSheetContents.h_sec3
111
    // this style sheet. This property probably isn't useful for much except
111
    // this style sheet. This property probably isn't useful for much except
112
    // the JavaScript binding (which needs to use this value for security).
112
    // the JavaScript binding (which needs to use this value for security).
113
    String originalURL() const { return m_originalURL; }
113
    String originalURL() const { return m_originalURL; }
114
    const KURL& baseURL() const { return m_parserContext.baseURL; }
114
    const URL& baseURL() const { return m_parserContext.baseURL; }
115
115
116
    unsigned ruleCount() const;
116
    unsigned ruleCount() const;
117
    StyleRuleBase* ruleAt(unsigned index) const;
117
    StyleRuleBase* ruleAt(unsigned index) const;
- a/Source/WebCore/css/WebKitCSSShaderValue.cpp -2 / +2 lines
Lines 37-43 a/Source/WebCore/css/WebKitCSSShaderValue.cpp_sec1
37
#include "CachedResourceRequest.h"
37
#include "CachedResourceRequest.h"
38
#include "CachedResourceRequestInitiators.h"
38
#include "CachedResourceRequestInitiators.h"
39
#include "Document.h"
39
#include "Document.h"
40
#include "KURL.h"
40
#include "URL.h"
41
#include "StyleCachedShader.h"
41
#include "StyleCachedShader.h"
42
#include "StylePendingShader.h"
42
#include "StylePendingShader.h"
43
#include <wtf/text/StringBuilder.h>
43
#include <wtf/text/StringBuilder.h>
Lines 55-61 WebKitCSSShaderValue::~WebKitCSSShaderValue() a/Source/WebCore/css/WebKitCSSShaderValue.cpp_sec2
55
{
55
{
56
}
56
}
57
57
58
KURL WebKitCSSShaderValue::completeURL(CachedResourceLoader* loader) const
58
URL WebKitCSSShaderValue::completeURL(CachedResourceLoader* loader) const
59
{
59
{
60
    return loader->document()->completeURL(m_url);
60
    return loader->document()->completeURL(m_url);
61
}
61
}
- a/Source/WebCore/css/WebKitCSSShaderValue.h -2 / +2 lines
Lines 37-43 a/Source/WebCore/css/WebKitCSSShaderValue.h_sec1
37
namespace WebCore {
37
namespace WebCore {
38
38
39
class CachedResourceLoader;
39
class CachedResourceLoader;
40
class KURL;
40
class URL;
41
class StyleCachedShader;
41
class StyleCachedShader;
42
class StyleShader;
42
class StyleShader;
43
43
Lines 49-55 public: a/Source/WebCore/css/WebKitCSSShaderValue.h_sec2
49
    const String& format() const { return m_format; }
49
    const String& format() const { return m_format; }
50
    void setFormat(const String& format) { m_format = format; }
50
    void setFormat(const String& format) { m_format = format; }
51
51
52
    KURL completeURL(CachedResourceLoader*) const;
52
    URL completeURL(CachedResourceLoader*) const;
53
    StyleCachedShader* cachedShader(CachedResourceLoader*);
53
    StyleCachedShader* cachedShader(CachedResourceLoader*);
54
    StyleShader* cachedOrPendingShader();
54
    StyleShader* cachedOrPendingShader();
55
55
- a/Source/WebCore/dom/DOMImplementation.cpp -5 / +5 lines
Lines 233-245 PassRefPtr<Document> DOMImplementation::createDocument(const String& namespaceUR a/Source/WebCore/dom/DOMImplementation.cpp_sec1
233
    RefPtr<Document> doc;
233
    RefPtr<Document> doc;
234
#if ENABLE(SVG)
234
#if ENABLE(SVG)
235
    if (namespaceURI == SVGNames::svgNamespaceURI)
235
    if (namespaceURI == SVGNames::svgNamespaceURI)
236
        doc = SVGDocument::create(0, KURL());
236
        doc = SVGDocument::create(0, URL());
237
    else
237
    else
238
#endif
238
#endif
239
    if (namespaceURI == HTMLNames::xhtmlNamespaceURI)
239
    if (namespaceURI == HTMLNames::xhtmlNamespaceURI)
240
        doc = Document::createXHTML(0, KURL());
240
        doc = Document::createXHTML(0, URL());
241
    else
241
    else
242
        doc = Document::create(0, KURL());
242
        doc = Document::create(0, URL());
243
243
244
    doc->setSecurityOrigin(m_document.securityOrigin());
244
    doc->setSecurityOrigin(m_document.securityOrigin());
245
245
Lines 310-316 bool DOMImplementation::isTextMIMEType(const String& mimeType) a/Source/WebCore/dom/DOMImplementation.cpp_sec2
310
310
311
PassRefPtr<HTMLDocument> DOMImplementation::createHTMLDocument(const String& title)
311
PassRefPtr<HTMLDocument> DOMImplementation::createHTMLDocument(const String& title)
312
{
312
{
313
    RefPtr<HTMLDocument> d = HTMLDocument::create(0, KURL());
313
    RefPtr<HTMLDocument> d = HTMLDocument::create(0, URL());
314
    d->open();
314
    d->open();
315
    d->write("<!doctype html><html><body></body></html>");
315
    d->write("<!doctype html><html><body></body></html>");
316
    if (!title.isNull())
316
    if (!title.isNull())
Lines 319-325 PassRefPtr<HTMLDocument> DOMImplementation::createHTMLDocument(const String& tit a/Source/WebCore/dom/DOMImplementation.cpp_sec3
319
    return d.release();
319
    return d.release();
320
}
320
}
321
321
322
PassRefPtr<Document> DOMImplementation::createDocument(const String& type, Frame* frame, const KURL& url, bool inViewSourceMode)
322
PassRefPtr<Document> DOMImplementation::createDocument(const String& type, Frame* frame, const URL& url, bool inViewSourceMode)
323
{
323
{
324
    if (inViewSourceMode)
324
    if (inViewSourceMode)
325
        return HTMLViewSourceDocument::create(frame, url, type);
325
        return HTMLViewSourceDocument::create(frame, url, type);
- a/Source/WebCore/dom/DOMImplementation.h -2 / +2 lines
Lines 37-43 class Document; a/Source/WebCore/dom/DOMImplementation.h_sec1
37
class DocumentType;
37
class DocumentType;
38
class Frame;
38
class Frame;
39
class HTMLDocument;
39
class HTMLDocument;
40
class KURL;
40
class URL;
41
class RegularExpression;
41
class RegularExpression;
42
42
43
typedef int ExceptionCode;
43
typedef int ExceptionCode;
Lines 65-71 public: a/Source/WebCore/dom/DOMImplementation.h_sec2
65
    PassRefPtr<HTMLDocument> createHTMLDocument(const String& title);
65
    PassRefPtr<HTMLDocument> createHTMLDocument(const String& title);
66
66
67
    // Other methods (not part of DOM)
67
    // Other methods (not part of DOM)
68
    static PassRefPtr<Document> createDocument(const String& MIMEType, Frame*, const KURL&, bool inViewSourceMode);
68
    static PassRefPtr<Document> createDocument(const String& MIMEType, Frame*, const URL&, bool inViewSourceMode);
69
69
70
    static bool isXMLMIMEType(const String& MIMEType);
70
    static bool isXMLMIMEType(const String& MIMEType);
71
    static bool isTextMIMEType(const String& MIMEType);
71
    static bool isTextMIMEType(const String& MIMEType);
- a/Source/WebCore/dom/Document.cpp -29 / +29 lines
Lines 312-318 static inline bool isValidNamePart(UChar32 c) a/Source/WebCore/dom/Document.cpp_sec1
312
    return true;
312
    return true;
313
}
313
}
314
314
315
static bool shouldInheritSecurityOriginFromOwner(const KURL& url)
315
static bool shouldInheritSecurityOriginFromOwner(const URL& url)
316
{
316
{
317
    // http://www.whatwg.org/specs/web-apps/current-work/#origin-0
317
    // http://www.whatwg.org/specs/web-apps/current-work/#origin-0
318
    //
318
    //
Lines 376-382 static bool canAccessAncestor(const SecurityOrigin* activeSecurityOrigin, Frame* a/Source/WebCore/dom/Document.cpp_sec2
376
    return false;
376
    return false;
377
}
377
}
378
378
379
static void printNavigationErrorMessage(Frame* frame, const KURL& activeURL, const char* reason)
379
static void printNavigationErrorMessage(Frame* frame, const URL& activeURL, const char* reason)
380
{
380
{
381
    String message = "Unsafe JavaScript attempt to initiate navigation for frame with URL '" + frame->document()->url().string() + "' from frame with URL '" + activeURL.string() + "'. " + reason + "\n";
381
    String message = "Unsafe JavaScript attempt to initiate navigation for frame with URL '" + frame->document()->url().string() + "' from frame with URL '" + activeURL.string() + "'. " + reason + "\n";
382
382
Lines 400-406 bool TextAutoSizingTraits::isDeletedValue(const TextAutoSizingKey& value) a/Source/WebCore/dom/Document.cpp_sec3
400
}
400
}
401
#endif
401
#endif
402
402
403
Document::Document(Frame* frame, const KURL& url, unsigned documentClasses)
403
Document::Document(Frame* frame, const URL& url, unsigned documentClasses)
404
    : ContainerNode(0, CreateDocument)
404
    : ContainerNode(0, CreateDocument)
405
    , TreeScope(this)
405
    , TreeScope(this)
406
    , m_styleResolverThrowawayTimer(this, &Document::styleResolverThrowawayTimerFired, timeBeforeThrowingAwayStyleResolverAfterLastUseInSeconds)
406
    , m_styleResolverThrowawayTimer(this, &Document::styleResolverThrowawayTimerFired, timeBeforeThrowingAwayStyleResolverAfterLastUseInSeconds)
Lines 1394-1400 void Document::setDocumentURI(const String& uri) a/Source/WebCore/dom/Document.cpp_sec4
1394
    updateBaseURL();
1394
    updateBaseURL();
1395
}
1395
}
1396
1396
1397
KURL Document::baseURI() const
1397
URL Document::baseURI() const
1398
{
1398
{
1399
    return m_baseURL;
1399
    return m_baseURL;
1400
}
1400
}
Lines 2623-2631 void Document::logExceptionToConsole(const String& errorMessage, const String& s a/Source/WebCore/dom/Document.cpp_sec5
2623
    addMessage(JSMessageSource, ErrorMessageLevel, errorMessage, sourceURL, lineNumber, columnNumber, callStack);
2623
    addMessage(JSMessageSource, ErrorMessageLevel, errorMessage, sourceURL, lineNumber, columnNumber, callStack);
2624
}
2624
}
2625
2625
2626
void Document::setURL(const KURL& url)
2626
void Document::setURL(const URL& url)
2627
{
2627
{
2628
    const KURL& newURL = url.isEmpty() ? blankURL() : url;
2628
    const URL& newURL = url.isEmpty() ? blankURL() : url;
2629
    if (newURL == m_url)
2629
    if (newURL == m_url)
2630
        return;
2630
        return;
2631
2631
Lines 2636-2642 void Document::setURL(const KURL& url) a/Source/WebCore/dom/Document.cpp_sec6
2636
2636
2637
void Document::updateBaseURL()
2637
void Document::updateBaseURL()
2638
{
2638
{
2639
    KURL oldBaseURL = m_baseURL;
2639
    URL oldBaseURL = m_baseURL;
2640
    // DOM 3 Core: When the Document supports the feature "HTML" [DOM Level 2 HTML], the base URI is computed using
2640
    // DOM 3 Core: When the Document supports the feature "HTML" [DOM Level 2 HTML], the base URI is computed using
2641
    // first the value of the href attribute of the HTML BASE element if any, and the value of the documentURI attribute
2641
    // first the value of the href attribute of the HTML BASE element if any, and the value of the documentURI attribute
2642
    // from the Document interface otherwise.
2642
    // from the Document interface otherwise.
Lines 2648-2661 void Document::updateBaseURL() a/Source/WebCore/dom/Document.cpp_sec7
2648
        // The documentURI attribute is read-only from JavaScript, but writable from Objective C, so we need to retain
2648
        // The documentURI attribute is read-only from JavaScript, but writable from Objective C, so we need to retain
2649
        // this fallback behavior. We use a null base URL, since the documentURI attribute is an arbitrary string
2649
        // this fallback behavior. We use a null base URL, since the documentURI attribute is an arbitrary string
2650
        // and DOM 3 Core does not specify how it should be resolved.
2650
        // and DOM 3 Core does not specify how it should be resolved.
2651
        m_baseURL = KURL(ParsedURLString, documentURI());
2651
        m_baseURL = URL(ParsedURLString, documentURI());
2652
    }
2652
    }
2653
2653
2654
    if (m_selectorQueryCache)
2654
    if (m_selectorQueryCache)
2655
        m_selectorQueryCache->invalidate();
2655
        m_selectorQueryCache->invalidate();
2656
2656
2657
    if (!m_baseURL.isValid())
2657
    if (!m_baseURL.isValid())
2658
        m_baseURL = KURL();
2658
        m_baseURL = URL();
2659
2659
2660
    if (m_elementSheet) {
2660
    if (m_elementSheet) {
2661
        // Element sheet is silly. It never contains anything.
2661
        // Element sheet is silly. It never contains anything.
Lines 2675-2681 void Document::updateBaseURL() a/Source/WebCore/dom/Document.cpp_sec8
2675
    }
2675
    }
2676
}
2676
}
2677
2677
2678
void Document::setBaseURLOverride(const KURL& url)
2678
void Document::setBaseURLOverride(const URL& url)
2679
{
2679
{
2680
    m_baseURLOverride = url;
2680
    m_baseURLOverride = url;
2681
    updateBaseURL();
2681
    updateBaseURL();
Lines 2701-2711 void Document::processBaseElement() a/Source/WebCore/dom/Document.cpp_sec9
2701
    }
2701
    }
2702
2702
2703
    // FIXME: Since this doesn't share code with completeURL it may not handle encodings correctly.
2703
    // FIXME: Since this doesn't share code with completeURL it may not handle encodings correctly.
2704
    KURL baseElementURL;
2704
    URL baseElementURL;
2705
    if (href) {
2705
    if (href) {
2706
        String strippedHref = stripLeadingAndTrailingHTMLSpaces(*href);
2706
        String strippedHref = stripLeadingAndTrailingHTMLSpaces(*href);
2707
        if (!strippedHref.isEmpty())
2707
        if (!strippedHref.isEmpty())
2708
            baseElementURL = KURL(url(), strippedHref);
2708
            baseElementURL = URL(url(), strippedHref);
2709
    }
2709
    }
2710
    if (m_baseElementURL != baseElementURL && contentSecurityPolicy()->allowBaseURI(baseElementURL)) {
2710
    if (m_baseElementURL != baseElementURL && contentSecurityPolicy()->allowBaseURI(baseElementURL)) {
2711
        m_baseElementURL = baseElementURL;
2711
        m_baseElementURL = baseElementURL;
Lines 2715-2721 void Document::processBaseElement() a/Source/WebCore/dom/Document.cpp_sec10
2715
    m_baseTarget = target ? *target : nullAtom;
2715
    m_baseTarget = target ? *target : nullAtom;
2716
}
2716
}
2717
2717
2718
String Document::userAgent(const KURL& url) const
2718
String Document::userAgent(const URL& url) const
2719
{
2719
{
2720
    return frame() ? frame()->loader().userAgent(url) : String();
2720
    return frame() ? frame()->loader().userAgent(url) : String();
2721
}
2721
}
Lines 3726-3732 String Document::cookie(ExceptionCode& ec) const a/Source/WebCore/dom/Document.cpp_sec11
3726
        return String();
3726
        return String();
3727
    }
3727
    }
3728
3728
3729
    KURL cookieURL = this->cookieURL();
3729
    URL cookieURL = this->cookieURL();
3730
    if (cookieURL.isEmpty())
3730
    if (cookieURL.isEmpty())
3731
        return String();
3731
        return String();
3732
3732
Lines 3747-3753 void Document::setCookie(const String& value, ExceptionCode& ec) a/Source/WebCore/dom/Document.cpp_sec12
3747
        return;
3747
        return;
3748
    }
3748
    }
3749
3749
3750
    KURL cookieURL = this->cookieURL();
3750
    URL cookieURL = this->cookieURL();
3751
    if (cookieURL.isEmpty())
3751
    if (cookieURL.isEmpty())
3752
        return;
3752
        return;
3753
3753
Lines 3971-3990 void Document::setDecoder(PassRefPtr<TextResourceDecoder> decoder) a/Source/WebCore/dom/Document.cpp_sec13
3971
    m_decoder = decoder;
3971
    m_decoder = decoder;
3972
}
3972
}
3973
3973
3974
KURL Document::completeURL(const String& url, const KURL& baseURLOverride) const
3974
URL Document::completeURL(const String& url, const URL& baseURLOverride) const
3975
{
3975
{
3976
    // Always return a null URL when passed a null string.
3976
    // Always return a null URL when passed a null string.
3977
    // FIXME: Should we change the KURL constructor to have this behavior?
3977
    // FIXME: Should we change the URL constructor to have this behavior?
3978
    // See also [CSS]StyleSheet::completeURL(const String&)
3978
    // See also [CSS]StyleSheet::completeURL(const String&)
3979
    if (url.isNull())
3979
    if (url.isNull())
3980
        return KURL();
3980
        return URL();
3981
    const KURL& baseURL = ((baseURLOverride.isEmpty() || baseURLOverride == blankURL()) && parentDocument()) ? parentDocument()->baseURL() : baseURLOverride;
3981
    const URL& baseURL = ((baseURLOverride.isEmpty() || baseURLOverride == blankURL()) && parentDocument()) ? parentDocument()->baseURL() : baseURLOverride;
3982
    if (!m_decoder)
3982
    if (!m_decoder)
3983
        return KURL(baseURL, url);
3983
        return URL(baseURL, url);
3984
    return KURL(baseURL, url, m_decoder->encoding());
3984
    return URL(baseURL, url, m_decoder->encoding());
3985
}
3985
}
3986
3986
3987
KURL Document::completeURL(const String& url) const
3987
URL Document::completeURL(const String& url) const
3988
{
3988
{
3989
    return completeURL(url, m_baseURL);
3989
    return completeURL(url, m_baseURL);
3990
}
3990
}
Lines 4199-4219 String Document::queryCommandValue(const String& commandName) a/Source/WebCore/dom/Document.cpp_sec14
4199
    return command(this, commandName).value();
4199
    return command(this, commandName).value();
4200
}
4200
}
4201
4201
4202
KURL Document::openSearchDescriptionURL()
4202
URL Document::openSearchDescriptionURL()
4203
{
4203
{
4204
    static const char* const openSearchMIMEType = "application/opensearchdescription+xml";
4204
    static const char* const openSearchMIMEType = "application/opensearchdescription+xml";
4205
    static const char* const openSearchRelation = "search";
4205
    static const char* const openSearchRelation = "search";
4206
4206
4207
    // FIXME: Why do only top-level frames have openSearchDescriptionURLs?
4207
    // FIXME: Why do only top-level frames have openSearchDescriptionURLs?
4208
    if (!frame() || frame()->tree().parent())
4208
    if (!frame() || frame()->tree().parent())
4209
        return KURL();
4209
        return URL();
4210
4210
4211
    // FIXME: Why do we need to wait for FrameStateComplete?
4211
    // FIXME: Why do we need to wait for FrameStateComplete?
4212
    if (frame()->loader().state() != FrameStateComplete)
4212
    if (frame()->loader().state() != FrameStateComplete)
4213
        return KURL();
4213
        return URL();
4214
4214
4215
    if (!head())
4215
    if (!head())
4216
        return KURL();
4216
        return URL();
4217
4217
4218
    RefPtr<HTMLCollection> children = head()->children();
4218
    RefPtr<HTMLCollection> children = head()->children();
4219
    for (unsigned i = 0; Node* child = children->item(i); i++) {
4219
    for (unsigned i = 0; Node* child = children->item(i); i++) {
Lines 4227-4233 KURL Document::openSearchDescriptionURL() a/Source/WebCore/dom/Document.cpp_sec15
4227
        return linkElement->href();
4227
        return linkElement->href();
4228
    }
4228
    }
4229
4229
4230
    return KURL();
4230
    return URL();
4231
}
4231
}
4232
4232
4233
void Document::pushCurrentScript(PassRefPtr<HTMLScriptElement> newCurrentScript)
4233
void Document::pushCurrentScript(PassRefPtr<HTMLScriptElement> newCurrentScript)
Lines 4566-4572 void Document::initSecurityContext() a/Source/WebCore/dom/Document.cpp_sec16
4566
    if (!m_frame) {
4566
    if (!m_frame) {
4567
        // No source for a security context.
4567
        // No source for a security context.
4568
        // This can occur via document.implementation.createDocument().
4568
        // This can occur via document.implementation.createDocument().
4569
        m_cookieURL = KURL(ParsedURLString, emptyString());
4569
        m_cookieURL = URL(ParsedURLString, emptyString());
4570
        setSecurityOrigin(SecurityOrigin::createUnique());
4570
        setSecurityOrigin(SecurityOrigin::createUnique());
4571
        setContentSecurityPolicy(ContentSecurityPolicy::create(this));
4571
        setContentSecurityPolicy(ContentSecurityPolicy::create(this));
4572
        return;
4572
        return;
Lines 4652-4658 bool Document::isContextThread() const a/Source/WebCore/dom/Document.cpp_sec17
4652
    return isMainThread();
4652
    return isMainThread();
4653
}
4653
}
4654
4654
4655
void Document::updateURLForPushOrReplaceState(const KURL& url)
4655
void Document::updateURLForPushOrReplaceState(const URL& url)
4656
{
4656
{
4657
    Frame* f = frame();
4657
    Frame* f = frame();
4658
    if (!f)
4658
    if (!f)
- a/Source/WebCore/dom/Document.h -25 / +25 lines
Lines 236-246 typedef unsigned char DocumentClassFlags; a/Source/WebCore/dom/Document.h_sec1
236
236
237
class Document : public ContainerNode, public TreeScope, public ScriptExecutionContext {
237
class Document : public ContainerNode, public TreeScope, public ScriptExecutionContext {
238
public:
238
public:
239
    static PassRefPtr<Document> create(Frame* frame, const KURL& url)
239
    static PassRefPtr<Document> create(Frame* frame, const URL& url)
240
    {
240
    {
241
        return adoptRef(new Document(frame, url));
241
        return adoptRef(new Document(frame, url));
242
    }
242
    }
243
    static PassRefPtr<Document> createXHTML(Frame* frame, const KURL& url)
243
    static PassRefPtr<Document> createXHTML(Frame* frame, const URL& url)
244
    {
244
    {
245
        return adoptRef(new Document(frame, url, XHTMLDocumentClass));
245
        return adoptRef(new Document(frame, url, XHTMLDocumentClass));
246
    }
246
    }
Lines 414-420 public: a/Source/WebCore/dom/Document.h_sec2
414
    String documentURI() const { return m_documentURI; }
414
    String documentURI() const { return m_documentURI; }
415
    void setDocumentURI(const String&);
415
    void setDocumentURI(const String&);
416
416
417
    virtual KURL baseURI() const;
417
    virtual URL baseURI() const;
418
418
419
#if ENABLE(PAGE_VISIBILITY_API)
419
#if ENABLE(PAGE_VISIBILITY_API)
420
    String visibilityState() const;
420
    String visibilityState() const;
Lines 584-605 public: a/Source/WebCore/dom/Document.h_sec3
584
584
585
    bool wellFormed() const { return m_wellFormed; }
585
    bool wellFormed() const { return m_wellFormed; }
586
586
587
    virtual const KURL& url() const OVERRIDE FINAL { return m_url; }
587
    virtual const URL& url() const OVERRIDE FINAL { return m_url; }
588
    void setURL(const KURL&);
588
    void setURL(const URL&);
589
589
590
    // To understand how these concepts relate to one another, please see the
590
    // To understand how these concepts relate to one another, please see the
591
    // comments surrounding their declaration.
591
    // comments surrounding their declaration.
592
    const KURL& baseURL() const { return m_baseURL; }
592
    const URL& baseURL() const { return m_baseURL; }
593
    void setBaseURLOverride(const KURL&);
593
    void setBaseURLOverride(const URL&);
594
    const KURL& baseURLOverride() const { return m_baseURLOverride; }
594
    const URL& baseURLOverride() const { return m_baseURLOverride; }
595
    const KURL& baseElementURL() const { return m_baseElementURL; }
595
    const URL& baseElementURL() const { return m_baseElementURL; }
596
    const String& baseTarget() const { return m_baseTarget; }
596
    const String& baseTarget() const { return m_baseTarget; }
597
    void processBaseElement();
597
    void processBaseElement();
598
598
599
    virtual KURL completeURL(const String&) const OVERRIDE FINAL;
599
    virtual URL completeURL(const String&) const OVERRIDE FINAL;
600
    KURL completeURL(const String&, const KURL& baseURLOverride) const;
600
    URL completeURL(const String&, const URL& baseURLOverride) const;
601
601
602
    virtual String userAgent(const KURL&) const;
602
    virtual String userAgent(const URL&) const;
603
603
604
    virtual void disableEval(const String& errorMessage);
604
    virtual void disableEval(const String& errorMessage);
605
605
Lines 817-824 public: a/Source/WebCore/dom/Document.h_sec4
817
    //    document inherits the security context of another document, it
817
    //    document inherits the security context of another document, it
818
    //    inherits its cookieURL but not its URL.
818
    //    inherits its cookieURL but not its URL.
819
    //
819
    //
820
    const KURL& cookieURL() const { return m_cookieURL; }
820
    const URL& cookieURL() const { return m_cookieURL; }
821
    void setCookieURL(const KURL& url) { m_cookieURL = url; }
821
    void setCookieURL(const URL& url) { m_cookieURL = url; }
822
822
823
    // The firstPartyForCookies is used to compute whether this document
823
    // The firstPartyForCookies is used to compute whether this document
824
    // appears in a "third-party" context for the purpose of third-party
824
    // appears in a "third-party" context for the purpose of third-party
Lines 830-837 public: a/Source/WebCore/dom/Document.h_sec5
830
    //       firstPartyForCookies have a different registry-controlled
830
    //       firstPartyForCookies have a different registry-controlled
831
    //       domain.
831
    //       domain.
832
    //
832
    //
833
    const KURL& firstPartyForCookies() const { return m_firstPartyForCookies; }
833
    const URL& firstPartyForCookies() const { return m_firstPartyForCookies; }
834
    void setFirstPartyForCookies(const KURL& url) { m_firstPartyForCookies = url; }
834
    void setFirstPartyForCookies(const URL& url) { m_firstPartyForCookies = url; }
835
    
835
    
836
    // The following implements the rule from HTML 4 for what valid names are.
836
    // The following implements the rule from HTML 4 for what valid names are.
837
    // To get this right for all the XML cases, we probably have to improve this or move it
837
    // To get this right for all the XML cases, we probably have to improve this or move it
Lines 866-872 public: a/Source/WebCore/dom/Document.h_sec6
866
    bool queryCommandSupported(const String& command);
866
    bool queryCommandSupported(const String& command);
867
    String queryCommandValue(const String& command);
867
    String queryCommandValue(const String& command);
868
868
869
    KURL openSearchDescriptionURL();
869
    URL openSearchDescriptionURL();
870
870
871
    // designMode support
871
    // designMode support
872
    enum InheritedBool { off = false, on = true, inherit };    
872
    enum InheritedBool { off = false, on = true, inherit };    
Lines 1007-1013 public: a/Source/WebCore/dom/Document.h_sec7
1007
    void initSecurityContext();
1007
    void initSecurityContext();
1008
    void initContentSecurityPolicy();
1008
    void initContentSecurityPolicy();
1009
1009
1010
    void updateURLForPushOrReplaceState(const KURL&);
1010
    void updateURLForPushOrReplaceState(const URL&);
1011
    void statePopped(PassRefPtr<SerializedScriptValue>);
1011
    void statePopped(PassRefPtr<SerializedScriptValue>);
1012
1012
1013
    bool processingLoadEvent() const { return m_processingLoadEvent; }
1013
    bool processingLoadEvent() const { return m_processingLoadEvent; }
Lines 1187-1193 public: a/Source/WebCore/dom/Document.h_sec8
1187
    void setVisualUpdatesAllowedByClient(bool);
1187
    void setVisualUpdatesAllowedByClient(bool);
1188
1188
1189
protected:
1189
protected:
1190
    Document(Frame*, const KURL&, unsigned = DefaultDocumentClass);
1190
    Document(Frame*, const URL&, unsigned = DefaultDocumentClass);
1191
1191
1192
    void clearXMLVersion() { m_xmlVersion = String(); }
1192
    void clearXMLVersion() { m_xmlVersion = String(); }
1193
1193
Lines 1293-1304 private: a/Source/WebCore/dom/Document.h_sec9
1293
    bool m_wellFormed;
1293
    bool m_wellFormed;
1294
1294
1295
    // Document URLs.
1295
    // Document URLs.
1296
    KURL m_url; // Document.URL: The URL from which this document was retrieved.
1296
    URL m_url; // Document.URL: The URL from which this document was retrieved.
1297
    KURL m_baseURL; // Node.baseURI: The URL to use when resolving relative URLs.
1297
    URL m_baseURL; // Node.baseURI: The URL to use when resolving relative URLs.
1298
    KURL m_baseURLOverride; // An alternative base URL that takes precedence over m_baseURL (but not m_baseElementURL).
1298
    URL m_baseURLOverride; // An alternative base URL that takes precedence over m_baseURL (but not m_baseElementURL).
1299
    KURL m_baseElementURL; // The URL set by the <base> element.
1299
    URL m_baseElementURL; // The URL set by the <base> element.
1300
    KURL m_cookieURL; // The URL to use for cookie access.
1300
    URL m_cookieURL; // The URL to use for cookie access.
1301
    KURL m_firstPartyForCookies; // The policy URL for third-party cookie blocking.
1301
    URL m_firstPartyForCookies; // The policy URL for third-party cookie blocking.
1302
1302
1303
    // Document.documentURI:
1303
    // Document.documentURI:
1304
    // Although URL-like, Document.documentURI can actually be set to any
1304
    // Although URL-like, Document.documentURI can actually be set to any
- a/Source/WebCore/dom/DocumentType.cpp -2 / +2 lines
Lines 36-44 DocumentType::DocumentType(Document& document, const String& name, const String& a/Source/WebCore/dom/DocumentType.cpp_sec1
36
{
36
{
37
}
37
}
38
38
39
KURL DocumentType::baseURI() const
39
URL DocumentType::baseURI() const
40
{
40
{
41
    return KURL();
41
    return URL();
42
}
42
}
43
43
44
String DocumentType::nodeName() const
44
String DocumentType::nodeName() const
- a/Source/WebCore/dom/DocumentType.h -1 / +1 lines
Lines 49-55 public: a/Source/WebCore/dom/DocumentType.h_sec1
49
private:
49
private:
50
    DocumentType(Document&, const String& name, const String& publicId, const String& systemId);
50
    DocumentType(Document&, const String& name, const String& publicId, const String& systemId);
51
51
52
    virtual KURL baseURI() const;
52
    virtual URL baseURI() const;
53
    virtual String nodeName() const;
53
    virtual String nodeName() const;
54
    virtual NodeType nodeType() const;
54
    virtual NodeType nodeType() const;
55
    virtual PassRefPtr<Node> cloneNode(bool deep);
55
    virtual PassRefPtr<Node> cloneNode(bool deep);
- a/Source/WebCore/dom/Element.cpp -7 / +7 lines
Lines 1246-1255 void Element::setPrefix(const AtomicString& prefix, ExceptionCode& ec) a/Source/WebCore/dom/Element.cpp_sec1
1246
    m_tagName.setPrefix(prefix.isEmpty() ? AtomicString() : prefix);
1246
    m_tagName.setPrefix(prefix.isEmpty() ? AtomicString() : prefix);
1247
}
1247
}
1248
1248
1249
KURL Element::baseURI() const
1249
URL Element::baseURI() const
1250
{
1250
{
1251
    const AtomicString& baseAttribute = getAttribute(baseAttr);
1251
    const AtomicString& baseAttribute = getAttribute(baseAttr);
1252
    KURL base(KURL(), baseAttribute);
1252
    URL base(URL(), baseAttribute);
1253
    if (!base.protocol().isEmpty())
1253
    if (!base.protocol().isEmpty())
1254
        return base;
1254
        return base;
1255
1255
Lines 1257-1267 KURL Element::baseURI() const a/Source/WebCore/dom/Element.cpp_sec2
1257
    if (!parent)
1257
    if (!parent)
1258
        return base;
1258
        return base;
1259
1259
1260
    const KURL& parentBase = parent->baseURI();
1260
    const URL& parentBase = parent->baseURI();
1261
    if (parentBase.isNull())
1261
    if (parentBase.isNull())
1262
        return base;
1262
        return base;
1263
1263
1264
    return KURL(parentBase, baseAttribute);
1264
    return URL(parentBase, baseAttribute);
1265
}
1265
}
1266
1266
1267
const AtomicString& Element::imageSourceURL() const
1267
const AtomicString& Element::imageSourceURL() const
Lines 2490-2496 DOMStringMap* Element::dataset() a/Source/WebCore/dom/Element.cpp_sec3
2490
    return data.dataset();
2490
    return data.dataset();
2491
}
2491
}
2492
2492
2493
KURL Element::getURLAttribute(const QualifiedName& name) const
2493
URL Element::getURLAttribute(const QualifiedName& name) const
2494
{
2494
{
2495
#if !ASSERT_DISABLED
2495
#if !ASSERT_DISABLED
2496
    if (elementData()) {
2496
    if (elementData()) {
Lines 2501-2507 KURL Element::getURLAttribute(const QualifiedName& name) const a/Source/WebCore/dom/Element.cpp_sec4
2501
    return document().completeURL(stripLeadingAndTrailingHTMLSpaces(getAttribute(name)));
2501
    return document().completeURL(stripLeadingAndTrailingHTMLSpaces(getAttribute(name)));
2502
}
2502
}
2503
2503
2504
KURL Element::getNonEmptyURLAttribute(const QualifiedName& name) const
2504
URL Element::getNonEmptyURLAttribute(const QualifiedName& name) const
2505
{
2505
{
2506
#if !ASSERT_DISABLED
2506
#if !ASSERT_DISABLED
2507
    if (elementData()) {
2507
    if (elementData()) {
Lines 2511-2517 KURL Element::getNonEmptyURLAttribute(const QualifiedName& name) const a/Source/WebCore/dom/Element.cpp_sec5
2511
#endif
2511
#endif
2512
    String value = stripLeadingAndTrailingHTMLSpaces(getAttribute(name));
2512
    String value = stripLeadingAndTrailingHTMLSpaces(getAttribute(name));
2513
    if (value.isEmpty())
2513
    if (value.isEmpty())
2514
        return KURL();
2514
        return URL();
2515
    return document().completeURL(value);
2515
    return document().completeURL(value);
2516
}
2516
}
2517
2517
- a/Source/WebCore/dom/Element.h -3 / +3 lines
Lines 253-259 public: a/Source/WebCore/dom/Element.h_sec1
253
    virtual const AtomicString& prefix() const OVERRIDE FINAL { return m_tagName.prefix(); }
253
    virtual const AtomicString& prefix() const OVERRIDE FINAL { return m_tagName.prefix(); }
254
    virtual const AtomicString& namespaceURI() const OVERRIDE FINAL { return m_tagName.namespaceURI(); }
254
    virtual const AtomicString& namespaceURI() const OVERRIDE FINAL { return m_tagName.namespaceURI(); }
255
255
256
    virtual KURL baseURI() const OVERRIDE FINAL;
256
    virtual URL baseURI() const OVERRIDE FINAL;
257
257
258
    virtual String nodeName() const;
258
    virtual String nodeName() const;
259
259
Lines 384-391 public: a/Source/WebCore/dom/Element.h_sec2
384
    virtual bool isURLAttribute(const Attribute&) const { return false; }
384
    virtual bool isURLAttribute(const Attribute&) const { return false; }
385
    virtual bool isHTMLContentAttribute(const Attribute&) const { return false; }
385
    virtual bool isHTMLContentAttribute(const Attribute&) const { return false; }
386
386
387
    KURL getURLAttribute(const QualifiedName&) const;
387
    URL getURLAttribute(const QualifiedName&) const;
388
    KURL getNonEmptyURLAttribute(const QualifiedName&) const;
388
    URL getNonEmptyURLAttribute(const QualifiedName&) const;
389
389
390
    virtual const AtomicString& imageSourceURL() const;
390
    virtual const AtomicString& imageSourceURL() const;
391
    virtual String target() const { return String(); }
391
    virtual String target() const { return String(); }
- a/Source/WebCore/dom/IconURL.cpp -1 / +1 lines
Lines 33-39 a/Source/WebCore/dom/IconURL.cpp_sec1
33
33
34
namespace WebCore {
34
namespace WebCore {
35
35
36
IconURL IconURL::defaultIconURL(const KURL& url, IconType type)
36
IconURL IconURL::defaultIconURL(const URL& url, IconType type)
37
{
37
{
38
    IconURL result(url, emptyString(), emptyString(), type);
38
    IconURL result(url, emptyString(), emptyString(), type);
39
    result.m_isDefaultIcon = true;
39
    result.m_isDefaultIcon = true;
- a/Source/WebCore/dom/IconURL.h -4 / +4 lines
Lines 31-37 a/Source/WebCore/dom/IconURL.h_sec1
31
#ifndef IconURL_h
31
#ifndef IconURL_h
32
#define IconURL_h
32
#define IconURL_h
33
33
34
#include "KURL.h"
34
#include "URL.h"
35
35
36
namespace WebCore {
36
namespace WebCore {
37
37
Lines 52-58 struct IconURL { a/Source/WebCore/dom/IconURL.h_sec2
52
    IconType m_iconType;
52
    IconType m_iconType;
53
    String m_sizes;
53
    String m_sizes;
54
    String m_mimeType;
54
    String m_mimeType;
55
    KURL m_iconURL;
55
    URL m_iconURL;
56
    bool m_isDefaultIcon;
56
    bool m_isDefaultIcon;
57
57
58
    IconURL()
58
    IconURL()
Lines 61-67 struct IconURL { a/Source/WebCore/dom/IconURL.h_sec3
61
    {
61
    {
62
    }
62
    }
63
63
64
    IconURL(const KURL& url, const String& sizes, const String& mimeType, IconType type)
64
    IconURL(const URL& url, const String& sizes, const String& mimeType, IconType type)
65
        : m_iconType(type)
65
        : m_iconType(type)
66
        , m_sizes(sizes)
66
        , m_sizes(sizes)
67
        , m_mimeType(mimeType)
67
        , m_mimeType(mimeType)
Lines 70-76 struct IconURL { a/Source/WebCore/dom/IconURL.h_sec4
70
    {
70
    {
71
    }
71
    }
72
    
72
    
73
    static IconURL defaultIconURL(const KURL&, IconType);
73
    static IconURL defaultIconURL(const URL&, IconType);
74
};
74
};
75
75
76
bool operator==(const IconURL&, const IconURL&);
76
bool operator==(const IconURL&, const IconURL&);
- a/Source/WebCore/dom/InlineStyleSheetOwner.cpp -1 / +1 lines
Lines 145-151 void InlineStyleSheetOwner::createSheet(Element& element, const String& text) a/Source/WebCore/dom/InlineStyleSheetOwner.cpp_sec1
145
145
146
    m_loading = true;
146
    m_loading = true;
147
147
148
    m_sheet = CSSStyleSheet::createInline(element, KURL(), document.inputEncoding());
148
    m_sheet = CSSStyleSheet::createInline(element, URL(), document.inputEncoding());
149
    m_sheet->setMediaQueries(mediaQueries.release());
149
    m_sheet->setMediaQueries(mediaQueries.release());
150
    m_sheet->setTitle(element.title());
150
    m_sheet->setTitle(element.title());
151
    m_sheet->contents()->parseStringAtLine(text, m_startLineNumber.zeroBasedInt(), m_isParsingChildren);
151
    m_sheet->contents()->parseStringAtLine(text, m_startLineNumber.zeroBasedInt(), m_isParsingChildren);
- a/Source/WebCore/dom/Node.cpp -3 / +3 lines
Lines 1138-1146 Document *Node::ownerDocument() const a/Source/WebCore/dom/Node.cpp_sec1
1138
    return doc == this ? 0 : doc;
1138
    return doc == this ? 0 : doc;
1139
}
1139
}
1140
1140
1141
KURL Node::baseURI() const
1141
URL Node::baseURI() const
1142
{
1142
{
1143
    return parentNode() ? parentNode()->baseURI() : KURL();
1143
    return parentNode() ? parentNode()->baseURI() : URL();
1144
}
1144
}
1145
1145
1146
bool Node::isEqualNode(Node* other) const
1146
bool Node::isEqualNode(Node* other) const
Lines 1799-1805 void NodeListsNodeData::invalidateCaches(const QualifiedName* attrName) a/Source/WebCore/dom/Node.cpp_sec2
1799
        it->value->invalidateCache();
1799
        it->value->invalidateCache();
1800
}
1800
}
1801
1801
1802
void Node::getSubresourceURLs(ListHashSet<KURL>& urls) const
1802
void Node::getSubresourceURLs(ListHashSet<URL>& urls) const
1803
{
1803
{
1804
    addSubresourceAttributeURLs(urls);
1804
    addSubresourceAttributeURLs(urls);
1805
}
1805
}
- a/Source/WebCore/dom/Node.h -5 / +5 lines
Lines 27-33 a/Source/WebCore/dom/Node.h_sec1
27
27
28
#include "EditingBoundary.h"
28
#include "EditingBoundary.h"
29
#include "EventTarget.h"
29
#include "EventTarget.h"
30
#include "KURLHash.h"
30
#include "URLHash.h"
31
#include "LayoutRect.h"
31
#include "LayoutRect.h"
32
#include "MutationObserver.h"
32
#include "MutationObserver.h"
33
#include "RenderStyleConstants.h"
33
#include "RenderStyleConstants.h"
Lines 191-199 public: a/Source/WebCore/dom/Node.h_sec2
191
    Node* pseudoAwareFirstChild() const;
191
    Node* pseudoAwareFirstChild() const;
192
    Node* pseudoAwareLastChild() const;
192
    Node* pseudoAwareLastChild() const;
193
193
194
    virtual KURL baseURI() const;
194
    virtual URL baseURI() const;
195
    
195
    
196
    void getSubresourceURLs(ListHashSet<KURL>&) const;
196
    void getSubresourceURLs(ListHashSet<URL>&) const;
197
197
198
    // These should all actually return a node, but this is only important for language bindings,
198
    // These should all actually return a node, but this is only important for language bindings,
199
    // which will already know and hold a ref on the right node to return. Returning bool allows
199
    // which will already know and hold a ref on the right node to return. Returning bool allows
Lines 664-670 protected: a/Source/WebCore/dom/Node.h_sec3
664
664
665
    virtual void didMoveToNewDocument(Document* oldDocument);
665
    virtual void didMoveToNewDocument(Document* oldDocument);
666
    
666
    
667
    virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const { }
667
    virtual void addSubresourceAttributeURLs(ListHashSet<URL>&) const { }
668
668
669
    bool hasRareData() const { return getFlag(HasRareDataFlag); }
669
    bool hasRareData() const { return getFlag(HasRareDataFlag); }
670
670
Lines 737-743 protected: a/Source/WebCore/dom/Node.h_sec4
737
};
737
};
738
738
739
// Used in Node::addSubresourceAttributeURLs() and in addSubresourceStyleURLs()
739
// Used in Node::addSubresourceAttributeURLs() and in addSubresourceStyleURLs()
740
inline void addSubresourceURL(ListHashSet<KURL>& urls, const KURL& url)
740
inline void addSubresourceURL(ListHashSet<URL>& urls, const URL& url)
741
{
741
{
742
    if (!url.isNull())
742
    if (!url.isNull())
743
        urls.add(url);
743
        urls.add(url);
- a/Source/WebCore/dom/ProcessingInstruction.cpp -4 / +4 lines
Lines 127-133 void ProcessingInstruction::checkStyleSheet() a/Source/WebCore/dom/ProcessingInstruction.cpp_sec1
127
            // We need to make a synthetic XSLStyleSheet that is embedded.  It needs to be able
127
            // We need to make a synthetic XSLStyleSheet that is embedded.  It needs to be able
128
            // to kick off import/include loads that can hang off some parent sheet.
128
            // to kick off import/include loads that can hang off some parent sheet.
129
            if (m_isXSL) {
129
            if (m_isXSL) {
130
                KURL finalURL(ParsedURLString, m_localHref);
130
                URL finalURL(ParsedURLString, m_localHref);
131
                m_sheet = XSLStyleSheet::createEmbedded(this, finalURL);
131
                m_sheet = XSLStyleSheet::createEmbedded(this, finalURL);
132
                m_loading = false;
132
                m_loading = false;
133
            }
133
            }
Lines 188-194 bool ProcessingInstruction::sheetLoaded() a/Source/WebCore/dom/ProcessingInstruction.cpp_sec2
188
    return false;
188
    return false;
189
}
189
}
190
190
191
void ProcessingInstruction::setCSSStyleSheet(const String& href, const KURL& baseURL, const String& charset, const CachedCSSStyleSheet* sheet)
191
void ProcessingInstruction::setCSSStyleSheet(const String& href, const URL& baseURL, const String& charset, const CachedCSSStyleSheet* sheet)
192
{
192
{
193
    if (!inDocument()) {
193
    if (!inDocument()) {
194
        ASSERT(!m_sheet);
194
        ASSERT(!m_sheet);
Lines 214-220 void ProcessingInstruction::setCSSStyleSheet(const String& href, const KURL& bas a/Source/WebCore/dom/ProcessingInstruction.cpp_sec3
214
}
214
}
215
215
216
#if ENABLE(XSLT)
216
#if ENABLE(XSLT)
217
void ProcessingInstruction::setXSLStyleSheet(const String& href, const KURL& baseURL, const String& sheet)
217
void ProcessingInstruction::setXSLStyleSheet(const String& href, const URL& baseURL, const String& sheet)
218
{
218
{
219
    ASSERT(m_isXSL);
219
    ASSERT(m_isXSL);
220
    m_sheet = XSLStyleSheet::create(this, href, baseURL);
220
    m_sheet = XSLStyleSheet::create(this, href, baseURL);
Lines 254-260 void ProcessingInstruction::setCSSStyleSheet(PassRefPtr<CSSStyleSheet> sheet) a/Source/WebCore/dom/ProcessingInstruction.cpp_sec4
254
    sheet->setDisabled(m_alternate);
254
    sheet->setDisabled(m_alternate);
255
}
255
}
256
256
257
void ProcessingInstruction::addSubresourceAttributeURLs(ListHashSet<KURL>& urls) const
257
void ProcessingInstruction::addSubresourceAttributeURLs(ListHashSet<URL>& urls) const
258
{
258
{
259
    if (!sheet())
259
    if (!sheet())
260
        return;
260
        return;
- a/Source/WebCore/dom/ProcessingInstruction.h -3 / +3 lines
Lines 64-78 private: a/Source/WebCore/dom/ProcessingInstruction.h_sec1
64
    virtual void removedFrom(ContainerNode*) OVERRIDE;
64
    virtual void removedFrom(ContainerNode*) OVERRIDE;
65
65
66
    void checkStyleSheet();
66
    void checkStyleSheet();
67
    virtual void setCSSStyleSheet(const String& href, const KURL& baseURL, const String& charset, const CachedCSSStyleSheet*);
67
    virtual void setCSSStyleSheet(const String& href, const URL& baseURL, const String& charset, const CachedCSSStyleSheet*);
68
#if ENABLE(XSLT)
68
#if ENABLE(XSLT)
69
    virtual void setXSLStyleSheet(const String& href, const KURL& baseURL, const String& sheet);
69
    virtual void setXSLStyleSheet(const String& href, const URL& baseURL, const String& sheet);
70
#endif
70
#endif
71
71
72
    bool isLoading() const;
72
    bool isLoading() const;
73
    virtual bool sheetLoaded();
73
    virtual bool sheetLoaded();
74
74
75
    virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const;
75
    virtual void addSubresourceAttributeURLs(ListHashSet<URL>&) const;
76
76
77
    void parseStyleSheet(const String& sheet);
77
    void parseStyleSheet(const String& sheet);
78
78
- a/Source/WebCore/dom/ScriptExecutionContext.cpp -1 / +1 lines
Lines 280-286 void ScriptExecutionContext::closeMessagePorts() { a/Source/WebCore/dom/ScriptExecutionContext.cpp_sec1
280
280
281
bool ScriptExecutionContext::sanitizeScriptError(String& errorMessage, int& lineNumber, int& columnNumber, String& sourceURL, CachedScript* cachedScript)
281
bool ScriptExecutionContext::sanitizeScriptError(String& errorMessage, int& lineNumber, int& columnNumber, String& sourceURL, CachedScript* cachedScript)
282
{
282
{
283
    KURL targetURL = completeURL(sourceURL);
283
    URL targetURL = completeURL(sourceURL);
284
    if (securityOrigin()->canRequest(targetURL) || (cachedScript && cachedScript->passesAccessControlCheck(securityOrigin())))
284
    if (securityOrigin()->canRequest(targetURL) || (cachedScript && cachedScript->passesAccessControlCheck(securityOrigin())))
285
        return false;
285
        return false;
286
    errorMessage = "Script error.";
286
    errorMessage = "Script error.";
- a/Source/WebCore/dom/ScriptExecutionContext.h -4 / +4 lines
Lines 30-36 a/Source/WebCore/dom/ScriptExecutionContext.h_sec1
30
30
31
#include "ActiveDOMObject.h"
31
#include "ActiveDOMObject.h"
32
#include "ConsoleTypes.h"
32
#include "ConsoleTypes.h"
33
#include "KURL.h"
33
#include "URL.h"
34
#include "SecurityContext.h"
34
#include "SecurityContext.h"
35
#include "Supplementable.h"
35
#include "Supplementable.h"
36
#include <wtf/HashSet.h>
36
#include <wtf/HashSet.h>
Lines 66-75 public: a/Source/WebCore/dom/ScriptExecutionContext.h_sec2
66
    virtual bool isContextThread() const { return true; }
66
    virtual bool isContextThread() const { return true; }
67
    virtual bool isJSExecutionForbidden() const = 0;
67
    virtual bool isJSExecutionForbidden() const = 0;
68
68
69
    virtual const KURL& url() const = 0;
69
    virtual const URL& url() const = 0;
70
    virtual KURL completeURL(const String& url) const = 0;
70
    virtual URL completeURL(const String& url) const = 0;
71
71
72
    virtual String userAgent(const KURL&) const = 0;
72
    virtual String userAgent(const URL&) const = 0;
73
73
74
    virtual void disableEval(const String& errorMessage) = 0;
74
    virtual void disableEval(const String& errorMessage) = 0;
75
75
- a/Source/WebCore/dom/SecurityContext.cpp -1 / +1 lines
Lines 56-62 void SecurityContext::setContentSecurityPolicy(PassOwnPtr<ContentSecurityPolicy> a/Source/WebCore/dom/SecurityContext.cpp_sec1
56
    m_contentSecurityPolicy = contentSecurityPolicy;
56
    m_contentSecurityPolicy = contentSecurityPolicy;
57
}
57
}
58
58
59
bool SecurityContext::isSecureTransitionTo(const KURL& url) const
59
bool SecurityContext::isSecureTransitionTo(const URL& url) const
60
{
60
{
61
    // If we haven't initialized our security origin by now, this is probably
61
    // If we haven't initialized our security origin by now, this is probably
62
    // a new window created via the API (i.e., that lacks an origin and lacks
62
    // a new window created via the API (i.e., that lacks an origin and lacks
- a/Source/WebCore/dom/SecurityContext.h -2 / +2 lines
Lines 35-41 namespace WebCore { a/Source/WebCore/dom/SecurityContext.h_sec1
35
35
36
class SecurityOrigin;
36
class SecurityOrigin;
37
class ContentSecurityPolicy;
37
class ContentSecurityPolicy;
38
class KURL;
38
class URL;
39
39
40
enum SandboxFlag {
40
enum SandboxFlag {
41
    // See http://www.whatwg.org/specs/web-apps/current-work/#attr-iframe-sandbox for a list of the sandbox flags.
41
    // See http://www.whatwg.org/specs/web-apps/current-work/#attr-iframe-sandbox for a list of the sandbox flags.
Lines 61-67 public: a/Source/WebCore/dom/SecurityContext.h_sec2
61
    SandboxFlags sandboxFlags() const { return m_sandboxFlags; }
61
    SandboxFlags sandboxFlags() const { return m_sandboxFlags; }
62
    ContentSecurityPolicy* contentSecurityPolicy() { return m_contentSecurityPolicy.get(); }
62
    ContentSecurityPolicy* contentSecurityPolicy() { return m_contentSecurityPolicy.get(); }
63
63
64
    bool isSecureTransitionTo(const KURL&) const;
64
    bool isSecureTransitionTo(const URL&) const;
65
65
66
    void enforceSandboxFlags(SandboxFlags mask);
66
    void enforceSandboxFlags(SandboxFlags mask);
67
    bool isSandboxed(SandboxFlags mask) const { return m_sandboxFlags & mask; }
67
    bool isSandboxed(SandboxFlags mask) const { return m_sandboxFlags & mask; }
- a/Source/WebCore/dom/StyledElement.cpp -1 / +1 lines
Lines 274-280 void StyledElement::removeAllInlineStyleProperties() a/Source/WebCore/dom/StyledElement.cpp_sec1
274
    inlineStyleChanged();
274
    inlineStyleChanged();
275
}
275
}
276
276
277
void StyledElement::addSubresourceAttributeURLs(ListHashSet<KURL>& urls) const
277
void StyledElement::addSubresourceAttributeURLs(ListHashSet<URL>& urls) const
278
{
278
{
279
    if (const StylePropertySet* inlineStyle = elementData() ? elementData()->inlineStyle() : 0)
279
    if (const StylePropertySet* inlineStyle = elementData() ? elementData()->inlineStyle() : 0)
280
        inlineStyle->addSubresourceStyleURLs(urls, document().elementSheet().contents());
280
        inlineStyle->addSubresourceStyleURLs(urls, document().elementSheet().contents());
- a/Source/WebCore/dom/StyledElement.h -1 / +1 lines
Lines 76-82 protected: a/Source/WebCore/dom/StyledElement.h_sec1
76
    void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPropertyID, double value, CSSPrimitiveValue::UnitTypes);
76
    void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPropertyID, double value, CSSPrimitiveValue::UnitTypes);
77
    void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPropertyID, const String& value);
77
    void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPropertyID, const String& value);
78
78
79
    virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const;
79
    virtual void addSubresourceAttributeURLs(ListHashSet<URL>&) const;
80
80
81
private:
81
private:
82
    void styleAttributeChanged(const AtomicString& newStyleString, AttributeModificationReason);
82
    void styleAttributeChanged(const AtomicString& newStyleString, AttributeModificationReason);
- a/Source/WebCore/editing/Editor.cpp -3 / +3 lines
Lines 1174-1185 void Editor::simplifyMarkup(Node* startNode, Node* endNode) a/Source/WebCore/editing/Editor.cpp_sec1
1174
    applyCommand(SimplifyMarkupCommand::create(document(), startNode, (endNode) ? NodeTraversal::next(endNode) : 0));
1174
    applyCommand(SimplifyMarkupCommand::create(document(), startNode, (endNode) ? NodeTraversal::next(endNode) : 0));
1175
}
1175
}
1176
1176
1177
void Editor::copyURL(const KURL& url, const String& title)
1177
void Editor::copyURL(const URL& url, const String& title)
1178
{
1178
{
1179
    copyURL(url, title, *Pasteboard::createForCopyAndPaste());
1179
    copyURL(url, title, *Pasteboard::createForCopyAndPaste());
1180
}
1180
}
1181
1181
1182
void Editor::copyURL(const KURL& url, const String& title, Pasteboard& pasteboard)
1182
void Editor::copyURL(const URL& url, const String& title, Pasteboard& pasteboard)
1183
{
1183
{
1184
    PasteboardURL pasteboardURL;
1184
    PasteboardURL pasteboardURL;
1185
    pasteboardURL.url = url;
1185
    pasteboardURL.url = url;
Lines 1198-1204 void Editor::copyImage(const HitTestResult& result) a/Source/WebCore/editing/Editor.cpp_sec2
1198
    if (!element)
1198
    if (!element)
1199
        return;
1199
        return;
1200
1200
1201
    KURL url = result.absoluteLinkURL();
1201
    URL url = result.absoluteLinkURL();
1202
    if (url.isEmpty())
1202
    if (url.isEmpty())
1203
        url = result.absoluteImageURL();
1203
        url = result.absoluteImageURL();
1204
1204
- a/Source/WebCore/editing/Editor.h -3 / +3 lines
Lines 126-133 public: a/Source/WebCore/editing/Editor.h_sec1
126
    void pasteAsPlainText();
126
    void pasteAsPlainText();
127
    void performDelete();
127
    void performDelete();
128
128
129
    void copyURL(const KURL&, const String& title);
129
    void copyURL(const URL&, const String& title);
130
    void copyURL(const KURL&, const String& title, Pasteboard&);
130
    void copyURL(const URL&, const String& title, Pasteboard&);
131
    void copyImage(const HitTestResult&);
131
    void copyImage(const HitTestResult&);
132
132
133
    String readPlainTextFromPasteboard(Pasteboard&);
133
    String readPlainTextFromPasteboard(Pasteboard&);
Lines 413-419 public: a/Source/WebCore/editing/Editor.h_sec2
413
413
414
#if PLATFORM(MAC) || PLATFORM(EFL)
414
#if PLATFORM(MAC) || PLATFORM(EFL)
415
    void writeSelectionToPasteboard(Pasteboard&);
415
    void writeSelectionToPasteboard(Pasteboard&);
416
    void writeImageToPasteboard(Pasteboard&, Element& imageElement, const KURL&, const String& title);
416
    void writeImageToPasteboard(Pasteboard&, Element& imageElement, const URL&, const String& title);
417
#endif
417
#endif
418
418
419
private:
419
private:
- a/Source/WebCore/editing/MarkupAccumulator.cpp -1 / +1 lines
Lines 35-41 a/Source/WebCore/editing/MarkupAccumulator.cpp_sec1
35
#include "HTMLElement.h"
35
#include "HTMLElement.h"
36
#include "HTMLNames.h"
36
#include "HTMLNames.h"
37
#include "HTMLTemplateElement.h"
37
#include "HTMLTemplateElement.h"
38
#include "KURL.h"
38
#include "URL.h"
39
#include "ProcessingInstruction.h"
39
#include "ProcessingInstruction.h"
40
#include "XLinkNames.h"
40
#include "XLinkNames.h"
41
#include "XMLNSNames.h"
41
#include "XMLNSNames.h"
- a/Source/WebCore/editing/efl/EditorEfl.cpp -1 / +1 lines
Lines 37-43 void Editor::writeSelectionToPasteboard(Pasteboard&) a/Source/WebCore/editing/efl/EditorEfl.cpp_sec1
37
    notImplemented();
37
    notImplemented();
38
}
38
}
39
39
40
void Editor::writeImageToPasteboard(Pasteboard&, Element&, const KURL&, const String&)
40
void Editor::writeImageToPasteboard(Pasteboard&, Element&, const URL&, const String&)
41
{
41
{
42
    notImplemented();
42
    notImplemented();
43
}
43
}
- a/Source/WebCore/editing/ios/EditorIOS.mm -1 / +1 lines
Lines 336-342 static void getImage(Element& imageElement, RefPtr<Image>& image, CachedImage*& a/Source/WebCore/editing/ios/EditorIOS.mm_sec1
336
    cachedImage = tentativeCachedImage;
336
    cachedImage = tentativeCachedImage;
337
}
337
}
338
338
339
void Editor::writeImageToPasteboard(Pasteboard& pasteboard, Element& imageElement, const KURL&, const String& title)
339
void Editor::writeImageToPasteboard(Pasteboard& pasteboard, Element& imageElement, const URL&, const String& title)
340
{
340
{
341
    PasteboardImage pasteboardImage;
341
    PasteboardImage pasteboardImage;
342
342
- a/Source/WebCore/editing/mac/EditorMac.mm -6 / +6 lines
Lines 386-392 String Editor::plainTextFromPasteboard(const PasteboardPlainText& text) a/Source/WebCore/editing/mac/EditorMac.mm_sec1
386
    String string = text.text;
386
    String string = text.text;
387
387
388
    // FIXME: It's not clear this is 100% correct since we know -[NSURL URLWithString:] does not handle
388
    // FIXME: It's not clear this is 100% correct since we know -[NSURL URLWithString:] does not handle
389
    // all the same cases we handle well in the KURL code for creating an NSURL.
389
    // all the same cases we handle well in the URL code for creating an NSURL.
390
    if (text.isURL)
390
    if (text.isURL)
391
        string = client()->userVisibleString([NSURL URLWithString:string]);
391
        string = client()->userVisibleString([NSURL URLWithString:string]);
392
392
Lines 394-400 String Editor::plainTextFromPasteboard(const PasteboardPlainText& text) a/Source/WebCore/editing/mac/EditorMac.mm_sec2
394
    return [(NSString *)string precomposedStringWithCanonicalMapping];
394
    return [(NSString *)string precomposedStringWithCanonicalMapping];
395
}
395
}
396
396
397
void Editor::writeImageToPasteboard(Pasteboard& pasteboard, Element& imageElement, const KURL& url, const String& title)
397
void Editor::writeImageToPasteboard(Pasteboard& pasteboard, Element& imageElement, const URL& url, const String& title)
398
{
398
{
399
    PasteboardImage pasteboardImage;
399
    PasteboardImage pasteboardImage;
400
400
Lines 437-443 private: a/Source/WebCore/editing/mac/EditorMac.mm_sec3
437
    virtual bool readRTFD(PassRefPtr<SharedBuffer>) override;
437
    virtual bool readRTFD(PassRefPtr<SharedBuffer>) override;
438
    virtual bool readRTF(PassRefPtr<SharedBuffer>) override;
438
    virtual bool readRTF(PassRefPtr<SharedBuffer>) override;
439
    virtual bool readImage(PassRefPtr<SharedBuffer>, const String& type) override;
439
    virtual bool readImage(PassRefPtr<SharedBuffer>, const String& type) override;
440
    virtual bool readURL(const KURL&, const String& title) override;
440
    virtual bool readURL(const URL&, const String& title) override;
441
    virtual bool readPlainText(const String&) override;
441
    virtual bool readPlainText(const String&) override;
442
};
442
};
443
443
Lines 446-452 bool Editor::WebContentReader::readWebArchive(PassRefPtr<SharedBuffer> buffer) a/Source/WebCore/editing/mac/EditorMac.mm_sec4
446
    if (!frame.document())
446
    if (!frame.document())
447
        return false;
447
        return false;
448
448
449
    RefPtr<LegacyWebArchive> archive = LegacyWebArchive::create(KURL(), buffer.get());
449
    RefPtr<LegacyWebArchive> archive = LegacyWebArchive::create(URL(), buffer.get());
450
    if (!archive)
450
    if (!archive)
451
        return false;
451
        return false;
452
452
Lines 535-547 bool Editor::WebContentReader::readImage(PassRefPtr<SharedBuffer> buffer, const a/Source/WebCore/editing/mac/EditorMac.mm_sec5
535
    ASSERT(type.contains('/'));
535
    ASSERT(type.contains('/'));
536
    String typeAsFilenameWithExtension = type;
536
    String typeAsFilenameWithExtension = type;
537
    typeAsFilenameWithExtension.replace('/', '.');
537
    typeAsFilenameWithExtension.replace('/', '.');
538
    KURL imageURL = KURL(KURL(), "webkit-fake-url://" + createCanonicalUUIDString() + '/' + typeAsFilenameWithExtension);
538
    URL imageURL = URL(URL(), "webkit-fake-url://" + createCanonicalUUIDString() + '/' + typeAsFilenameWithExtension);
539
539
540
    fragment = frame.editor().createFragmentForImageResourceAndAddResource(ArchiveResource::create(buffer, imageURL, type, emptyString(), emptyString()));
540
    fragment = frame.editor().createFragmentForImageResourceAndAddResource(ArchiveResource::create(buffer, imageURL, type, emptyString(), emptyString()));
541
    return fragment;
541
    return fragment;
542
}
542
}
543
543
544
bool Editor::WebContentReader::readURL(const KURL& url, const String& title)
544
bool Editor::WebContentReader::readURL(const URL& url, const String& title)
545
{
545
{
546
    if (url.string().isEmpty())
546
    if (url.string().isEmpty())
547
        return false;
547
        return false;
- a/Source/WebCore/editing/markup.cpp -5 / +5 lines
Lines 48-54 a/Source/WebCore/editing/markup.cpp_sec1
48
#include "HTMLTableElement.h"
48
#include "HTMLTableElement.h"
49
#include "HTMLTextAreaElement.h"
49
#include "HTMLTextAreaElement.h"
50
#include "HTMLTextFormControlElement.h"
50
#include "HTMLTextFormControlElement.h"
51
#include "KURL.h"
51
#include "URL.h"
52
#include "MarkupAccumulator.h"
52
#include "MarkupAccumulator.h"
53
#include "Range.h"
53
#include "Range.h"
54
#include "RenderBlock.h"
54
#include "RenderBlock.h"
Lines 100-106 static void completeURLs(DocumentFragment* fragment, const String& baseURL) a/Source/WebCore/editing/markup.cpp_sec2
100
{
100
{
101
    Vector<AttributeChange> changes;
101
    Vector<AttributeChange> changes;
102
102
103
    KURL parsedBaseURL(ParsedURLString, baseURL);
103
    URL parsedBaseURL(ParsedURLString, baseURL);
104
104
105
    for (auto element = elementDescendants(fragment).begin(), end = elementDescendants(fragment).end(); element != end; ++element) {
105
    for (auto element = elementDescendants(fragment).begin(), end = elementDescendants(fragment).end(); element != end; ++element) {
106
        if (!element->hasAttributes())
106
        if (!element->hasAttributes())
Lines 109-115 static void completeURLs(DocumentFragment* fragment, const String& baseURL) a/Source/WebCore/editing/markup.cpp_sec3
109
        for (unsigned i = 0; i < length; i++) {
109
        for (unsigned i = 0; i < length; i++) {
110
            const Attribute& attribute = element->attributeAt(i);
110
            const Attribute& attribute = element->attributeAt(i);
111
            if (element->isURLAttribute(attribute) && !attribute.value().isEmpty())
111
            if (element->isURLAttribute(attribute) && !attribute.value().isEmpty())
112
                changes.append(AttributeChange(&*element, attribute.name(), KURL(parsedBaseURL, attribute.value()).string()));
112
                changes.append(AttributeChange(&*element, attribute.name(), URL(parsedBaseURL, attribute.value()).string()));
113
        }
113
        }
114
    }
114
    }
115
115
Lines 723-729 PassRefPtr<DocumentFragment> createFragmentFromMarkupWithContext(Document* docum a/Source/WebCore/editing/markup.cpp_sec4
723
    taggedMarkup.append(markup.substring(fragmentEnd));
723
    taggedMarkup.append(markup.substring(fragmentEnd));
724
724
725
    RefPtr<DocumentFragment> taggedFragment = createFragmentFromMarkup(document, taggedMarkup.toString(), baseURL, parserContentPolicy);
725
    RefPtr<DocumentFragment> taggedFragment = createFragmentFromMarkup(document, taggedMarkup.toString(), baseURL, parserContentPolicy);
726
    RefPtr<Document> taggedDocument = Document::create(0, KURL());
726
    RefPtr<Document> taggedDocument = Document::create(0, URL());
727
    taggedDocument->takeAllChildrenFrom(taggedFragment.get());
727
    taggedDocument->takeAllChildrenFrom(taggedFragment.get());
728
728
729
    RefPtr<Node> nodeBeforeContext;
729
    RefPtr<Node> nodeBeforeContext;
Lines 952-958 String createFullMarkup(const Range* range) a/Source/WebCore/editing/markup.cpp_sec5
952
    return documentTypeString(node->document()) + createMarkup(range, 0, AnnotateForInterchange);
952
    return documentTypeString(node->document()) + createMarkup(range, 0, AnnotateForInterchange);
953
}
953
}
954
954
955
String urlToMarkup(const KURL& url, const String& title)
955
String urlToMarkup(const URL& url, const String& title)
956
{
956
{
957
    StringBuilder markup;
957
    StringBuilder markup;
958
    markup.append("<a href=\"");
958
    markup.append("<a href=\"");
- a/Source/WebCore/editing/markup.h -2 / +2 lines
Lines 38-44 class Document; a/Source/WebCore/editing/markup.h_sec1
38
class DocumentFragment;
38
class DocumentFragment;
39
class Element;
39
class Element;
40
class HTMLElement;
40
class HTMLElement;
41
class KURL;
41
class URL;
42
class Node;
42
class Node;
43
class QualifiedName;
43
class QualifiedName;
44
class Range;
44
class Range;
Lines 70-76 String createMarkup(const Node*, EChildrenOnly = IncludeNode, Vector<Node*>* = 0 a/Source/WebCore/editing/markup.h_sec2
70
String createFullMarkup(const Node*);
70
String createFullMarkup(const Node*);
71
String createFullMarkup(const Range*);
71
String createFullMarkup(const Range*);
72
72
73
String urlToMarkup(const KURL&, const String& title);
73
String urlToMarkup(const URL&, const String& title);
74
74
75
String documentTypeString(const Document&);
75
String documentTypeString(const Document&);
76
76
- a/Source/WebCore/fileapi/AsyncFileStream.cpp -2 / +2 lines
Lines 203-214 static void didWrite(AsyncFileStream* proxy, int bytesWritten) a/Source/WebCore/fileapi/AsyncFileStream.cpp_sec1
203
        proxy->client()->didWrite(bytesWritten);
203
        proxy->client()->didWrite(bytesWritten);
204
}
204
}
205
205
206
void AsyncFileStream::write(const KURL& blobURL, long long position, int length)
206
void AsyncFileStream::write(const URL& blobURL, long long position, int length)
207
{
207
{
208
    fileThread()->postTask(createFileThreadTask(this, &AsyncFileStream::writeOnFileThread, blobURL, position, length));
208
    fileThread()->postTask(createFileThreadTask(this, &AsyncFileStream::writeOnFileThread, blobURL, position, length));
209
}
209
}
210
210
211
void AsyncFileStream::writeOnFileThread(const KURL& blobURL, long long position, int length)
211
void AsyncFileStream::writeOnFileThread(const URL& blobURL, long long position, int length)
212
{
212
{
213
    int bytesWritten = m_stream->write(blobURL, position, length);
213
    int bytesWritten = m_stream->write(blobURL, position, length);
214
    callOnMainThread(didWrite, AllowCrossThreadAccess(this), bytesWritten);
214
    callOnMainThread(didWrite, AllowCrossThreadAccess(this), bytesWritten);
- a/Source/WebCore/fileapi/AsyncFileStream.h -3 / +3 lines
Lines 42-48 namespace WebCore { a/Source/WebCore/fileapi/AsyncFileStream.h_sec1
42
42
43
class FileStreamClient;
43
class FileStreamClient;
44
class FileStream;
44
class FileStream;
45
class KURL;
45
class URL;
46
46
47
class AsyncFileStream : public RefCounted<AsyncFileStream> {
47
class AsyncFileStream : public RefCounted<AsyncFileStream> {
48
public:
48
public:
Lines 54-60 public: a/Source/WebCore/fileapi/AsyncFileStream.h_sec2
54
    void openForWrite(const String& path);
54
    void openForWrite(const String& path);
55
    void close();
55
    void close();
56
    void read(char* buffer, int length);
56
    void read(char* buffer, int length);
57
    void write(const KURL& blobURL, long long position, int length);
57
    void write(const URL& blobURL, long long position, int length);
58
    void truncate(long long position);
58
    void truncate(long long position);
59
59
60
    // Stops the proxy and schedules it to be destructed. All the pending tasks will be aborted and the file stream will be closed.
60
    // Stops the proxy and schedules it to be destructed. All the pending tasks will be aborted and the file stream will be closed.
Lines 75-81 private: a/Source/WebCore/fileapi/AsyncFileStream.h_sec3
75
    void openForWriteOnFileThread(const String& path);
75
    void openForWriteOnFileThread(const String& path);
76
    void closeOnFileThread();
76
    void closeOnFileThread();
77
    void readOnFileThread(char* buffer, int length);
77
    void readOnFileThread(char* buffer, int length);
78
    void writeOnFileThread(const KURL& blobURL, long long position, int length);
78
    void writeOnFileThread(const URL& blobURL, long long position, int length);
79
    void truncateOnFileThread(long long position);
79
    void truncateOnFileThread(long long position);
80
80
81
    RefPtr<FileStream> m_stream;
81
    RefPtr<FileStream> m_stream;
- a/Source/WebCore/fileapi/Blob.cpp -5 / +5 lines
Lines 54-73 enum SliceHistogramEnum { a/Source/WebCore/fileapi/Blob.cpp_sec1
54
54
55
class BlobURLRegistry : public URLRegistry {
55
class BlobURLRegistry : public URLRegistry {
56
public:
56
public:
57
    virtual void registerURL(SecurityOrigin*, const KURL&, URLRegistrable*) OVERRIDE;
57
    virtual void registerURL(SecurityOrigin*, const URL&, URLRegistrable*) OVERRIDE;
58
    virtual void unregisterURL(const KURL&) OVERRIDE;
58
    virtual void unregisterURL(const URL&) OVERRIDE;
59
59
60
    static URLRegistry& registry();
60
    static URLRegistry& registry();
61
};
61
};
62
62
63
63
64
void BlobURLRegistry::registerURL(SecurityOrigin* origin, const KURL& publicURL, URLRegistrable* blob)
64
void BlobURLRegistry::registerURL(SecurityOrigin* origin, const URL& publicURL, URLRegistrable* blob)
65
{
65
{
66
    ASSERT(&blob->registry() == this);
66
    ASSERT(&blob->registry() == this);
67
    ThreadableBlobRegistry::registerBlobURL(origin, publicURL, static_cast<Blob*>(blob)->url());
67
    ThreadableBlobRegistry::registerBlobURL(origin, publicURL, static_cast<Blob*>(blob)->url());
68
}
68
}
69
69
70
void BlobURLRegistry::unregisterURL(const KURL& url)
70
void BlobURLRegistry::unregisterURL(const URL& url)
71
{
71
{
72
    ThreadableBlobRegistry::unregisterBlobURL(url);
72
    ThreadableBlobRegistry::unregisterBlobURL(url);
73
}
73
}
Lines 100-106 Blob::Blob(PassOwnPtr<BlobData> blobData, long long size) a/Source/WebCore/fileapi/Blob.cpp_sec2
100
    ThreadableBlobRegistry::registerBlobURL(m_internalURL, blobData);
100
    ThreadableBlobRegistry::registerBlobURL(m_internalURL, blobData);
101
}
101
}
102
102
103
Blob::Blob(const KURL& srcURL, const String& type, long long size)
103
Blob::Blob(const URL& srcURL, const String& type, long long size)
104
    : m_type(Blob::normalizedContentType(type))
104
    : m_type(Blob::normalizedContentType(type))
105
    , m_size(size)
105
    , m_size(size)
106
{
106
{
- a/Source/WebCore/fileapi/Blob.h -5 / +5 lines
Lines 32-38 a/Source/WebCore/fileapi/Blob.h_sec1
32
#define Blob_h
32
#define Blob_h
33
33
34
#include "BlobData.h"
34
#include "BlobData.h"
35
#include "KURL.h"
35
#include "URL.h"
36
#include "ScriptWrappable.h"
36
#include "ScriptWrappable.h"
37
#include "URLRegistry.h"
37
#include "URLRegistry.h"
38
#include <wtf/PassOwnPtr.h>
38
#include <wtf/PassOwnPtr.h>
Lines 57-63 public: a/Source/WebCore/fileapi/Blob.h_sec2
57
    }
57
    }
58
58
59
    // For deserialization.
59
    // For deserialization.
60
    static PassRefPtr<Blob> create(const KURL& srcURL, const String& type, long long size)
60
    static PassRefPtr<Blob> create(const URL& srcURL, const String& type, long long size)
61
    {
61
    {
62
        ASSERT(Blob::isNormalizedContentType(type));
62
        ASSERT(Blob::isNormalizedContentType(type));
63
        return adoptRef(new Blob(srcURL, type, size));
63
        return adoptRef(new Blob(srcURL, type, size));
Lines 65-71 public: a/Source/WebCore/fileapi/Blob.h_sec3
65
65
66
    virtual ~Blob();
66
    virtual ~Blob();
67
67
68
    const KURL& url() const { return m_internalURL; }
68
    const URL& url() const { return m_internalURL; }
69
    const String& type() const { return m_type; }
69
    const String& type() const { return m_type; }
70
70
71
    virtual unsigned long long size() const { return static_cast<unsigned long long>(m_size); }
71
    virtual unsigned long long size() const { return static_cast<unsigned long long>(m_size); }
Lines 91-102 protected: a/Source/WebCore/fileapi/Blob.h_sec4
91
    Blob(PassOwnPtr<BlobData>, long long size);
91
    Blob(PassOwnPtr<BlobData>, long long size);
92
92
93
    // For deserialization.
93
    // For deserialization.
94
    Blob(const KURL& srcURL, const String& type, long long size);
94
    Blob(const URL& srcURL, const String& type, long long size);
95
95
96
    // This is an internal URL referring to the blob data associated with this object. It serves
96
    // This is an internal URL referring to the blob data associated with this object. It serves
97
    // as an identifier for this blob. The internal URL is never used to source the blob's content
97
    // as an identifier for this blob. The internal URL is never used to source the blob's content
98
    // into an HTML or for FileRead'ing, public blob URLs must be used for those purposes.
98
    // into an HTML or for FileRead'ing, public blob URLs must be used for those purposes.
99
    KURL m_internalURL;
99
    URL m_internalURL;
100
100
101
    String m_type;
101
    String m_type;
102
    long long m_size;
102
    long long m_size;
- a/Source/WebCore/fileapi/BlobURL.cpp -7 / +7 lines
Lines 32-38 a/Source/WebCore/fileapi/BlobURL.cpp_sec1
32
32
33
#include "BlobURL.h"
33
#include "BlobURL.h"
34
34
35
#include "KURL.h"
35
#include "URL.h"
36
#include "SecurityOrigin.h"
36
#include "SecurityOrigin.h"
37
#include "UUID.h"
37
#include "UUID.h"
38
#include <wtf/text/WTFString.h>
38
#include <wtf/text/WTFString.h>
Lines 41-58 namespace WebCore { a/Source/WebCore/fileapi/BlobURL.cpp_sec2
41
41
42
const char BlobURL::kBlobProtocol[] = "blob";
42
const char BlobURL::kBlobProtocol[] = "blob";
43
43
44
KURL BlobURL::createPublicURL(SecurityOrigin* securityOrigin)
44
URL BlobURL::createPublicURL(SecurityOrigin* securityOrigin)
45
{
45
{
46
    ASSERT(securityOrigin);
46
    ASSERT(securityOrigin);
47
    return createBlobURL(securityOrigin->toString());
47
    return createBlobURL(securityOrigin->toString());
48
}
48
}
49
49
50
KURL BlobURL::createInternalURL()
50
URL BlobURL::createInternalURL()
51
{
51
{
52
    return createBlobURL("blobinternal://");
52
    return createBlobURL("blobinternal://");
53
}
53
}
54
54
55
String BlobURL::getOrigin(const KURL& url)
55
String BlobURL::getOrigin(const URL& url)
56
{
56
{
57
    ASSERT(url.protocolIs(kBlobProtocol));
57
    ASSERT(url.protocolIs(kBlobProtocol));
58
58
Lines 61-67 String BlobURL::getOrigin(const KURL& url) a/Source/WebCore/fileapi/BlobURL.cpp_sec3
61
    return url.string().substring(startIndex, endIndex - startIndex - 1);
61
    return url.string().substring(startIndex, endIndex - startIndex - 1);
62
}
62
}
63
63
64
String BlobURL::getIdentifier(const KURL& url)
64
String BlobURL::getIdentifier(const URL& url)
65
{
65
{
66
    ASSERT(url.protocolIs(kBlobProtocol));
66
    ASSERT(url.protocolIs(kBlobProtocol));
67
67
Lines 69-79 String BlobURL::getIdentifier(const KURL& url) a/Source/WebCore/fileapi/BlobURL.cpp_sec4
69
    return url.string().substring(startIndex);
69
    return url.string().substring(startIndex);
70
}
70
}
71
71
72
KURL BlobURL::createBlobURL(const String& originString)
72
URL BlobURL::createBlobURL(const String& originString)
73
{
73
{
74
    ASSERT(!originString.isEmpty());
74
    ASSERT(!originString.isEmpty());
75
    String urlString = "blob:" + encodeWithURLEscapeSequences(originString) + '/' + createCanonicalUUIDString();
75
    String urlString = "blob:" + encodeWithURLEscapeSequences(originString) + '/' + createCanonicalUUIDString();
76
    return KURL(ParsedURLString, urlString);
76
    return URL(ParsedURLString, urlString);
77
}
77
}
78
78
79
} // namespace WebCore
79
} // namespace WebCore
- a/Source/WebCore/fileapi/BlobURL.h -6 / +6 lines
Lines 31-37 a/Source/WebCore/fileapi/BlobURL.h_sec1
31
#ifndef BlobURL_h
31
#ifndef BlobURL_h
32
#define BlobURL_h
32
#define BlobURL_h
33
33
34
#include "KURL.h"
34
#include "URL.h"
35
35
36
namespace WebCore {
36
namespace WebCore {
37
37
Lines 48-61 class SecurityOrigin; a/Source/WebCore/fileapi/BlobURL.h_sec2
48
// be used with ResourceHandle or FileReader.
48
// be used with ResourceHandle or FileReader.
49
class BlobURL {
49
class BlobURL {
50
public:
50
public:
51
    static KURL createPublicURL(SecurityOrigin*);
51
    static URL createPublicURL(SecurityOrigin*);
52
    static KURL createInternalURL();
52
    static URL createInternalURL();
53
    static String getOrigin(const KURL&);
53
    static String getOrigin(const URL&);
54
    static String getIdentifier(const KURL&);
54
    static String getIdentifier(const URL&);
55
    static const char* blobProtocol() { return kBlobProtocol; }
55
    static const char* blobProtocol() { return kBlobProtocol; }
56
56
57
private:
57
private:
58
    static KURL createBlobURL(const String& originString);
58
    static URL createBlobURL(const String& originString);
59
    static const char kBlobProtocol[];
59
    static const char kBlobProtocol[];
60
    BlobURL() { }
60
    BlobURL() { }
61
};
61
};
- a/Source/WebCore/fileapi/File.cpp -3 / +3 lines
Lines 78-84 static PassOwnPtr<BlobData> createBlobDataForFileWithMetadata(const String& file a/Source/WebCore/fileapi/File.cpp_sec1
78
    return blobData.release();
78
    return blobData.release();
79
}
79
}
80
80
81
static PassOwnPtr<BlobData> createBlobDataForFileSystemURL(const KURL& fileSystemURL, const FileMetadata& metadata)
81
static PassOwnPtr<BlobData> createBlobDataForFileSystemURL(const URL& fileSystemURL, const FileMetadata& metadata)
82
{
82
{
83
    OwnPtr<BlobData> blobData = BlobData::create();
83
    OwnPtr<BlobData> blobData = BlobData::create();
84
    blobData->setContentType(getContentTypeFromFileName(fileSystemURL.path(), File::WellKnownContentTypes));
84
    blobData->setContentType(getContentTypeFromFileName(fileSystemURL.path(), File::WellKnownContentTypes));
Lines 107-113 File::File(const String& path, ContentTypeLookupPolicy policy) a/Source/WebCore/fileapi/File.cpp_sec2
107
{
107
{
108
}
108
}
109
109
110
File::File(const String& path, const KURL& url, const String& type)
110
File::File(const String& path, const URL& url, const String& type)
111
    : Blob(url, type, -1)
111
    : Blob(url, type, -1)
112
    , m_path(path)
112
    , m_path(path)
113
#if ENABLE(FILE_SYSTEM)
113
#if ENABLE(FILE_SYSTEM)
Lines 142-148 File::File(const String& name, const FileMetadata& metadata) a/Source/WebCore/fileapi/File.cpp_sec3
142
{
142
{
143
}
143
}
144
144
145
File::File(const KURL& fileSystemURL, const FileMetadata& metadata)
145
File::File(const URL& fileSystemURL, const FileMetadata& metadata)
146
    : Blob(createBlobDataForFileSystemURL(fileSystemURL, metadata), metadata.length)
146
    : Blob(createBlobDataForFileSystemURL(fileSystemURL, metadata), metadata.length)
147
    , m_fileSystemURL(fileSystemURL)
147
    , m_fileSystemURL(fileSystemURL)
148
    , m_snapshotSize(metadata.length)
148
    , m_snapshotSize(metadata.length)
- a/Source/WebCore/fileapi/File.h -7 / +7 lines
Lines 33-39 a/Source/WebCore/fileapi/File.h_sec1
33
namespace WebCore {
33
namespace WebCore {
34
34
35
struct FileMetadata;
35
struct FileMetadata;
36
class KURL;
36
class URL;
37
37
38
class File : public Blob {
38
class File : public Blob {
39
public:
39
public:
Lines 50-56 public: a/Source/WebCore/fileapi/File.h_sec2
50
    }
50
    }
51
51
52
    // For deserialization.
52
    // For deserialization.
53
    static PassRefPtr<File> create(const String& path, const KURL& srcURL, const String& type)
53
    static PassRefPtr<File> create(const String& path, const URL& srcURL, const String& type)
54
    {
54
    {
55
        return adoptRef(new File(path, srcURL, type));
55
        return adoptRef(new File(path, srcURL, type));
56
    }
56
    }
Lines 68-79 public: a/Source/WebCore/fileapi/File.h_sec3
68
        return adoptRef(new File(name, metadata));
68
        return adoptRef(new File(name, metadata));
69
    }
69
    }
70
70
71
    static PassRefPtr<File> createForFileSystemFile(const KURL& url, const FileMetadata& metadata)
71
    static PassRefPtr<File> createForFileSystemFile(const URL& url, const FileMetadata& metadata)
72
    {
72
    {
73
        return adoptRef(new File(url, metadata));
73
        return adoptRef(new File(url, metadata));
74
    }
74
    }
75
75
76
    KURL fileSystemURL() const { return m_fileSystemURL; }
76
    URL fileSystemURL() const { return m_fileSystemURL; }
77
#endif
77
#endif
78
78
79
    // Create a file with a name exposed to the author (via File.name and associated DOM properties) that differs from the one provided in the path.
79
    // Create a file with a name exposed to the author (via File.name and associated DOM properties) that differs from the one provided in the path.
Lines 105-116 private: a/Source/WebCore/fileapi/File.h_sec4
105
    File(const String& path, ContentTypeLookupPolicy);
105
    File(const String& path, ContentTypeLookupPolicy);
106
106
107
    // For deserialization.
107
    // For deserialization.
108
    File(const String& path, const KURL& srcURL, const String& type);
108
    File(const String& path, const URL& srcURL, const String& type);
109
    File(const String& path, const String& name, ContentTypeLookupPolicy);
109
    File(const String& path, const String& name, ContentTypeLookupPolicy);
110
110
111
# if ENABLE(FILE_SYSTEM)
111
# if ENABLE(FILE_SYSTEM)
112
    File(const String& name, const FileMetadata&);
112
    File(const String& name, const FileMetadata&);
113
    File(const KURL& fileSystemURL, const FileMetadata&);
113
    File(const URL& fileSystemURL, const FileMetadata&);
114
114
115
    // Returns true if this has a valid snapshot metadata (i.e. m_snapshotSize >= 0).
115
    // Returns true if this has a valid snapshot metadata (i.e. m_snapshotSize >= 0).
116
    bool hasValidSnapshotMetadata() const { return m_snapshotSize >= 0; }
116
    bool hasValidSnapshotMetadata() const { return m_snapshotSize >= 0; }
Lines 120-126 private: a/Source/WebCore/fileapi/File.h_sec5
120
    String m_name;
120
    String m_name;
121
121
122
#if ENABLE(FILE_SYSTEM)
122
#if ENABLE(FILE_SYSTEM)
123
    KURL m_fileSystemURL;
123
    URL m_fileSystemURL;
124
124
125
    // If m_snapshotSize is negative (initialized to -1 by default), the snapshot metadata is invalid and we retrieve the latest metadata synchronously in size(), lastModifiedTime() and slice().
125
    // If m_snapshotSize is negative (initialized to -1 by default), the snapshot metadata is invalid and we retrieve the latest metadata synchronously in size(), lastModifiedTime() and slice().
126
    // Otherwise, the snapshot metadata are used directly in those methods.
126
    // Otherwise, the snapshot metadata are used directly in those methods.
- a/Source/WebCore/fileapi/FileReaderLoader.h -2 / +2 lines
Lines 34-40 a/Source/WebCore/fileapi/FileReaderLoader.h_sec1
34
#if ENABLE(BLOB)
34
#if ENABLE(BLOB)
35
35
36
#include "FileError.h"
36
#include "FileError.h"
37
#include "KURL.h"
37
#include "URL.h"
38
#include "TextEncoding.h"
38
#include "TextEncoding.h"
39
#include "ThreadableLoaderClient.h"
39
#include "ThreadableLoaderClient.h"
40
#include <wtf/Forward.h>
40
#include <wtf/Forward.h>
Lines 106-112 private: a/Source/WebCore/fileapi/FileReaderLoader.h_sec2
106
    TextEncoding m_encoding;
106
    TextEncoding m_encoding;
107
    String m_dataType;
107
    String m_dataType;
108
108
109
    KURL m_urlForReading;
109
    URL m_urlForReading;
110
    RefPtr<ThreadableLoader> m_loader;
110
    RefPtr<ThreadableLoader> m_loader;
111
111
112
    RefPtr<JSC::ArrayBuffer> m_rawData;
112
    RefPtr<JSC::ArrayBuffer> m_rawData;
- a/Source/WebCore/fileapi/ThreadableBlobRegistry.cpp -13 / +13 lines
Lines 49-74 namespace WebCore { a/Source/WebCore/fileapi/ThreadableBlobRegistry.cpp_sec1
49
struct BlobRegistryContext {
49
struct BlobRegistryContext {
50
    WTF_MAKE_FAST_ALLOCATED;
50
    WTF_MAKE_FAST_ALLOCATED;
51
public:
51
public:
52
    BlobRegistryContext(const KURL& url, PassOwnPtr<BlobData> blobData)
52
    BlobRegistryContext(const URL& url, PassOwnPtr<BlobData> blobData)
53
        : url(url.copy())
53
        : url(url.copy())
54
        , blobData(blobData)
54
        , blobData(blobData)
55
    {
55
    {
56
        this->blobData->detachFromCurrentThread();
56
        this->blobData->detachFromCurrentThread();
57
    }
57
    }
58
58
59
    BlobRegistryContext(const KURL& url, const KURL& srcURL)
59
    BlobRegistryContext(const URL& url, const URL& srcURL)
60
        : url(url.copy())
60
        : url(url.copy())
61
        , srcURL(srcURL.copy())
61
        , srcURL(srcURL.copy())
62
    {
62
    {
63
    }
63
    }
64
64
65
    BlobRegistryContext(const KURL& url)
65
    BlobRegistryContext(const URL& url)
66
        : url(url.copy())
66
        : url(url.copy())
67
    {
67
    {
68
    }
68
    }
69
69
70
    KURL url;
70
    URL url;
71
    KURL srcURL;
71
    URL srcURL;
72
    OwnPtr<BlobData> blobData;
72
    OwnPtr<BlobData> blobData;
73
};
73
};
74
74
Lines 87-93 static void registerBlobURLTask(void* context) a/Source/WebCore/fileapi/ThreadableBlobRegistry.cpp_sec2
87
    blobRegistry().registerBlobURL(blobRegistryContext->url, blobRegistryContext->blobData.release());
87
    blobRegistry().registerBlobURL(blobRegistryContext->url, blobRegistryContext->blobData.release());
88
}
88
}
89
89
90
void ThreadableBlobRegistry::registerBlobURL(const KURL& url, PassOwnPtr<BlobData> blobData)
90
void ThreadableBlobRegistry::registerBlobURL(const URL& url, PassOwnPtr<BlobData> blobData)
91
{
91
{
92
    if (isMainThread())
92
    if (isMainThread())
93
        blobRegistry().registerBlobURL(url, blobData);
93
        blobRegistry().registerBlobURL(url, blobData);
Lines 103-109 static void registerBlobURLFromTask(void* context) a/Source/WebCore/fileapi/ThreadableBlobRegistry.cpp_sec3
103
    blobRegistry().registerBlobURL(blobRegistryContext->url, blobRegistryContext->srcURL);
103
    blobRegistry().registerBlobURL(blobRegistryContext->url, blobRegistryContext->srcURL);
104
}
104
}
105
105
106
void ThreadableBlobRegistry::registerBlobURL(SecurityOrigin* origin, const KURL& url, const KURL& srcURL)
106
void ThreadableBlobRegistry::registerBlobURL(SecurityOrigin* origin, const URL& url, const URL& srcURL)
107
{
107
{
108
    // If the blob URL contains null origin, as in the context with unique security origin or file URL, save the mapping between url and origin so that the origin can be retrived when doing security origin check.
108
    // If the blob URL contains null origin, as in the context with unique security origin or file URL, save the mapping between url and origin so that the origin can be retrived when doing security origin check.
109
    if (origin && BlobURL::getOrigin(url) == "null")
109
    if (origin && BlobURL::getOrigin(url) == "null")
Lines 123-129 static void unregisterBlobURLTask(void* context) a/Source/WebCore/fileapi/ThreadableBlobRegistry.cpp_sec4
123
    blobRegistry().unregisterBlobURL(blobRegistryContext->url);
123
    blobRegistry().unregisterBlobURL(blobRegistryContext->url);
124
}
124
}
125
125
126
void ThreadableBlobRegistry::unregisterBlobURL(const KURL& url)
126
void ThreadableBlobRegistry::unregisterBlobURL(const URL& url)
127
{
127
{
128
    if (BlobURL::getOrigin(url) == "null")
128
    if (BlobURL::getOrigin(url) == "null")
129
        originMap()->remove(url.string());
129
        originMap()->remove(url.string());
Lines 136-161 void ThreadableBlobRegistry::unregisterBlobURL(const KURL& url) a/Source/WebCore/fileapi/ThreadableBlobRegistry.cpp_sec5
136
    }
136
    }
137
}
137
}
138
138
139
PassRefPtr<SecurityOrigin> ThreadableBlobRegistry::getCachedOrigin(const KURL& url)
139
PassRefPtr<SecurityOrigin> ThreadableBlobRegistry::getCachedOrigin(const URL& url)
140
{
140
{
141
    return originMap()->get(url.string());
141
    return originMap()->get(url.string());
142
}
142
}
143
143
144
#else
144
#else
145
145
146
void ThreadableBlobRegistry::registerBlobURL(const KURL&, PassOwnPtr<BlobData>)
146
void ThreadableBlobRegistry::registerBlobURL(const URL&, PassOwnPtr<BlobData>)
147
{
147
{
148
}
148
}
149
149
150
void ThreadableBlobRegistry::registerBlobURL(SecurityOrigin*, const KURL&, const KURL&)
150
void ThreadableBlobRegistry::registerBlobURL(SecurityOrigin*, const URL&, const URL&)
151
{
151
{
152
}
152
}
153
153
154
void ThreadableBlobRegistry::unregisterBlobURL(const KURL&)
154
void ThreadableBlobRegistry::unregisterBlobURL(const URL&)
155
{
155
{
156
}
156
}
157
157
158
PassRefPtr<SecurityOrigin> ThreadableBlobRegistry::getCachedOrigin(const KURL&)
158
PassRefPtr<SecurityOrigin> ThreadableBlobRegistry::getCachedOrigin(const URL&)
159
{
159
{
160
    return 0;
160
    return 0;
161
}
161
}
- a/Source/WebCore/fileapi/ThreadableBlobRegistry.h -5 / +5 lines
Lines 37-54 a/Source/WebCore/fileapi/ThreadableBlobRegistry.h_sec1
37
namespace WebCore {
37
namespace WebCore {
38
38
39
class BlobData;
39
class BlobData;
40
class KURL;
40
class URL;
41
class SecurityOrigin;
41
class SecurityOrigin;
42
42
43
class ThreadableBlobRegistry {
43
class ThreadableBlobRegistry {
44
public:
44
public:
45
    static void registerBlobURL(const KURL&, PassOwnPtr<BlobData>);
45
    static void registerBlobURL(const URL&, PassOwnPtr<BlobData>);
46
    static void registerBlobURL(SecurityOrigin*, const KURL&, const KURL& srcURL);
46
    static void registerBlobURL(SecurityOrigin*, const URL&, const URL& srcURL);
47
    static void unregisterBlobURL(const KURL&);
47
    static void unregisterBlobURL(const URL&);
48
48
49
    // Returns the origin for the given blob URL. This is because we are not able to embed the unique security origin or the origin of file URL
49
    // Returns the origin for the given blob URL. This is because we are not able to embed the unique security origin or the origin of file URL
50
    // in the blob URL.
50
    // in the blob URL.
51
    static PassRefPtr<SecurityOrigin> getCachedOrigin(const KURL&);
51
    static PassRefPtr<SecurityOrigin> getCachedOrigin(const URL&);
52
};
52
};
53
53
54
} // namespace WebCore
54
} // namespace WebCore
- a/Source/WebCore/history/CachedFrame.cpp -1 / +1 lines
Lines 239-245 void CachedFrame::clear() a/Source/WebCore/history/CachedFrame.cpp_sec1
239
    m_document = 0;
239
    m_document = 0;
240
    m_view = 0;
240
    m_view = 0;
241
    m_mousePressNode = 0;
241
    m_mousePressNode = 0;
242
    m_url = KURL();
242
    m_url = URL();
243
243
244
    m_cachedFramePlatformData.clear();
244
    m_cachedFramePlatformData.clear();
245
    m_cachedFrameScriptData.clear();
245
    m_cachedFrameScriptData.clear();
- a/Source/WebCore/history/CachedFrame.h -3 / +3 lines
Lines 27-33 a/Source/WebCore/history/CachedFrame.h_sec1
27
#define CachedFrame_h
27
#define CachedFrame_h
28
28
29
#include "DOMWindow.h"
29
#include "DOMWindow.h"
30
#include "KURL.h"
30
#include "URL.h"
31
#include "ScriptCachedFrameData.h"
31
#include "ScriptCachedFrameData.h"
32
#include <wtf/PassOwnPtr.h>
32
#include <wtf/PassOwnPtr.h>
33
#include <wtf/RefPtr.h>
33
#include <wtf/RefPtr.h>
Lines 47-53 public: a/Source/WebCore/history/CachedFrame.h_sec2
47
47
48
    Document* document() const { return m_document.get(); }
48
    Document* document() const { return m_document.get(); }
49
    FrameView* view() const { return m_view.get(); }
49
    FrameView* view() const { return m_view.get(); }
50
    const KURL& url() const { return m_url; }
50
    const URL& url() const { return m_url; }
51
    bool isMainFrame() { return m_isMainFrame; }
51
    bool isMainFrame() { return m_isMainFrame; }
52
52
53
protected:
53
protected:
Lines 58-64 protected: a/Source/WebCore/history/CachedFrame.h_sec3
58
    RefPtr<DocumentLoader> m_documentLoader;
58
    RefPtr<DocumentLoader> m_documentLoader;
59
    RefPtr<FrameView> m_view;
59
    RefPtr<FrameView> m_view;
60
    RefPtr<Node> m_mousePressNode;
60
    RefPtr<Node> m_mousePressNode;
61
    KURL m_url;
61
    URL m_url;
62
    OwnPtr<ScriptCachedFrameData> m_cachedFrameScriptData;
62
    OwnPtr<ScriptCachedFrameData> m_cachedFrameScriptData;
63
    OwnPtr<CachedFramePlatformData> m_cachedFramePlatformData;
63
    OwnPtr<CachedFramePlatformData> m_cachedFramePlatformData;
64
    bool m_isMainFrame;
64
    bool m_isMainFrame;
- a/Source/WebCore/history/HistoryItem.cpp -6 / +6 lines
Lines 109-115 HistoryItem::HistoryItem(const String& urlString, const String& title, const Str a/Source/WebCore/history/HistoryItem.cpp_sec1
109
    iconDatabase().retainIconForPageURL(m_urlString);
109
    iconDatabase().retainIconForPageURL(m_urlString);
110
}
110
}
111
111
112
HistoryItem::HistoryItem(const KURL& url, const String& target, const String& parent, const String& title)
112
HistoryItem::HistoryItem(const URL& url, const String& target, const String& parent, const String& title)
113
    : m_urlString(url.string())
113
    : m_urlString(url.string())
114
    , m_originalURLString(url.string())
114
    , m_originalURLString(url.string())
115
    , m_target(target)
115
    , m_target(target)
Lines 240-253 double HistoryItem::lastVisitedTime() const a/Source/WebCore/history/HistoryItem.cpp_sec2
240
    return m_lastVisitedTime;
240
    return m_lastVisitedTime;
241
}
241
}
242
242
243
KURL HistoryItem::url() const
243
URL HistoryItem::url() const
244
{
244
{
245
    return KURL(ParsedURLString, m_urlString);
245
    return URL(ParsedURLString, m_urlString);
246
}
246
}
247
247
248
KURL HistoryItem::originalURL() const
248
URL HistoryItem::originalURL() const
249
{
249
{
250
    return KURL(ParsedURLString, m_originalURLString);
250
    return URL(ParsedURLString, m_originalURLString);
251
}
251
}
252
252
253
const String& HistoryItem::referrer() const
253
const String& HistoryItem::referrer() const
Lines 282-288 void HistoryItem::setURLString(const String& urlString) a/Source/WebCore/history/HistoryItem.cpp_sec3
282
    notifyHistoryItemChanged(this);
282
    notifyHistoryItemChanged(this);
283
}
283
}
284
284
285
void HistoryItem::setURL(const KURL& url)
285
void HistoryItem::setURL(const URL& url)
286
{
286
{
287
    pageCache()->remove(this);
287
    pageCache()->remove(this);
288
    setURLString(url.string());
288
    setURLString(url.string());
- a/Source/WebCore/history/HistoryItem.h -6 / +6 lines
Lines 56-62 class Document; a/Source/WebCore/history/HistoryItem.h_sec1
56
class FormData;
56
class FormData;
57
class HistoryItem;
57
class HistoryItem;
58
class Image;
58
class Image;
59
class KURL;
59
class URL;
60
class ResourceRequest;
60
class ResourceRequest;
61
61
62
typedef Vector<RefPtr<HistoryItem> > HistoryItemVector;
62
typedef Vector<RefPtr<HistoryItem> > HistoryItemVector;
Lines 81-87 public: a/Source/WebCore/history/HistoryItem.h_sec2
81
    {
81
    {
82
        return adoptRef(new HistoryItem(urlString, title, alternateTitle, lastVisited));
82
        return adoptRef(new HistoryItem(urlString, title, alternateTitle, lastVisited));
83
    }
83
    }
84
    static PassRefPtr<HistoryItem> create(const KURL& url, const String& target, const String& parent, const String& title)
84
    static PassRefPtr<HistoryItem> create(const URL& url, const String& target, const String& parent, const String& title)
85
    {
85
    {
86
        return adoptRef(new HistoryItem(url, target, parent, title));
86
        return adoptRef(new HistoryItem(url, target, parent, title));
87
    }
87
    }
Lines 109-116 public: a/Source/WebCore/history/HistoryItem.h_sec3
109
    const String& alternateTitle() const;
109
    const String& alternateTitle() const;
110
    
110
    
111
    const String& parent() const;
111
    const String& parent() const;
112
    KURL url() const;
112
    URL url() const;
113
    KURL originalURL() const;
113
    URL originalURL() const;
114
    const String& referrer() const;
114
    const String& referrer() const;
115
    const String& target() const;
115
    const String& target() const;
116
    bool isTargetItem() const;
116
    bool isTargetItem() const;
Lines 135-141 public: a/Source/WebCore/history/HistoryItem.h_sec4
135
    void setDocumentState(const Vector<String>&);
135
    void setDocumentState(const Vector<String>&);
136
    void clearDocumentState();
136
    void clearDocumentState();
137
137
138
    void setURL(const KURL&);
138
    void setURL(const URL&);
139
    void setURLString(const String&);
139
    void setURLString(const String&);
140
    void setOriginalURLString(const String&);
140
    void setOriginalURLString(const String&);
141
    void setReferrer(const String&);
141
    void setReferrer(const String&);
Lines 222-228 private: a/Source/WebCore/history/HistoryItem.h_sec5
222
    HistoryItem();
222
    HistoryItem();
223
    HistoryItem(const String& urlString, const String& title, double lastVisited);
223
    HistoryItem(const String& urlString, const String& title, double lastVisited);
224
    HistoryItem(const String& urlString, const String& title, const String& alternateTitle, double lastVisited);
224
    HistoryItem(const String& urlString, const String& title, const String& alternateTitle, double lastVisited);
225
    HistoryItem(const KURL& url, const String& frameName, const String& parent, const String& title);
225
    HistoryItem(const URL& url, const String& frameName, const String& parent, const String& title);
226
226
227
    explicit HistoryItem(const HistoryItem&);
227
    explicit HistoryItem(const HistoryItem&);
228
228
- a/Source/WebCore/history/PageCache.cpp -3 / +3 lines
Lines 95-102 static unsigned logCanCacheFrameDecision(Frame* frame, int indentLevel) a/Source/WebCore/history/PageCache.cpp_sec1
95
        return 1 << NoDocumentLoader;
95
        return 1 << NoDocumentLoader;
96
    }
96
    }
97
97
98
    KURL currentURL = frame->loader().documentLoader()->url();
98
    URL currentURL = frame->loader().documentLoader()->url();
99
    KURL newURL = frame->loader().provisionalDocumentLoader() ? frame->loader().provisionalDocumentLoader()->url() : KURL();
99
    URL newURL = frame->loader().provisionalDocumentLoader() ? frame->loader().provisionalDocumentLoader()->url() : URL();
100
    if (!newURL.isEmpty())
100
    if (!newURL.isEmpty())
101
        PCLOG(" Determining if frame can be cached navigating from (", currentURL.string(), ") to (", newURL.string(), "):");
101
        PCLOG(" Determining if frame can be cached navigating from (", currentURL.string(), ") to (", newURL.string(), "):");
102
    else
102
    else
Lines 205-211 static void logCanCachePageDecision(Page* page) a/Source/WebCore/history/PageCache.cpp_sec2
205
    // Only bother logging for main frames that have actually loaded and have content.
205
    // Only bother logging for main frames that have actually loaded and have content.
206
    if (page->mainFrame().loader().stateMachine()->creatingInitialEmptyDocument())
206
    if (page->mainFrame().loader().stateMachine()->creatingInitialEmptyDocument())
207
        return;
207
        return;
208
    KURL currentURL = page->mainFrame().loader().documentLoader() ? page->mainFrame().loader().documentLoader()->url() : KURL();
208
    URL currentURL = page->mainFrame().loader().documentLoader() ? page->mainFrame().loader().documentLoader()->url() : URL();
209
    if (currentURL.isEmpty())
209
    if (currentURL.isEmpty())
210
        return;
210
        return;
211
    
211
    
- a/Source/WebCore/html/DOMURL.cpp -3 / +3 lines
Lines 33-39 a/Source/WebCore/html/DOMURL.cpp_sec1
33
#include "ActiveDOMObject.h"
33
#include "ActiveDOMObject.h"
34
#include "Blob.h"
34
#include "Blob.h"
35
#include "BlobURL.h"
35
#include "BlobURL.h"
36
#include "KURL.h"
36
#include "URL.h"
37
#include "MemoryCache.h"
37
#include "MemoryCache.h"
38
#include "PublicURLManager.h"
38
#include "PublicURLManager.h"
39
#include "ResourceRequest.h"
39
#include "ResourceRequest.h"
Lines 52-58 String DOMURL::createObjectURL(ScriptExecutionContext* scriptExecutionContext, B a/Source/WebCore/html/DOMURL.cpp_sec2
52
52
53
String DOMURL::createPublicURL(ScriptExecutionContext* scriptExecutionContext, URLRegistrable* registrable)
53
String DOMURL::createPublicURL(ScriptExecutionContext* scriptExecutionContext, URLRegistrable* registrable)
54
{
54
{
55
    KURL publicURL = BlobURL::createPublicURL(scriptExecutionContext->securityOrigin());
55
    URL publicURL = BlobURL::createPublicURL(scriptExecutionContext->securityOrigin());
56
    if (publicURL.isEmpty())
56
    if (publicURL.isEmpty())
57
        return String();
57
        return String();
58
58
Lines 66-72 void DOMURL::revokeObjectURL(ScriptExecutionContext* scriptExecutionContext, con a/Source/WebCore/html/DOMURL.cpp_sec3
66
    if (!scriptExecutionContext)
66
    if (!scriptExecutionContext)
67
        return;
67
        return;
68
68
69
    KURL url(KURL(), urlString);
69
    URL url(URL(), urlString);
70
    ResourceRequest request(url);
70
    ResourceRequest request(url);
71
#if ENABLE(CACHE_PARTITIONING)
71
#if ENABLE(CACHE_PARTITIONING)
72
    request.setCachePartition(scriptExecutionContext->topOrigin()->cachePartition());
72
    request.setCachePartition(scriptExecutionContext->topOrigin()->cachePartition());
- a/Source/WebCore/html/DOMURL.h -1 / +1 lines
Lines 27-33 a/Source/WebCore/html/DOMURL.h_sec1
27
#ifndef DOMURL_h
27
#ifndef DOMURL_h
28
#define DOMURL_h
28
#define DOMURL_h
29
29
30
#include "KURL.h"
30
#include "URL.h"
31
#include <wtf/HashSet.h>
31
#include <wtf/HashSet.h>
32
#include <wtf/PassRefPtr.h>
32
#include <wtf/PassRefPtr.h>
33
#include <wtf/RefCounted.h>
33
#include <wtf/RefCounted.h>
- a/Source/WebCore/html/FTPDirectoryDocument.cpp -1 / +1 lines
Lines 425-431 void FTPDirectoryDocumentParser::finish() a/Source/WebCore/html/FTPDirectoryDocument.cpp_sec1
425
    HTMLDocumentParser::finish();
425
    HTMLDocumentParser::finish();
426
}
426
}
427
427
428
FTPDirectoryDocument::FTPDirectoryDocument(Frame* frame, const KURL& url)
428
FTPDirectoryDocument::FTPDirectoryDocument(Frame* frame, const URL& url)
429
    : HTMLDocument(frame, url)
429
    : HTMLDocument(frame, url)
430
{
430
{
431
#if !LOG_DISABLED
431
#if !LOG_DISABLED
- a/Source/WebCore/html/FTPDirectoryDocument.h -2 / +2 lines
Lines 33-45 class DOMImplementation; a/Source/WebCore/html/FTPDirectoryDocument.h_sec1
33
    
33
    
34
class FTPDirectoryDocument : public HTMLDocument {
34
class FTPDirectoryDocument : public HTMLDocument {
35
public:
35
public:
36
    static PassRefPtr<FTPDirectoryDocument> create(Frame* frame, const KURL& url)
36
    static PassRefPtr<FTPDirectoryDocument> create(Frame* frame, const URL& url)
37
    {
37
    {
38
        return adoptRef(new FTPDirectoryDocument(frame, url));
38
        return adoptRef(new FTPDirectoryDocument(frame, url));
39
    }
39
    }
40
40
41
private:
41
private:
42
    FTPDirectoryDocument(Frame*, const KURL&);
42
    FTPDirectoryDocument(Frame*, const URL&);
43
    virtual PassRefPtr<DocumentParser> createParser();
43
    virtual PassRefPtr<DocumentParser> createParser();
44
};
44
};
45
    
45
    
- a/Source/WebCore/html/FormController.cpp -1 / +1 lines
Lines 328-334 static inline void recordFormStructure(const HTMLFormElement& form, StringBuilde a/Source/WebCore/html/FormController.cpp_sec1
328
328
329
static inline String formSignature(const HTMLFormElement& form)
329
static inline String formSignature(const HTMLFormElement& form)
330
{
330
{
331
    KURL actionURL = form.getURLAttribute(actionAttr);
331
    URL actionURL = form.getURLAttribute(actionAttr);
332
    // Remove the query part because it might contain volatile parameters such
332
    // Remove the query part because it might contain volatile parameters such
333
    // as a session key.
333
    // as a session key.
334
    actionURL.setQuery(String());
334
    actionURL.setQuery(String());
- a/Source/WebCore/html/HTMLAnchorElement.cpp -11 / +11 lines
Lines 294-300 bool HTMLAnchorElement::draggable() const a/Source/WebCore/html/HTMLAnchorElement.cpp_sec1
294
    return hasAttribute(hrefAttr);
294
    return hasAttribute(hrefAttr);
295
}
295
}
296
296
297
KURL HTMLAnchorElement::href() const
297
URL HTMLAnchorElement::href() const
298
{
298
{
299
    return document().completeURL(stripLeadingAndTrailingHTMLSpaces(getAttribute(hrefAttr)));
299
    return document().completeURL(stripLeadingAndTrailingHTMLSpaces(getAttribute(hrefAttr)));
300
}
300
}
Lines 341-347 String HTMLAnchorElement::hash() const a/Source/WebCore/html/HTMLAnchorElement.cpp_sec2
341
341
342
void HTMLAnchorElement::setHash(const String& value)
342
void HTMLAnchorElement::setHash(const String& value)
343
{
343
{
344
    KURL url = href();
344
    URL url = href();
345
    if (value[0] == '#')
345
    if (value[0] == '#')
346
        url.setFragmentIdentifier(value.substring(1));
346
        url.setFragmentIdentifier(value.substring(1));
347
    else
347
    else
Lines 351-357 void HTMLAnchorElement::setHash(const String& value) a/Source/WebCore/html/HTMLAnchorElement.cpp_sec3
351
351
352
String HTMLAnchorElement::host() const
352
String HTMLAnchorElement::host() const
353
{
353
{
354
    const KURL& url = href();
354
    const URL& url = href();
355
    if (url.hostEnd() == url.pathStart())
355
    if (url.hostEnd() == url.pathStart())
356
        return url.host();
356
        return url.host();
357
    if (isDefaultPortForProtocol(url.port(), url.protocol()))
357
    if (isDefaultPortForProtocol(url.port(), url.protocol()))
Lines 363-369 void HTMLAnchorElement::setHost(const String& value) a/Source/WebCore/html/HTMLAnchorElement.cpp_sec4
363
{
363
{
364
    if (value.isEmpty())
364
    if (value.isEmpty())
365
        return;
365
        return;
366
    KURL url = href();
366
    URL url = href();
367
    if (!url.canSetHostOrPort())
367
    if (!url.canSetHostOrPort())
368
        return;
368
        return;
369
369
Lines 408-414 void HTMLAnchorElement::setHostname(const String& value) a/Source/WebCore/html/HTMLAnchorElement.cpp_sec5
408
    if (i == hostLength)
408
    if (i == hostLength)
409
        return;
409
        return;
410
410
411
    KURL url = href();
411
    URL url = href();
412
    if (!url.canSetHostOrPort())
412
    if (!url.canSetHostOrPort())
413
        return;
413
        return;
414
414
Lines 423-429 String HTMLAnchorElement::pathname() const a/Source/WebCore/html/HTMLAnchorElement.cpp_sec6
423
423
424
void HTMLAnchorElement::setPathname(const String& value)
424
void HTMLAnchorElement::setPathname(const String& value)
425
{
425
{
426
    KURL url = href();
426
    URL url = href();
427
    if (!url.canSetPathname())
427
    if (!url.canSetPathname())
428
        return;
428
        return;
429
429
Lines 445-451 String HTMLAnchorElement::port() const a/Source/WebCore/html/HTMLAnchorElement.cpp_sec7
445
445
446
void HTMLAnchorElement::setPort(const String& value)
446
void HTMLAnchorElement::setPort(const String& value)
447
{
447
{
448
    KURL url = href();
448
    URL url = href();
449
    if (!url.canSetHostOrPort())
449
    if (!url.canSetHostOrPort())
450
        return;
450
        return;
451
451
Lines 468-474 String HTMLAnchorElement::protocol() const a/Source/WebCore/html/HTMLAnchorElement.cpp_sec8
468
468
469
void HTMLAnchorElement::setProtocol(const String& value)
469
void HTMLAnchorElement::setProtocol(const String& value)
470
{
470
{
471
    KURL url = href();
471
    URL url = href();
472
    url.setProtocol(value);
472
    url.setProtocol(value);
473
    setHref(url.string());
473
    setHref(url.string());
474
}
474
}
Lines 487-493 String HTMLAnchorElement::origin() const a/Source/WebCore/html/HTMLAnchorElement.cpp_sec9
487
487
488
void HTMLAnchorElement::setSearch(const String& value)
488
void HTMLAnchorElement::setSearch(const String& value)
489
{
489
{
490
    KURL url = href();
490
    URL url = href();
491
    String newSearch = (value[0] == '?') ? value.substring(1) : value;
491
    String newSearch = (value[0] == '?') ? value.substring(1) : value;
492
    // Make sure that '#' in the query does not leak to the hash.
492
    // Make sure that '#' in the query does not leak to the hash.
493
    url.setQuery(newSearch.replaceWithLiteral('#', "%23"));
493
    url.setQuery(newSearch.replaceWithLiteral('#', "%23"));
Lines 510-516 bool HTMLAnchorElement::isLiveLink() const a/Source/WebCore/html/HTMLAnchorElement.cpp_sec10
510
    return isLink() && treatLinkAsLiveForEventType(m_wasShiftKeyDownOnMouseDown ? MouseEventWithShiftKey : MouseEventWithoutShiftKey);
510
    return isLink() && treatLinkAsLiveForEventType(m_wasShiftKeyDownOnMouseDown ? MouseEventWithShiftKey : MouseEventWithoutShiftKey);
511
}
511
}
512
512
513
void HTMLAnchorElement::sendPings(const KURL& destinationURL)
513
void HTMLAnchorElement::sendPings(const URL& destinationURL)
514
{
514
{
515
    if (!hasAttribute(pingAttr) || !document().settings() || !document().settings()->hyperlinkAuditingEnabled())
515
    if (!hasAttribute(pingAttr) || !document().settings() || !document().settings()->hyperlinkAuditingEnabled())
516
        return;
516
        return;
Lines 531-537 void HTMLAnchorElement::handleClick(Event* event) a/Source/WebCore/html/HTMLAnchorElement.cpp_sec11
531
    StringBuilder url;
531
    StringBuilder url;
532
    url.append(stripLeadingAndTrailingHTMLSpaces(fastGetAttribute(hrefAttr)));
532
    url.append(stripLeadingAndTrailingHTMLSpaces(fastGetAttribute(hrefAttr)));
533
    appendServerMapMousePosition(url, event);
533
    appendServerMapMousePosition(url, event);
534
    KURL kurl = document().completeURL(url.toString());
534
    URL kurl = document().completeURL(url.toString());
535
535
536
#if ENABLE(DOWNLOAD_ATTRIBUTE)
536
#if ENABLE(DOWNLOAD_ATTRIBUTE)
537
    if (hasAttribute(downloadAttr)) {
537
    if (hasAttribute(downloadAttr)) {
- a/Source/WebCore/html/HTMLAnchorElement.h -2 / +2 lines
Lines 60-66 public: a/Source/WebCore/html/HTMLAnchorElement.h_sec1
60
60
61
    virtual ~HTMLAnchorElement();
61
    virtual ~HTMLAnchorElement();
62
62
63
    KURL href() const;
63
    URL href() const;
64
    void setHref(const AtomicString&);
64
    void setHref(const AtomicString&);
65
65
66
    const AtomicString& name() const;
66
    const AtomicString& name() const;
Lines 120-126 private: a/Source/WebCore/html/HTMLAnchorElement.h_sec2
120
    virtual short tabIndex() const OVERRIDE FINAL;
120
    virtual short tabIndex() const OVERRIDE FINAL;
121
    virtual bool draggable() const;
121
    virtual bool draggable() const;
122
122
123
    void sendPings(const KURL& destinationURL);
123
    void sendPings(const URL& destinationURL);
124
124
125
    void handleClick(Event*);
125
    void handleClick(Event*);
126
126
- a/Source/WebCore/html/HTMLBaseElement.cpp -5 / +5 lines
Lines 77-83 String HTMLBaseElement::target() const a/Source/WebCore/html/HTMLBaseElement.cpp_sec1
77
    return fastGetAttribute(targetAttr);
77
    return fastGetAttribute(targetAttr);
78
}
78
}
79
79
80
KURL HTMLBaseElement::href() const
80
URL HTMLBaseElement::href() const
81
{
81
{
82
    // This does not use the getURLAttribute function because that will resolve relative to the document's base URL;
82
    // This does not use the getURLAttribute function because that will resolve relative to the document's base URL;
83
    // base elements like this one can be used to set that base URL. Thus we need to resolve relative to the document's
83
    // base elements like this one can be used to set that base URL. Thus we need to resolve relative to the document's
Lines 87-98 KURL HTMLBaseElement::href() const a/Source/WebCore/html/HTMLBaseElement.cpp_sec2
87
    if (attributeValue.isNull())
87
    if (attributeValue.isNull())
88
        return document().url();
88
        return document().url();
89
89
90
    KURL url = !document().decoder() ?
90
    URL url = !document().decoder() ?
91
        KURL(document().url(), stripLeadingAndTrailingHTMLSpaces(attributeValue)) :
91
        URL(document().url(), stripLeadingAndTrailingHTMLSpaces(attributeValue)) :
92
        KURL(document().url(), stripLeadingAndTrailingHTMLSpaces(attributeValue), document().decoder()->encoding());
92
        URL(document().url(), stripLeadingAndTrailingHTMLSpaces(attributeValue), document().decoder()->encoding());
93
93
94
    if (!url.isValid())
94
    if (!url.isValid())
95
        return KURL();
95
        return URL();
96
96
97
    return url;
97
    return url;
98
}
98
}
- a/Source/WebCore/html/HTMLBaseElement.h -1 / +1 lines
Lines 31-37 class HTMLBaseElement FINAL : public HTMLElement { a/Source/WebCore/html/HTMLBaseElement.h_sec1
31
public:
31
public:
32
    static PassRefPtr<HTMLBaseElement> create(const QualifiedName&, Document&);
32
    static PassRefPtr<HTMLBaseElement> create(const QualifiedName&, Document&);
33
33
34
    KURL href() const;
34
    URL href() const;
35
    void setHref(const AtomicString&);
35
    void setHref(const AtomicString&);
36
36
37
private:
37
private:
- a/Source/WebCore/html/HTMLBodyElement.cpp -1 / +1 lines
Lines 327-333 int HTMLBodyElement::scrollWidth() a/Source/WebCore/html/HTMLBodyElement.cpp_sec1
327
    return adjustForZoom(view->contentsWidth(), *frame);
327
    return adjustForZoom(view->contentsWidth(), *frame);
328
}
328
}
329
329
330
void HTMLBodyElement::addSubresourceAttributeURLs(ListHashSet<KURL>& urls) const
330
void HTMLBodyElement::addSubresourceAttributeURLs(ListHashSet<URL>& urls) const
331
{
331
{
332
    HTMLElement::addSubresourceAttributeURLs(urls);
332
    HTMLElement::addSubresourceAttributeURLs(urls);
333
333
- a/Source/WebCore/html/HTMLBodyElement.h -1 / +1 lines
Lines 89-95 private: a/Source/WebCore/html/HTMLBodyElement.h_sec1
89
    virtual int scrollHeight();
89
    virtual int scrollHeight();
90
    virtual int scrollWidth();
90
    virtual int scrollWidth();
91
    
91
    
92
    virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const;
92
    virtual void addSubresourceAttributeURLs(ListHashSet<URL>&) const;
93
};
93
};
94
94
95
} //namespace
95
} //namespace
- a/Source/WebCore/html/HTMLDocument.cpp -2 / +2 lines
Lines 71-77 a/Source/WebCore/html/HTMLDocument.cpp_sec1
71
#include "HTMLFrameSetElement.h"
71
#include "HTMLFrameSetElement.h"
72
#include "HTMLNames.h"
72
#include "HTMLNames.h"
73
#include "InspectorInstrumentation.h"
73
#include "InspectorInstrumentation.h"
74
#include "KURL.h"
74
#include "URL.h"
75
#include "Page.h"
75
#include "Page.h"
76
#include "ScriptController.h"
76
#include "ScriptController.h"
77
#include "Settings.h"
77
#include "Settings.h"
Lines 82-88 namespace WebCore { a/Source/WebCore/html/HTMLDocument.cpp_sec2
82
82
83
using namespace HTMLNames;
83
using namespace HTMLNames;
84
84
85
HTMLDocument::HTMLDocument(Frame* frame, const KURL& url, DocumentClassFlags documentClasses)
85
HTMLDocument::HTMLDocument(Frame* frame, const URL& url, DocumentClassFlags documentClasses)
86
    : Document(frame, url, documentClasses | HTMLDocumentClass)
86
    : Document(frame, url, documentClasses | HTMLDocumentClass)
87
{
87
{
88
    clearXMLVersion();
88
    clearXMLVersion();
- a/Source/WebCore/html/HTMLDocument.h -2 / +2 lines
Lines 31-37 namespace WebCore { a/Source/WebCore/html/HTMLDocument.h_sec1
31
31
32
class HTMLDocument : public Document, public CachedResourceClient {
32
class HTMLDocument : public Document, public CachedResourceClient {
33
public:
33
public:
34
    static PassRefPtr<HTMLDocument> create(Frame* frame, const KURL& url)
34
    static PassRefPtr<HTMLDocument> create(Frame* frame, const URL& url)
35
    {
35
    {
36
        return adoptRef(new HTMLDocument(frame, url));
36
        return adoptRef(new HTMLDocument(frame, url));
37
    }
37
    }
Lines 80-86 public: a/Source/WebCore/html/HTMLDocument.h_sec2
80
    static bool isCaseSensitiveAttribute(const QualifiedName&);
80
    static bool isCaseSensitiveAttribute(const QualifiedName&);
81
81
82
protected:
82
protected:
83
    HTMLDocument(Frame*, const KURL&, DocumentClassFlags = 0);
83
    HTMLDocument(Frame*, const URL&, DocumentClassFlags = 0);
84
84
85
private:
85
private:
86
    virtual PassRefPtr<Element> createElement(const AtomicString& tagName, ExceptionCode&);
86
    virtual PassRefPtr<Element> createElement(const AtomicString& tagName, ExceptionCode&);
- a/Source/WebCore/html/HTMLEmbedElement.cpp -1 / +1 lines
Lines 211-217 const AtomicString& HTMLEmbedElement::imageSourceURL() const a/Source/WebCore/html/HTMLEmbedElement.cpp_sec1
211
    return getAttribute(srcAttr);
211
    return getAttribute(srcAttr);
212
}
212
}
213
213
214
void HTMLEmbedElement::addSubresourceAttributeURLs(ListHashSet<KURL>& urls) const
214
void HTMLEmbedElement::addSubresourceAttributeURLs(ListHashSet<URL>& urls) const
215
{
215
{
216
    HTMLPlugInImageElement::addSubresourceAttributeURLs(urls);
216
    HTMLPlugInImageElement::addSubresourceAttributeURLs(urls);
217
217
- a/Source/WebCore/html/HTMLEmbedElement.h -1 / +1 lines
Lines 47-53 private: a/Source/WebCore/html/HTMLEmbedElement.h_sec1
47
47
48
    virtual void updateWidget(PluginCreationOption);
48
    virtual void updateWidget(PluginCreationOption);
49
49
50
    virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const;
50
    virtual void addSubresourceAttributeURLs(ListHashSet<URL>&) const;
51
51
52
    void parametersForPlugin(Vector<String>& paramNames, Vector<String>& paramValues);
52
    void parametersForPlugin(Vector<String>& paramNames, Vector<String>& paramValues);
53
};
53
};
- a/Source/WebCore/html/HTMLFrameElementBase.cpp -4 / +4 lines
Lines 33-39 a/Source/WebCore/html/HTMLFrameElementBase.cpp_sec1
33
#include "FrameView.h"
33
#include "FrameView.h"
34
#include "HTMLNames.h"
34
#include "HTMLNames.h"
35
#include "HTMLParserIdioms.h"
35
#include "HTMLParserIdioms.h"
36
#include "KURL.h"
36
#include "URL.h"
37
#include "Page.h"
37
#include "Page.h"
38
#include "RenderWidget.h"
38
#include "RenderWidget.h"
39
#include "ScriptController.h"
39
#include "ScriptController.h"
Lines 59-65 bool HTMLFrameElementBase::isURLAllowed() const a/Source/WebCore/html/HTMLFrameElementBase.cpp_sec2
59
    if (m_URL.isEmpty())
59
    if (m_URL.isEmpty())
60
        return true;
60
        return true;
61
61
62
    const KURL& completeURL = document().completeURL(m_URL);
62
    const URL& completeURL = document().completeURL(m_URL);
63
63
64
    if (protocolIsJavaScript(completeURL)) { 
64
    if (protocolIsJavaScript(completeURL)) { 
65
        Document* contentDoc = this->contentDocument();
65
        Document* contentDoc = this->contentDocument();
Lines 181-190 void HTMLFrameElementBase::didAttachRenderers() a/Source/WebCore/html/HTMLFrameElementBase.cpp_sec3
181
    }
181
    }
182
}
182
}
183
183
184
KURL HTMLFrameElementBase::location() const
184
URL HTMLFrameElementBase::location() const
185
{
185
{
186
    if (fastHasAttribute(srcdocAttr))
186
    if (fastHasAttribute(srcdocAttr))
187
        return KURL(ParsedURLString, "about:srcdoc");
187
        return URL(ParsedURLString, "about:srcdoc");
188
    return document().completeURL(getAttribute(srcAttr));
188
    return document().completeURL(getAttribute(srcAttr));
189
}
189
}
190
190
- a/Source/WebCore/html/HTMLFrameElementBase.h -1 / +1 lines
Lines 31-37 namespace WebCore { a/Source/WebCore/html/HTMLFrameElementBase.h_sec1
31
31
32
class HTMLFrameElementBase : public HTMLFrameOwnerElement {
32
class HTMLFrameElementBase : public HTMLFrameOwnerElement {
33
public:
33
public:
34
    KURL location() const;
34
    URL location() const;
35
    void setLocation(const String&);
35
    void setLocation(const String&);
36
36
37
    virtual ScrollbarMode scrollingMode() const { return m_scrolling; }
37
    virtual ScrollbarMode scrollingMode() const { return m_scrolling; }
- a/Source/WebCore/html/HTMLImageElement.cpp -2 / +2 lines
Lines 309-315 void HTMLImageElement::setHeight(int value) a/Source/WebCore/html/HTMLImageElement.cpp_sec1
309
    setAttribute(heightAttr, String::number(value));
309
    setAttribute(heightAttr, String::number(value));
310
}
310
}
311
311
312
KURL HTMLImageElement::src() const
312
URL HTMLImageElement::src() const
313
{
313
{
314
    return document().completeURL(getAttribute(srcAttr));
314
    return document().completeURL(getAttribute(srcAttr));
315
}
315
}
Lines 351-357 bool HTMLImageElement::complete() const a/Source/WebCore/html/HTMLImageElement.cpp_sec2
351
    return m_imageLoader.imageComplete();
351
    return m_imageLoader.imageComplete();
352
}
352
}
353
353
354
void HTMLImageElement::addSubresourceAttributeURLs(ListHashSet<KURL>& urls) const
354
void HTMLImageElement::addSubresourceAttributeURLs(ListHashSet<URL>& urls) const
355
{
355
{
356
    HTMLElement::addSubresourceAttributeURLs(urls);
356
    HTMLElement::addSubresourceAttributeURLs(urls);
357
357
- a/Source/WebCore/html/HTMLImageElement.h -2 / +2 lines
Lines 63-69 public: a/Source/WebCore/html/HTMLImageElement.h_sec1
63
63
64
    void setHeight(int);
64
    void setHeight(int);
65
65
66
    KURL src() const;
66
    URL src() const;
67
    void setSrc(const String&);
67
    void setSrc(const String&);
68
68
69
    void setWidth(int);
69
    void setWidth(int);
Lines 104-110 private: a/Source/WebCore/html/HTMLImageElement.h_sec2
104
104
105
    virtual bool draggable() const;
105
    virtual bool draggable() const;
106
106
107
    virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const;
107
    virtual void addSubresourceAttributeURLs(ListHashSet<URL>&) const;
108
108
109
    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
109
    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
110
    virtual void removedFrom(ContainerNode*) OVERRIDE;
110
    virtual void removedFrom(ContainerNode*) OVERRIDE;
- a/Source/WebCore/html/HTMLInputElement.cpp -2 / +2 lines
Lines 1340-1346 void HTMLInputElement::setSize(unsigned size, ExceptionCode& ec) a/Source/WebCore/html/HTMLInputElement.cpp_sec1
1340
        setSize(size);
1340
        setSize(size);
1341
}
1341
}
1342
1342
1343
KURL HTMLInputElement::src() const
1343
URL HTMLInputElement::src() const
1344
{
1344
{
1345
    return document().completeURL(fastGetAttribute(srcAttr));
1345
    return document().completeURL(fastGetAttribute(srcAttr));
1346
}
1346
}
Lines 1570-1576 void HTMLInputElement::didMoveToNewDocument(Document* oldDocument) a/Source/WebCore/html/HTMLInputElement.cpp_sec2
1570
    HTMLTextFormControlElement::didMoveToNewDocument(oldDocument);
1570
    HTMLTextFormControlElement::didMoveToNewDocument(oldDocument);
1571
}
1571
}
1572
1572
1573
void HTMLInputElement::addSubresourceAttributeURLs(ListHashSet<KURL>& urls) const
1573
void HTMLInputElement::addSubresourceAttributeURLs(ListHashSet<URL>& urls) const
1574
{
1574
{
1575
    HTMLTextFormControlElement::addSubresourceAttributeURLs(urls);
1575
    HTMLTextFormControlElement::addSubresourceAttributeURLs(urls);
1576
1576
- a/Source/WebCore/html/HTMLInputElement.h -3 / +3 lines
Lines 39-45 class HTMLImageLoader; a/Source/WebCore/html/HTMLInputElement.h_sec1
39
class HTMLOptionElement;
39
class HTMLOptionElement;
40
class Icon;
40
class Icon;
41
class InputType;
41
class InputType;
42
class KURL;
42
class URL;
43
class ListAttributeTargetObserver;
43
class ListAttributeTargetObserver;
44
struct DateTimeChooserParameters;
44
struct DateTimeChooserParameters;
45
45
Lines 214-220 public: a/Source/WebCore/html/HTMLInputElement.h_sec2
214
    void setSize(unsigned);
214
    void setSize(unsigned);
215
    void setSize(unsigned, ExceptionCode&);
215
    void setSize(unsigned, ExceptionCode&);
216
216
217
    KURL src() const;
217
    URL src() const;
218
218
219
    virtual int maxLength() const;
219
    virtual int maxLength() const;
220
    void setMaxLength(int, ExceptionCode&);
220
    void setMaxLength(int, ExceptionCode&);
Lines 372-378 private: a/Source/WebCore/html/HTMLInputElement.h_sec3
372
    virtual void documentWillSuspendForPageCache() OVERRIDE;
372
    virtual void documentWillSuspendForPageCache() OVERRIDE;
373
#endif
373
#endif
374
374
375
    virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const;
375
    virtual void addSubresourceAttributeURLs(ListHashSet<URL>&) const;
376
376
377
    bool needsSuspensionCallback();
377
    bool needsSuspensionCallback();
378
    void registerForSuspensionCallbackIfNeeded();
378
    void registerForSuspensionCallbackIfNeeded();
- a/Source/WebCore/html/HTMLLinkElement.cpp -4 / +4 lines
Lines 179-185 void HTMLLinkElement::process() a/Source/WebCore/html/HTMLLinkElement.cpp_sec1
179
    }
179
    }
180
180
181
    String type = m_type.lower();
181
    String type = m_type.lower();
182
    KURL url = getNonEmptyURLAttribute(hrefAttr);
182
    URL url = getNonEmptyURLAttribute(hrefAttr);
183
183
184
    if (!m_linkLoader.loadLink(m_relAttribute, type, m_sizes->toString(), url, &document()))
184
    if (!m_linkLoader.loadLink(m_relAttribute, type, m_sizes->toString(), url, &document()))
185
        return;
185
        return;
Lines 291-297 void HTMLLinkElement::finishParsingChildren() a/Source/WebCore/html/HTMLLinkElement.cpp_sec2
291
    HTMLElement::finishParsingChildren();
291
    HTMLElement::finishParsingChildren();
292
}
292
}
293
293
294
void HTMLLinkElement::setCSSStyleSheet(const String& href, const KURL& baseURL, const String& charset, const CachedCSSStyleSheet* cachedStyleSheet)
294
void HTMLLinkElement::setCSSStyleSheet(const String& href, const URL& baseURL, const String& charset, const CachedCSSStyleSheet* cachedStyleSheet)
295
{
295
{
296
    if (!inDocument()) {
296
    if (!inDocument()) {
297
        ASSERT(!m_sheet);
297
        ASSERT(!m_sheet);
Lines 395-401 bool HTMLLinkElement::isURLAttribute(const Attribute& attribute) const a/Source/WebCore/html/HTMLLinkElement.cpp_sec3
395
    return attribute.name().localName() == hrefAttr || HTMLElement::isURLAttribute(attribute);
395
    return attribute.name().localName() == hrefAttr || HTMLElement::isURLAttribute(attribute);
396
}
396
}
397
397
398
KURL HTMLLinkElement::href() const
398
URL HTMLLinkElement::href() const
399
{
399
{
400
    return document().completeURL(getAttribute(hrefAttr));
400
    return document().completeURL(getAttribute(hrefAttr));
401
}
401
}
Lines 425-431 String HTMLLinkElement::iconSizes() const a/Source/WebCore/html/HTMLLinkElement.cpp_sec4
425
    return m_sizes->toString();
425
    return m_sizes->toString();
426
}
426
}
427
427
428
void HTMLLinkElement::addSubresourceAttributeURLs(ListHashSet<KURL>& urls) const
428
void HTMLLinkElement::addSubresourceAttributeURLs(ListHashSet<URL>& urls) const
429
{
429
{
430
    HTMLElement::addSubresourceAttributeURLs(urls);
430
    HTMLElement::addSubresourceAttributeURLs(urls);
431
431
- a/Source/WebCore/html/HTMLLinkElement.h -4 / +4 lines
Lines 37-43 a/Source/WebCore/html/HTMLLinkElement.h_sec1
37
namespace WebCore {
37
namespace WebCore {
38
38
39
class HTMLLinkElement;
39
class HTMLLinkElement;
40
class KURL;
40
class URL;
41
41
42
template<typename T> class EventSender;
42
template<typename T> class EventSender;
43
typedef EventSender<HTMLLinkElement> LinkEventSender;
43
typedef EventSender<HTMLLinkElement> LinkEventSender;
Lines 47-53 public: a/Source/WebCore/html/HTMLLinkElement.h_sec2
47
    static PassRefPtr<HTMLLinkElement> create(const QualifiedName&, Document&, bool createdByParser);
47
    static PassRefPtr<HTMLLinkElement> create(const QualifiedName&, Document&, bool createdByParser);
48
    virtual ~HTMLLinkElement();
48
    virtual ~HTMLLinkElement();
49
49
50
    KURL href() const;
50
    URL href() const;
51
    String rel() const;
51
    String rel() const;
52
52
53
    virtual String target() const;
53
    virtual String target() const;
Lines 83-89 private: a/Source/WebCore/html/HTMLLinkElement.h_sec3
83
    virtual void removedFrom(ContainerNode*) OVERRIDE;
83
    virtual void removedFrom(ContainerNode*) OVERRIDE;
84
84
85
    // from CachedResourceClient
85
    // from CachedResourceClient
86
    virtual void setCSSStyleSheet(const String& href, const KURL& baseURL, const String& charset, const CachedCSSStyleSheet* sheet);
86
    virtual void setCSSStyleSheet(const String& href, const URL& baseURL, const String& charset, const CachedCSSStyleSheet* sheet);
87
    virtual bool sheetLoaded();
87
    virtual bool sheetLoaded();
88
    virtual void notifyLoadedSheetAndAllCriticalSubresources(bool errorOccurred);
88
    virtual void notifyLoadedSheetAndAllCriticalSubresources(bool errorOccurred);
89
    virtual void startLoadingDynamicSheet();
89
    virtual void startLoadingDynamicSheet();
Lines 100-106 private: a/Source/WebCore/html/HTMLLinkElement.h_sec4
100
private:
100
private:
101
    HTMLLinkElement(const QualifiedName&, Document&, bool createdByParser);
101
    HTMLLinkElement(const QualifiedName&, Document&, bool createdByParser);
102
102
103
    virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const;
103
    virtual void addSubresourceAttributeURLs(ListHashSet<URL>&) const;
104
104
105
    virtual void finishParsingChildren();
105
    virtual void finishParsingChildren();
106
106
- a/Source/WebCore/html/HTMLMediaElement.cpp -25 / +25 lines
Lines 154-160 static void clearFlags(unsigned& value, unsigned flags) a/Source/WebCore/html/HTMLMediaElement.cpp_sec1
154
}
154
}
155
    
155
    
156
#if !LOG_DISABLED
156
#if !LOG_DISABLED
157
static String urlForLoggingMedia(const KURL& url)
157
static String urlForLoggingMedia(const URL& url)
158
{
158
{
159
    static const unsigned maximumURLLengthForLogging = 128;
159
    static const unsigned maximumURLLengthForLogging = 128;
160
160
Lines 740-746 HTMLMediaElement::NetworkState HTMLMediaElement::networkState() const a/Source/WebCore/html/HTMLMediaElement.cpp_sec2
740
    return m_networkState;
740
    return m_networkState;
741
}
741
}
742
742
743
String HTMLMediaElement::canPlayType(const String& mimeType, const String& keySystem, const KURL& url) const
743
String HTMLMediaElement::canPlayType(const String& mimeType, const String& keySystem, const URL& url) const
744
{
744
{
745
    MediaPlayer::SupportsType support = MediaPlayer::supportsType(ContentType(mimeType), keySystem, url, this);
745
    MediaPlayer::SupportsType support = MediaPlayer::supportsType(ContentType(mimeType), keySystem, url, this);
746
    String canPlay;
746
    String canPlay;
Lines 956-962 void HTMLMediaElement::selectMediaResource() a/Source/WebCore/html/HTMLMediaElement.cpp_sec3
956
        m_loadState = LoadingFromSrcAttr;
956
        m_loadState = LoadingFromSrcAttr;
957
957
958
        // If the src attribute's value is the empty string ... jump down to the failed step below
958
        // If the src attribute's value is the empty string ... jump down to the failed step below
959
        KURL mediaURL = getNonEmptyURLAttribute(srcAttr);
959
        URL mediaURL = getNonEmptyURLAttribute(srcAttr);
960
        if (mediaURL.isEmpty()) {
960
        if (mediaURL.isEmpty()) {
961
            mediaLoadingFailed(MediaPlayer::FormatError);
961
            mediaLoadingFailed(MediaPlayer::FormatError);
962
            LOG(Media, "HTMLMediaElement::selectMediaResource, empty 'src'");
962
            LOG(Media, "HTMLMediaElement::selectMediaResource, empty 'src'");
Lines 985-991 void HTMLMediaElement::loadNextSourceChild() a/Source/WebCore/html/HTMLMediaElement.cpp_sec4
985
{
985
{
986
    ContentType contentType((String()));
986
    ContentType contentType((String()));
987
    String keySystem;
987
    String keySystem;
988
    KURL mediaURL = selectNextSourceChild(&contentType, &keySystem, Complain);
988
    URL mediaURL = selectNextSourceChild(&contentType, &keySystem, Complain);
989
    if (!mediaURL.isValid()) {
989
    if (!mediaURL.isValid()) {
990
        waitForSourceChange();
990
        waitForSourceChange();
991
        return;
991
        return;
Lines 1000-1017 void HTMLMediaElement::loadNextSourceChild() a/Source/WebCore/html/HTMLMediaElement.cpp_sec5
1000
    loadResource(mediaURL, contentType, keySystem);
1000
    loadResource(mediaURL, contentType, keySystem);
1001
}
1001
}
1002
1002
1003
static KURL createFileURLForApplicationCacheResource(const String& path)
1003
static URL createFileURLForApplicationCacheResource(const String& path)
1004
{
1004
{
1005
    // KURL should have a function to create a url from a path, but it does not. This function
1005
    // URL should have a function to create a url from a path, but it does not. This function
1006
    // is not suitable because KURL::setPath uses encodeWithURLEscapeSequences, which it notes
1006
    // is not suitable because URL::setPath uses encodeWithURLEscapeSequences, which it notes
1007
    // does not correctly escape '#' and '?'. This function works for our purposes because
1007
    // does not correctly escape '#' and '?'. This function works for our purposes because
1008
    // app cache media files are always created with encodeForFileName(createCanonicalUUIDString()).
1008
    // app cache media files are always created with encodeForFileName(createCanonicalUUIDString()).
1009
1009
1010
#if USE(CF) && PLATFORM(WIN)
1010
#if USE(CF) && PLATFORM(WIN)
1011
    RetainPtr<CFURLRef> cfURL = adoptCF(CFURLCreateWithFileSystemPath(0, path.createCFString().get(), kCFURLWindowsPathStyle, false));
1011
    RetainPtr<CFURLRef> cfURL = adoptCF(CFURLCreateWithFileSystemPath(0, path.createCFString().get(), kCFURLWindowsPathStyle, false));
1012
    KURL url(cfURL.get());
1012
    URL url(cfURL.get());
1013
#else
1013
#else
1014
    KURL url;
1014
    URL url;
1015
1015
1016
    url.setProtocol(ASCIILiteral("file"));
1016
    url.setProtocol(ASCIILiteral("file"));
1017
    url.setPath(path);
1017
    url.setPath(path);
Lines 1019-1025 static KURL createFileURLForApplicationCacheResource(const String& path) a/Source/WebCore/html/HTMLMediaElement.cpp_sec6
1019
    return url;
1019
    return url;
1020
}
1020
}
1021
1021
1022
void HTMLMediaElement::loadResource(const KURL& initialURL, ContentType& contentType, const String& keySystem)
1022
void HTMLMediaElement::loadResource(const URL& initialURL, ContentType& contentType, const String& keySystem)
1023
{
1023
{
1024
    ASSERT(isSafeToLoadURL(initialURL, Complain));
1024
    ASSERT(isSafeToLoadURL(initialURL, Complain));
1025
1025
Lines 1031-1037 void HTMLMediaElement::loadResource(const KURL& initialURL, ContentType& content a/Source/WebCore/html/HTMLMediaElement.cpp_sec7
1031
        return;
1031
        return;
1032
    }
1032
    }
1033
1033
1034
    KURL url = initialURL;
1034
    URL url = initialURL;
1035
    if (!frame->loader().willLoadMediaElementURL(url)) {
1035
    if (!frame->loader().willLoadMediaElementURL(url)) {
1036
        mediaLoadingFailed(MediaPlayer::FormatError);
1036
        mediaLoadingFailed(MediaPlayer::FormatError);
1037
        return;
1037
        return;
Lines 1527-1533 void HTMLMediaElement::textTrackRemoveCue(TextTrack*, PassRefPtr<TextTrackCue> c a/Source/WebCore/html/HTMLMediaElement.cpp_sec8
1527
1527
1528
#endif
1528
#endif
1529
1529
1530
bool HTMLMediaElement::isSafeToLoadURL(const KURL& url, InvalidURLAction actionIfInvalid)
1530
bool HTMLMediaElement::isSafeToLoadURL(const URL& url, InvalidURLAction actionIfInvalid)
1531
{
1531
{
1532
    if (!url.isValid()) {
1532
    if (!url.isValid()) {
1533
        LOG(Media, "HTMLMediaElement::isSafeToLoadURL(%s) -> FALSE because url is invalid", urlForLoggingMedia(url).utf8().data());
1533
        LOG(Media, "HTMLMediaElement::isSafeToLoadURL(%s) -> FALSE because url is invalid", urlForLoggingMedia(url).utf8().data());
Lines 1983-1989 void HTMLMediaElement::mediaPlayerKeyError(MediaPlayer*, const String& keySystem a/Source/WebCore/html/HTMLMediaElement.cpp_sec9
1983
    m_asyncEventQueue.enqueueEvent(event.release());
1983
    m_asyncEventQueue.enqueueEvent(event.release());
1984
}
1984
}
1985
1985
1986
void HTMLMediaElement::mediaPlayerKeyMessage(MediaPlayer*, const String& keySystem, const String& sessionId, const unsigned char* message, unsigned messageLength, const KURL& defaultURL)
1986
void HTMLMediaElement::mediaPlayerKeyMessage(MediaPlayer*, const String& keySystem, const String& sessionId, const unsigned char* message, unsigned messageLength, const URL& defaultURL)
1987
{
1987
{
1988
    MediaKeyEventInit initializer;
1988
    MediaKeyEventInit initializer;
1989
    initializer.keySystem = keySystem;
1989
    initializer.keySystem = keySystem;
Lines 3189-3195 void HTMLMediaElement::didRemoveTextTrack(HTMLTrackElement* trackElement) a/Source/WebCore/html/HTMLMediaElement.cpp_sec10
3189
3189
3190
#if !LOG_DISABLED
3190
#if !LOG_DISABLED
3191
    if (trackElement->hasTagName(trackTag)) {
3191
    if (trackElement->hasTagName(trackTag)) {
3192
        KURL url = trackElement->getNonEmptyURLAttribute(srcAttr);
3192
        URL url = trackElement->getNonEmptyURLAttribute(srcAttr);
3193
        LOG(Media, "HTMLMediaElement::didRemoveTrack - 'src' is %s", urlForLoggingMedia(url).utf8().data());
3193
        LOG(Media, "HTMLMediaElement::didRemoveTrack - 'src' is %s", urlForLoggingMedia(url).utf8().data());
3194
    }
3194
    }
3195
#endif
3195
#endif
Lines 3424-3430 bool HTMLMediaElement::havePotentialSourceChild() a/Source/WebCore/html/HTMLMediaElement.cpp_sec11
3424
    RefPtr<HTMLSourceElement> currentSourceNode = m_currentSourceNode;
3424
    RefPtr<HTMLSourceElement> currentSourceNode = m_currentSourceNode;
3425
    RefPtr<Node> nextNode = m_nextChildNodeToConsider;
3425
    RefPtr<Node> nextNode = m_nextChildNodeToConsider;
3426
3426
3427
    KURL nextURL = selectNextSourceChild(0, 0, DoNothing);
3427
    URL nextURL = selectNextSourceChild(0, 0, DoNothing);
3428
3428
3429
    m_currentSourceNode = currentSourceNode;
3429
    m_currentSourceNode = currentSourceNode;
3430
    m_nextChildNodeToConsider = nextNode;
3430
    m_nextChildNodeToConsider = nextNode;
Lines 3432-3438 bool HTMLMediaElement::havePotentialSourceChild() a/Source/WebCore/html/HTMLMediaElement.cpp_sec12
3432
    return nextURL.isValid();
3432
    return nextURL.isValid();
3433
}
3433
}
3434
3434
3435
KURL HTMLMediaElement::selectNextSourceChild(ContentType* contentType, String* keySystem, InvalidURLAction actionIfInvalid)
3435
URL HTMLMediaElement::selectNextSourceChild(ContentType* contentType, String* keySystem, InvalidURLAction actionIfInvalid)
3436
{
3436
{
3437
#if !LOG_DISABLED
3437
#if !LOG_DISABLED
3438
    // Don't log if this was just called to find out if there are any valid <source> elements.
3438
    // Don't log if this was just called to find out if there are any valid <source> elements.
Lines 3446-3455 KURL HTMLMediaElement::selectNextSourceChild(ContentType* contentType, String* k a/Source/WebCore/html/HTMLMediaElement.cpp_sec13
3446
        if (shouldLog)
3446
        if (shouldLog)
3447
            LOG(Media, "HTMLMediaElement::selectNextSourceChild -> 0x0000, \"\"");
3447
            LOG(Media, "HTMLMediaElement::selectNextSourceChild -> 0x0000, \"\"");
3448
#endif
3448
#endif
3449
        return KURL();
3449
        return URL();
3450
    }
3450
    }
3451
3451
3452
    KURL mediaURL;
3452
    URL mediaURL;
3453
    HTMLSourceElement* source = 0;
3453
    HTMLSourceElement* source = 0;
3454
    String type;
3454
    String type;
3455
    String system;
3455
    String system;
Lines 3543-3549 check_again: a/Source/WebCore/html/HTMLMediaElement.cpp_sec14
3543
    if (shouldLog)
3543
    if (shouldLog)
3544
        LOG(Media, "HTMLMediaElement::selectNextSourceChild -> %p, %s", m_currentSourceNode.get(), canUseSourceElement ? urlForLoggingMedia(mediaURL).utf8().data() : "");
3544
        LOG(Media, "HTMLMediaElement::selectNextSourceChild -> %p, %s", m_currentSourceNode.get(), canUseSourceElement ? urlForLoggingMedia(mediaURL).utf8().data() : "");
3545
#endif
3545
#endif
3546
    return canUseSourceElement ? mediaURL : KURL();
3546
    return canUseSourceElement ? mediaURL : URL();
3547
}
3547
}
3548
3548
3549
void HTMLMediaElement::sourceWasAdded(HTMLSourceElement* source)
3549
void HTMLMediaElement::sourceWasAdded(HTMLSourceElement* source)
Lines 3552-3558 void HTMLMediaElement::sourceWasAdded(HTMLSourceElement* source) a/Source/WebCore/html/HTMLMediaElement.cpp_sec15
3552
3552
3553
#if !LOG_DISABLED
3553
#if !LOG_DISABLED
3554
    if (source->hasTagName(sourceTag)) {
3554
    if (source->hasTagName(sourceTag)) {
3555
        KURL url = source->getNonEmptyURLAttribute(srcAttr);
3555
        URL url = source->getNonEmptyURLAttribute(srcAttr);
3556
        LOG(Media, "HTMLMediaElement::sourceWasAdded - 'src' is %s", urlForLoggingMedia(url).utf8().data());
3556
        LOG(Media, "HTMLMediaElement::sourceWasAdded - 'src' is %s", urlForLoggingMedia(url).utf8().data());
3557
    }
3557
    }
3558
#endif
3558
#endif
Lines 3600-3606 void HTMLMediaElement::sourceWasRemoved(HTMLSourceElement* source) a/Source/WebCore/html/HTMLMediaElement.cpp_sec16
3600
3600
3601
#if !LOG_DISABLED
3601
#if !LOG_DISABLED
3602
    if (source->hasTagName(sourceTag)) {
3602
    if (source->hasTagName(sourceTag)) {
3603
        KURL url = source->getNonEmptyURLAttribute(srcAttr);
3603
        URL url = source->getNonEmptyURLAttribute(srcAttr);
3604
        LOG(Media, "HTMLMediaElement::sourceWasRemoved - 'src' is %s", urlForLoggingMedia(url).utf8().data());
3604
        LOG(Media, "HTMLMediaElement::sourceWasRemoved - 'src' is %s", urlForLoggingMedia(url).utf8().data());
3605
    }
3605
    }
3606
#endif
3606
#endif
Lines 4311-4317 void HTMLMediaElement::setMediaPlayerProxy(WebMediaPlayerProxy* proxy) a/Source/WebCore/html/HTMLMediaElement.cpp_sec17
4311
    m_player->setMediaPlayerProxy(proxy);
4311
    m_player->setMediaPlayerProxy(proxy);
4312
}
4312
}
4313
4313
4314
void HTMLMediaElement::getPluginProxyParams(KURL& url, Vector<String>& names, Vector<String>& values)
4314
void HTMLMediaElement::getPluginProxyParams(URL& url, Vector<String>& names, Vector<String>& values)
4315
{
4315
{
4316
    Ref<HTMLMediaElement> protect(*this); // selectNextSourceChild may fire 'beforeload', which can make arbitrary DOM mutations.
4316
    Ref<HTMLMediaElement> protect(*this); // selectNextSourceChild may fire 'beforeload', which can make arbitrary DOM mutations.
4317
4317
Lines 4319-4325 void HTMLMediaElement::getPluginProxyParams(KURL& url, Vector<String>& names, Ve a/Source/WebCore/html/HTMLMediaElement.cpp_sec18
4319
4319
4320
    if (isVideo()) {
4320
    if (isVideo()) {
4321
        HTMLVideoElement* video = toHTMLVideoElement(this);
4321
        HTMLVideoElement* video = toHTMLVideoElement(this);
4322
        KURL posterURL = video->posterImageURL();
4322
        URL posterURL = video->posterImageURL();
4323
        if (!posterURL.isEmpty() && frame && frame->loader().willLoadMediaElementURL(posterURL)) {
4323
        if (!posterURL.isEmpty() && frame && frame->loader().willLoadMediaElementURL(posterURL)) {
4324
            names.append(ASCIILiteral("_media_element_poster_"));
4324
            names.append(ASCIILiteral("_media_element_poster_"));
4325
            values.append(posterURL.string());
4325
            values.append(posterURL.string());
Lines 4355-4361 void HTMLMediaElement::createMediaPlayerProxy() a/Source/WebCore/html/HTMLMediaElement.cpp_sec19
4355
4355
4356
    LOG(Media, "HTMLMediaElement::createMediaPlayerProxy");
4356
    LOG(Media, "HTMLMediaElement::createMediaPlayerProxy");
4357
4357
4358
    KURL url;
4358
    URL url;
4359
    Vector<String> paramNames;
4359
    Vector<String> paramNames;
4360
    Vector<String> paramValues;
4360
    Vector<String> paramValues;
4361
4361
Lines 4375-4381 void HTMLMediaElement::updateWidget(PluginCreationOption) a/Source/WebCore/html/HTMLMediaElement.cpp_sec20
4375
    Vector<String> paramNames;
4375
    Vector<String> paramNames;
4376
    Vector<String> paramValues;
4376
    Vector<String> paramValues;
4377
    // FIXME: Rename kurl to something more sensible.
4377
    // FIXME: Rename kurl to something more sensible.
4378
    KURL kurl;
4378
    URL kurl;
4379
4379
4380
    mediaElement->getPluginProxyParams(kurl, paramNames, paramValues);
4380
    mediaElement->getPluginProxyParams(kurl, paramNames, paramValues);
4381
    // FIXME: What if document().frame() is 0?
4381
    // FIXME: What if document().frame() is 0?
- a/Source/WebCore/html/HTMLMediaElement.h -9 / +9 lines
Lines 60-66 class MediaElementAudioSourceNode; a/Source/WebCore/html/HTMLMediaElement.h_sec1
60
class Event;
60
class Event;
61
class HTMLSourceElement;
61
class HTMLSourceElement;
62
class HTMLTrackElement;
62
class HTMLTrackElement;
63
class KURL;
63
class URL;
64
class MediaController;
64
class MediaController;
65
class MediaControls;
65
class MediaControls;
66
class MediaError;
66
class MediaError;
Lines 138-144 public: a/Source/WebCore/html/HTMLMediaElement.h_sec2
138
138
139
// network state
139
// network state
140
    void setSrc(const String&);
140
    void setSrc(const String&);
141
    const KURL& currentSrc() const { return m_currentSrc; }
141
    const URL& currentSrc() const { return m_currentSrc; }
142
142
143
    enum NetworkState { NETWORK_EMPTY, NETWORK_IDLE, NETWORK_LOADING, NETWORK_NO_SOURCE };
143
    enum NetworkState { NETWORK_EMPTY, NETWORK_IDLE, NETWORK_LOADING, NETWORK_NO_SOURCE };
144
    NetworkState networkState() const;
144
    NetworkState networkState() const;
Lines 148-154 public: a/Source/WebCore/html/HTMLMediaElement.h_sec3
148
148
149
    PassRefPtr<TimeRanges> buffered() const;
149
    PassRefPtr<TimeRanges> buffered() const;
150
    void load();
150
    void load();
151
    String canPlayType(const String& mimeType, const String& keySystem = String(), const KURL& = KURL()) const;
151
    String canPlayType(const String& mimeType, const String& keySystem = String(), const URL& = URL()) const;
152
152
153
// ready state
153
// ready state
154
    ReadyState readyState() const;
154
    ReadyState readyState() const;
Lines 320-326 public: a/Source/WebCore/html/HTMLMediaElement.h_sec4
320
    void setNeedWidgetUpdate(bool needWidgetUpdate) { m_needWidgetUpdate = needWidgetUpdate; }
320
    void setNeedWidgetUpdate(bool needWidgetUpdate) { m_needWidgetUpdate = needWidgetUpdate; }
321
    void deliverNotification(MediaPlayerProxyNotificationType notification);
321
    void deliverNotification(MediaPlayerProxyNotificationType notification);
322
    void setMediaPlayerProxy(WebMediaPlayerProxy* proxy);
322
    void setMediaPlayerProxy(WebMediaPlayerProxy* proxy);
323
    void getPluginProxyParams(KURL& url, Vector<String>& names, Vector<String>& values);
323
    void getPluginProxyParams(URL& url, Vector<String>& names, Vector<String>& values);
324
    void createMediaPlayerProxy();
324
    void createMediaPlayerProxy();
325
    void updateWidget(PluginCreationOption);
325
    void updateWidget(PluginCreationOption);
326
#endif
326
#endif
Lines 368-374 public: a/Source/WebCore/html/HTMLMediaElement.h_sec5
368
#endif
368
#endif
369
369
370
    enum InvalidURLAction { DoNothing, Complain };
370
    enum InvalidURLAction { DoNothing, Complain };
371
    bool isSafeToLoadURL(const KURL&, InvalidURLAction);
371
    bool isSafeToLoadURL(const URL&, InvalidURLAction);
372
372
373
    const String& mediaGroup() const;
373
    const String& mediaGroup() const;
374
    void setMediaGroup(const String&);
374
    void setMediaGroup(const String&);
Lines 483-489 private: a/Source/WebCore/html/HTMLMediaElement.h_sec6
483
#if ENABLE(ENCRYPTED_MEDIA)
483
#if ENABLE(ENCRYPTED_MEDIA)
484
    virtual void mediaPlayerKeyAdded(MediaPlayer*, const String& keySystem, const String& sessionId) OVERRIDE;
484
    virtual void mediaPlayerKeyAdded(MediaPlayer*, const String& keySystem, const String& sessionId) OVERRIDE;
485
    virtual void mediaPlayerKeyError(MediaPlayer*, const String& keySystem, const String& sessionId, MediaPlayerClient::MediaKeyErrorCode, unsigned short systemCode) OVERRIDE;
485
    virtual void mediaPlayerKeyError(MediaPlayer*, const String& keySystem, const String& sessionId, MediaPlayerClient::MediaKeyErrorCode, unsigned short systemCode) OVERRIDE;
486
    virtual void mediaPlayerKeyMessage(MediaPlayer*, const String& keySystem, const String& sessionId, const unsigned char* message, unsigned messageLength, const KURL& defaultURL) OVERRIDE;
486
    virtual void mediaPlayerKeyMessage(MediaPlayer*, const String& keySystem, const String& sessionId, const unsigned char* message, unsigned messageLength, const URL& defaultURL) OVERRIDE;
487
    virtual bool mediaPlayerKeyNeeded(MediaPlayer*, const String& keySystem, const String& sessionId, const unsigned char* initData, unsigned initDataLength) OVERRIDE;
487
    virtual bool mediaPlayerKeyNeeded(MediaPlayer*, const String& keySystem, const String& sessionId, const unsigned char* initData, unsigned initDataLength) OVERRIDE;
488
#endif
488
#endif
489
489
Lines 535-541 private: a/Source/WebCore/html/HTMLMediaElement.h_sec7
535
    
535
    
536
    // loading
536
    // loading
537
    void selectMediaResource();
537
    void selectMediaResource();
538
    void loadResource(const KURL&, ContentType&, const String& keySystem);
538
    void loadResource(const URL&, ContentType&, const String& keySystem);
539
    void scheduleNextSourceChild();
539
    void scheduleNextSourceChild();
540
    void loadNextSourceChild();
540
    void loadNextSourceChild();
541
    void userCancelledLoad();
541
    void userCancelledLoad();
Lines 547-553 private: a/Source/WebCore/html/HTMLMediaElement.h_sec8
547
    void waitForSourceChange();
547
    void waitForSourceChange();
548
    void prepareToPlay();
548
    void prepareToPlay();
549
549
550
    KURL selectNextSourceChild(ContentType*, String* keySystem, InvalidURLAction);
550
    URL selectNextSourceChild(ContentType*, String* keySystem, InvalidURLAction);
551
551
552
    void mediaLoadingFailed(MediaPlayer::NetworkState);
552
    void mediaLoadingFailed(MediaPlayer::NetworkState);
553
553
Lines 634-640 private: a/Source/WebCore/html/HTMLMediaElement.h_sec9
634
    NetworkState m_networkState;
634
    NetworkState m_networkState;
635
    ReadyState m_readyState;
635
    ReadyState m_readyState;
636
    ReadyState m_readyStateMaximum;
636
    ReadyState m_readyStateMaximum;
637
    KURL m_currentSrc;
637
    URL m_currentSrc;
638
638
639
    RefPtr<MediaError> m_error;
639
    RefPtr<MediaError> m_error;
640
640
- a/Source/WebCore/html/HTMLObjectElement.cpp -1 / +1 lines
Lines 466-472 bool HTMLObjectElement::containsJavaApplet() const a/Source/WebCore/html/HTMLObjectElement.cpp_sec1
466
    return false;
466
    return false;
467
}
467
}
468
468
469
void HTMLObjectElement::addSubresourceAttributeURLs(ListHashSet<KURL>& urls) const
469
void HTMLObjectElement::addSubresourceAttributeURLs(ListHashSet<URL>& urls) const
470
{
470
{
471
    HTMLPlugInImageElement::addSubresourceAttributeURLs(urls);
471
    HTMLPlugInImageElement::addSubresourceAttributeURLs(urls);
472
472
- a/Source/WebCore/html/HTMLObjectElement.h -1 / +1 lines
Lines 82-88 private: a/Source/WebCore/html/HTMLObjectElement.h_sec1
82
82
83
    virtual RenderWidget* renderWidgetForJSBindings() const;
83
    virtual RenderWidget* renderWidgetForJSBindings() const;
84
84
85
    virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const;
85
    virtual void addSubresourceAttributeURLs(ListHashSet<URL>&) const;
86
86
87
    virtual void updateWidget(PluginCreationOption);
87
    virtual void updateWidget(PluginCreationOption);
88
    void updateDocNamedItem();
88
    void updateDocNamedItem();
- a/Source/WebCore/html/HTMLParamElement.cpp -1 / +1 lines
Lines 66-72 bool HTMLParamElement::isURLAttribute(const Attribute& attribute) const a/Source/WebCore/html/HTMLParamElement.cpp_sec1
66
    return HTMLElement::isURLAttribute(attribute);
66
    return HTMLElement::isURLAttribute(attribute);
67
}
67
}
68
68
69
void HTMLParamElement::addSubresourceAttributeURLs(ListHashSet<KURL>& urls) const
69
void HTMLParamElement::addSubresourceAttributeURLs(ListHashSet<URL>& urls) const
70
{
70
{
71
    HTMLElement::addSubresourceAttributeURLs(urls);
71
    HTMLElement::addSubresourceAttributeURLs(urls);
72
72
- a/Source/WebCore/html/HTMLParamElement.h -1 / +1 lines
Lines 40-46 private: a/Source/WebCore/html/HTMLParamElement.h_sec1
40
    HTMLParamElement(const QualifiedName&, Document&);
40
    HTMLParamElement(const QualifiedName&, Document&);
41
41
42
    virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
42
    virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
43
    virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const;
43
    virtual void addSubresourceAttributeURLs(ListHashSet<URL>&) const;
44
};
44
};
45
45
46
ELEMENT_TYPE_CASTS(HTMLParamElement)
46
ELEMENT_TYPE_CASTS(HTMLParamElement)
- a/Source/WebCore/html/HTMLPlugInImageElement.cpp -5 / +5 lines
Lines 159-165 bool HTMLPlugInImageElement::isImageType() a/Source/WebCore/html/HTMLPlugInImageElement.cpp_sec1
159
        m_serviceType = mimeTypeFromDataURL(m_url);
159
        m_serviceType = mimeTypeFromDataURL(m_url);
160
160
161
    if (Frame* frame = document().frame()) {
161
    if (Frame* frame = document().frame()) {
162
        KURL completedURL = document().completeURL(m_url);
162
        URL completedURL = document().completeURL(m_url);
163
        return frame->loader().client().objectContentType(completedURL, m_serviceType, shouldPreferPlugInsForImages()) == ObjectContentImage;
163
        return frame->loader().client().objectContentType(completedURL, m_serviceType, shouldPreferPlugInsForImages()) == ObjectContentImage;
164
    }
164
    }
165
165
Lines 170-176 bool HTMLPlugInImageElement::isImageType() a/Source/WebCore/html/HTMLPlugInImageElement.cpp_sec2
170
// depending on <param> values.
170
// depending on <param> values.
171
bool HTMLPlugInImageElement::allowedToLoadFrameURL(const String& url)
171
bool HTMLPlugInImageElement::allowedToLoadFrameURL(const String& url)
172
{
172
{
173
    KURL completeURL = document().completeURL(url);
173
    URL completeURL = document().completeURL(url);
174
174
175
    if (contentFrame() && protocolIsJavaScript(completeURL)
175
    if (contentFrame() && protocolIsJavaScript(completeURL)
176
        && !document().securityOrigin()->canAccess(contentDocument()->securityOrigin()))
176
        && !document().securityOrigin()->canAccess(contentDocument()->securityOrigin()))
Lines 184-190 bool HTMLPlugInImageElement::allowedToLoadFrameURL(const String& url) a/Source/WebCore/html/HTMLPlugInImageElement.cpp_sec3
184
bool HTMLPlugInImageElement::wouldLoadAsNetscapePlugin(const String& url, const String& serviceType)
184
bool HTMLPlugInImageElement::wouldLoadAsNetscapePlugin(const String& url, const String& serviceType)
185
{
185
{
186
    ASSERT(document().frame());
186
    ASSERT(document().frame());
187
    KURL completedURL;
187
    URL completedURL;
188
    if (!url.isEmpty())
188
    if (!url.isEmpty())
189
        completedURL = document().completeURL(url);
189
        completedURL = document().completeURL(url);
190
190
Lines 431-437 static void addPlugInsFromNodeListMatchingPlugInOrigin(HTMLPlugInImageElementLis a/Source/WebCore/html/HTMLPlugInImageElement.cpp_sec4
431
            HTMLPlugInElement* plugInElement = toHTMLPlugInElement(node);
431
            HTMLPlugInElement* plugInElement = toHTMLPlugInElement(node);
432
            if (plugInElement->isPlugInImageElement()) {
432
            if (plugInElement->isPlugInImageElement()) {
433
                HTMLPlugInImageElement* plugInImageElement = toHTMLPlugInImageElement(node);
433
                HTMLPlugInImageElement* plugInImageElement = toHTMLPlugInImageElement(node);
434
                const KURL& loadedURL = plugInImageElement->loadedUrl();
434
                const URL& loadedURL = plugInImageElement->loadedUrl();
435
                String otherMimeType = plugInImageElement->loadedMimeType();
435
                String otherMimeType = plugInImageElement->loadedMimeType();
436
                if (plugInOrigin == loadedURL.host() && mimeType == otherMimeType)
436
                if (plugInOrigin == loadedURL.host() && mimeType == otherMimeType)
437
                    plugInList.append(plugInImageElement);
437
                    plugInList.append(plugInImageElement);
Lines 571-577 void HTMLPlugInImageElement::checkSizeChangeForSnapshotting() a/Source/WebCore/html/HTMLPlugInImageElement.cpp_sec5
571
        toPluginViewBase(widget)->beginSnapshottingRunningPlugin();
571
        toPluginViewBase(widget)->beginSnapshottingRunningPlugin();
572
}
572
}
573
573
574
void HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn(const KURL& url)
574
void HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn(const URL& url)
575
{
575
{
576
    LOG(Plugins, "%p Plug-in URL: %s", this, m_url.utf8().data());
576
    LOG(Plugins, "%p Plug-in URL: %s", this, m_url.utf8().data());
577
    LOG(Plugins, "   Actual URL: %s", url.string().utf8().data());
577
    LOG(Plugins, "   Actual URL: %s", url.string().utf8().data());
- a/Source/WebCore/html/HTMLPlugInImageElement.h -3 / +3 lines
Lines 57-63 public: a/Source/WebCore/html/HTMLPlugInImageElement.h_sec1
57
57
58
    const String& serviceType() const { return m_serviceType; }
58
    const String& serviceType() const { return m_serviceType; }
59
    const String& url() const { return m_url; }
59
    const String& url() const { return m_url; }
60
    const KURL& loadedUrl() const { return m_loadedUrl; }
60
    const URL& loadedUrl() const { return m_loadedUrl; }
61
61
62
    const String loadedMimeType() const
62
    const String loadedMimeType() const
63
    {
63
    {
Lines 79-85 public: a/Source/WebCore/html/HTMLPlugInImageElement.h_sec2
79
    void restartSnapshottedPlugIn();
79
    void restartSnapshottedPlugIn();
80
80
81
    // Plug-in URL might not be the same as url() with overriding parameters.
81
    // Plug-in URL might not be the same as url() with overriding parameters.
82
    void subframeLoaderWillCreatePlugIn(const KURL& plugInURL);
82
    void subframeLoaderWillCreatePlugIn(const URL& plugInURL);
83
    void subframeLoaderDidCreatePlugIn(const Widget*);
83
    void subframeLoaderDidCreatePlugIn(const Widget*);
84
84
85
    void setIsPrimarySnapshottedPlugIn(bool);
85
    void setIsPrimarySnapshottedPlugIn(bool);
Lines 106-112 protected: a/Source/WebCore/html/HTMLPlugInImageElement.h_sec3
106
    OwnPtr<HTMLImageLoader> m_imageLoader;
106
    OwnPtr<HTMLImageLoader> m_imageLoader;
107
    String m_serviceType;
107
    String m_serviceType;
108
    String m_url;
108
    String m_url;
109
    KURL m_loadedUrl;
109
    URL m_loadedUrl;
110
110
111
    static void updateWidgetCallback(Node*, unsigned = 0);
111
    static void updateWidgetCallback(Node*, unsigned = 0);
112
    virtual void didAttachRenderers() OVERRIDE;
112
    virtual void didAttachRenderers() OVERRIDE;
- a/Source/WebCore/html/HTMLScriptElement.cpp -2 / +2 lines
Lines 105-116 bool HTMLScriptElement::async() const a/Source/WebCore/html/HTMLScriptElement.cpp_sec1
105
    return fastHasAttribute(asyncAttr) || forceAsync();
105
    return fastHasAttribute(asyncAttr) || forceAsync();
106
}
106
}
107
107
108
KURL HTMLScriptElement::src() const
108
URL HTMLScriptElement::src() const
109
{
109
{
110
    return document().completeURL(sourceAttributeValue());
110
    return document().completeURL(sourceAttributeValue());
111
}
111
}
112
112
113
void HTMLScriptElement::addSubresourceAttributeURLs(ListHashSet<KURL>& urls) const
113
void HTMLScriptElement::addSubresourceAttributeURLs(ListHashSet<URL>& urls) const
114
{
114
{
115
    HTMLElement::addSubresourceAttributeURLs(urls);
115
    HTMLElement::addSubresourceAttributeURLs(urls);
116
116
- a/Source/WebCore/html/HTMLScriptElement.h -2 / +2 lines
Lines 36-42 public: a/Source/WebCore/html/HTMLScriptElement.h_sec1
36
    String text() const { return scriptContent(); }
36
    String text() const { return scriptContent(); }
37
    void setText(const String&);
37
    void setText(const String&);
38
38
39
    KURL src() const;
39
    URL src() const;
40
40
41
    void setAsync(bool);
41
    void setAsync(bool);
42
    bool async() const;
42
    bool async() const;
Lines 50-56 private: a/Source/WebCore/html/HTMLScriptElement.h_sec2
50
50
51
    virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
51
    virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
52
52
53
    virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const;
53
    virtual void addSubresourceAttributeURLs(ListHashSet<URL>&) const;
54
54
55
    virtual String sourceAttributeValue() const;
55
    virtual String sourceAttributeValue() const;
56
    virtual String charsetAttributeValue() const;
56
    virtual String charsetAttributeValue() const;
- a/Source/WebCore/html/HTMLStyleElement.cpp -1 / +1 lines
Lines 269-275 void HTMLStyleElement::notifyLoadedSheetAndAllCriticalSubresources(bool errorOcc a/Source/WebCore/html/HTMLStyleElement.cpp_sec1
269
    m_firedLoad = true;
269
    m_firedLoad = true;
270
}
270
}
271
271
272
void HTMLStyleElement::addSubresourceAttributeURLs(ListHashSet<KURL>& urls) const
272
void HTMLStyleElement::addSubresourceAttributeURLs(ListHashSet<URL>& urls) const
273
{    
273
{    
274
    HTMLElement::addSubresourceAttributeURLs(urls);
274
    HTMLElement::addSubresourceAttributeURLs(urls);
275
275
- a/Source/WebCore/html/HTMLStyleElement.h -1 / +1 lines
Lines 77-83 private: a/Source/WebCore/html/HTMLStyleElement.h_sec1
77
    virtual void notifyLoadedSheetAndAllCriticalSubresources(bool errorOccurred);
77
    virtual void notifyLoadedSheetAndAllCriticalSubresources(bool errorOccurred);
78
    virtual void startLoadingDynamicSheet() { m_styleSheetOwner.startLoadingDynamicSheet(document()); }
78
    virtual void startLoadingDynamicSheet() { m_styleSheetOwner.startLoadingDynamicSheet(document()); }
79
79
80
    virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const;
80
    virtual void addSubresourceAttributeURLs(ListHashSet<URL>&) const;
81
81
82
#if ENABLE(STYLE_SCOPED)
82
#if ENABLE(STYLE_SCOPED)
83
    void scopedAttributeChanged(bool);
83
    void scopedAttributeChanged(bool);
- a/Source/WebCore/html/HTMLTableCellElement.cpp -1 / +1 lines
Lines 159-165 String HTMLTableCellElement::scope() const a/Source/WebCore/html/HTMLTableCellElement.cpp_sec1
159
    return getAttribute(scopeAttr);
159
    return getAttribute(scopeAttr);
160
}
160
}
161
161
162
void HTMLTableCellElement::addSubresourceAttributeURLs(ListHashSet<KURL>& urls) const
162
void HTMLTableCellElement::addSubresourceAttributeURLs(ListHashSet<URL>& urls) const
163
{
163
{
164
    HTMLTablePartElement::addSubresourceAttributeURLs(urls);
164
    HTMLTablePartElement::addSubresourceAttributeURLs(urls);
165
165
- a/Source/WebCore/html/HTMLTableCellElement.h -1 / +1 lines
Lines 60-66 private: a/Source/WebCore/html/HTMLTableCellElement.h_sec1
60
60
61
    virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
61
    virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
62
62
63
    virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const;
63
    virtual void addSubresourceAttributeURLs(ListHashSet<URL>&) const;
64
};
64
};
65
65
66
HTMLTableCellElement* toHTMLTableCellElement(Node* node);
66
HTMLTableCellElement* toHTMLTableCellElement(Node* node);
- a/Source/WebCore/html/HTMLTableElement.cpp -1 / +1 lines
Lines 570-576 String HTMLTableElement::summary() const a/Source/WebCore/html/HTMLTableElement.cpp_sec1
570
    return getAttribute(summaryAttr);
570
    return getAttribute(summaryAttr);
571
}
571
}
572
572
573
void HTMLTableElement::addSubresourceAttributeURLs(ListHashSet<KURL>& urls) const
573
void HTMLTableElement::addSubresourceAttributeURLs(ListHashSet<URL>& urls) const
574
{
574
{
575
    HTMLElement::addSubresourceAttributeURLs(urls);
575
    HTMLElement::addSubresourceAttributeURLs(urls);
576
576
- a/Source/WebCore/html/HTMLTableElement.h -1 / +1 lines
Lines 79-85 private: a/Source/WebCore/html/HTMLTableElement.h_sec1
79
    // Used to obtain either a solid or outset border decl and to deal with the frame and rules attributes.
79
    // Used to obtain either a solid or outset border decl and to deal with the frame and rules attributes.
80
    virtual const StylePropertySet* additionalPresentationAttributeStyle() OVERRIDE;
80
    virtual const StylePropertySet* additionalPresentationAttributeStyle() OVERRIDE;
81
81
82
    virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const;
82
    virtual void addSubresourceAttributeURLs(ListHashSet<URL>&) const;
83
83
84
    enum TableRules { UnsetRules, NoneRules, GroupsRules, RowsRules, ColsRules, AllRules };
84
    enum TableRules { UnsetRules, NoneRules, GroupsRules, RowsRules, ColsRules, AllRules };
85
    enum CellBorders { NoBorders, SolidBorders, InsetBorders, SolidBordersColsOnly, SolidBordersRowsOnly };
85
    enum CellBorders { NoBorders, SolidBorders, InsetBorders, SolidBordersColsOnly, SolidBordersRowsOnly };
- a/Source/WebCore/html/HTMLTrackElement.cpp -4 / +4 lines
Lines 41-47 namespace WebCore { a/Source/WebCore/html/HTMLTrackElement.cpp_sec1
41
using namespace HTMLNames;
41
using namespace HTMLNames;
42
42
43
#if !LOG_DISABLED
43
#if !LOG_DISABLED
44
static String urlForLoggingTrack(const KURL& url)
44
static String urlForLoggingTrack(const URL& url)
45
{
45
{
46
    static const unsigned maximumURLLengthForLogging = 128;
46
    static const unsigned maximumURLLengthForLogging = 128;
47
    
47
    
Lines 115-121 void HTMLTrackElement::parseAttribute(const QualifiedName& name, const AtomicStr a/Source/WebCore/html/HTMLTrackElement.cpp_sec2
115
    HTMLElement::parseAttribute(name, value);
115
    HTMLElement::parseAttribute(name, value);
116
}
116
}
117
117
118
KURL HTMLTrackElement::src() const
118
URL HTMLTrackElement::src() const
119
{
119
{
120
    return document().completeURL(getAttribute(srcAttr));
120
    return document().completeURL(getAttribute(srcAttr));
121
}
121
}
Lines 220-226 void HTMLTrackElement::loadTimerFired(Timer<HTMLTrackElement>*) a/Source/WebCore/html/HTMLTrackElement.cpp_sec3
220
    setReadyState(HTMLTrackElement::LOADING);
220
    setReadyState(HTMLTrackElement::LOADING);
221
221
222
    // 7. Let URL be the track URL of the track element.
222
    // 7. Let URL be the track URL of the track element.
223
    KURL url = getNonEmptyURLAttribute(srcAttr);
223
    URL url = getNonEmptyURLAttribute(srcAttr);
224
224
225
    // 8. If the track element's parent is a media element then let CORS mode be the state of the parent media
225
    // 8. If the track element's parent is a media element then let CORS mode be the state of the parent media
226
    // element's crossorigin content attribute. Otherwise, let CORS mode be No CORS.
226
    // element's crossorigin content attribute. Otherwise, let CORS mode be No CORS.
Lines 232-238 void HTMLTrackElement::loadTimerFired(Timer<HTMLTrackElement>*) a/Source/WebCore/html/HTMLTrackElement.cpp_sec4
232
    ensureTrack().scheduleLoad(url);
232
    ensureTrack().scheduleLoad(url);
233
}
233
}
234
234
235
bool HTMLTrackElement::canLoadUrl(const KURL& url)
235
bool HTMLTrackElement::canLoadUrl(const URL& url)
236
{
236
{
237
    if (!RuntimeEnabledFeatures::sharedFeatures().webkitVideoTrackEnabled())
237
    if (!RuntimeEnabledFeatures::sharedFeatures().webkitVideoTrackEnabled())
238
        return false;
238
        return false;
- a/Source/WebCore/html/HTMLTrackElement.h -2 / +2 lines
Lines 39-45 class HTMLTrackElement FINAL : public HTMLElement, public TextTrackClient { a/Source/WebCore/html/HTMLTrackElement.h_sec1
39
public:
39
public:
40
    static PassRefPtr<HTMLTrackElement> create(const QualifiedName&, Document&);
40
    static PassRefPtr<HTMLTrackElement> create(const QualifiedName&, Document&);
41
41
42
    KURL src() const;
42
    URL src() const;
43
    void setSrc(const String&);
43
    void setSrc(const String&);
44
44
45
    String kind();
45
    String kind();
Lines 91-97 private: a/Source/WebCore/html/HTMLTrackElement.h_sec2
91
    virtual void textTrackRemoveCue(TextTrack*, PassRefPtr<TextTrackCue>);
91
    virtual void textTrackRemoveCue(TextTrack*, PassRefPtr<TextTrackCue>);
92
92
93
    LoadableTextTrack& ensureTrack();
93
    LoadableTextTrack& ensureTrack();
94
    virtual bool canLoadUrl(const KURL&);
94
    virtual bool canLoadUrl(const URL&);
95
95
96
    RefPtr<LoadableTextTrack> m_track;
96
    RefPtr<LoadableTextTrack> m_track;
97
    Timer<HTMLTrackElement> m_loadTimer;
97
    Timer<HTMLTrackElement> m_loadTimer;
- a/Source/WebCore/html/HTMLVideoElement.cpp -3 / +3 lines
Lines 194-200 const AtomicString& HTMLVideoElement::imageSourceURL() const a/Source/WebCore/html/HTMLVideoElement.cpp_sec1
194
void HTMLVideoElement::setDisplayMode(DisplayMode mode)
194
void HTMLVideoElement::setDisplayMode(DisplayMode mode)
195
{
195
{
196
    DisplayMode oldMode = displayMode();
196
    DisplayMode oldMode = displayMode();
197
    KURL poster = posterImageURL();
197
    URL poster = posterImageURL();
198
198
199
    if (!poster.isEmpty()) {
199
    if (!poster.isEmpty()) {
200
        // We have a poster path, but only show it until the user triggers display by playing or seeking and the
200
        // We have a poster path, but only show it until the user triggers display by playing or seeking and the
Lines 315-325 unsigned HTMLVideoElement::webkitDroppedFrameCount() const a/Source/WebCore/html/HTMLVideoElement.cpp_sec2
315
}
315
}
316
#endif
316
#endif
317
317
318
KURL HTMLVideoElement::posterImageURL() const
318
URL HTMLVideoElement::posterImageURL() const
319
{
319
{
320
    String url = stripLeadingAndTrailingHTMLSpaces(imageSourceURL());
320
    String url = stripLeadingAndTrailingHTMLSpaces(imageSourceURL());
321
    if (url.isEmpty())
321
    if (url.isEmpty())
322
        return KURL();
322
        return URL();
323
    return document().completeURL(url);
323
    return document().completeURL(url);
324
}
324
}
325
325
- a/Source/WebCore/html/HTMLVideoElement.h -1 / +1 lines
Lines 69-75 public: a/Source/WebCore/html/HTMLVideoElement.h_sec1
69
69
70
    bool shouldDisplayPosterImage() const { return displayMode() == Poster || displayMode() == PosterWaitingForVideo; }
70
    bool shouldDisplayPosterImage() const { return displayMode() == Poster || displayMode() == PosterWaitingForVideo; }
71
71
72
    KURL posterImageURL() const;
72
    URL posterImageURL() const;
73
73
74
private:
74
private:
75
    HTMLVideoElement(const QualifiedName&, Document&, bool);
75
    HTMLVideoElement(const QualifiedName&, Document&, bool);
- a/Source/WebCore/html/HTMLViewSourceDocument.cpp -1 / +1 lines
Lines 49-55 namespace WebCore { a/Source/WebCore/html/HTMLViewSourceDocument.cpp_sec1
49
49
50
using namespace HTMLNames;
50
using namespace HTMLNames;
51
51
52
HTMLViewSourceDocument::HTMLViewSourceDocument(Frame* frame, const KURL& url, const String& mimeType)
52
HTMLViewSourceDocument::HTMLViewSourceDocument(Frame* frame, const URL& url, const String& mimeType)
53
    : HTMLDocument(frame, url)
53
    : HTMLDocument(frame, url)
54
    , m_type(mimeType)
54
    , m_type(mimeType)
55
{
55
{
- a/Source/WebCore/html/HTMLViewSourceDocument.h -2 / +2 lines
Lines 35-41 class HTMLToken; a/Source/WebCore/html/HTMLViewSourceDocument.h_sec1
35
35
36
class HTMLViewSourceDocument FINAL : public HTMLDocument {
36
class HTMLViewSourceDocument FINAL : public HTMLDocument {
37
public:
37
public:
38
    static PassRefPtr<HTMLViewSourceDocument> create(Frame* frame, const KURL& url, const String& mimeType)
38
    static PassRefPtr<HTMLViewSourceDocument> create(Frame* frame, const URL& url, const String& mimeType)
39
    {
39
    {
40
        return adoptRef(new HTMLViewSourceDocument(frame, url, mimeType));
40
        return adoptRef(new HTMLViewSourceDocument(frame, url, mimeType));
41
    }
41
    }
Lines 43-49 public: a/Source/WebCore/html/HTMLViewSourceDocument.h_sec2
43
    void addSource(const String&, HTMLToken&);
43
    void addSource(const String&, HTMLToken&);
44
44
45
private:
45
private:
46
    HTMLViewSourceDocument(Frame*, const KURL&, const String& mimeType);
46
    HTMLViewSourceDocument(Frame*, const URL&, const String& mimeType);
47
47
48
    // Returns HTMLViewSourceParser or TextDocumentParser based on m_type.
48
    // Returns HTMLViewSourceParser or TextDocumentParser based on m_type.
49
    virtual PassRefPtr<DocumentParser> createParser();
49
    virtual PassRefPtr<DocumentParser> createParser();
- a/Source/WebCore/html/ImageDocument.cpp -1 / +1 lines
Lines 177-183 void ImageDocumentParser::finish() a/Source/WebCore/html/ImageDocument.cpp_sec1
177
    
177
    
178
// --------
178
// --------
179
179
180
ImageDocument::ImageDocument(Frame* frame, const KURL& url)
180
ImageDocument::ImageDocument(Frame* frame, const URL& url)
181
    : HTMLDocument(frame, url, ImageDocumentClass)
181
    : HTMLDocument(frame, url, ImageDocumentClass)
182
    , m_imageElement(0)
182
    , m_imageElement(0)
183
    , m_imageSizeIsKnown(false)
183
    , m_imageSizeIsKnown(false)
- a/Source/WebCore/html/ImageDocument.h -2 / +2 lines
Lines 34-40 class ImageDocumentElement; a/Source/WebCore/html/ImageDocument.h_sec1
34
34
35
class ImageDocument FINAL : public HTMLDocument {
35
class ImageDocument FINAL : public HTMLDocument {
36
public:
36
public:
37
    static PassRefPtr<ImageDocument> create(Frame* frame, const KURL& url)
37
    static PassRefPtr<ImageDocument> create(Frame* frame, const URL& url)
38
    {
38
    {
39
        return adoptRef(new ImageDocument(frame, url));
39
        return adoptRef(new ImageDocument(frame, url));
40
    }
40
    }
Lines 48-54 public: a/Source/WebCore/html/ImageDocument.h_sec2
48
    void imageClicked(int x, int y);
48
    void imageClicked(int x, int y);
49
49
50
private:
50
private:
51
    ImageDocument(Frame*, const KURL&);
51
    ImageDocument(Frame*, const URL&);
52
52
53
    virtual PassRefPtr<DocumentParser> createParser();
53
    virtual PassRefPtr<DocumentParser> createParser();
54
    
54
    
- a/Source/WebCore/html/MediaDocument.cpp -1 / +1 lines
Lines 118-124 void MediaDocumentParser::appendBytes(DocumentWriter*, const char*, size_t) a/Source/WebCore/html/MediaDocument.cpp_sec1
118
    finish();
118
    finish();
119
}
119
}
120
    
120
    
121
MediaDocument::MediaDocument(Frame* frame, const KURL& url)
121
MediaDocument::MediaDocument(Frame* frame, const URL& url)
122
    : HTMLDocument(frame, url, MediaDocumentClass)
122
    : HTMLDocument(frame, url, MediaDocumentClass)
123
    , m_replaceMediaElementTimer(this, &MediaDocument::replaceMediaElementTimerFired)
123
    , m_replaceMediaElementTimer(this, &MediaDocument::replaceMediaElementTimerFired)
124
{
124
{
- a/Source/WebCore/html/MediaDocument.h -2 / +2 lines
Lines 34-40 namespace WebCore { a/Source/WebCore/html/MediaDocument.h_sec1
34
34
35
class MediaDocument FINAL : public HTMLDocument {
35
class MediaDocument FINAL : public HTMLDocument {
36
public:
36
public:
37
    static PassRefPtr<MediaDocument> create(Frame* frame, const KURL& url)
37
    static PassRefPtr<MediaDocument> create(Frame* frame, const URL& url)
38
    {
38
    {
39
        return adoptRef(new MediaDocument(frame, url));
39
        return adoptRef(new MediaDocument(frame, url));
40
    }
40
    }
Lines 43-49 public: a/Source/WebCore/html/MediaDocument.h_sec2
43
    void mediaElementSawUnsupportedTracks();
43
    void mediaElementSawUnsupportedTracks();
44
44
45
private:
45
private:
46
    MediaDocument(Frame*, const KURL&);
46
    MediaDocument(Frame*, const URL&);
47
47
48
    virtual PassRefPtr<DocumentParser> createParser();
48
    virtual PassRefPtr<DocumentParser> createParser();
49
49
- a/Source/WebCore/html/MediaFragmentURIParser.cpp -1 / +1 lines
Lines 75-81 double MediaFragmentURIParser::invalidTimeValue() a/Source/WebCore/html/MediaFragmentURIParser.cpp_sec1
75
    return MediaPlayer::invalidTime();
75
    return MediaPlayer::invalidTime();
76
}
76
}
77
77
78
MediaFragmentURIParser::MediaFragmentURIParser(const KURL& url)
78
MediaFragmentURIParser::MediaFragmentURIParser(const URL& url)
79
    : m_url(url)
79
    : m_url(url)
80
    , m_timeFormat(None)
80
    , m_timeFormat(None)
81
    , m_startTime(MediaPlayer::invalidTime())
81
    , m_startTime(MediaPlayer::invalidTime())
- a/Source/WebCore/html/MediaFragmentURIParser.h -4 / +4 lines
Lines 28-44 a/Source/WebCore/html/MediaFragmentURIParser.h_sec1
28
28
29
#if ENABLE(VIDEO)
29
#if ENABLE(VIDEO)
30
30
31
#include "KURL.h"
31
#include "URL.h"
32
#include <wtf/Vector.h>
32
#include <wtf/Vector.h>
33
33
34
namespace WebCore {
34
namespace WebCore {
35
35
36
class KURL;
36
class URL;
37
37
38
class MediaFragmentURIParser FINAL {
38
class MediaFragmentURIParser FINAL {
39
public:
39
public:
40
    
40
    
41
    MediaFragmentURIParser(const KURL&);
41
    MediaFragmentURIParser(const URL&);
42
42
43
    double startTime();
43
    double startTime();
44
    double endTime();
44
    double endTime();
Lines 54-60 private: a/Source/WebCore/html/MediaFragmentURIParser.h_sec2
54
    bool parseNPTFragment(const LChar*, unsigned length, double& startTime, double& endTime);
54
    bool parseNPTFragment(const LChar*, unsigned length, double& startTime, double& endTime);
55
    bool parseNPTTime(const LChar*, unsigned length, unsigned& offset, double& time);
55
    bool parseNPTTime(const LChar*, unsigned length, unsigned& offset, double& time);
56
56
57
    KURL m_url;
57
    URL m_url;
58
    TimeFormat m_timeFormat;
58
    TimeFormat m_timeFormat;
59
    double m_startTime;
59
    double m_startTime;
60
    double m_endTime;
60
    double m_endTime;
- a/Source/WebCore/html/PluginDocument.cpp -1 / +1 lines
Lines 131-137 void PluginDocumentParser::appendBytes(DocumentWriter*, const char*, size_t) a/Source/WebCore/html/PluginDocument.cpp_sec1
131
    }
131
    }
132
}
132
}
133
133
134
PluginDocument::PluginDocument(Frame* frame, const KURL& url)
134
PluginDocument::PluginDocument(Frame* frame, const URL& url)
135
    : HTMLDocument(frame, url, PluginDocumentClass)
135
    : HTMLDocument(frame, url, PluginDocumentClass)
136
    , m_shouldLoadPluginManually(true)
136
    , m_shouldLoadPluginManually(true)
137
{
137
{
- a/Source/WebCore/html/PluginDocument.h -2 / +2 lines
Lines 34-40 class Widget; a/Source/WebCore/html/PluginDocument.h_sec1
34
34
35
class PluginDocument FINAL : public HTMLDocument {
35
class PluginDocument FINAL : public HTMLDocument {
36
public:
36
public:
37
    static PassRefPtr<PluginDocument> create(Frame* frame, const KURL& url)
37
    static PassRefPtr<PluginDocument> create(Frame* frame, const URL& url)
38
    {
38
    {
39
        return adoptRef(new PluginDocument(frame, url));
39
        return adoptRef(new PluginDocument(frame, url));
40
    }
40
    }
Lines 51-57 public: a/Source/WebCore/html/PluginDocument.h_sec2
51
    bool shouldLoadPluginManually() { return m_shouldLoadPluginManually; }
51
    bool shouldLoadPluginManually() { return m_shouldLoadPluginManually; }
52
52
53
private:
53
private:
54
    PluginDocument(Frame*, const KURL&);
54
    PluginDocument(Frame*, const URL&);
55
55
56
    virtual PassRefPtr<DocumentParser> createParser() OVERRIDE;
56
    virtual PassRefPtr<DocumentParser> createParser() OVERRIDE;
57
57
- a/Source/WebCore/html/PublicURLManager.cpp -4 / +4 lines
Lines 29-48 a/Source/WebCore/html/PublicURLManager.cpp_sec1
29
29
30
#if ENABLE(BLOB)
30
#if ENABLE(BLOB)
31
31
32
#include "KURL.h"
32
#include "URL.h"
33
#include "URLRegistry.h"
33
#include "URLRegistry.h"
34
#include <wtf/text/StringHash.h>
34
#include <wtf/text/StringHash.h>
35
35
36
namespace WebCore {
36
namespace WebCore {
37
37
38
void PublicURLManager::registerURL(SecurityOrigin* origin, const KURL& url, URLRegistrable* registrable)
38
void PublicURLManager::registerURL(SecurityOrigin* origin, const URL& url, URLRegistrable* registrable)
39
{
39
{
40
    RegistryURLMap::iterator found = m_registryToURL.add(&registrable->registry(), URLSet()).iterator;
40
    RegistryURLMap::iterator found = m_registryToURL.add(&registrable->registry(), URLSet()).iterator;
41
    found->key->registerURL(origin, url, registrable);
41
    found->key->registerURL(origin, url, registrable);
42
    found->value.add(url.string());
42
    found->value.add(url.string());
43
}
43
}
44
44
45
void PublicURLManager::revoke(const KURL& url)
45
void PublicURLManager::revoke(const URL& url)
46
{
46
{
47
    for (RegistryURLMap::iterator i = m_registryToURL.begin(); i != m_registryToURL.end(); ++i) {
47
    for (RegistryURLMap::iterator i = m_registryToURL.begin(); i != m_registryToURL.end(); ++i) {
48
        if (i->value.contains(url.string())) {
48
        if (i->value.contains(url.string())) {
Lines 57-63 void PublicURLManager::contextDestroyed() a/Source/WebCore/html/PublicURLManager.cpp_sec2
57
{
57
{
58
    for (RegistryURLMap::iterator i = m_registryToURL.begin(); i != m_registryToURL.end(); ++i) {
58
    for (RegistryURLMap::iterator i = m_registryToURL.begin(); i != m_registryToURL.end(); ++i) {
59
        for (URLSet::iterator j = i->value.begin(); j != i->value.end(); ++j)
59
        for (URLSet::iterator j = i->value.begin(); j != i->value.end(); ++j)
60
            i->key->unregisterURL(KURL(ParsedURLString, *j));
60
            i->key->unregisterURL(URL(ParsedURLString, *j));
61
    }
61
    }
62
62
63
    m_registryToURL.clear();
63
    m_registryToURL.clear();
- a/Source/WebCore/html/PublicURLManager.h -3 / +3 lines
Lines 35-41 a/Source/WebCore/html/PublicURLManager.h_sec1
35
35
36
namespace WebCore {
36
namespace WebCore {
37
37
38
class KURL;
38
class URL;
39
class ScriptExecutionContext;
39
class ScriptExecutionContext;
40
class SecurityOrigin;
40
class SecurityOrigin;
41
class URLRegistry;
41
class URLRegistry;
Lines 46-53 class PublicURLManager { a/Source/WebCore/html/PublicURLManager.h_sec2
46
public:
46
public:
47
    static OwnPtr<PublicURLManager> create() { return adoptPtr(new PublicURLManager); }
47
    static OwnPtr<PublicURLManager> create() { return adoptPtr(new PublicURLManager); }
48
48
49
    void registerURL(SecurityOrigin*, const KURL&, URLRegistrable*);
49
    void registerURL(SecurityOrigin*, const URL&, URLRegistrable*);
50
    void revoke(const KURL&);
50
    void revoke(const URL&);
51
    void contextDestroyed();
51
    void contextDestroyed();
52
52
53
private:
53
private:
- a/Source/WebCore/html/TextDocument.cpp -1 / +1 lines
Lines 29-35 a/Source/WebCore/html/TextDocument.cpp_sec1
29
29
30
namespace WebCore {
30
namespace WebCore {
31
31
32
TextDocument::TextDocument(Frame* frame, const KURL& url)
32
TextDocument::TextDocument(Frame* frame, const URL& url)
33
    : HTMLDocument(frame, url)
33
    : HTMLDocument(frame, url)
34
{
34
{
35
    setCompatibilityMode(QuirksMode);
35
    setCompatibilityMode(QuirksMode);
- a/Source/WebCore/html/TextDocument.h -2 / +2 lines
Lines 31-43 namespace WebCore { a/Source/WebCore/html/TextDocument.h_sec1
31
31
32
class TextDocument FINAL : public HTMLDocument {
32
class TextDocument FINAL : public HTMLDocument {
33
public:
33
public:
34
    static PassRefPtr<TextDocument> create(Frame* frame, const KURL& url)
34
    static PassRefPtr<TextDocument> create(Frame* frame, const URL& url)
35
    {
35
    {
36
        return adoptRef(new TextDocument(frame, url));
36
        return adoptRef(new TextDocument(frame, url));
37
    }
37
    }
38
38
39
private:
39
private:
40
    TextDocument(Frame*, const KURL&);
40
    TextDocument(Frame*, const URL&);
41
    
41
    
42
    virtual PassRefPtr<DocumentParser> createParser();
42
    virtual PassRefPtr<DocumentParser> createParser();
43
};
43
};
- a/Source/WebCore/html/URLInputType.cpp -2 / +2 lines
Lines 34-40 a/Source/WebCore/html/URLInputType.cpp_sec1
34
#include "HTMLInputElement.h"
34
#include "HTMLInputElement.h"
35
#include "InputTypeNames.h"
35
#include "InputTypeNames.h"
36
#include "LocalizedStrings.h"
36
#include "LocalizedStrings.h"
37
#include "KURL.h"
37
#include "URL.h"
38
#include <wtf/PassOwnPtr.h>
38
#include <wtf/PassOwnPtr.h>
39
39
40
namespace WebCore {
40
namespace WebCore {
Lines 57-63 const AtomicString& URLInputType::formControlType() const a/Source/WebCore/html/URLInputType.cpp_sec2
57
57
58
bool URLInputType::typeMismatchFor(const String& value) const
58
bool URLInputType::typeMismatchFor(const String& value) const
59
{
59
{
60
    return !value.isEmpty() && !KURL(KURL(), value).isValid();
60
    return !value.isEmpty() && !URL(URL(), value).isValid();
61
}
61
}
62
62
63
bool URLInputType::typeMismatch() const
63
bool URLInputType::typeMismatch() const
- a/Source/WebCore/html/URLRegistry.h -3 / +3 lines
Lines 35-41 a/Source/WebCore/html/URLRegistry.h_sec1
35
35
36
namespace WebCore {
36
namespace WebCore {
37
37
38
class KURL;
38
class URL;
39
class SecurityOrigin;
39
class SecurityOrigin;
40
class URLRegistry;
40
class URLRegistry;
41
41
Lines 49-56 class URLRegistry { a/Source/WebCore/html/URLRegistry.h_sec2
49
    WTF_MAKE_FAST_ALLOCATED;
49
    WTF_MAKE_FAST_ALLOCATED;
50
public:
50
public:
51
    virtual ~URLRegistry() { }
51
    virtual ~URLRegistry() { }
52
    virtual void registerURL(SecurityOrigin*, const KURL&, URLRegistrable*) = 0;
52
    virtual void registerURL(SecurityOrigin*, const URL&, URLRegistrable*) = 0;
53
    virtual void unregisterURL(const KURL&) = 0;
53
    virtual void unregisterURL(const URL&) = 0;
54
54
55
    // This is an optional API
55
    // This is an optional API
56
    virtual URLRegistrable* lookup(const String&) { ASSERT_NOT_REACHED(); return 0; }
56
    virtual URLRegistrable* lookup(const String&) { ASSERT_NOT_REACHED(); return 0; }
- a/Source/WebCore/html/canvas/CanvasRenderingContext.cpp -3 / +3 lines
Lines 32-38 a/Source/WebCore/html/canvas/CanvasRenderingContext.cpp_sec1
32
#include "HTMLImageElement.h"
32
#include "HTMLImageElement.h"
33
#include "HTMLVideoElement.h"
33
#include "HTMLVideoElement.h"
34
#include "Image.h"
34
#include "Image.h"
35
#include "KURL.h"
35
#include "URL.h"
36
#include "SecurityOrigin.h"
36
#include "SecurityOrigin.h"
37
37
38
namespace WebCore {
38
namespace WebCore {
Lines 91-97 bool CanvasRenderingContext::wouldTaintOrigin(const HTMLVideoElement* video) a/Source/WebCore/html/canvas/CanvasRenderingContext.cpp_sec2
91
    return false;
91
    return false;
92
}
92
}
93
93
94
bool CanvasRenderingContext::wouldTaintOrigin(const KURL& url)
94
bool CanvasRenderingContext::wouldTaintOrigin(const URL& url)
95
{
95
{
96
    if (!canvas()->originClean() || m_cleanURLs.contains(url.string()))
96
    if (!canvas()->originClean() || m_cleanURLs.contains(url.string()))
97
        return false;
97
        return false;
Lines 106-112 bool CanvasRenderingContext::wouldTaintOrigin(const KURL& url) a/Source/WebCore/html/canvas/CanvasRenderingContext.cpp_sec3
106
    return false;
106
    return false;
107
}
107
}
108
108
109
void CanvasRenderingContext::checkOrigin(const KURL& url)
109
void CanvasRenderingContext::checkOrigin(const URL& url)
110
{
110
{
111
    if (wouldTaintOrigin(url))
111
    if (wouldTaintOrigin(url))
112
        canvas()->setOriginTainted();
112
        canvas()->setOriginTainted();
- a/Source/WebCore/html/canvas/CanvasRenderingContext.h -3 / +3 lines
Lines 39-45 class CanvasPattern; a/Source/WebCore/html/canvas/CanvasRenderingContext.h_sec1
39
class HTMLCanvasElement;
39
class HTMLCanvasElement;
40
class HTMLImageElement;
40
class HTMLImageElement;
41
class HTMLVideoElement;
41
class HTMLVideoElement;
42
class KURL;
42
class URL;
43
class WebGLObject;
43
class WebGLObject;
44
44
45
class CanvasRenderingContext : public ScriptWrappable {
45
class CanvasRenderingContext : public ScriptWrappable {
Lines 67-80 protected: a/Source/WebCore/html/canvas/CanvasRenderingContext.h_sec2
67
    bool wouldTaintOrigin(const HTMLCanvasElement*);
67
    bool wouldTaintOrigin(const HTMLCanvasElement*);
68
    bool wouldTaintOrigin(const HTMLImageElement*);
68
    bool wouldTaintOrigin(const HTMLImageElement*);
69
    bool wouldTaintOrigin(const HTMLVideoElement*);
69
    bool wouldTaintOrigin(const HTMLVideoElement*);
70
    bool wouldTaintOrigin(const KURL&);
70
    bool wouldTaintOrigin(const URL&);
71
71
72
    template<class T> void checkOrigin(const T* arg)
72
    template<class T> void checkOrigin(const T* arg)
73
    {
73
    {
74
        if (wouldTaintOrigin(arg))
74
        if (wouldTaintOrigin(arg))
75
            canvas()->setOriginTainted();
75
            canvas()->setOriginTainted();
76
    }
76
    }
77
    void checkOrigin(const KURL&);
77
    void checkOrigin(const URL&);
78
78
79
private:
79
private:
80
    HTMLCanvasElement* m_canvas;
80
    HTMLCanvasElement* m_canvas;
- a/Source/WebCore/html/canvas/WebGLRenderingContext.cpp -1 / +1 lines
Lines 5559-5565 bool WebGLRenderingContext::validateHTMLImageElement(const char* functionName, H a/Source/WebCore/html/canvas/WebGLRenderingContext.cpp_sec1
5559
        synthesizeGLError(GraphicsContext3D::INVALID_VALUE, functionName, "no image");
5559
        synthesizeGLError(GraphicsContext3D::INVALID_VALUE, functionName, "no image");
5560
        return false;
5560
        return false;
5561
    }
5561
    }
5562
    const KURL& url = image->cachedImage()->response().url();
5562
    const URL& url = image->cachedImage()->response().url();
5563
    if (url.isNull() || url.isEmpty() || !url.isValid()) {
5563
    if (url.isNull() || url.isEmpty() || !url.isValid()) {
5564
        synthesizeGLError(GraphicsContext3D::INVALID_VALUE, functionName, "invalid image");
5564
        synthesizeGLError(GraphicsContext3D::INVALID_VALUE, functionName, "invalid image");
5565
        return false;
5565
        return false;
- a/Source/WebCore/html/parser/CSSPreloadScanner.cpp -1 / +1 lines
Lines 222-228 void CSSPreloadScanner::emitRule() a/Source/WebCore/html/parser/CSSPreloadScanner.cpp_sec1
222
    if (ruleEqualIgnoringCase(m_rule, "import")) {
222
    if (ruleEqualIgnoringCase(m_rule, "import")) {
223
        String url = parseCSSStringOrURL(m_ruleValue.data(), m_ruleValue.size());
223
        String url = parseCSSStringOrURL(m_ruleValue.data(), m_ruleValue.size());
224
        if (!url.isEmpty()) {
224
        if (!url.isEmpty()) {
225
            KURL baseElementURL; // FIXME: This should be passed in from the HTMLPreloadScaner via scan()!
225
            URL baseElementURL; // FIXME: This should be passed in from the HTMLPreloadScaner via scan()!
226
            OwnPtr<PreloadRequest> request = PreloadRequest::create("css", url, baseElementURL, CachedResource::CSSStyleSheet);
226
            OwnPtr<PreloadRequest> request = PreloadRequest::create("css", url, baseElementURL, CachedResource::CSSStyleSheet);
227
            // FIXME: Should this be including the charset in the preload request?
227
            // FIXME: Should this be including the charset in the preload request?
228
            m_requests->append(request.release());
228
            m_requests->append(request.release());
- a/Source/WebCore/html/parser/HTMLParserIdioms.cpp -1 / +1 lines
Lines 27-33 a/Source/WebCore/html/parser/HTMLParserIdioms.cpp_sec1
27
27
28
#include "Decimal.h"
28
#include "Decimal.h"
29
#include "HTMLIdentifier.h"
29
#include "HTMLIdentifier.h"
30
#include "KURL.h"
30
#include "URL.h"
31
#include "QualifiedName.h"
31
#include "QualifiedName.h"
32
#include <limits>
32
#include <limits>
33
#include <wtf/MathExtras.h>
33
#include <wtf/MathExtras.h>
- a/Source/WebCore/html/parser/HTMLPreloadScanner.cpp -5 / +5 lines
Lines 142-148 public: a/Source/WebCore/html/parser/HTMLPreloadScanner.cpp_sec1
142
    }
142
    }
143
#endif
143
#endif
144
144
145
    OwnPtr<PreloadRequest> createPreloadRequest(const KURL& predictedBaseURL)
145
    OwnPtr<PreloadRequest> createPreloadRequest(const URL& predictedBaseURL)
146
    {
146
    {
147
        if (!shouldPreload())
147
        if (!shouldPreload())
148
            return nullptr;
148
            return nullptr;
Lines 263-269 private: a/Source/WebCore/html/parser/HTMLPreloadScanner.cpp_sec2
263
    float m_deviceScaleFactor;
263
    float m_deviceScaleFactor;
264
};
264
};
265
265
266
TokenPreloadScanner::TokenPreloadScanner(const KURL& documentURL, float deviceScaleFactor)
266
TokenPreloadScanner::TokenPreloadScanner(const URL& documentURL, float deviceScaleFactor)
267
    : m_documentURL(documentURL)
267
    : m_documentURL(documentURL)
268
    , m_inStyle(false)
268
    , m_inStyle(false)
269
    , m_deviceScaleFactor(deviceScaleFactor)
269
    , m_deviceScaleFactor(deviceScaleFactor)
Lines 381-390 void TokenPreloadScanner::updatePredictedBaseURL(const Token& token) a/Source/WebCore/html/parser/HTMLPreloadScanner.cpp_sec3
381
{
381
{
382
    ASSERT(m_predictedBaseElementURL.isEmpty());
382
    ASSERT(m_predictedBaseElementURL.isEmpty());
383
    if (const typename Token::Attribute* hrefAttribute = token.getAttributeItem(hrefAttr))
383
    if (const typename Token::Attribute* hrefAttribute = token.getAttributeItem(hrefAttr))
384
        m_predictedBaseElementURL = KURL(m_documentURL, stripLeadingAndTrailingHTMLSpaces(hrefAttribute->value)).copy();
384
        m_predictedBaseElementURL = URL(m_documentURL, stripLeadingAndTrailingHTMLSpaces(hrefAttribute->value)).copy();
385
}
385
}
386
386
387
HTMLPreloadScanner::HTMLPreloadScanner(const HTMLParserOptions& options, const KURL& documentURL, float deviceScaleFactor)
387
HTMLPreloadScanner::HTMLPreloadScanner(const HTMLParserOptions& options, const URL& documentURL, float deviceScaleFactor)
388
    : m_scanner(documentURL, deviceScaleFactor)
388
    : m_scanner(documentURL, deviceScaleFactor)
389
    , m_tokenizer(HTMLTokenizer::create(options))
389
    , m_tokenizer(HTMLTokenizer::create(options))
390
{
390
{
Lines 399-405 void HTMLPreloadScanner::appendToEnd(const SegmentedString& source) a/Source/WebCore/html/parser/HTMLPreloadScanner.cpp_sec4
399
    m_source.append(source);
399
    m_source.append(source);
400
}
400
}
401
401
402
void HTMLPreloadScanner::scan(HTMLResourcePreloader* preloader, const KURL& startingBaseElementURL)
402
void HTMLPreloadScanner::scan(HTMLResourcePreloader* preloader, const URL& startingBaseElementURL)
403
{
403
{
404
    ASSERT(isMainThread()); // HTMLTokenizer::updateStateFor only works on the main thread.
404
    ASSERT(isMainThread()); // HTMLTokenizer::updateStateFor only works on the main thread.
405
405
- a/Source/WebCore/html/parser/HTMLPreloadScanner.h -8 / +8 lines
Lines 44-50 class SegmentedString; a/Source/WebCore/html/parser/HTMLPreloadScanner.h_sec1
44
class TokenPreloadScanner {
44
class TokenPreloadScanner {
45
    WTF_MAKE_NONCOPYABLE(TokenPreloadScanner); WTF_MAKE_FAST_ALLOCATED;
45
    WTF_MAKE_NONCOPYABLE(TokenPreloadScanner); WTF_MAKE_FAST_ALLOCATED;
46
public:
46
public:
47
    explicit TokenPreloadScanner(const KURL& documentURL, float deviceScaleFactor = 1.0);
47
    explicit TokenPreloadScanner(const URL& documentURL, float deviceScaleFactor = 1.0);
48
    ~TokenPreloadScanner();
48
    ~TokenPreloadScanner();
49
49
50
    void scan(const HTMLToken&, PreloadRequestStream& requests);
50
    void scan(const HTMLToken&, PreloadRequestStream& requests);
Lines 52-58 public: a/Source/WebCore/html/parser/HTMLPreloadScanner.h_sec2
52
    void scan(const CompactHTMLToken&, PreloadRequestStream& requests);
52
    void scan(const CompactHTMLToken&, PreloadRequestStream& requests);
53
#endif
53
#endif
54
54
55
    void setPredictedBaseElementURL(const KURL& url) { m_predictedBaseElementURL = url; }
55
    void setPredictedBaseElementURL(const URL& url) { m_predictedBaseElementURL = url; }
56
56
57
    // A TokenPreloadScannerCheckpoint is valid until the next call to rewindTo,
57
    // A TokenPreloadScannerCheckpoint is valid until the next call to rewindTo,
58
    // at which point all outstanding checkpoints are invalidated.
58
    // at which point all outstanding checkpoints are invalidated.
Lines 94-100 private: a/Source/WebCore/html/parser/HTMLPreloadScanner.h_sec3
94
    void updatePredictedBaseURL(const Token&);
94
    void updatePredictedBaseURL(const Token&);
95
95
96
    struct Checkpoint {
96
    struct Checkpoint {
97
        Checkpoint(const KURL& predictedBaseElementURL, bool inStyle
97
        Checkpoint(const URL& predictedBaseElementURL, bool inStyle
98
#if ENABLE(TEMPLATE_ELEMENT)
98
#if ENABLE(TEMPLATE_ELEMENT)
99
            , size_t templateCount
99
            , size_t templateCount
100
#endif
100
#endif
Lines 107-113 private: a/Source/WebCore/html/parser/HTMLPreloadScanner.h_sec4
107
        {
107
        {
108
        }
108
        }
109
109
110
        KURL predictedBaseElementURL;
110
        URL predictedBaseElementURL;
111
        bool inStyle;
111
        bool inStyle;
112
#if ENABLE(TEMPLATE_ELEMENT)
112
#if ENABLE(TEMPLATE_ELEMENT)
113
        size_t templateCount;
113
        size_t templateCount;
Lines 115-122 private: a/Source/WebCore/html/parser/HTMLPreloadScanner.h_sec5
115
    };
115
    };
116
116
117
    CSSPreloadScanner m_cssScanner;
117
    CSSPreloadScanner m_cssScanner;
118
    const KURL m_documentURL;
118
    const URL m_documentURL;
119
    KURL m_predictedBaseElementURL;
119
    URL m_predictedBaseElementURL;
120
    bool m_inStyle;
120
    bool m_inStyle;
121
    float m_deviceScaleFactor;
121
    float m_deviceScaleFactor;
122
122
Lines 130-140 private: a/Source/WebCore/html/parser/HTMLPreloadScanner.h_sec6
130
class HTMLPreloadScanner {
130
class HTMLPreloadScanner {
131
    WTF_MAKE_NONCOPYABLE(HTMLPreloadScanner); WTF_MAKE_FAST_ALLOCATED;
131
    WTF_MAKE_NONCOPYABLE(HTMLPreloadScanner); WTF_MAKE_FAST_ALLOCATED;
132
public:
132
public:
133
    HTMLPreloadScanner(const HTMLParserOptions&, const KURL& documentURL, float deviceScaleFactor = 1.0);
133
    HTMLPreloadScanner(const HTMLParserOptions&, const URL& documentURL, float deviceScaleFactor = 1.0);
134
    ~HTMLPreloadScanner();
134
    ~HTMLPreloadScanner();
135
135
136
    void appendToEnd(const SegmentedString&);
136
    void appendToEnd(const SegmentedString&);
137
    void scan(HTMLResourcePreloader*, const KURL& documentBaseElementURL);
137
    void scan(HTMLResourcePreloader*, const URL& documentBaseElementURL);
138
138
139
private:
139
private:
140
    TokenPreloadScanner m_scanner;
140
    TokenPreloadScanner m_scanner;
- a/Source/WebCore/html/parser/HTMLResourcePreloader.cpp -1 / +1 lines
Lines 45-51 bool PreloadRequest::isSafeToSendToAnotherThread() const a/Source/WebCore/html/parser/HTMLResourcePreloader.cpp_sec1
45
        && m_baseURL.isSafeToSendToAnotherThread();
45
        && m_baseURL.isSafeToSendToAnotherThread();
46
}
46
}
47
47
48
KURL PreloadRequest::completeURL(Document* document)
48
URL PreloadRequest::completeURL(Document* document)
49
{
49
{
50
    return document->completeURL(m_resourceURL, m_baseURL.isEmpty() ? document->url() : m_baseURL);
50
    return document->completeURL(m_resourceURL, m_baseURL.isEmpty() ? document->url() : m_baseURL);
51
}
51
}
- a/Source/WebCore/html/parser/HTMLResourcePreloader.h -5 / +5 lines
Lines 33-44 namespace WebCore { a/Source/WebCore/html/parser/HTMLResourcePreloader.h_sec1
33
33
34
class PreloadRequest {
34
class PreloadRequest {
35
public:
35
public:
36
    static OwnPtr<PreloadRequest> create(const String& initiator, const String& resourceURL, const KURL& baseURL, CachedResource::Type resourceType, const String& mediaAttribute)
36
    static OwnPtr<PreloadRequest> create(const String& initiator, const String& resourceURL, const URL& baseURL, CachedResource::Type resourceType, const String& mediaAttribute)
37
    {
37
    {
38
        return adoptPtr(new PreloadRequest(initiator, resourceURL, baseURL, resourceType, mediaAttribute));
38
        return adoptPtr(new PreloadRequest(initiator, resourceURL, baseURL, resourceType, mediaAttribute));
39
    }
39
    }
40
40
41
    static OwnPtr<PreloadRequest> create(const String& initiator, const String& resourceURL, const KURL& baseURL, CachedResource::Type resourceType)
41
    static OwnPtr<PreloadRequest> create(const String& initiator, const String& resourceURL, const URL& baseURL, CachedResource::Type resourceType)
42
    {
42
    {
43
        return adoptPtr(new PreloadRequest(initiator, resourceURL, baseURL, resourceType, String()));
43
        return adoptPtr(new PreloadRequest(initiator, resourceURL, baseURL, resourceType, String()));
44
    }
44
    }
Lines 54-60 public: a/Source/WebCore/html/parser/HTMLResourcePreloader.h_sec2
54
    CachedResource::Type resourceType() const { return m_resourceType; }
54
    CachedResource::Type resourceType() const { return m_resourceType; }
55
55
56
private:
56
private:
57
    PreloadRequest(const String& initiator, const String& resourceURL, const KURL& baseURL, CachedResource::Type resourceType, const String& mediaAttribute)
57
    PreloadRequest(const String& initiator, const String& resourceURL, const URL& baseURL, CachedResource::Type resourceType, const String& mediaAttribute)
58
        : m_initiator(initiator)
58
        : m_initiator(initiator)
59
        , m_resourceURL(resourceURL.isolatedCopy())
59
        , m_resourceURL(resourceURL.isolatedCopy())
60
        , m_baseURL(baseURL.copy())
60
        , m_baseURL(baseURL.copy())
Lines 64-74 private: a/Source/WebCore/html/parser/HTMLResourcePreloader.h_sec3
64
    {
64
    {
65
    }
65
    }
66
66
67
    KURL completeURL(Document*);
67
    URL completeURL(Document*);
68
68
69
    String m_initiator;
69
    String m_initiator;
70
    String m_resourceURL;
70
    String m_resourceURL;
71
    KURL m_baseURL;
71
    URL m_baseURL;
72
    String m_charset;
72
    String m_charset;
73
    CachedResource::Type m_resourceType;
73
    CachedResource::Type m_resourceType;
74
    String m_mediaAttribute;
74
    String m_mediaAttribute;
- a/Source/WebCore/html/parser/HTMLScriptRunner.cpp -2 / +2 lines
Lines 74-83 void HTMLScriptRunner::detach() a/Source/WebCore/html/parser/HTMLScriptRunner.cpp_sec1
74
    m_document = 0;
74
    m_document = 0;
75
}
75
}
76
76
77
static KURL documentURLForScriptExecution(Document* document)
77
static URL documentURLForScriptExecution(Document* document)
78
{
78
{
79
    if (!document || !document->frame())
79
    if (!document || !document->frame())
80
        return KURL();
80
        return URL();
81
81
82
    // Use the URL of the currently active document for this frame.
82
    // Use the URL of the currently active document for this frame.
83
    return document->frame()->document()->url();
83
    return document->frame()->document()->url();
- a/Source/WebCore/html/parser/XSSAuditor.cpp -6 / +6 lines
Lines 38-44 a/Source/WebCore/html/parser/XSSAuditor.cpp_sec1
38
#include "HTMLParamElement.h"
38
#include "HTMLParamElement.h"
39
#include "HTMLParserIdioms.h"
39
#include "HTMLParserIdioms.h"
40
#include "InspectorValues.h"
40
#include "InspectorValues.h"
41
#include "KURL.h"
41
#include "URL.h"
42
#include "Settings.h"
42
#include "Settings.h"
43
#include "TextEncoding.h"
43
#include "TextEncoding.h"
44
#include "TextResourceDecoder.h"
44
#include "TextResourceDecoder.h"
Lines 156-163 static inline String decode16BitUnicodeEscapeSequences(const String& string) a/Source/WebCore/html/parser/XSSAuditor.cpp_sec2
156
156
157
static inline String decodeStandardURLEscapeSequences(const String& string, const TextEncoding& encoding)
157
static inline String decodeStandardURLEscapeSequences(const String& string, const TextEncoding& encoding)
158
{
158
{
159
    // We use decodeEscapeSequences() instead of decodeURLEscapeSequences() (declared in KURL.h) to
159
    // We use decodeEscapeSequences() instead of decodeURLEscapeSequences() (declared in URL.h) to
160
    // avoid platform-specific URL decoding differences (e.g. KURLGoogle).
160
    // avoid platform-specific URL decoding differences (e.g. URLGoogle).
161
    return decodeEscapeSequences<URLEscapeSequence>(string, encoding);
161
    return decodeEscapeSequences<URLEscapeSequence>(string, encoding);
162
}
162
}
163
163
Lines 278-284 void XSSAuditor::init(Document* document, XSSAuditorDelegate* auditorDelegate) a/Source/WebCore/html/parser/XSSAuditor.cpp_sec3
278
        String errorDetails;
278
        String errorDetails;
279
        unsigned errorPosition = 0;
279
        unsigned errorPosition = 0;
280
        String reportURL;
280
        String reportURL;
281
        KURL xssProtectionReportURL;
281
        URL xssProtectionReportURL;
282
282
283
        // Process the X-XSS-Protection header, then mix in the CSP header's value.
283
        // Process the X-XSS-Protection header, then mix in the CSP header's value.
284
        ContentSecurityPolicy::ReflectedXSSDisposition xssProtectionHeader = parseXSSProtectionHeader(headerValue, errorDetails, errorPosition, reportURL);
284
        ContentSecurityPolicy::ReflectedXSSDisposition xssProtectionHeader = parseXSSProtectionHeader(headerValue, errorDetails, errorPosition, reportURL);
Lines 288-294 void XSSAuditor::init(Document* document, XSSAuditorDelegate* auditorDelegate) a/Source/WebCore/html/parser/XSSAuditor.cpp_sec4
288
            if (MixedContentChecker::isMixedContent(document->securityOrigin(), xssProtectionReportURL)) {
288
            if (MixedContentChecker::isMixedContent(document->securityOrigin(), xssProtectionReportURL)) {
289
                errorDetails = "insecure reporting URL for secure page";
289
                errorDetails = "insecure reporting URL for secure page";
290
                xssProtectionHeader = ContentSecurityPolicy::ReflectedXSSInvalid;
290
                xssProtectionHeader = ContentSecurityPolicy::ReflectedXSSInvalid;
291
                xssProtectionReportURL = KURL();
291
                xssProtectionReportURL = URL();
292
            }
292
            }
293
        }
293
        }
294
        if (xssProtectionHeader == ContentSecurityPolicy::ReflectedXSSInvalid)
294
        if (xssProtectionHeader == ContentSecurityPolicy::ReflectedXSSInvalid)
Lines 720-726 bool XSSAuditor::isLikelySafeResource(const String& url) a/Source/WebCore/html/parser/XSSAuditor.cpp_sec5
720
    if (m_documentURL.host().isEmpty())
720
    if (m_documentURL.host().isEmpty())
721
        return false;
721
        return false;
722
722
723
    KURL resourceURL(m_documentURL, url);
723
    URL resourceURL(m_documentURL, url);
724
    return (m_documentURL.host() == resourceURL.host() && resourceURL.query().isEmpty());
724
    return (m_documentURL.host() == resourceURL.host() && resourceURL.query().isEmpty());
725
}
725
}
726
726
- a/Source/WebCore/html/parser/XSSAuditor.h -2 / +2 lines
Lines 28-34 a/Source/WebCore/html/parser/XSSAuditor.h_sec1
28
28
29
#include "HTMLToken.h"
29
#include "HTMLToken.h"
30
#include "HTTPParsers.h"
30
#include "HTTPParsers.h"
31
#include "KURL.h"
31
#include "URL.h"
32
#include "SuffixTree.h"
32
#include "SuffixTree.h"
33
#include "TextEncoding.h"
33
#include "TextEncoding.h"
34
#include <wtf/PassOwnPtr.h>
34
#include <wtf/PassOwnPtr.h>
Lines 104-110 private: a/Source/WebCore/html/parser/XSSAuditor.h_sec2
104
    bool isContainedInRequest(const String&);
104
    bool isContainedInRequest(const String&);
105
    bool isLikelySafeResource(const String& url);
105
    bool isLikelySafeResource(const String& url);
106
106
107
    KURL m_documentURL;
107
    URL m_documentURL;
108
    bool m_isEnabled;
108
    bool m_isEnabled;
109
109
110
    ContentSecurityPolicy::ReflectedXSSDisposition m_xssProtection;
110
    ContentSecurityPolicy::ReflectedXSSDisposition m_xssProtection;
- a/Source/WebCore/html/parser/XSSAuditorDelegate.h -3 / +3 lines
Lines 26-32 a/Source/WebCore/html/parser/XSSAuditorDelegate.h_sec1
26
#ifndef XSSAuditorDelegate_h
26
#ifndef XSSAuditorDelegate_h
27
#define XSSAuditorDelegate_h
27
#define XSSAuditorDelegate_h
28
28
29
#include "KURL.h"
29
#include "URL.h"
30
#include <wtf/OwnPtr.h>
30
#include <wtf/OwnPtr.h>
31
#include <wtf/PassOwnPtr.h>
31
#include <wtf/PassOwnPtr.h>
32
#include <wtf/Vector.h>
32
#include <wtf/Vector.h>
Lines 63-76 public: a/Source/WebCore/html/parser/XSSAuditorDelegate.h_sec2
63
    explicit XSSAuditorDelegate(Document*);
63
    explicit XSSAuditorDelegate(Document*);
64
64
65
    void didBlockScript(const XSSInfo&);
65
    void didBlockScript(const XSSInfo&);
66
    void setReportURL(const KURL& url) { m_reportURL = url; }
66
    void setReportURL(const URL& url) { m_reportURL = url; }
67
67
68
private:
68
private:
69
    PassRefPtr<FormData> generateViolationReport();
69
    PassRefPtr<FormData> generateViolationReport();
70
70
71
    Document* m_document;
71
    Document* m_document;
72
    bool m_didSendNotifications;
72
    bool m_didSendNotifications;
73
    KURL m_reportURL;
73
    URL m_reportURL;
74
};
74
};
75
75
76
typedef Vector<OwnPtr<XSSInfo> > XSSInfoStream;
76
typedef Vector<OwnPtr<XSSInfo> > XSSInfoStream;
- a/Source/WebCore/html/track/LoadableTextTrack.cpp -1 / +1 lines
Lines 54-60 void LoadableTextTrack::clearClient() a/Source/WebCore/html/track/LoadableTextTrack.cpp_sec1
54
    TextTrack::clearClient();
54
    TextTrack::clearClient();
55
}
55
}
56
56
57
void LoadableTextTrack::scheduleLoad(const KURL& url)
57
void LoadableTextTrack::scheduleLoad(const URL& url)
58
{
58
{
59
    if (url == m_url)
59
    if (url == m_url)
60
        return;
60
        return;
- a/Source/WebCore/html/track/LoadableTextTrack.h -3 / +3 lines
Lines 41-47 class LoadableTextTrackClient : public TextTrackClient { a/Source/WebCore/html/track/LoadableTextTrack.h_sec1
41
public:
41
public:
42
    virtual ~LoadableTextTrackClient() { }
42
    virtual ~LoadableTextTrackClient() { }
43
    
43
    
44
    virtual bool canLoadUrl(LoadableTextTrack*, const KURL&) { return false; }
44
    virtual bool canLoadUrl(LoadableTextTrack*, const URL&) { return false; }
45
    virtual void loadingCompleted(LoadableTextTrack*, bool /* loadingFailed */) { }
45
    virtual void loadingCompleted(LoadableTextTrack*, bool /* loadingFailed */) { }
46
};
46
};
47
47
Lines 53-59 public: a/Source/WebCore/html/track/LoadableTextTrack.h_sec2
53
    }
53
    }
54
    virtual ~LoadableTextTrack();
54
    virtual ~LoadableTextTrack();
55
55
56
    void scheduleLoad(const KURL&);
56
    void scheduleLoad(const URL&);
57
57
58
    virtual void clearClient();
58
    virtual void clearClient();
59
59
Lines 82-88 private: a/Source/WebCore/html/track/LoadableTextTrack.h_sec3
82
    HTMLTrackElement* m_trackElement;
82
    HTMLTrackElement* m_trackElement;
83
    Timer<LoadableTextTrack> m_loadTimer;
83
    Timer<LoadableTextTrack> m_loadTimer;
84
    OwnPtr<TextTrackLoader> m_loader;
84
    OwnPtr<TextTrackLoader> m_loader;
85
    KURL m_url;
85
    URL m_url;
86
    bool m_isDefault;
86
    bool m_isDefault;
87
};
87
};
88
} // namespace WebCore
88
} // namespace WebCore
- a/Source/WebCore/inspector/DOMPatchSupport.cpp -3 / +3 lines
Lines 91-102 void DOMPatchSupport::patchDocument(const String& markup) a/Source/WebCore/inspector/DOMPatchSupport.cpp_sec1
91
{
91
{
92
    RefPtr<Document> newDocument;
92
    RefPtr<Document> newDocument;
93
    if (m_document->isHTMLDocument())
93
    if (m_document->isHTMLDocument())
94
        newDocument = HTMLDocument::create(0, KURL());
94
        newDocument = HTMLDocument::create(0, URL());
95
    else if (m_document->isXHTMLDocument())
95
    else if (m_document->isXHTMLDocument())
96
        newDocument = HTMLDocument::createXHTML(0, KURL());
96
        newDocument = HTMLDocument::createXHTML(0, URL());
97
#if ENABLE(SVG)
97
#if ENABLE(SVG)
98
    else if (m_document->isSVGDocument())
98
    else if (m_document->isSVGDocument())
99
        newDocument = Document::create(0, KURL());
99
        newDocument = Document::create(0, URL());
100
#endif
100
#endif
101
101
102
    ASSERT(newDocument);
102
    ASSERT(newDocument);
- a/Source/WebCore/inspector/InspectorAgent.cpp -4 / +4 lines
Lines 139-145 void InspectorAgent::domContentLoadedEventFired() a/Source/WebCore/inspector/InspectorAgent.cpp_sec1
139
    m_injectedScriptManager->injectedScriptHost()->clearInspectedObjects();
139
    m_injectedScriptManager->injectedScriptHost()->clearInspectedObjects();
140
}
140
}
141
141
142
bool InspectorAgent::isMainResourceLoader(DocumentLoader* loader, const KURL& requestUrl)
142
bool InspectorAgent::isMainResourceLoader(DocumentLoader* loader, const URL& requestUrl)
143
{
143
{
144
    return m_inspectedPage->frameIsMainFrame(loader->frame()) && requestUrl == loader->requestURL();
144
    return m_inspectedPage->frameIsMainFrame(loader->frame()) && requestUrl == loader->requestURL();
145
}
145
}
Lines 169-182 void InspectorAgent::inspect(PassRefPtr<TypeBuilder::Runtime::RemoteObject> obje a/Source/WebCore/inspector/InspectorAgent.cpp_sec2
169
    m_pendingInspectData.second = hints;
169
    m_pendingInspectData.second = hints;
170
}
170
}
171
171
172
KURL InspectorAgent::inspectedURL() const
172
URL InspectorAgent::inspectedURL() const
173
{
173
{
174
    return m_inspectedPage->mainFrame().document()->url();
174
    return m_inspectedPage->mainFrame().document()->url();
175
}
175
}
176
176
177
KURL InspectorAgent::inspectedURLWithoutFragment() const
177
URL InspectorAgent::inspectedURLWithoutFragment() const
178
{
178
{
179
    KURL url = inspectedURL();
179
    URL url = inspectedURL();
180
    url.removeFragmentIdentifier();
180
    url.removeFragmentIdentifier();
181
    return url;
181
    return url;
182
}
182
}
- a/Source/WebCore/inspector/InspectorAgent.h -4 / +4 lines
Lines 46-52 class InjectedScriptManager; a/Source/WebCore/inspector/InspectorAgent.h_sec1
46
class InspectorFrontend;
46
class InspectorFrontend;
47
class InspectorObject;
47
class InspectorObject;
48
class InstrumentingAgents;
48
class InstrumentingAgents;
49
class KURL;
49
class URL;
50
class Page;
50
class Page;
51
51
52
typedef String ErrorString;
52
typedef String ErrorString;
Lines 67-74 public: a/Source/WebCore/inspector/InspectorAgent.h_sec2
67
    void enable(ErrorString*);
67
    void enable(ErrorString*);
68
    void disable(ErrorString*);
68
    void disable(ErrorString*);
69
69
70
    KURL inspectedURL() const;
70
    URL inspectedURL() const;
71
    KURL inspectedURLWithoutFragment() const;
71
    URL inspectedURLWithoutFragment() const;
72
72
73
    InspectorFrontend* frontend() const { return m_frontend; }
73
    InspectorFrontend* frontend() const { return m_frontend; }
74
74
Lines 98-104 private: a/Source/WebCore/inspector/InspectorAgent.h_sec3
98
    void toggleRecordButton(bool);
98
    void toggleRecordButton(bool);
99
#endif
99
#endif
100
100
101
    bool isMainResourceLoader(DocumentLoader*, const KURL& requestUrl);
101
    bool isMainResourceLoader(DocumentLoader*, const URL& requestUrl);
102
102
103
    Page* m_inspectedPage;
103
    Page* m_inspectedPage;
104
    InspectorFrontend* m_frontend;
104
    InspectorFrontend* m_frontend;
- a/Source/WebCore/inspector/InspectorDebuggerAgent.cpp -1 / +1 lines
Lines 683-689 String InspectorDebuggerAgent::sourceMapURLForScript(const Script& script) a/Source/WebCore/inspector/InspectorDebuggerAgent.cpp_sec1
683
683
684
    if (!script.url.isEmpty()) {
684
    if (!script.url.isEmpty()) {
685
        if (InspectorPageAgent* pageAgent = m_instrumentingAgents->inspectorPageAgent()) {
685
        if (InspectorPageAgent* pageAgent = m_instrumentingAgents->inspectorPageAgent()) {
686
            CachedResource* resource = pageAgent->cachedResource(pageAgent->mainFrame(), KURL(ParsedURLString, script.url));
686
            CachedResource* resource = pageAgent->cachedResource(pageAgent->mainFrame(), URL(ParsedURLString, script.url));
687
            if (resource) {
687
            if (resource) {
688
                String sourceMapHeader = resource->response().httpHeaderField(sourceMapHTTPHeader);
688
                String sourceMapHeader = resource->response().httpHeaderField(sourceMapHTTPHeader);
689
                if (!sourceMapHeader.isEmpty())
689
                if (!sourceMapHeader.isEmpty())
- a/Source/WebCore/inspector/InspectorFileSystemAgent.cpp -8 / +8 lines
Lines 55-61 a/Source/WebCore/inspector/InspectorFileSystemAgent.cpp_sec1
55
#include "InspectorPageAgent.h"
55
#include "InspectorPageAgent.h"
56
#include "InspectorState.h"
56
#include "InspectorState.h"
57
#include "InstrumentingAgents.h"
57
#include "InstrumentingAgents.h"
58
#include "KURL.h"
58
#include "URL.h"
59
#include "LocalFileSystem.h"
59
#include "LocalFileSystem.h"
60
#include "MIMETypeRegistry.h"
60
#include "MIMETypeRegistry.h"
61
#include "Metadata.h"
61
#include "Metadata.h"
Lines 217-223 private: a/Source/WebCore/inspector/InspectorFileSystemAgent.cpp_sec2
217
    void readDirectoryEntries();
217
    void readDirectoryEntries();
218
218
219
    RefPtr<RequestDirectoryContentCallback> m_requestCallback;
219
    RefPtr<RequestDirectoryContentCallback> m_requestCallback;
220
    KURL m_url;
220
    URL m_url;
221
    RefPtr<Array<TypeBuilder::FileSystem::Entry> > m_entries;
221
    RefPtr<Array<TypeBuilder::FileSystem::Entry> > m_entries;
222
    RefPtr<DirectoryReader> m_directoryReader;
222
    RefPtr<DirectoryReader> m_directoryReader;
223
};
223
};
Lines 342-348 private: a/Source/WebCore/inspector/InspectorFileSystemAgent.cpp_sec3
342
        , m_url(ParsedURLString, url) { }
342
        , m_url(ParsedURLString, url) { }
343
343
344
    RefPtr<RequestMetadataCallback> m_requestCallback;
344
    RefPtr<RequestMetadataCallback> m_requestCallback;
345
    KURL m_url;
345
    URL m_url;
346
    String m_path;
346
    String m_path;
347
    bool m_isDirectory;
347
    bool m_isDirectory;
348
};
348
};
Lines 442-448 private: a/Source/WebCore/inspector/InspectorFileSystemAgent.cpp_sec4
442
        , m_charset(charset) { }
442
        , m_charset(charset) { }
443
443
444
    RefPtr<RequestFileContentCallback> m_requestCallback;
444
    RefPtr<RequestFileContentCallback> m_requestCallback;
445
    KURL m_url;
445
    URL m_url;
446
    bool m_readAsText;
446
    bool m_readAsText;
447
    int m_start;
447
    int m_start;
448
    long long m_end;
448
    long long m_end;
Lines 522-528 void FileContentRequest::didRead() a/Source/WebCore/inspector/InspectorFileSystemAgent.cpp_sec5
522
522
523
class DeleteEntryRequest : public VoidCallback {
523
class DeleteEntryRequest : public VoidCallback {
524
public:
524
public:
525
    static PassRefPtr<DeleteEntryRequest> create(PassRefPtr<DeleteEntryCallback> requestCallback, const KURL& url)
525
    static PassRefPtr<DeleteEntryRequest> create(PassRefPtr<DeleteEntryCallback> requestCallback, const URL& url)
526
    {
526
    {
527
        return adoptRef(new DeleteEntryRequest(requestCallback, url));
527
        return adoptRef(new DeleteEntryRequest(requestCallback, url));
528
    }
528
    }
Lines 554-565 private: a/Source/WebCore/inspector/InspectorFileSystemAgent.cpp_sec6
554
        m_requestCallback->sendSuccess(static_cast<int>(errorCode));
554
        m_requestCallback->sendSuccess(static_cast<int>(errorCode));
555
    }
555
    }
556
556
557
    DeleteEntryRequest(PassRefPtr<DeleteEntryCallback> requestCallback, const KURL& url)
557
    DeleteEntryRequest(PassRefPtr<DeleteEntryCallback> requestCallback, const URL& url)
558
        : m_requestCallback(requestCallback)
558
        : m_requestCallback(requestCallback)
559
        , m_url(url) { }
559
        , m_url(url) { }
560
560
561
    RefPtr<DeleteEntryCallback> m_requestCallback;
561
    RefPtr<DeleteEntryCallback> m_requestCallback;
562
    KURL m_url;
562
    URL m_url;
563
};
563
};
564
564
565
void DeleteEntryRequest::start(ScriptExecutionContext* scriptExecutionContext)
565
void DeleteEntryRequest::start(ScriptExecutionContext* scriptExecutionContext)
Lines 686-692 void InspectorFileSystemAgent::deleteEntry(ErrorString* error, const String& url a/Source/WebCore/inspector/InspectorFileSystemAgent.cpp_sec7
686
    if (!assertEnabled(error))
686
    if (!assertEnabled(error))
687
        return;
687
        return;
688
688
689
    KURL url(ParsedURLString, urlString);
689
    URL url(ParsedURLString, urlString);
690
690
691
    ScriptExecutionContext* scriptExecutionContext = assertScriptExecutionContextForOrigin(error, SecurityOrigin::create(url).get());
691
    ScriptExecutionContext* scriptExecutionContext = assertScriptExecutionContextForOrigin(error, SecurityOrigin::create(url).get());
692
    if (!scriptExecutionContext)
692
    if (!scriptExecutionContext)
- a/Source/WebCore/inspector/InspectorFrontendHost.cpp -1 / +1 lines
Lines 322-328 void InspectorFrontendHost::removeFileSystem(const String& fileSystemPath) a/Source/WebCore/inspector/InspectorFrontendHost.cpp_sec1
322
PassRefPtr<DOMFileSystem> InspectorFrontendHost::isolatedFileSystem(const String& fileSystemName, const String& rootURL)
322
PassRefPtr<DOMFileSystem> InspectorFrontendHost::isolatedFileSystem(const String& fileSystemName, const String& rootURL)
323
{
323
{
324
    ScriptExecutionContext* context = m_frontendPage->mainFrame().document();
324
    ScriptExecutionContext* context = m_frontendPage->mainFrame().document();
325
    return DOMFileSystem::create(context, fileSystemName, FileSystemTypeIsolated, KURL(ParsedURLString, rootURL), AsyncFileSystem::create());
325
    return DOMFileSystem::create(context, fileSystemName, FileSystemTypeIsolated, URL(ParsedURLString, rootURL), AsyncFileSystem::create());
326
}
326
}
327
#endif
327
#endif
328
328
- a/Source/WebCore/inspector/InspectorInstrumentation.cpp -3 / +3 lines
Lines 797-803 void InspectorInstrumentation::documentThreadableLoaderStartedLoadingForClientIm a/Source/WebCore/inspector/InspectorInstrumentation.cpp_sec1
797
        resourceAgent->documentThreadableLoaderStartedLoadingForClient(identifier, client);
797
        resourceAgent->documentThreadableLoaderStartedLoadingForClient(identifier, client);
798
}
798
}
799
799
800
void InspectorInstrumentation::willLoadXHRImpl(InstrumentingAgents* instrumentingAgents, ThreadableLoaderClient* client, const String& method, const KURL& url, bool async, PassRefPtr<FormData> formData, const HTTPHeaderMap& headers, bool includeCredentials)
800
void InspectorInstrumentation::willLoadXHRImpl(InstrumentingAgents* instrumentingAgents, ThreadableLoaderClient* client, const String& method, const URL& url, bool async, PassRefPtr<FormData> formData, const HTTPHeaderMap& headers, bool includeCredentials)
801
{
801
{
802
    if (InspectorResourceAgent* resourceAgent = instrumentingAgents->inspectorResourceAgent())
802
    if (InspectorResourceAgent* resourceAgent = instrumentingAgents->inspectorResourceAgent())
803
        resourceAgent->willLoadXHR(client, method, url, async, formData, headers, includeCredentials);
803
        resourceAgent->willLoadXHR(client, method, url, async, formData, headers, includeCredentials);
Lines 1128-1134 bool InspectorInstrumentation::shouldPauseDedicatedWorkerOnStartImpl(Instrumenti a/Source/WebCore/inspector/InspectorInstrumentation.cpp_sec2
1128
    return false;
1128
    return false;
1129
}
1129
}
1130
1130
1131
void InspectorInstrumentation::didStartWorkerGlobalScopeImpl(InstrumentingAgents* instrumentingAgents, WorkerGlobalScopeProxy* workerGlobalScopeProxy, const KURL& url)
1131
void InspectorInstrumentation::didStartWorkerGlobalScopeImpl(InstrumentingAgents* instrumentingAgents, WorkerGlobalScopeProxy* workerGlobalScopeProxy, const URL& url)
1132
{
1132
{
1133
    if (InspectorWorkerAgent* workerAgent = instrumentingAgents->inspectorWorkerAgent())
1133
    if (InspectorWorkerAgent* workerAgent = instrumentingAgents->inspectorWorkerAgent())
1134
        workerAgent->didStartWorkerGlobalScope(workerGlobalScopeProxy, url);
1134
        workerAgent->didStartWorkerGlobalScope(workerGlobalScopeProxy, url);
Lines 1155-1161 void InspectorInstrumentation::workerGlobalScopeTerminatedImpl(InstrumentingAgen a/Source/WebCore/inspector/InspectorInstrumentation.cpp_sec3
1155
#endif
1155
#endif
1156
1156
1157
#if ENABLE(WEB_SOCKETS)
1157
#if ENABLE(WEB_SOCKETS)
1158
void InspectorInstrumentation::didCreateWebSocketImpl(InstrumentingAgents* instrumentingAgents, unsigned long identifier, const KURL& requestURL, const KURL&, const String& protocol, Document* document)
1158
void InspectorInstrumentation::didCreateWebSocketImpl(InstrumentingAgents* instrumentingAgents, unsigned long identifier, const URL& requestURL, const URL&, const String& protocol, Document* document)
1159
{
1159
{
1160
    InspectorAgent* inspectorAgent = instrumentingAgents->inspectorAgent();
1160
    InspectorAgent* inspectorAgent = instrumentingAgents->inspectorAgent();
1161
    if (!inspectorAgent || !inspectorAgent->developerExtrasEnabled())
1161
    if (!inspectorAgent || !inspectorAgent->developerExtrasEnabled())
- a/Source/WebCore/inspector/InspectorInstrumentation.h -10 / +10 lines
Lines 68-74 class InspectorCSSOMWrappers; a/Source/WebCore/inspector/InspectorInstrumentation.h_sec1
68
class InspectorInstrumentation;
68
class InspectorInstrumentation;
69
class InspectorTimelineAgent;
69
class InspectorTimelineAgent;
70
class InstrumentingAgents;
70
class InstrumentingAgents;
71
class KURL;
71
class URL;
72
class Node;
72
class Node;
73
class PseudoElement;
73
class PseudoElement;
74
class RenderLayer;
74
class RenderLayer;
Lines 202-208 public: a/Source/WebCore/inspector/InspectorInstrumentation.h_sec2
202
    static void didFinishLoading(Frame*, DocumentLoader*, unsigned long identifier, double finishTime);
202
    static void didFinishLoading(Frame*, DocumentLoader*, unsigned long identifier, double finishTime);
203
    static void didFailLoading(Frame*, DocumentLoader*, unsigned long identifier, const ResourceError&);
203
    static void didFailLoading(Frame*, DocumentLoader*, unsigned long identifier, const ResourceError&);
204
    static void documentThreadableLoaderStartedLoadingForClient(ScriptExecutionContext*, unsigned long identifier, ThreadableLoaderClient*);
204
    static void documentThreadableLoaderStartedLoadingForClient(ScriptExecutionContext*, unsigned long identifier, ThreadableLoaderClient*);
205
    static void willLoadXHR(ScriptExecutionContext*, ThreadableLoaderClient*, const String&, const KURL&, bool, PassRefPtr<FormData>, const HTTPHeaderMap&, bool);
205
    static void willLoadXHR(ScriptExecutionContext*, ThreadableLoaderClient*, const String&, const URL&, bool, PassRefPtr<FormData>, const HTTPHeaderMap&, bool);
206
    static void didFailXHRLoading(ScriptExecutionContext*, ThreadableLoaderClient*);
206
    static void didFailXHRLoading(ScriptExecutionContext*, ThreadableLoaderClient*);
207
    static void didFinishXHRLoading(ScriptExecutionContext*, ThreadableLoaderClient*, unsigned long identifier, const String& sourceString, const String& url, const String& sendURL, unsigned sendLineNumber);
207
    static void didFinishXHRLoading(ScriptExecutionContext*, ThreadableLoaderClient*, unsigned long identifier, const String& sourceString, const String& url, const String& sendURL, unsigned sendLineNumber);
208
    static void didReceiveXHRResponse(ScriptExecutionContext*, unsigned long identifier);
208
    static void didReceiveXHRResponse(ScriptExecutionContext*, unsigned long identifier);
Lines 262-274 public: a/Source/WebCore/inspector/InspectorInstrumentation.h_sec3
262
262
263
#if ENABLE(WORKERS)
263
#if ENABLE(WORKERS)
264
    static bool shouldPauseDedicatedWorkerOnStart(ScriptExecutionContext*);
264
    static bool shouldPauseDedicatedWorkerOnStart(ScriptExecutionContext*);
265
    static void didStartWorkerGlobalScope(ScriptExecutionContext*, WorkerGlobalScopeProxy*, const KURL&);
265
    static void didStartWorkerGlobalScope(ScriptExecutionContext*, WorkerGlobalScopeProxy*, const URL&);
266
    static void workerGlobalScopeTerminated(ScriptExecutionContext*, WorkerGlobalScopeProxy*);
266
    static void workerGlobalScopeTerminated(ScriptExecutionContext*, WorkerGlobalScopeProxy*);
267
    static void willEvaluateWorkerScript(WorkerGlobalScope*, int workerThreadStartMode);
267
    static void willEvaluateWorkerScript(WorkerGlobalScope*, int workerThreadStartMode);
268
#endif
268
#endif
269
269
270
#if ENABLE(WEB_SOCKETS)
270
#if ENABLE(WEB_SOCKETS)
271
    static void didCreateWebSocket(Document*, unsigned long identifier, const KURL& requestURL, const KURL& documentURL, const String& protocol);
271
    static void didCreateWebSocket(Document*, unsigned long identifier, const URL& requestURL, const URL& documentURL, const String& protocol);
272
    static void willSendWebSocketHandshakeRequest(Document*, unsigned long identifier, const ResourceRequest&);
272
    static void willSendWebSocketHandshakeRequest(Document*, unsigned long identifier, const ResourceRequest&);
273
    static void didReceiveWebSocketHandshakeResponse(Document*, unsigned long identifier, const ResourceResponse&);
273
    static void didReceiveWebSocketHandshakeResponse(Document*, unsigned long identifier, const ResourceResponse&);
274
    static void didCloseWebSocket(Document*, unsigned long identifier);
274
    static void didCloseWebSocket(Document*, unsigned long identifier);
Lines 406-412 private: a/Source/WebCore/inspector/InspectorInstrumentation.h_sec4
406
    static void didFinishLoadingImpl(InstrumentingAgents*, unsigned long identifier, DocumentLoader*, double finishTime);
406
    static void didFinishLoadingImpl(InstrumentingAgents*, unsigned long identifier, DocumentLoader*, double finishTime);
407
    static void didFailLoadingImpl(InstrumentingAgents*, unsigned long identifier, DocumentLoader*, const ResourceError&);
407
    static void didFailLoadingImpl(InstrumentingAgents*, unsigned long identifier, DocumentLoader*, const ResourceError&);
408
    static void documentThreadableLoaderStartedLoadingForClientImpl(InstrumentingAgents*, unsigned long identifier, ThreadableLoaderClient*);
408
    static void documentThreadableLoaderStartedLoadingForClientImpl(InstrumentingAgents*, unsigned long identifier, ThreadableLoaderClient*);
409
    static void willLoadXHRImpl(InstrumentingAgents*, ThreadableLoaderClient*, const String&, const KURL&, bool, PassRefPtr<FormData>, const HTTPHeaderMap&, bool);
409
    static void willLoadXHRImpl(InstrumentingAgents*, ThreadableLoaderClient*, const String&, const URL&, bool, PassRefPtr<FormData>, const HTTPHeaderMap&, bool);
410
    static void didFailXHRLoadingImpl(InstrumentingAgents*, ThreadableLoaderClient*);
410
    static void didFailXHRLoadingImpl(InstrumentingAgents*, ThreadableLoaderClient*);
411
    static void didFinishXHRLoadingImpl(InstrumentingAgents*, ThreadableLoaderClient*, unsigned long identifier, const String& sourceString, const String& url, const String& sendURL, unsigned sendLineNumber);
411
    static void didFinishXHRLoadingImpl(InstrumentingAgents*, ThreadableLoaderClient*, unsigned long identifier, const String& sourceString, const String& url, const String& sendURL, unsigned sendLineNumber);
412
    static void didReceiveXHRResponseImpl(InstrumentingAgents*, unsigned long identifier);
412
    static void didReceiveXHRResponseImpl(InstrumentingAgents*, unsigned long identifier);
Lines 463-474 private: a/Source/WebCore/inspector/InspectorInstrumentation.h_sec5
463
463
464
#if ENABLE(WORKERS)
464
#if ENABLE(WORKERS)
465
    static bool shouldPauseDedicatedWorkerOnStartImpl(InstrumentingAgents*);
465
    static bool shouldPauseDedicatedWorkerOnStartImpl(InstrumentingAgents*);
466
    static void didStartWorkerGlobalScopeImpl(InstrumentingAgents*, WorkerGlobalScopeProxy*, const KURL&);
466
    static void didStartWorkerGlobalScopeImpl(InstrumentingAgents*, WorkerGlobalScopeProxy*, const URL&);
467
    static void workerGlobalScopeTerminatedImpl(InstrumentingAgents*, WorkerGlobalScopeProxy*);
467
    static void workerGlobalScopeTerminatedImpl(InstrumentingAgents*, WorkerGlobalScopeProxy*);
468
#endif
468
#endif
469
469
470
#if ENABLE(WEB_SOCKETS)
470
#if ENABLE(WEB_SOCKETS)
471
    static void didCreateWebSocketImpl(InstrumentingAgents*, unsigned long identifier, const KURL& requestURL, const KURL& documentURL, const String& protocol, Document*);
471
    static void didCreateWebSocketImpl(InstrumentingAgents*, unsigned long identifier, const URL& requestURL, const URL& documentURL, const String& protocol, Document*);
472
    static void willSendWebSocketHandshakeRequestImpl(InstrumentingAgents*, unsigned long identifier, const ResourceRequest&, Document*);
472
    static void willSendWebSocketHandshakeRequestImpl(InstrumentingAgents*, unsigned long identifier, const ResourceRequest&, Document*);
473
    static void didReceiveWebSocketHandshakeResponseImpl(InstrumentingAgents*, unsigned long identifier, const ResourceResponse&, Document*);
473
    static void didReceiveWebSocketHandshakeResponseImpl(InstrumentingAgents*, unsigned long identifier, const ResourceResponse&, Document*);
474
    static void didCloseWebSocketImpl(InstrumentingAgents*, unsigned long identifier, Document*);
474
    static void didCloseWebSocketImpl(InstrumentingAgents*, unsigned long identifier, Document*);
Lines 1504-1510 inline void InspectorInstrumentation::documentThreadableLoaderStartedLoadingForC a/Source/WebCore/inspector/InspectorInstrumentation.h_sec6
1504
#endif
1504
#endif
1505
}
1505
}
1506
1506
1507
inline void InspectorInstrumentation::willLoadXHR(ScriptExecutionContext* context, ThreadableLoaderClient* client, const String& method, const KURL& url, bool async, PassRefPtr<FormData> formData, const HTTPHeaderMap& headers, bool includeCredentials)
1507
inline void InspectorInstrumentation::willLoadXHR(ScriptExecutionContext* context, ThreadableLoaderClient* client, const String& method, const URL& url, bool async, PassRefPtr<FormData> formData, const HTTPHeaderMap& headers, bool includeCredentials)
1508
{
1508
{
1509
#if ENABLE(INSPECTOR)
1509
#if ENABLE(INSPECTOR)
1510
    if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(context))
1510
    if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(context))
Lines 1806-1812 inline bool InspectorInstrumentation::shouldPauseDedicatedWorkerOnStart(ScriptEx a/Source/WebCore/inspector/InspectorInstrumentation.h_sec7
1806
    return false;
1806
    return false;
1807
}
1807
}
1808
1808
1809
inline void InspectorInstrumentation::didStartWorkerGlobalScope(ScriptExecutionContext* context, WorkerGlobalScopeProxy* proxy, const KURL& url)
1809
inline void InspectorInstrumentation::didStartWorkerGlobalScope(ScriptExecutionContext* context, WorkerGlobalScopeProxy* proxy, const URL& url)
1810
{
1810
{
1811
#if ENABLE(INSPECTOR)
1811
#if ENABLE(INSPECTOR)
1812
    if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(context))
1812
    if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(context))
Lines 1833-1839 inline void InspectorInstrumentation::workerGlobalScopeTerminated(ScriptExecutio a/Source/WebCore/inspector/InspectorInstrumentation.h_sec8
1833
1833
1834
1834
1835
#if ENABLE(WEB_SOCKETS)
1835
#if ENABLE(WEB_SOCKETS)
1836
inline void InspectorInstrumentation::didCreateWebSocket(Document* document, unsigned long identifier, const KURL& requestURL, const KURL& documentURL, const String& protocol)
1836
inline void InspectorInstrumentation::didCreateWebSocket(Document* document, unsigned long identifier, const URL& requestURL, const URL& documentURL, const String& protocol)
1837
{
1837
{
1838
#if ENABLE(INSPECTOR)
1838
#if ENABLE(INSPECTOR)
1839
    if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocument(document))
1839
    if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocument(document))
- a/Source/WebCore/inspector/InspectorPageAgent.cpp -10 / +10 lines
Lines 249-255 PassOwnPtr<InspectorPageAgent> InspectorPageAgent::create(InstrumentingAgents* i a/Source/WebCore/inspector/InspectorPageAgent.cpp_sec1
249
}
249
}
250
250
251
// static
251
// static
252
void InspectorPageAgent::resourceContent(ErrorString* errorString, Frame* frame, const KURL& url, String* result, bool* base64Encoded)
252
void InspectorPageAgent::resourceContent(ErrorString* errorString, Frame* frame, const URL& url, String* result, bool* base64Encoded)
253
{
253
{
254
    DocumentLoader* loader = assertDocumentLoader(errorString, frame);
254
    DocumentLoader* loader = assertDocumentLoader(errorString, frame);
255
    if (!loader)
255
    if (!loader)
Lines 298-304 String InspectorPageAgent::sourceMapURLForResource(CachedResource* cachedResourc a/Source/WebCore/inspector/InspectorPageAgent.cpp_sec2
298
    return String();
298
    return String();
299
}
299
}
300
300
301
CachedResource* InspectorPageAgent::cachedResource(Frame* frame, const KURL& url)
301
CachedResource* InspectorPageAgent::cachedResource(Frame* frame, const URL& url)
302
{
302
{
303
    CachedResource* cachedResource = frame->document()->cachedResourceLoader()->cachedResource(url);
303
    CachedResource* cachedResource = frame->document()->cachedResourceLoader()->cachedResource(url);
304
    if (!cachedResource) {
304
    if (!cachedResource) {
Lines 561-569 static Vector<CachedResource*> cachedResourcesForFrame(Frame* frame) a/Source/WebCore/inspector/InspectorPageAgent.cpp_sec3
561
    return result;
561
    return result;
562
}
562
}
563
563
564
static Vector<KURL> allResourcesURLsForFrame(Frame* frame)
564
static Vector<URL> allResourcesURLsForFrame(Frame* frame)
565
{
565
{
566
    Vector<KURL> result;
566
    Vector<URL> result;
567
567
568
    result.append(frame->loader().documentLoader()->url());
568
    result.append(frame->loader().documentLoader()->url());
569
569
Lines 589-598 void InspectorPageAgent::getCookies(ErrorString*, RefPtr<TypeBuilder::Array<Type a/Source/WebCore/inspector/InspectorPageAgent.cpp_sec4
589
589
590
    for (Frame* frame = mainFrame(); frame; frame = frame->tree().traverseNext(mainFrame())) {
590
    for (Frame* frame = mainFrame(); frame; frame = frame->tree().traverseNext(mainFrame())) {
591
        Document* document = frame->document();
591
        Document* document = frame->document();
592
        Vector<KURL> allURLs = allResourcesURLsForFrame(frame);
592
        Vector<URL> allURLs = allResourcesURLsForFrame(frame);
593
        for (Vector<KURL>::const_iterator it = allURLs.begin(); it != allURLs.end(); ++it) {
593
        for (Vector<URL>::const_iterator it = allURLs.begin(); it != allURLs.end(); ++it) {
594
            Vector<Cookie> docCookiesList;
594
            Vector<Cookie> docCookiesList;
595
            rawCookiesImplemented = getRawCookies(document, KURL(ParsedURLString, *it), docCookiesList);
595
            rawCookiesImplemented = getRawCookies(document, URL(ParsedURLString, *it), docCookiesList);
596
            if (!rawCookiesImplemented) {
596
            if (!rawCookiesImplemented) {
597
                // FIXME: We need duplication checking for the String representation of cookies.
597
                // FIXME: We need duplication checking for the String representation of cookies.
598
                //
598
                //
Lines 621-627 void InspectorPageAgent::getCookies(ErrorString*, RefPtr<TypeBuilder::Array<Type a/Source/WebCore/inspector/InspectorPageAgent.cpp_sec5
621
621
622
void InspectorPageAgent::deleteCookie(ErrorString*, const String& cookieName, const String& url)
622
void InspectorPageAgent::deleteCookie(ErrorString*, const String& cookieName, const String& url)
623
{
623
{
624
    KURL parsedURL(ParsedURLString, url);
624
    URL parsedURL(ParsedURLString, url);
625
    for (Frame* frame = &m_page->mainFrame(); frame; frame = frame->tree().traverseNext(&m_page->mainFrame()))
625
    for (Frame* frame = &m_page->mainFrame(); frame; frame = frame->tree().traverseNext(&m_page->mainFrame()))
626
        WebCore::deleteCookie(frame->document(), parsedURL, cookieName);
626
        WebCore::deleteCookie(frame->document(), parsedURL, cookieName);
627
}
627
}
Lines 637-643 void InspectorPageAgent::getResourceContent(ErrorString* errorString, const Stri a/Source/WebCore/inspector/InspectorPageAgent.cpp_sec6
637
    if (!frame)
637
    if (!frame)
638
        return;
638
        return;
639
639
640
    resourceContent(errorString, frame, KURL(ParsedURLString, url), content, base64Encoded);
640
    resourceContent(errorString, frame, URL(ParsedURLString, url), content, base64Encoded);
641
}
641
}
642
642
643
static bool textContentForCachedResource(CachedResource* cachedResource, String* result)
643
static bool textContentForCachedResource(CachedResource* cachedResource, String* result)
Lines 668-674 void InspectorPageAgent::searchInResource(ErrorString*, const String& frameId, c a/Source/WebCore/inspector/InspectorPageAgent.cpp_sec7
668
    if (!loader)
668
    if (!loader)
669
        return;
669
        return;
670
670
671
    KURL kurl(ParsedURLString, url);
671
    URL kurl(ParsedURLString, url);
672
672
673
    String content;
673
    String content;
674
    bool success = false;
674
    bool success = false;
- a/Source/WebCore/inspector/InspectorPageAgent.h -4 / +4 lines
Lines 60-66 class InspectorObject; a/Source/WebCore/inspector/InspectorPageAgent.h_sec1
60
class InspectorOverlay;
60
class InspectorOverlay;
61
class InspectorState;
61
class InspectorState;
62
class InstrumentingAgents;
62
class InstrumentingAgents;
63
class KURL;
63
class URL;
64
class Page;
64
class Page;
65
class RegularExpression;
65
class RegularExpression;
66
class SharedBuffer;
66
class SharedBuffer;
Lines 86-96 public: a/Source/WebCore/inspector/InspectorPageAgent.h_sec2
86
86
87
    static bool cachedResourceContent(CachedResource*, String* result, bool* base64Encoded);
87
    static bool cachedResourceContent(CachedResource*, String* result, bool* base64Encoded);
88
    static bool sharedBufferContent(PassRefPtr<SharedBuffer>, const String& textEncodingName, bool withBase64Encode, String* result);
88
    static bool sharedBufferContent(PassRefPtr<SharedBuffer>, const String& textEncodingName, bool withBase64Encode, String* result);
89
    static void resourceContent(ErrorString*, Frame*, const KURL&, String* result, bool* base64Encoded);
89
    static void resourceContent(ErrorString*, Frame*, const URL&, String* result, bool* base64Encoded);
90
    static String sourceMapURLForResource(CachedResource*);
90
    static String sourceMapURLForResource(CachedResource*);
91
91
92
    static PassRefPtr<SharedBuffer> resourceData(Frame*, const KURL&, String* textEncodingName);
92
    static PassRefPtr<SharedBuffer> resourceData(Frame*, const URL&, String* textEncodingName);
93
    static CachedResource* cachedResource(Frame*, const KURL&);
93
    static CachedResource* cachedResource(Frame*, const URL&);
94
    static TypeBuilder::Page::ResourceType::Enum resourceTypeJson(ResourceType);
94
    static TypeBuilder::Page::ResourceType::Enum resourceTypeJson(ResourceType);
95
    static ResourceType cachedResourceType(const CachedResource&);
95
    static ResourceType cachedResourceType(const CachedResource&);
96
    static TypeBuilder::Page::ResourceType::Enum cachedResourceTypeJson(const CachedResource&);
96
    static TypeBuilder::Page::ResourceType::Enum cachedResourceTypeJson(const CachedResource&);
- a/Source/WebCore/inspector/InspectorProfilerAgent.cpp -1 / +1 lines
Lines 43-49 a/Source/WebCore/inspector/InspectorProfilerAgent.cpp_sec1
43
#include "InspectorState.h"
43
#include "InspectorState.h"
44
#include "InspectorValues.h"
44
#include "InspectorValues.h"
45
#include "InstrumentingAgents.h"
45
#include "InstrumentingAgents.h"
46
#include "KURL.h"
46
#include "URL.h"
47
#include "Page.h"
47
#include "Page.h"
48
#include "PageScriptDebugServer.h"
48
#include "PageScriptDebugServer.h"
49
#include "ScriptHeapSnapshot.h"
49
#include "ScriptHeapSnapshot.h"
- a/Source/WebCore/inspector/InspectorResourceAgent.cpp -3 / +3 lines
Lines 51-57 a/Source/WebCore/inspector/InspectorResourceAgent.cpp_sec1
51
#include "InspectorState.h"
51
#include "InspectorState.h"
52
#include "InspectorValues.h"
52
#include "InspectorValues.h"
53
#include "InstrumentingAgents.h"
53
#include "InstrumentingAgents.h"
54
#include "KURL.h"
54
#include "URL.h"
55
#include "MemoryCache.h"
55
#include "MemoryCache.h"
56
#include "NetworkResourcesData.h"
56
#include "NetworkResourcesData.h"
57
#include "Page.h"
57
#include "Page.h"
Lines 375-381 void InspectorResourceAgent::documentThreadableLoaderStartedLoadingForClient(uns a/Source/WebCore/inspector/InspectorResourceAgent.cpp_sec2
375
    m_resourcesData->setXHRReplayData(requestId, xhrReplayData);
375
    m_resourcesData->setXHRReplayData(requestId, xhrReplayData);
376
}
376
}
377
377
378
void InspectorResourceAgent::willLoadXHR(ThreadableLoaderClient* client, const String& method, const KURL& url, bool async, PassRefPtr<FormData> formData, const HTTPHeaderMap& headers, bool includeCredentials)
378
void InspectorResourceAgent::willLoadXHR(ThreadableLoaderClient* client, const String& method, const URL& url, bool async, PassRefPtr<FormData> formData, const HTTPHeaderMap& headers, bool includeCredentials)
379
{
379
{
380
    RefPtr<XHRReplayData> xhrReplayData = XHRReplayData::create(method, url, async, formData, includeCredentials);
380
    RefPtr<XHRReplayData> xhrReplayData = XHRReplayData::create(method, url, async, formData, includeCredentials);
381
    HTTPHeaderMap::const_iterator end = headers.end();
381
    HTTPHeaderMap::const_iterator end = headers.end();
Lines 480-486 PassRefPtr<TypeBuilder::Network::Initiator> InspectorResourceAgent::buildInitiat a/Source/WebCore/inspector/InspectorResourceAgent.cpp_sec3
480
480
481
#if ENABLE(WEB_SOCKETS)
481
#if ENABLE(WEB_SOCKETS)
482
482
483
void InspectorResourceAgent::didCreateWebSocket(unsigned long identifier, const KURL& requestURL)
483
void InspectorResourceAgent::didCreateWebSocket(unsigned long identifier, const URL& requestURL)
484
{
484
{
485
    m_frontend->webSocketCreated(IdentifiersFactory::requestId(identifier), requestURL.string());
485
    m_frontend->webSocketCreated(IdentifiersFactory::requestId(identifier), requestURL.string());
486
}
486
}
- a/Source/WebCore/inspector/InspectorResourceAgent.h -3 / +3 lines
Lines 60-66 class InspectorObject; a/Source/WebCore/inspector/InspectorResourceAgent.h_sec1
60
class InspectorPageAgent;
60
class InspectorPageAgent;
61
class InspectorState;
61
class InspectorState;
62
class InstrumentingAgents;
62
class InstrumentingAgents;
63
class KURL;
63
class URL;
64
class NetworkResourcesData;
64
class NetworkResourcesData;
65
class Page;
65
class Page;
66
class ResourceError;
66
class ResourceError;
Lines 105-111 public: a/Source/WebCore/inspector/InspectorResourceAgent.h_sec2
105
    void didReceiveScriptResponse(unsigned long identifier);
105
    void didReceiveScriptResponse(unsigned long identifier);
106
106
107
    void documentThreadableLoaderStartedLoadingForClient(unsigned long identifier, ThreadableLoaderClient*);
107
    void documentThreadableLoaderStartedLoadingForClient(unsigned long identifier, ThreadableLoaderClient*);
108
    void willLoadXHR(ThreadableLoaderClient*, const String& method, const KURL&, bool async, PassRefPtr<FormData> body, const HTTPHeaderMap& headers, bool includeCrendentials);
108
    void willLoadXHR(ThreadableLoaderClient*, const String& method, const URL&, bool async, PassRefPtr<FormData> body, const HTTPHeaderMap& headers, bool includeCrendentials);
109
    void didFailXHRLoading(ThreadableLoaderClient*);
109
    void didFailXHRLoading(ThreadableLoaderClient*);
110
    void didFinishXHRLoading(ThreadableLoaderClient*, unsigned long identifier, const String& sourceString);
110
    void didFinishXHRLoading(ThreadableLoaderClient*, unsigned long identifier, const String& sourceString);
111
    void didReceiveXHRResponse(unsigned long identifier);
111
    void didReceiveXHRResponse(unsigned long identifier);
Lines 124-130 public: a/Source/WebCore/inspector/InspectorResourceAgent.h_sec3
124
    PassRefPtr<TypeBuilder::Network::Initiator> buildInitiatorObject(Document*);
124
    PassRefPtr<TypeBuilder::Network::Initiator> buildInitiatorObject(Document*);
125
125
126
#if ENABLE(WEB_SOCKETS)
126
#if ENABLE(WEB_SOCKETS)
127
    void didCreateWebSocket(unsigned long identifier, const KURL& requestURL);
127
    void didCreateWebSocket(unsigned long identifier, const URL& requestURL);
128
    void willSendWebSocketHandshakeRequest(unsigned long identifier, const ResourceRequest&);
128
    void willSendWebSocketHandshakeRequest(unsigned long identifier, const ResourceRequest&);
129
    void didReceiveWebSocketHandshakeResponse(unsigned long identifier, const ResourceResponse&);
129
    void didReceiveWebSocketHandshakeResponse(unsigned long identifier, const ResourceResponse&);
130
    void didCloseWebSocket(unsigned long identifier);
130
    void didCloseWebSocket(unsigned long identifier);
- a/Source/WebCore/inspector/InspectorStyleSheet.cpp -1 / +1 lines
Lines 1382-1388 bool InspectorStyleSheet::resourceStyleSheetText(String* result) const a/Source/WebCore/inspector/InspectorStyleSheet.cpp_sec1
1382
1382
1383
    String error;
1383
    String error;
1384
    bool base64Encoded;
1384
    bool base64Encoded;
1385
    InspectorPageAgent::resourceContent(&error, ownerDocument()->frame(), KURL(ParsedURLString, m_pageStyleSheet->href()), result, &base64Encoded);
1385
    InspectorPageAgent::resourceContent(&error, ownerDocument()->frame(), URL(ParsedURLString, m_pageStyleSheet->href()), result, &base64Encoded);
1386
    return error.isEmpty() && !base64Encoded;
1386
    return error.isEmpty() && !base64Encoded;
1387
}
1387
}
1388
1388
- a/Source/WebCore/inspector/InspectorTimelineAgent.cpp -1 / +1 lines
Lines 434-440 void InspectorTimelineAgent::didFireAnimationFrame() a/Source/WebCore/inspector/InspectorTimelineAgent.cpp_sec1
434
}
434
}
435
435
436
#if ENABLE(WEB_SOCKETS)
436
#if ENABLE(WEB_SOCKETS)
437
void InspectorTimelineAgent::didCreateWebSocket(unsigned long identifier, const KURL& url, const String& protocol, Frame* frame)
437
void InspectorTimelineAgent::didCreateWebSocket(unsigned long identifier, const URL& url, const String& protocol, Frame* frame)
438
{
438
{
439
    appendRecord(TimelineRecordFactory::createWebSocketCreateData(identifier, url, protocol), TimelineRecordType::WebSocketCreate, true, frame);
439
    appendRecord(TimelineRecordFactory::createWebSocketCreateData(identifier, url, protocol), TimelineRecordType::WebSocketCreate, true, frame);
440
}
440
}
- a/Source/WebCore/inspector/InspectorTimelineAgent.h -2 / +2 lines
Lines 54-60 class InspectorPageAgent; a/Source/WebCore/inspector/InspectorTimelineAgent.h_sec1
54
class InspectorState;
54
class InspectorState;
55
class InstrumentingAgents;
55
class InstrumentingAgents;
56
class IntRect;
56
class IntRect;
57
class KURL;
57
class URL;
58
class Page;
58
class Page;
59
class RenderObject;
59
class RenderObject;
60
class ResourceRequest;
60
class ResourceRequest;
Lines 216-222 public: a/Source/WebCore/inspector/InspectorTimelineAgent.h_sec2
216
    void didFireAnimationFrame();
216
    void didFireAnimationFrame();
217
217
218
#if ENABLE(WEB_SOCKETS)
218
#if ENABLE(WEB_SOCKETS)
219
    void didCreateWebSocket(unsigned long identifier, const KURL&, const String& protocol, Frame*);
219
    void didCreateWebSocket(unsigned long identifier, const URL&, const String& protocol, Frame*);
220
    void willSendWebSocketHandshakeRequest(unsigned long identifier, Frame*);
220
    void willSendWebSocketHandshakeRequest(unsigned long identifier, Frame*);
221
    void didReceiveWebSocketHandshakeResponse(unsigned long identifier, Frame*);
221
    void didReceiveWebSocketHandshakeResponse(unsigned long identifier, Frame*);
222
    void didDestroyWebSocket(unsigned long identifier, Frame*);
222
    void didDestroyWebSocket(unsigned long identifier, Frame*);
- a/Source/WebCore/inspector/InspectorWorkerAgent.cpp -2 / +2 lines
Lines 39-45 a/Source/WebCore/inspector/InspectorWorkerAgent.cpp_sec1
39
#include "InspectorState.h"
39
#include "InspectorState.h"
40
#include "InspectorValues.h"
40
#include "InspectorValues.h"
41
#include "InstrumentingAgents.h"
41
#include "InstrumentingAgents.h"
42
#include "KURL.h"
42
#include "URL.h"
43
#include "WorkerGlobalScopeProxy.h"
43
#include "WorkerGlobalScopeProxy.h"
44
#include <wtf/PassOwnPtr.h>
44
#include <wtf/PassOwnPtr.h>
45
#include <wtf/RefPtr.h>
45
#include <wtf/RefPtr.h>
Lines 204-210 bool InspectorWorkerAgent::shouldPauseDedicatedWorkerOnStart() a/Source/WebCore/inspector/InspectorWorkerAgent.cpp_sec2
204
    return m_state->getBoolean(WorkerAgentState::autoconnectToWorkers);
204
    return m_state->getBoolean(WorkerAgentState::autoconnectToWorkers);
205
}
205
}
206
206
207
void InspectorWorkerAgent::didStartWorkerGlobalScope(WorkerGlobalScopeProxy* workerGlobalScopeProxy, const KURL& url)
207
void InspectorWorkerAgent::didStartWorkerGlobalScope(WorkerGlobalScopeProxy* workerGlobalScopeProxy, const URL& url)
208
{
208
{
209
    m_dedicatedWorkers.set(workerGlobalScopeProxy, url.string());
209
    m_dedicatedWorkers.set(workerGlobalScopeProxy, url.string());
210
    if (m_inspectorFrontend && m_state->getBoolean(WorkerAgentState::workerInspectionEnabled))
210
    if (m_inspectorFrontend && m_state->getBoolean(WorkerAgentState::workerInspectionEnabled))
- a/Source/WebCore/inspector/InspectorWorkerAgent.h -2 / +2 lines
Lines 42-48 class InspectorFrontend; a/Source/WebCore/inspector/InspectorWorkerAgent.h_sec1
42
class InspectorObject;
42
class InspectorObject;
43
class InspectorState;
43
class InspectorState;
44
class InstrumentingAgents;
44
class InstrumentingAgents;
45
class KURL;
45
class URL;
46
class WorkerGlobalScopeProxy;
46
class WorkerGlobalScopeProxy;
47
47
48
typedef String ErrorString;
48
typedef String ErrorString;
Lines 58-64 public: a/Source/WebCore/inspector/InspectorWorkerAgent.h_sec2
58
58
59
    // Called from InspectorInstrumentation
59
    // Called from InspectorInstrumentation
60
    bool shouldPauseDedicatedWorkerOnStart();
60
    bool shouldPauseDedicatedWorkerOnStart();
61
    void didStartWorkerGlobalScope(WorkerGlobalScopeProxy*, const KURL&);
61
    void didStartWorkerGlobalScope(WorkerGlobalScopeProxy*, const URL&);
62
    void workerGlobalScopeTerminated(WorkerGlobalScopeProxy*);
62
    void workerGlobalScopeTerminated(WorkerGlobalScopeProxy*);
63
63
64
    // Called from InspectorBackendDispatcher
64
    // Called from InspectorBackendDispatcher
- a/Source/WebCore/inspector/NetworkResourcesData.cpp -2 / +2 lines
Lines 49-55 static size_t maximumSingleResourceContentSize = 10 * 1000 * 1000; a/Source/WebCore/inspector/NetworkResourcesData.cpp_sec1
49
namespace WebCore {
49
namespace WebCore {
50
50
51
51
52
PassRefPtr<XHRReplayData> XHRReplayData::create(const String &method, const KURL& url, bool async, PassRefPtr<FormData> formData, bool includeCredentials)
52
PassRefPtr<XHRReplayData> XHRReplayData::create(const String &method, const URL& url, bool async, PassRefPtr<FormData> formData, bool includeCredentials)
53
{
53
{
54
    return adoptRef(new XHRReplayData(method, url, async, formData, includeCredentials));
54
    return adoptRef(new XHRReplayData(method, url, async, formData, includeCredentials));
55
}
55
}
Lines 59-65 void XHRReplayData::addHeader(const AtomicString& key, const String& value) a/Source/WebCore/inspector/NetworkResourcesData.cpp_sec2
59
    m_headers.set(key, value);
59
    m_headers.set(key, value);
60
}
60
}
61
61
62
XHRReplayData::XHRReplayData(const String &method, const KURL& url, bool async, PassRefPtr<FormData> formData, bool includeCredentials)
62
XHRReplayData::XHRReplayData(const String &method, const URL& url, bool async, PassRefPtr<FormData> formData, bool includeCredentials)
63
    : m_method(method)
63
    : m_method(method)
64
    , m_url(url)
64
    , m_url(url)
65
    , m_async(async)
65
    , m_async(async)
- a/Source/WebCore/inspector/NetworkResourcesData.h -5 / +5 lines
Lines 31-37 a/Source/WebCore/inspector/NetworkResourcesData.h_sec1
31
31
32
#include "HTTPHeaderMap.h"
32
#include "HTTPHeaderMap.h"
33
#include "InspectorPageAgent.h"
33
#include "InspectorPageAgent.h"
34
#include "KURL.h"
34
#include "URL.h"
35
#include "TextResourceDecoder.h"
35
#include "TextResourceDecoder.h"
36
#include <wtf/Deque.h>
36
#include <wtf/Deque.h>
37
#include <wtf/HashMap.h>
37
#include <wtf/HashMap.h>
Lines 51-70 class TextResourceDecoder; a/Source/WebCore/inspector/NetworkResourcesData.h_sec2
51
51
52
class XHRReplayData : public RefCounted<XHRReplayData> {
52
class XHRReplayData : public RefCounted<XHRReplayData> {
53
public:
53
public:
54
    static PassRefPtr<XHRReplayData> create(const String &method, const KURL&, bool async, PassRefPtr<FormData>, bool includeCredentials);
54
    static PassRefPtr<XHRReplayData> create(const String &method, const URL&, bool async, PassRefPtr<FormData>, bool includeCredentials);
55
55
56
    void addHeader(const AtomicString& key, const String& value);
56
    void addHeader(const AtomicString& key, const String& value);
57
    const String& method() const { return m_method; }
57
    const String& method() const { return m_method; }
58
    const KURL& url() const { return m_url; }
58
    const URL& url() const { return m_url; }
59
    bool async() const { return m_async; }
59
    bool async() const { return m_async; }
60
    PassRefPtr<FormData> formData() const { return m_formData; }
60
    PassRefPtr<FormData> formData() const { return m_formData; }
61
    const HTTPHeaderMap& headers() const { return m_headers; }
61
    const HTTPHeaderMap& headers() const { return m_headers; }
62
    bool includeCredentials() const { return m_includeCredentials; }
62
    bool includeCredentials() const { return m_includeCredentials; }
63
private:
63
private:
64
    XHRReplayData(const String &method, const KURL&, bool async, PassRefPtr<FormData>, bool includeCredentials);
64
    XHRReplayData(const String &method, const URL&, bool async, PassRefPtr<FormData>, bool includeCredentials);
65
65
66
    String m_method;
66
    String m_method;
67
    KURL m_url;
67
    URL m_url;
68
    bool m_async;
68
    bool m_async;
69
    RefPtr<FormData> m_formData;
69
    RefPtr<FormData> m_formData;
70
    HTTPHeaderMap m_headers;
70
    HTTPHeaderMap m_headers;
- a/Source/WebCore/inspector/TimelineRecordFactory.h -2 / +2 lines
Lines 32-38 a/Source/WebCore/inspector/TimelineRecordFactory.h_sec1
32
#define TimelineRecordFactory_h
32
#define TimelineRecordFactory_h
33
33
34
#include "InspectorValues.h"
34
#include "InspectorValues.h"
35
#include "KURL.h"
35
#include "URL.h"
36
#include "LayoutRect.h"
36
#include "LayoutRect.h"
37
#include <wtf/Forward.h>
37
#include <wtf/Forward.h>
38
#include <wtf/text/WTFString.h>
38
#include <wtf/text/WTFString.h>
Lines 97-103 namespace WebCore { a/Source/WebCore/inspector/TimelineRecordFactory.h_sec2
97
        static void appendLayoutRoot(InspectorObject* data, const FloatQuad&);
97
        static void appendLayoutRoot(InspectorObject* data, const FloatQuad&);
98
98
99
#if ENABLE(WEB_SOCKETS)
99
#if ENABLE(WEB_SOCKETS)
100
        static inline PassRefPtr<InspectorObject> createWebSocketCreateData(unsigned long identifier, const KURL& url, const String& protocol)
100
        static inline PassRefPtr<InspectorObject> createWebSocketCreateData(unsigned long identifier, const URL& url, const String& protocol)
101
        {
101
        {
102
            RefPtr<InspectorObject> data = InspectorObject::create();
102
            RefPtr<InspectorObject> data = InspectorObject::create();
103
            data->setNumber("identifier", identifier);
103
            data->setNumber("identifier", identifier);
- a/Source/WebCore/loader/CookieJar.cpp -5 / +5 lines
Lines 59-71 inline NetworkStorageSession& storageSession(const Document* document) a/Source/WebCore/loader/CookieJar.cpp_sec1
59
#define LOCAL_SESSION(document) NetworkStorageSession session(networkingContext(document));
59
#define LOCAL_SESSION(document) NetworkStorageSession session(networkingContext(document));
60
#endif
60
#endif
61
61
62
String cookies(const Document* document, const KURL& url)
62
String cookies(const Document* document, const URL& url)
63
{
63
{
64
    LOCAL_SESSION(document)
64
    LOCAL_SESSION(document)
65
    return platformStrategies()->cookiesStrategy()->cookiesForDOM(session, document->firstPartyForCookies(), url);
65
    return platformStrategies()->cookiesStrategy()->cookiesForDOM(session, document->firstPartyForCookies(), url);
66
}
66
}
67
67
68
void setCookies(Document* document, const KURL& url, const String& cookieString)
68
void setCookies(Document* document, const URL& url, const String& cookieString)
69
{
69
{
70
    LOCAL_SESSION(document)
70
    LOCAL_SESSION(document)
71
    platformStrategies()->cookiesStrategy()->setCookiesFromDOM(session, document->firstPartyForCookies(), url, cookieString);
71
    platformStrategies()->cookiesStrategy()->setCookiesFromDOM(session, document->firstPartyForCookies(), url, cookieString);
Lines 77-95 bool cookiesEnabled(const Document* document) a/Source/WebCore/loader/CookieJar.cpp_sec2
77
    return platformStrategies()->cookiesStrategy()->cookiesEnabled(session, document->firstPartyForCookies(), document->cookieURL());
77
    return platformStrategies()->cookiesStrategy()->cookiesEnabled(session, document->firstPartyForCookies(), document->cookieURL());
78
}
78
}
79
79
80
String cookieRequestHeaderFieldValue(const Document* document, const KURL& url)
80
String cookieRequestHeaderFieldValue(const Document* document, const URL& url)
81
{
81
{
82
    LOCAL_SESSION(document)
82
    LOCAL_SESSION(document)
83
    return platformStrategies()->cookiesStrategy()->cookieRequestHeaderFieldValue(session, document->firstPartyForCookies(), url);
83
    return platformStrategies()->cookiesStrategy()->cookieRequestHeaderFieldValue(session, document->firstPartyForCookies(), url);
84
}
84
}
85
85
86
bool getRawCookies(const Document* document, const KURL& url, Vector<Cookie>& cookies)
86
bool getRawCookies(const Document* document, const URL& url, Vector<Cookie>& cookies)
87
{
87
{
88
    LOCAL_SESSION(document)
88
    LOCAL_SESSION(document)
89
    return platformStrategies()->cookiesStrategy()->getRawCookies(session, document->firstPartyForCookies(), url, cookies);
89
    return platformStrategies()->cookiesStrategy()->getRawCookies(session, document->firstPartyForCookies(), url, cookies);
90
}
90
}
91
91
92
void deleteCookie(const Document* document, const KURL& url, const String& cookieName)
92
void deleteCookie(const Document* document, const URL& url, const String& cookieName)
93
{
93
{
94
    LOCAL_SESSION(document)
94
    LOCAL_SESSION(document)
95
    platformStrategies()->cookiesStrategy()->deleteCookie(session, url, cookieName);
95
    platformStrategies()->cookiesStrategy()->deleteCookie(session, url, cookieName);
- a/Source/WebCore/loader/CookieJar.h -6 / +6 lines
Lines 34-52 a/Source/WebCore/loader/CookieJar.h_sec1
34
namespace WebCore {
34
namespace WebCore {
35
35
36
class Document;
36
class Document;
37
class KURL;
37
class URL;
38
struct Cookie;
38
struct Cookie;
39
39
40
// Functions in this file take a Document pointer to determine which cookie storage to use. We should merge that into call sites, and use PlatformCookieJar directly.
40
// Functions in this file take a Document pointer to determine which cookie storage to use. We should merge that into call sites, and use PlatformCookieJar directly.
41
41
42
// These two functions implement document.cookie API, with special rules for HttpOnly cookies.
42
// These two functions implement document.cookie API, with special rules for HttpOnly cookies.
43
String cookies(const Document*, const KURL&);
43
String cookies(const Document*, const URL&);
44
void setCookies(Document*, const KURL&, const String& cookieString);
44
void setCookies(Document*, const URL&, const String& cookieString);
45
45
46
bool cookiesEnabled(const Document*);
46
bool cookiesEnabled(const Document*);
47
String cookieRequestHeaderFieldValue(const Document*, const KURL&);
47
String cookieRequestHeaderFieldValue(const Document*, const URL&);
48
bool getRawCookies(const Document*, const KURL&, Vector<Cookie>&);
48
bool getRawCookies(const Document*, const URL&, Vector<Cookie>&);
49
void deleteCookie(const Document*, const KURL&, const String& cookieName);
49
void deleteCookie(const Document*, const URL&, const String& cookieName);
50
50
51
}
51
}
52
52
- a/Source/WebCore/loader/CrossOriginPreflightResultCache.cpp -2 / +2 lines
Lines 154-166 CrossOriginPreflightResultCache& CrossOriginPreflightResultCache::shared() a/Source/WebCore/loader/CrossOriginPreflightResultCache.cpp_sec1
154
    return cache;
154
    return cache;
155
}
155
}
156
156
157
void CrossOriginPreflightResultCache::appendEntry(const String& origin, const KURL& url, PassOwnPtr<CrossOriginPreflightResultCacheItem> preflightResult)
157
void CrossOriginPreflightResultCache::appendEntry(const String& origin, const URL& url, PassOwnPtr<CrossOriginPreflightResultCacheItem> preflightResult)
158
{
158
{
159
    ASSERT(isMainThread());
159
    ASSERT(isMainThread());
160
    m_preflightHashMap.set(make_pair(origin, url), preflightResult);
160
    m_preflightHashMap.set(make_pair(origin, url), preflightResult);
161
}
161
}
162
162
163
bool CrossOriginPreflightResultCache::canSkipPreflight(const String& origin, const KURL& url, StoredCredentials includeCredentials, const String& method, const HTTPHeaderMap& requestHeaders)
163
bool CrossOriginPreflightResultCache::canSkipPreflight(const String& origin, const URL& url, StoredCredentials includeCredentials, const String& method, const HTTPHeaderMap& requestHeaders)
164
{
164
{
165
    ASSERT(isMainThread());
165
    ASSERT(isMainThread());
166
    CrossOriginPreflightResultHashMap::iterator cacheIt = m_preflightHashMap.find(make_pair(origin, url));
166
    CrossOriginPreflightResultHashMap::iterator cacheIt = m_preflightHashMap.find(make_pair(origin, url));
- a/Source/WebCore/loader/CrossOriginPreflightResultCache.h -4 / +4 lines
Lines 27-33 a/Source/WebCore/loader/CrossOriginPreflightResultCache.h_sec1
27
#ifndef CrossOriginPreflightResultCache_h
27
#ifndef CrossOriginPreflightResultCache_h
28
#define CrossOriginPreflightResultCache_h
28
#define CrossOriginPreflightResultCache_h
29
29
30
#include "KURLHash.h"
30
#include "URLHash.h"
31
#include "ResourceHandleTypes.h"
31
#include "ResourceHandleTypes.h"
32
#include <wtf/HashMap.h>
32
#include <wtf/HashMap.h>
33
#include <wtf/HashSet.h>
33
#include <wtf/HashSet.h>
Lines 70-84 namespace WebCore { a/Source/WebCore/loader/CrossOriginPreflightResultCache.h_sec2
70
    public:
70
    public:
71
        static CrossOriginPreflightResultCache& shared();
71
        static CrossOriginPreflightResultCache& shared();
72
72
73
        void appendEntry(const String& origin, const KURL&, PassOwnPtr<CrossOriginPreflightResultCacheItem>);
73
        void appendEntry(const String& origin, const URL&, PassOwnPtr<CrossOriginPreflightResultCacheItem>);
74
        bool canSkipPreflight(const String& origin, const KURL&, StoredCredentials, const String& method, const HTTPHeaderMap& requestHeaders);
74
        bool canSkipPreflight(const String& origin, const URL&, StoredCredentials, const String& method, const HTTPHeaderMap& requestHeaders);
75
75
76
        void empty();
76
        void empty();
77
77
78
    private:
78
    private:
79
        CrossOriginPreflightResultCache() { }
79
        CrossOriginPreflightResultCache() { }
80
80
81
        typedef HashMap<std::pair<String, KURL>, OwnPtr<CrossOriginPreflightResultCacheItem> > CrossOriginPreflightResultHashMap;
81
        typedef HashMap<std::pair<String, URL>, OwnPtr<CrossOriginPreflightResultCacheItem> > CrossOriginPreflightResultHashMap;
82
82
83
        CrossOriginPreflightResultHashMap m_preflightHashMap;
83
        CrossOriginPreflightResultHashMap m_preflightHashMap;
84
    };
84
    };
- a/Source/WebCore/loader/DocumentLoadTiming.cpp -1 / +1 lines
Lines 82-88 void DocumentLoadTiming::setNavigationStart(double navigationStart) a/Source/WebCore/loader/DocumentLoadTiming.cpp_sec1
82
    m_navigationStart = navigationStart;
82
    m_navigationStart = navigationStart;
83
}
83
}
84
84
85
void DocumentLoadTiming::addRedirect(const KURL& redirectingUrl, const KURL& redirectedUrl)
85
void DocumentLoadTiming::addRedirect(const URL& redirectingUrl, const URL& redirectedUrl)
86
{
86
{
87
    m_redirectCount++;
87
    m_redirectCount++;
88
    if (!m_redirectStart)
88
    if (!m_redirectStart)
- a/Source/WebCore/loader/DocumentLoadTiming.h -2 / +2 lines
Lines 31-37 a/Source/WebCore/loader/DocumentLoadTiming.h_sec1
31
namespace WebCore {
31
namespace WebCore {
32
32
33
class Frame;
33
class Frame;
34
class KURL;
34
class URL;
35
35
36
class DocumentLoadTiming {
36
class DocumentLoadTiming {
37
public:
37
public:
Lines 42-48 public: a/Source/WebCore/loader/DocumentLoadTiming.h_sec2
42
42
43
    void markNavigationStart();
43
    void markNavigationStart();
44
    void setNavigationStart(double);
44
    void setNavigationStart(double);
45
    void addRedirect(const KURL& redirectingUrl, const KURL& redirectedUrl);
45
    void addRedirect(const URL& redirectingUrl, const URL& redirectedUrl);
46
46
47
    void markUnloadEventStart() { m_unloadEventStart = monotonicallyIncreasingTime(); }
47
    void markUnloadEventStart() { m_unloadEventStart = monotonicallyIncreasingTime(); }
48
    void markUnloadEventEnd() { m_unloadEventEnd = monotonicallyIncreasingTime(); }
48
    void markUnloadEventEnd() { m_unloadEventEnd = monotonicallyIncreasingTime(); }
- a/Source/WebCore/loader/DocumentLoader.cpp -16 / +16 lines
Lines 183-194 ResourceRequest& DocumentLoader::request() a/Source/WebCore/loader/DocumentLoader.cpp_sec1
183
    return m_request;
183
    return m_request;
184
}
184
}
185
185
186
const KURL& DocumentLoader::url() const
186
const URL& DocumentLoader::url() const
187
{
187
{
188
    return request().url();
188
    return request().url();
189
}
189
}
190
190
191
void DocumentLoader::replaceRequestURLForSameDocumentNavigation(const KURL& url)
191
void DocumentLoader::replaceRequestURLForSameDocumentNavigation(const URL& url)
192
{
192
{
193
    m_originalRequestCopy.setURL(url);
193
    m_originalRequestCopy.setURL(url);
194
    m_request.setURL(url);
194
    m_request.setURL(url);
Lines 436-442 bool DocumentLoader::isPostOrRedirectAfterPost(const ResourceRequest& newRequest a/Source/WebCore/loader/DocumentLoader.cpp_sec2
436
436
437
void DocumentLoader::handleSubstituteDataLoadNow(DocumentLoaderTimer*)
437
void DocumentLoader::handleSubstituteDataLoadNow(DocumentLoaderTimer*)
438
{
438
{
439
    KURL url = m_substituteData.responseURL();
439
    URL url = m_substituteData.responseURL();
440
    if (url.isEmpty())
440
    if (url.isEmpty())
441
        url = m_request.url();
441
        url = m_request.url();
442
    ResourceResponse response(url, m_substituteData.mimeType(), m_substituteData.content()->size(), m_substituteData.textEncoding(), "");
442
    ResourceResponse response(url, m_substituteData.mimeType(), m_substituteData.content()->size(), m_substituteData.textEncoding(), "");
Lines 653-659 void DocumentLoader::continueAfterContentPolicy(PolicyAction policy) a/Source/WebCore/loader/DocumentLoader.cpp_sec3
653
    if (isStopping())
653
    if (isStopping())
654
        return;
654
        return;
655
655
656
    KURL url = m_request.url();
656
    URL url = m_request.url();
657
    const String& mimeType = m_response.mimeType();
657
    const String& mimeType = m_response.mimeType();
658
    
658
    
659
    switch (policy) {
659
    switch (policy) {
Lines 825-831 void DocumentLoader::dataReceived(CachedResource* resource, const char* data, in a/Source/WebCore/loader/DocumentLoader.cpp_sec4
825
#if USE(CFNETWORK) || PLATFORM(MAC)
825
#if USE(CFNETWORK) || PLATFORM(MAC)
826
    // Workaround for <rdar://problem/6060782>
826
    // Workaround for <rdar://problem/6060782>
827
    if (m_response.isNull())
827
    if (m_response.isNull())
828
        m_response = ResourceResponse(KURL(), "text/html", 0, String(), String());
828
        m_response = ResourceResponse(URL(), "text/html", 0, String(), String());
829
#endif
829
#endif
830
830
831
    // There is a bug in CFNetwork where callbacks can be dispatched even when loads are deferred.
831
    // There is a bug in CFNetwork where callbacks can be dispatched even when loads are deferred.
Lines 1012-1018 void DocumentLoader::addArchiveResource(PassRefPtr<ArchiveResource> resource) a/Source/WebCore/loader/DocumentLoader.cpp_sec5
1012
    m_archiveResourceCollection->addResource(resource);
1012
    m_archiveResourceCollection->addResource(resource);
1013
}
1013
}
1014
1014
1015
PassRefPtr<Archive> DocumentLoader::popArchiveForSubframe(const String& frameName, const KURL& url)
1015
PassRefPtr<Archive> DocumentLoader::popArchiveForSubframe(const String& frameName, const URL& url)
1016
{
1016
{
1017
    return m_archiveResourceCollection ? m_archiveResourceCollection->popSubframeArchive(frameName, url) : PassRefPtr<Archive>(0);
1017
    return m_archiveResourceCollection ? m_archiveResourceCollection->popSubframeArchive(frameName, url) : PassRefPtr<Archive>(0);
1018
}
1018
}
Lines 1029-1035 SharedBuffer* DocumentLoader::parsedArchiveData() const a/Source/WebCore/loader/DocumentLoader.cpp_sec6
1029
}
1029
}
1030
#endif // ENABLE(WEB_ARCHIVE) || ENABLE(MHTML)
1030
#endif // ENABLE(WEB_ARCHIVE) || ENABLE(MHTML)
1031
1031
1032
ArchiveResource* DocumentLoader::archiveResourceForURL(const KURL& url) const
1032
ArchiveResource* DocumentLoader::archiveResourceForURL(const URL& url) const
1033
{
1033
{
1034
    if (!m_archiveResourceCollection)
1034
    if (!m_archiveResourceCollection)
1035
        return 0;
1035
        return 0;
Lines 1051-1057 PassRefPtr<ArchiveResource> DocumentLoader::mainResource() const a/Source/WebCore/loader/DocumentLoader.cpp_sec7
1051
    return ArchiveResource::create(data, r.url(), r.mimeType(), r.textEncodingName(), frame()->tree().uniqueName());
1051
    return ArchiveResource::create(data, r.url(), r.mimeType(), r.textEncodingName(), frame()->tree().uniqueName());
1052
}
1052
}
1053
1053
1054
PassRefPtr<ArchiveResource> DocumentLoader::subresource(const KURL& url) const
1054
PassRefPtr<ArchiveResource> DocumentLoader::subresource(const URL& url) const
1055
{
1055
{
1056
    if (!isCommitted())
1056
    if (!isCommitted())
1057
        return 0;
1057
        return 0;
Lines 1083-1089 void DocumentLoader::getSubresources(Vector<PassRefPtr<ArchiveResource> >& subre a/Source/WebCore/loader/DocumentLoader.cpp_sec8
1083
    const CachedResourceLoader::DocumentResourceMap& allResources = m_cachedResourceLoader->allCachedResources();
1083
    const CachedResourceLoader::DocumentResourceMap& allResources = m_cachedResourceLoader->allCachedResources();
1084
    CachedResourceLoader::DocumentResourceMap::const_iterator end = allResources.end();
1084
    CachedResourceLoader::DocumentResourceMap::const_iterator end = allResources.end();
1085
    for (CachedResourceLoader::DocumentResourceMap::const_iterator it = allResources.begin(); it != end; ++it) {
1085
    for (CachedResourceLoader::DocumentResourceMap::const_iterator it = allResources.begin(); it != end; ++it) {
1086
        RefPtr<ArchiveResource> subresource = this->subresource(KURL(ParsedURLString, it->value->url()));
1086
        RefPtr<ArchiveResource> subresource = this->subresource(URL(ParsedURLString, it->value->url()));
1087
        if (subresource)
1087
        if (subresource)
1088
            subresources.append(subresource.release());
1088
            subresources.append(subresource.release());
1089
    }
1089
    }
Lines 1210-1216 void DocumentLoader::setTitle(const StringWithDirection& title) a/Source/WebCore/loader/DocumentLoader.cpp_sec9
1210
    frameLoader()->didChangeTitle(this);
1210
    frameLoader()->didChangeTitle(this);
1211
}
1211
}
1212
1212
1213
KURL DocumentLoader::urlForHistory() const
1213
URL DocumentLoader::urlForHistory() const
1214
{
1214
{
1215
    // Return the URL to be used for history and B/F list.
1215
    // Return the URL to be used for history and B/F list.
1216
    // Returns nil for WebDataProtocol URLs that aren't alternates
1216
    // Returns nil for WebDataProtocol URLs that aren't alternates
Lines 1226-1249 bool DocumentLoader::urlForHistoryReflectsFailure() const a/Source/WebCore/loader/DocumentLoader.cpp_sec10
1226
    return m_substituteData.isValid() || m_response.httpStatusCode() >= 400;
1226
    return m_substituteData.isValid() || m_response.httpStatusCode() >= 400;
1227
}
1227
}
1228
1228
1229
const KURL& DocumentLoader::originalURL() const
1229
const URL& DocumentLoader::originalURL() const
1230
{
1230
{
1231
    return m_originalRequestCopy.url();
1231
    return m_originalRequestCopy.url();
1232
}
1232
}
1233
1233
1234
const KURL& DocumentLoader::requestURL() const
1234
const URL& DocumentLoader::requestURL() const
1235
{
1235
{
1236
    return request().url();
1236
    return request().url();
1237
}
1237
}
1238
1238
1239
const KURL& DocumentLoader::responseURL() const
1239
const URL& DocumentLoader::responseURL() const
1240
{
1240
{
1241
    return m_response.url();
1241
    return m_response.url();
1242
}
1242
}
1243
1243
1244
KURL DocumentLoader::documentURL() const
1244
URL DocumentLoader::documentURL() const
1245
{
1245
{
1246
    KURL url = substituteData().responseURL();
1246
    URL url = substituteData().responseURL();
1247
#if ENABLE(WEB_ARCHIVE)
1247
#if ENABLE(WEB_ARCHIVE)
1248
    if (url.isEmpty() && m_archive && m_archive->type() == Archive::WebArchive)
1248
    if (url.isEmpty() && m_archive && m_archive->type() == Archive::WebArchive)
1249
        url = m_archive->mainResource()->url();
1249
        url = m_archive->mainResource()->url();
Lines 1260-1266 const String& DocumentLoader::responseMIMEType() const a/Source/WebCore/loader/DocumentLoader.cpp_sec11
1260
    return m_response.mimeType();
1260
    return m_response.mimeType();
1261
}
1261
}
1262
1262
1263
const KURL& DocumentLoader::unreachableURL() const
1263
const URL& DocumentLoader::unreachableURL() const
1264
{
1264
{
1265
    return m_substituteData.failingURL();
1265
    return m_substituteData.failingURL();
1266
}
1266
}
- a/Source/WebCore/loader/DocumentLoader.h -11 / +11 lines
Lines 109-123 namespace WebCore { a/Source/WebCore/loader/DocumentLoader.h_sec1
109
        const SubstituteData& substituteData() const { return m_substituteData; }
109
        const SubstituteData& substituteData() const { return m_substituteData; }
110
110
111
        // FIXME: This is the same as requestURL(). We should remove one of them.
111
        // FIXME: This is the same as requestURL(). We should remove one of them.
112
        const KURL& url() const;
112
        const URL& url() const;
113
        const KURL& unreachableURL() const;
113
        const URL& unreachableURL() const;
114
114
115
        const KURL& originalURL() const;
115
        const URL& originalURL() const;
116
        const KURL& requestURL() const;
116
        const URL& requestURL() const;
117
        const KURL& responseURL() const;
117
        const URL& responseURL() const;
118
        const String& responseMIMEType() const;
118
        const String& responseMIMEType() const;
119
119
120
        void replaceRequestURLForSameDocumentNavigation(const KURL&);
120
        void replaceRequestURLForSameDocumentNavigation(const URL&);
121
        bool isStopping() const { return m_isStopping; }
121
        bool isStopping() const { return m_isStopping; }
122
        void stopLoading();
122
        void stopLoading();
123
        void setCommitted(bool committed) { m_committed = committed; }
123
        void setCommitted(bool committed) { m_committed = committed; }
Lines 142-161 namespace WebCore { a/Source/WebCore/loader/DocumentLoader.h_sec2
142
        void setArchive(PassRefPtr<Archive>);
142
        void setArchive(PassRefPtr<Archive>);
143
        void addAllArchiveResources(Archive*);
143
        void addAllArchiveResources(Archive*);
144
        void addArchiveResource(PassRefPtr<ArchiveResource>);
144
        void addArchiveResource(PassRefPtr<ArchiveResource>);
145
        PassRefPtr<Archive> popArchiveForSubframe(const String& frameName, const KURL&);
145
        PassRefPtr<Archive> popArchiveForSubframe(const String& frameName, const URL&);
146
        SharedBuffer* parsedArchiveData() const;
146
        SharedBuffer* parsedArchiveData() const;
147
147
148
        bool scheduleArchiveLoad(ResourceLoader*, const ResourceRequest&);
148
        bool scheduleArchiveLoad(ResourceLoader*, const ResourceRequest&);
149
#endif // ENABLE(WEB_ARCHIVE) || ENABLE(MHTML)
149
#endif // ENABLE(WEB_ARCHIVE) || ENABLE(MHTML)
150
150
151
        // Return the ArchiveResource for the URL only when loading an Archive
151
        // Return the ArchiveResource for the URL only when loading an Archive
152
        ArchiveResource* archiveResourceForURL(const KURL&) const;
152
        ArchiveResource* archiveResourceForURL(const URL&) const;
153
153
154
        PassRefPtr<ArchiveResource> mainResource() const;
154
        PassRefPtr<ArchiveResource> mainResource() const;
155
155
156
        // Return an ArchiveResource for the URL, either creating from live data or
156
        // Return an ArchiveResource for the URL, either creating from live data or
157
        // pulling from the ArchiveResourceCollection
157
        // pulling from the ArchiveResourceCollection
158
        PassRefPtr<ArchiveResource> subresource(const KURL&) const;
158
        PassRefPtr<ArchiveResource> subresource(const URL&) const;
159
        void getSubresources(Vector<PassRefPtr<ArchiveResource> >&) const;
159
        void getSubresources(Vector<PassRefPtr<ArchiveResource> >&) const;
160
160
161
161
Lines 176-182 namespace WebCore { a/Source/WebCore/loader/DocumentLoader.h_sec3
176
        void stopRecordingResponses();
176
        void stopRecordingResponses();
177
        const StringWithDirection& title() const { return m_pageTitle; }
177
        const StringWithDirection& title() const { return m_pageTitle; }
178
178
179
        KURL urlForHistory() const;
179
        URL urlForHistory() const;
180
        bool urlForHistoryReflectsFailure() const;
180
        bool urlForHistoryReflectsFailure() const;
181
181
182
        // These accessors accommodate WebCore's somewhat fickle custom of creating history
182
        // These accessors accommodate WebCore's somewhat fickle custom of creating history
Lines 257-263 namespace WebCore { a/Source/WebCore/loader/DocumentLoader.h_sec4
257
    private:
257
    private:
258
258
259
        // The URL of the document resulting from this DocumentLoader.
259
        // The URL of the document resulting from this DocumentLoader.
260
        KURL documentURL() const;
260
        URL documentURL() const;
261
        Document* document() const;
261
        Document* document() const;
262
262
263
        void setRequest(const ResourceRequest&);
263
        void setRequest(const ResourceRequest&);
- a/Source/WebCore/loader/DocumentThreadableLoader.cpp -2 / +2 lines
Lines 361-367 void DocumentThreadableLoader::preflightFailure(unsigned long identifier, const a/Source/WebCore/loader/DocumentThreadableLoader.cpp_sec1
361
void DocumentThreadableLoader::loadRequest(const ResourceRequest& request, SecurityCheckPolicy securityCheck)
361
void DocumentThreadableLoader::loadRequest(const ResourceRequest& request, SecurityCheckPolicy securityCheck)
362
{
362
{
363
    // Any credential should have been removed from the cross-site requests.
363
    // Any credential should have been removed from the cross-site requests.
364
    const KURL& requestURL = request.url();
364
    const URL& requestURL = request.url();
365
    m_options.securityCheck = securityCheck;
365
    m_options.securityCheck = securityCheck;
366
    ASSERT(m_sameOriginRequest || requestURL.user().isEmpty());
366
    ASSERT(m_sameOriginRequest || requestURL.user().isEmpty());
367
    ASSERT(m_sameOriginRequest || requestURL.pass().isEmpty());
367
    ASSERT(m_sameOriginRequest || requestURL.pass().isEmpty());
Lines 429-435 void DocumentThreadableLoader::loadRequest(const ResourceRequest& request, Secur a/Source/WebCore/loader/DocumentThreadableLoader.cpp_sec2
429
    didFinishLoading(identifier, 0.0);
429
    didFinishLoading(identifier, 0.0);
430
}
430
}
431
431
432
bool DocumentThreadableLoader::isAllowedRedirect(const KURL& url)
432
bool DocumentThreadableLoader::isAllowedRedirect(const URL& url)
433
{
433
{
434
    if (m_options.crossOriginRequestPolicy == AllowCrossOriginRequests)
434
    if (m_options.crossOriginRequestPolicy == AllowCrossOriginRequests)
435
        return true;
435
        return true;
- a/Source/WebCore/loader/DocumentThreadableLoader.h -2 / +2 lines
Lines 45-51 a/Source/WebCore/loader/DocumentThreadableLoader.h_sec1
45
namespace WebCore {
45
namespace WebCore {
46
    class CachedRawResource;
46
    class CachedRawResource;
47
    class Document;
47
    class Document;
48
    class KURL;
48
    class URL;
49
    class ResourceRequest;
49
    class ResourceRequest;
50
    class SecurityOrigin;
50
    class SecurityOrigin;
51
    class ThreadableLoaderClient;
51
    class ThreadableLoaderClient;
Lines 95-101 namespace WebCore { a/Source/WebCore/loader/DocumentThreadableLoader.h_sec2
95
        void preflightFailure(unsigned long identifier, const String& url, const String& errorDescription);
95
        void preflightFailure(unsigned long identifier, const String& url, const String& errorDescription);
96
96
97
        void loadRequest(const ResourceRequest&, SecurityCheckPolicy);
97
        void loadRequest(const ResourceRequest&, SecurityCheckPolicy);
98
        bool isAllowedRedirect(const KURL&);
98
        bool isAllowedRedirect(const URL&);
99
99
100
        SecurityOrigin* securityOrigin() const;
100
        SecurityOrigin* securityOrigin() const;
101
101
- a/Source/WebCore/loader/DocumentWriter.cpp -4 / +4 lines
Lines 100-109 void DocumentWriter::clear() a/Source/WebCore/loader/DocumentWriter.cpp_sec1
100
100
101
void DocumentWriter::begin()
101
void DocumentWriter::begin()
102
{
102
{
103
    begin(KURL());
103
    begin(URL());
104
}
104
}
105
105
106
PassRefPtr<Document> DocumentWriter::createDocument(const KURL& url)
106
PassRefPtr<Document> DocumentWriter::createDocument(const URL& url)
107
{
107
{
108
    if (!m_frame->loader().stateMachine()->isDisplayingInitialEmptyDocument() && m_frame->loader().client().shouldAlwaysUsePluginDocument(m_mimeType))
108
    if (!m_frame->loader().stateMachine()->isDisplayingInitialEmptyDocument() && m_frame->loader().client().shouldAlwaysUsePluginDocument(m_mimeType))
109
        return PluginDocument::create(m_frame, url);
109
        return PluginDocument::create(m_frame, url);
Lines 112-123 PassRefPtr<Document> DocumentWriter::createDocument(const KURL& url) a/Source/WebCore/loader/DocumentWriter.cpp_sec2
112
    return DOMImplementation::createDocument(m_mimeType, m_frame, url, m_frame->inViewSourceMode());
112
    return DOMImplementation::createDocument(m_mimeType, m_frame, url, m_frame->inViewSourceMode());
113
}
113
}
114
114
115
void DocumentWriter::begin(const KURL& urlReference, bool dispatch, Document* ownerDocument)
115
void DocumentWriter::begin(const URL& urlReference, bool dispatch, Document* ownerDocument)
116
{
116
{
117
    // We grab a local copy of the URL because it's easy for callers to supply
117
    // We grab a local copy of the URL because it's easy for callers to supply
118
    // a URL that will be deallocated during the execution of this function.
118
    // a URL that will be deallocated during the execution of this function.
119
    // For example, see <https://bugs.webkit.org/show_bug.cgi?id=66360>.
119
    // For example, see <https://bugs.webkit.org/show_bug.cgi?id=66360>.
120
    KURL url = urlReference;
120
    URL url = urlReference;
121
121
122
    // Create a new document before clearing the frame, because it may need to
122
    // Create a new document before clearing the frame, because it may need to
123
    // inherit an aliased security context.
123
    // inherit an aliased security context.
- a/Source/WebCore/loader/DocumentWriter.h -3 / +3 lines
Lines 29-35 a/Source/WebCore/loader/DocumentWriter.h_sec1
29
#ifndef DocumentWriter_h
29
#ifndef DocumentWriter_h
30
#define DocumentWriter_h
30
#define DocumentWriter_h
31
31
32
#include "KURL.h"
32
#include "URL.h"
33
#include <wtf/text/WTFString.h>
33
#include <wtf/text/WTFString.h>
34
34
35
namespace WebCore {
35
namespace WebCore {
Lines 50-56 public: a/Source/WebCore/loader/DocumentWriter.h_sec2
50
    void replaceDocument(const String&, Document* ownerDocument);
50
    void replaceDocument(const String&, Document* ownerDocument);
51
51
52
    void begin();
52
    void begin();
53
    void begin(const KURL&, bool dispatchWindowObjectAvailable = true, Document* ownerDocument = 0);
53
    void begin(const URL&, bool dispatchWindowObjectAvailable = true, Document* ownerDocument = 0);
54
    void addData(const char* bytes, size_t length);
54
    void addData(const char* bytes, size_t length);
55
    void end();
55
    void end();
56
    
56
    
Lines 68-74 public: a/Source/WebCore/loader/DocumentWriter.h_sec3
68
    void setDocumentWasLoadedAsPartOfNavigation();
68
    void setDocumentWasLoadedAsPartOfNavigation();
69
69
70
private:
70
private:
71
    PassRefPtr<Document> createDocument(const KURL&);
71
    PassRefPtr<Document> createDocument(const URL&);
72
    void clear();
72
    void clear();
73
73
74
    Frame* m_frame;
74
    Frame* m_frame;
- a/Source/WebCore/loader/EmptyClients.cpp -4 / +4 lines
Lines 135-146 PassRefPtr<DocumentLoader> EmptyFrameLoaderClient::createDocumentLoader(const Re a/Source/WebCore/loader/EmptyClients.cpp_sec1
135
    return DocumentLoader::create(request, substituteData);
135
    return DocumentLoader::create(request, substituteData);
136
}
136
}
137
137
138
PassRefPtr<Frame> EmptyFrameLoaderClient::createFrame(const KURL&, const String&, HTMLFrameOwnerElement*, const String&, bool, int, int)
138
PassRefPtr<Frame> EmptyFrameLoaderClient::createFrame(const URL&, const String&, HTMLFrameOwnerElement*, const String&, bool, int, int)
139
{
139
{
140
    return 0;
140
    return 0;
141
}
141
}
142
142
143
PassRefPtr<Widget> EmptyFrameLoaderClient::createPlugin(const IntSize&, HTMLPlugInElement*, const KURL&, const Vector<String>&, const Vector<String>&, const String&, bool)
143
PassRefPtr<Widget> EmptyFrameLoaderClient::createPlugin(const IntSize&, HTMLPlugInElement*, const URL&, const Vector<String>&, const Vector<String>&, const String&, bool)
144
{
144
{
145
    return 0;
145
    return 0;
146
}
146
}
Lines 149-161 void EmptyFrameLoaderClient::recreatePlugin(Widget*) a/Source/WebCore/loader/EmptyClients.cpp_sec2
149
{
149
{
150
}
150
}
151
151
152
PassRefPtr<Widget> EmptyFrameLoaderClient::createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const KURL&, const Vector<String>&, const Vector<String>&)
152
PassRefPtr<Widget> EmptyFrameLoaderClient::createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const URL&, const Vector<String>&, const Vector<String>&)
153
{
153
{
154
    return 0;
154
    return 0;
155
}
155
}
156
156
157
#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
157
#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
158
PassRefPtr<Widget> EmptyFrameLoaderClient::createMediaPlayerProxyPlugin(const IntSize&, HTMLMediaElement*, const KURL&, const Vector<String>&, const Vector<String>&, const String&)
158
PassRefPtr<Widget> EmptyFrameLoaderClient::createMediaPlayerProxyPlugin(const IntSize&, HTMLMediaElement*, const URL&, const Vector<String>&, const Vector<String>&, const String&)
159
{
159
{
160
    return 0;
160
    return 0;
161
}
161
}
- a/Source/WebCore/loader/EmptyClients.h -12 / +12 lines
Lines 243-249 public: a/Source/WebCore/loader/EmptyClients.h_sec1
243
    virtual void dispatchDidHandleOnloadEvents() { }
243
    virtual void dispatchDidHandleOnloadEvents() { }
244
    virtual void dispatchDidReceiveServerRedirectForProvisionalLoad() { }
244
    virtual void dispatchDidReceiveServerRedirectForProvisionalLoad() { }
245
    virtual void dispatchDidCancelClientRedirect() { }
245
    virtual void dispatchDidCancelClientRedirect() { }
246
    virtual void dispatchWillPerformClientRedirect(const KURL&, double, double) { }
246
    virtual void dispatchWillPerformClientRedirect(const URL&, double, double) { }
247
    virtual void dispatchDidChangeLocationWithinPage() { }
247
    virtual void dispatchDidChangeLocationWithinPage() { }
248
    virtual void dispatchDidPushStateWithinPage() { }
248
    virtual void dispatchDidPushStateWithinPage() { }
249
    virtual void dispatchDidReplaceStateWithinPage() { }
249
    virtual void dispatchDidReplaceStateWithinPage() { }
Lines 312-325 public: a/Source/WebCore/loader/EmptyClients.h_sec2
312
    virtual void frameLoadCompleted() { }
312
    virtual void frameLoadCompleted() { }
313
    virtual void restoreViewState() { }
313
    virtual void restoreViewState() { }
314
    virtual void provisionalLoadStarted() { }
314
    virtual void provisionalLoadStarted() { }
315
    virtual bool shouldTreatURLAsSameAsCurrent(const KURL&) const { return false; }
315
    virtual bool shouldTreatURLAsSameAsCurrent(const URL&) const { return false; }
316
    virtual void didFinishLoad() { }
316
    virtual void didFinishLoad() { }
317
    virtual void prepareForDataSourceReplacement() { }
317
    virtual void prepareForDataSourceReplacement() { }
318
318
319
    virtual PassRefPtr<DocumentLoader> createDocumentLoader(const ResourceRequest&, const SubstituteData&) OVERRIDE;
319
    virtual PassRefPtr<DocumentLoader> createDocumentLoader(const ResourceRequest&, const SubstituteData&) OVERRIDE;
320
    virtual void setTitle(const StringWithDirection&, const KURL&) { }
320
    virtual void setTitle(const StringWithDirection&, const URL&) { }
321
321
322
    virtual String userAgent(const KURL&) { return ""; }
322
    virtual String userAgent(const URL&) { return ""; }
323
323
324
    virtual void savePlatformDataToCachedFrame(CachedFrame*) { }
324
    virtual void savePlatformDataToCachedFrame(CachedFrame*) { }
325
    virtual void transitionToCommittedFromCachedFrame(CachedFrame*) { }
325
    virtual void transitionToCommittedFromCachedFrame(CachedFrame*) { }
Lines 338-356 public: a/Source/WebCore/loader/EmptyClients.h_sec3
338
    virtual void saveViewStateToItem(HistoryItem*) { }
338
    virtual void saveViewStateToItem(HistoryItem*) { }
339
    virtual bool canCachePage() const { return false; }
339
    virtual bool canCachePage() const { return false; }
340
    virtual void didDisplayInsecureContent() { }
340
    virtual void didDisplayInsecureContent() { }
341
    virtual void didRunInsecureContent(SecurityOrigin*, const KURL&) { }
341
    virtual void didRunInsecureContent(SecurityOrigin*, const URL&) { }
342
    virtual void didDetectXSS(const KURL&, bool) { }
342
    virtual void didDetectXSS(const URL&, bool) { }
343
    virtual PassRefPtr<Frame> createFrame(const KURL&, const String&, HTMLFrameOwnerElement*, const String&, bool, int, int) OVERRIDE;
343
    virtual PassRefPtr<Frame> createFrame(const URL&, const String&, HTMLFrameOwnerElement*, const String&, bool, int, int) OVERRIDE;
344
    virtual PassRefPtr<Widget> createPlugin(const IntSize&, HTMLPlugInElement*, const KURL&, const Vector<String>&, const Vector<String>&, const String&, bool) OVERRIDE;
344
    virtual PassRefPtr<Widget> createPlugin(const IntSize&, HTMLPlugInElement*, const URL&, const Vector<String>&, const Vector<String>&, const String&, bool) OVERRIDE;
345
    virtual void recreatePlugin(Widget*) OVERRIDE;
345
    virtual void recreatePlugin(Widget*) OVERRIDE;
346
    virtual PassRefPtr<Widget> createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const KURL&, const Vector<String>&, const Vector<String>&) OVERRIDE;
346
    virtual PassRefPtr<Widget> createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const URL&, const Vector<String>&, const Vector<String>&) OVERRIDE;
347
#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
347
#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
348
    virtual PassRefPtr<Widget> createMediaPlayerProxyPlugin(const IntSize&, HTMLMediaElement*, const KURL&, const Vector<String>&, const Vector<String>&, const String&) OVERRIDE;
348
    virtual PassRefPtr<Widget> createMediaPlayerProxyPlugin(const IntSize&, HTMLMediaElement*, const URL&, const Vector<String>&, const Vector<String>&, const String&) OVERRIDE;
349
    virtual void hideMediaPlayerProxyPlugin(Widget*) { }
349
    virtual void hideMediaPlayerProxyPlugin(Widget*) { }
350
    virtual void showMediaPlayerProxyPlugin(Widget*) { }
350
    virtual void showMediaPlayerProxyPlugin(Widget*) { }
351
#endif
351
#endif
352
352
353
    virtual ObjectContentType objectContentType(const KURL&, const String&, bool) { return ObjectContentType(); }
353
    virtual ObjectContentType objectContentType(const URL&, const String&, bool) { return ObjectContentType(); }
354
    virtual String overrideMediaType() const { return String(); }
354
    virtual String overrideMediaType() const { return String(); }
355
355
356
    virtual void redirectDataToPlugin(Widget*) { }
356
    virtual void redirectDataToPlugin(Widget*) { }
Lines 517-523 public: a/Source/WebCore/loader/EmptyClients.h_sec4
517
#endif
517
#endif
518
    virtual void contextMenuItemSelected(ContextMenuItem*, const ContextMenu*) { }
518
    virtual void contextMenuItemSelected(ContextMenuItem*, const ContextMenu*) { }
519
519
520
    virtual void downloadURL(const KURL&) { }
520
    virtual void downloadURL(const URL&) { }
521
    virtual void copyImageToClipboard(const HitTestResult&) { }
521
    virtual void copyImageToClipboard(const HitTestResult&) { }
522
    virtual void searchWithGoogle(const Frame*) { }
522
    virtual void searchWithGoogle(const Frame*) { }
523
    virtual void lookUpInDictionary(Frame*) { }
523
    virtual void lookUpInDictionary(Frame*) { }
- a/Source/WebCore/loader/FormSubmission.cpp -6 / +6 lines
Lines 61-67 static int64_t generateFormDataIdentifier() a/Source/WebCore/loader/FormSubmission.cpp_sec1
61
    return ++nextIdentifier;
61
    return ++nextIdentifier;
62
}
62
}
63
63
64
static void appendMailtoPostFormDataToURL(KURL& url, const FormData& data, const String& encodingType)
64
static void appendMailtoPostFormDataToURL(URL& url, const FormData& data, const String& encodingType)
65
{
65
{
66
    String body = data.flattenToString();
66
    String body = data.flattenToString();
67
67
Lines 84-90 static void appendMailtoPostFormDataToURL(KURL& url, const FormData& data, const a/Source/WebCore/loader/FormSubmission.cpp_sec2
84
84
85
void FormSubmission::Attributes::parseAction(const String& action)
85
void FormSubmission::Attributes::parseAction(const String& action)
86
{
86
{
87
    // FIXME: Can we parse into a KURL?
87
    // FIXME: Can we parse into a URL?
88
    m_action = stripLeadingAndTrailingHTMLSpaces(action);
88
    m_action = stripLeadingAndTrailingHTMLSpaces(action);
89
}
89
}
90
90
Lines 124-130 void FormSubmission::Attributes::copyFrom(const Attributes& other) a/Source/WebCore/loader/FormSubmission.cpp_sec3
124
    m_acceptCharset = other.m_acceptCharset;
124
    m_acceptCharset = other.m_acceptCharset;
125
}
125
}
126
126
127
inline FormSubmission::FormSubmission(Method method, const KURL& action, const String& target, const String& contentType, PassRefPtr<FormState> state, PassRefPtr<FormData> data, const String& boundary, bool lockHistory, PassRefPtr<Event> event)
127
inline FormSubmission::FormSubmission(Method method, const URL& action, const String& target, const String& contentType, PassRefPtr<FormState> state, PassRefPtr<FormData> data, const String& boundary, bool lockHistory, PassRefPtr<Event> event)
128
    : m_method(method)
128
    : m_method(method)
129
    , m_action(action)
129
    , m_action(action)
130
    , m_target(target)
130
    , m_target(target)
Lines 166-172 PassRefPtr<FormSubmission> FormSubmission::create(HTMLFormElement* form, const A a/Source/WebCore/loader/FormSubmission.cpp_sec4
166
    }
166
    }
167
    
167
    
168
    Document& document = form->document();
168
    Document& document = form->document();
169
    KURL actionURL = document.completeURL(copiedAttributes.action().isEmpty() ? document.url().string() : copiedAttributes.action());
169
    URL actionURL = document.completeURL(copiedAttributes.action().isEmpty() ? document.url().string() : copiedAttributes.action());
170
    bool isMailtoForm = actionURL.protocolIs("mailto");
170
    bool isMailtoForm = actionURL.protocolIs("mailto");
171
    bool isMultiPartForm = false;
171
    bool isMultiPartForm = false;
172
    String encodingType = copiedAttributes.encodingType();
172
    String encodingType = copiedAttributes.encodingType();
Lines 222-233 PassRefPtr<FormSubmission> FormSubmission::create(HTMLFormElement* form, const A a/Source/WebCore/loader/FormSubmission.cpp_sec5
222
    return adoptRef(new FormSubmission(copiedAttributes.method(), actionURL, targetOrBaseTarget, encodingType, formState.release(), formData.release(), boundary, lockHistory, event));
222
    return adoptRef(new FormSubmission(copiedAttributes.method(), actionURL, targetOrBaseTarget, encodingType, formState.release(), formData.release(), boundary, lockHistory, event));
223
}
223
}
224
224
225
KURL FormSubmission::requestURL() const
225
URL FormSubmission::requestURL() const
226
{
226
{
227
    if (m_method == FormSubmission::PostMethod)
227
    if (m_method == FormSubmission::PostMethod)
228
        return m_action;
228
        return m_action;
229
229
230
    KURL requestURL(m_action);
230
    URL requestURL(m_action);
231
    requestURL.setQuery(m_formData->flattenToString());    
231
    requestURL.setQuery(m_formData->flattenToString());    
232
    return requestURL;
232
    return requestURL;
233
}
233
}
- a/Source/WebCore/loader/FormSubmission.h -5 / +5 lines
Lines 32-38 a/Source/WebCore/loader/FormSubmission.h_sec1
32
#define FormSubmission_h
32
#define FormSubmission_h
33
33
34
#include "FormState.h"
34
#include "FormState.h"
35
#include "KURL.h"
35
#include "URL.h"
36
36
37
namespace WebCore {
37
namespace WebCore {
38
38
Lines 92-101 public: a/Source/WebCore/loader/FormSubmission.h_sec2
92
92
93
    void populateFrameLoadRequest(FrameLoadRequest&);
93
    void populateFrameLoadRequest(FrameLoadRequest&);
94
    
94
    
95
    KURL requestURL() const;
95
    URL requestURL() const;
96
96
97
    Method method() const { return m_method; }
97
    Method method() const { return m_method; }
98
    const KURL& action() const { return m_action; }
98
    const URL& action() const { return m_action; }
99
    const String& target() const { return m_target; }
99
    const String& target() const { return m_target; }
100
    void clearTarget() { m_target = String(); }
100
    void clearTarget() { m_target = String(); }
101
    const String& contentType() const { return m_contentType; }
101
    const String& contentType() const { return m_contentType; }
Lines 111-121 public: a/Source/WebCore/loader/FormSubmission.h_sec3
111
    void setOrigin(const String& origin) { m_origin = origin; }
111
    void setOrigin(const String& origin) { m_origin = origin; }
112
112
113
private:
113
private:
114
    FormSubmission(Method, const KURL& action, const String& target, const String& contentType, PassRefPtr<FormState>, PassRefPtr<FormData>, const String& boundary, bool lockHistory, PassRefPtr<Event>);
114
    FormSubmission(Method, const URL& action, const String& target, const String& contentType, PassRefPtr<FormState>, PassRefPtr<FormData>, const String& boundary, bool lockHistory, PassRefPtr<Event>);
115
115
116
    // FIXME: Hold an instance of Attributes instead of individual members.
116
    // FIXME: Hold an instance of Attributes instead of individual members.
117
    Method m_method;
117
    Method m_method;
118
    KURL m_action;
118
    URL m_action;
119
    String m_target;
119
    String m_target;
120
    String m_contentType;
120
    String m_contentType;
121
    RefPtr<FormState> m_formState;
121
    RefPtr<FormState> m_formState;
- a/Source/WebCore/loader/FrameLoader.cpp -44 / +44 lines
Lines 261-267 FrameLoader::~FrameLoader() a/Source/WebCore/loader/FrameLoader.cpp_sec1
261
void FrameLoader::init()
261
void FrameLoader::init()
262
{
262
{
263
    // This somewhat odd set of steps gives the frame an initial empty document.
263
    // This somewhat odd set of steps gives the frame an initial empty document.
264
    setPolicyDocumentLoader(m_client.createDocumentLoader(ResourceRequest(KURL(ParsedURLString, emptyString())), SubstituteData()).get());
264
    setPolicyDocumentLoader(m_client.createDocumentLoader(ResourceRequest(URL(ParsedURLString, emptyString())), SubstituteData()).get());
265
    setProvisionalDocumentLoader(m_policyDocumentLoader.get());
265
    setProvisionalDocumentLoader(m_policyDocumentLoader.get());
266
    m_provisionalDocumentLoader->startLoadingMainResource();
266
    m_provisionalDocumentLoader->startLoadingMainResource();
267
    m_frame.document()->cancelParsing();
267
    m_frame.document()->cancelParsing();
Lines 287-299 void FrameLoader::setDefersLoading(bool defers) a/Source/WebCore/loader/FrameLoader.cpp_sec2
287
    }
287
    }
288
}
288
}
289
289
290
void FrameLoader::changeLocation(SecurityOrigin* securityOrigin, const KURL& url, const String& referrer, bool lockHistory, bool lockBackForwardList, bool refresh)
290
void FrameLoader::changeLocation(SecurityOrigin* securityOrigin, const URL& url, const String& referrer, bool lockHistory, bool lockBackForwardList, bool refresh)
291
{
291
{
292
    urlSelected(FrameLoadRequest(securityOrigin, ResourceRequest(url, referrer, refresh ? ReloadIgnoringCacheData : UseProtocolCachePolicy), "_self"),
292
    urlSelected(FrameLoadRequest(securityOrigin, ResourceRequest(url, referrer, refresh ? ReloadIgnoringCacheData : UseProtocolCachePolicy), "_self"),
293
        0, lockHistory, lockBackForwardList, MaybeSendReferrer, ReplaceDocumentIfJavaScriptURL);
293
        0, lockHistory, lockBackForwardList, MaybeSendReferrer, ReplaceDocumentIfJavaScriptURL);
294
}
294
}
295
295
296
void FrameLoader::urlSelected(const KURL& url, const String& passedTarget, PassRefPtr<Event> triggeringEvent, bool lockHistory, bool lockBackForwardList, ShouldSendReferrer shouldSendReferrer)
296
void FrameLoader::urlSelected(const URL& url, const String& passedTarget, PassRefPtr<Event> triggeringEvent, bool lockHistory, bool lockBackForwardList, ShouldSendReferrer shouldSendReferrer)
297
{
297
{
298
    urlSelected(FrameLoadRequest(m_frame.document()->securityOrigin(), ResourceRequest(url), passedTarget),
298
    urlSelected(FrameLoadRequest(m_frame.document()->securityOrigin(), ResourceRequest(url), passedTarget),
299
        triggeringEvent, lockHistory, lockBackForwardList, shouldSendReferrer, DoNotReplaceDocumentIfJavaScriptURL);
299
        triggeringEvent, lockHistory, lockBackForwardList, shouldSendReferrer, DoNotReplaceDocumentIfJavaScriptURL);
Lines 345-351 void FrameLoader::submitForm(PassRefPtr<FormSubmission> submission) a/Source/WebCore/loader/FrameLoader.cpp_sec3
345
    }
345
    }
346
346
347
    if (protocolIsJavaScript(submission->action())) {
347
    if (protocolIsJavaScript(submission->action())) {
348
        if (!m_frame.document()->contentSecurityPolicy()->allowFormAction(KURL(submission->action())))
348
        if (!m_frame.document()->contentSecurityPolicy()->allowFormAction(URL(submission->action())))
349
            return;
349
            return;
350
        m_isExecutingJavaScriptFormAction = true;
350
        m_isExecutingJavaScriptFormAction = true;
351
        m_frame.script().executeIfJavaScriptURL(submission->action(), DoNotReplaceDocumentIfJavaScriptURL);
351
        m_frame.script().executeIfJavaScriptURL(submission->action(), DoNotReplaceDocumentIfJavaScriptURL);
Lines 648-654 void FrameLoader::receivedFirstData() a/Source/WebCore/loader/FrameLoader.cpp_sec4
648
    m_frame.navigationScheduler().scheduleRedirect(delay, url);
648
    m_frame.navigationScheduler().scheduleRedirect(delay, url);
649
}
649
}
650
650
651
void FrameLoader::setOutgoingReferrer(const KURL& url)
651
void FrameLoader::setOutgoingReferrer(const URL& url)
652
{
652
{
653
    m_outgoingReferrer = url.strippedForUseAsReferrer();
653
    m_outgoingReferrer = url.strippedForUseAsReferrer();
654
}
654
}
Lines 850-856 void FrameLoader::checkCallImplicitClose() a/Source/WebCore/loader/FrameLoader.cpp_sec5
850
    m_frame.document()->implicitClose();
850
    m_frame.document()->implicitClose();
851
}
851
}
852
852
853
void FrameLoader::loadURLIntoChildFrame(const KURL& url, const String& referer, Frame* childFrame)
853
void FrameLoader::loadURLIntoChildFrame(const URL& url, const String& referer, Frame* childFrame)
854
{
854
{
855
    ASSERT(childFrame);
855
    ASSERT(childFrame);
856
856
Lines 886-892 void FrameLoader::loadArchive(PassRefPtr<Archive> archive) a/Source/WebCore/loader/FrameLoader.cpp_sec6
886
    if (!mainResource)
886
    if (!mainResource)
887
        return;
887
        return;
888
        
888
        
889
    SubstituteData substituteData(mainResource->data(), mainResource->mimeType(), mainResource->textEncoding(), KURL());
889
    SubstituteData substituteData(mainResource->data(), mainResource->mimeType(), mainResource->textEncoding(), URL());
890
    
890
    
891
    ResourceRequest request(mainResource->url());
891
    ResourceRequest request(mainResource->url());
892
#if PLATFORM(MAC)
892
#if PLATFORM(MAC)
Lines 899-905 void FrameLoader::loadArchive(PassRefPtr<Archive> archive) a/Source/WebCore/loader/FrameLoader.cpp_sec7
899
}
899
}
900
#endif // ENABLE(WEB_ARCHIVE) || ENABLE(MHTML)
900
#endif // ENABLE(WEB_ARCHIVE) || ENABLE(MHTML)
901
901
902
ObjectContentType FrameLoader::defaultObjectContentType(const KURL& url, const String& mimeTypeIn, bool shouldPreferPlugInsForImages)
902
ObjectContentType FrameLoader::defaultObjectContentType(const URL& url, const String& mimeTypeIn, bool shouldPreferPlugInsForImages)
903
{
903
{
904
    String mimeType = mimeTypeIn;
904
    String mimeType = mimeTypeIn;
905
905
Lines 953-959 String FrameLoader::outgoingOrigin() const a/Source/WebCore/loader/FrameLoader.cpp_sec8
953
    return m_frame.document()->securityOrigin()->toString();
953
    return m_frame.document()->securityOrigin()->toString();
954
}
954
}
955
955
956
bool FrameLoader::checkIfFormActionAllowedByCSP(const KURL& url) const
956
bool FrameLoader::checkIfFormActionAllowedByCSP(const URL& url) const
957
{
957
{
958
    if (m_submittedFormURL.isEmpty())
958
    if (m_submittedFormURL.isEmpty())
959
        return true;
959
        return true;
Lines 1000-1006 void FrameLoader::provisionalLoadStarted() a/Source/WebCore/loader/FrameLoader.cpp_sec9
1000
1000
1001
void FrameLoader::resetMultipleFormSubmissionProtection()
1001
void FrameLoader::resetMultipleFormSubmissionProtection()
1002
{
1002
{
1003
    m_submittedFormURL = KURL();
1003
    m_submittedFormURL = URL();
1004
}
1004
}
1005
1005
1006
void FrameLoader::updateFirstPartyForCookies()
1006
void FrameLoader::updateFirstPartyForCookies()
Lines 1011-1017 void FrameLoader::updateFirstPartyForCookies() a/Source/WebCore/loader/FrameLoader.cpp_sec10
1011
        setFirstPartyForCookies(m_frame.document()->url());
1011
        setFirstPartyForCookies(m_frame.document()->url());
1012
}
1012
}
1013
1013
1014
void FrameLoader::setFirstPartyForCookies(const KURL& url)
1014
void FrameLoader::setFirstPartyForCookies(const URL& url)
1015
{
1015
{
1016
    for (Frame* frame = &m_frame; frame; frame = frame->tree().traverseNext(&m_frame))
1016
    for (Frame* frame = &m_frame; frame; frame = frame->tree().traverseNext(&m_frame))
1017
        frame->document()->setFirstPartyForCookies(url);
1017
        frame->document()->setFirstPartyForCookies(url);
Lines 1019-1031 void FrameLoader::setFirstPartyForCookies(const KURL& url) a/Source/WebCore/loader/FrameLoader.cpp_sec11
1019
1019
1020
// This does the same kind of work that didOpenURL does, except it relies on the fact
1020
// This does the same kind of work that didOpenURL does, except it relies on the fact
1021
// that a higher level already checked that the URLs match and the scrolling is the right thing to do.
1021
// that a higher level already checked that the URLs match and the scrolling is the right thing to do.
1022
void FrameLoader::loadInSameDocument(const KURL& url, PassRefPtr<SerializedScriptValue> stateObject, bool isNewNavigation)
1022
void FrameLoader::loadInSameDocument(const URL& url, PassRefPtr<SerializedScriptValue> stateObject, bool isNewNavigation)
1023
{
1023
{
1024
    // If we have a state object, we cannot also be a new navigation.
1024
    // If we have a state object, we cannot also be a new navigation.
1025
    ASSERT(!stateObject || (stateObject && !isNewNavigation));
1025
    ASSERT(!stateObject || (stateObject && !isNewNavigation));
1026
1026
1027
    // Update the data source's request with the new URL to fake the URL change
1027
    // Update the data source's request with the new URL to fake the URL change
1028
    KURL oldURL = m_frame.document()->url();
1028
    URL oldURL = m_frame.document()->url();
1029
    m_frame.document()->setURL(url);
1029
    m_frame.document()->setURL(url);
1030
    setOutgoingReferrer(url);
1030
    setOutgoingReferrer(url);
1031
    documentLoader()->replaceRequestURLForSameDocumentNavigation(url);
1031
    documentLoader()->replaceRequestURLForSameDocumentNavigation(url);
Lines 1158-1164 void FrameLoader::loadFrameRequest(const FrameLoadRequest& request, bool lockHis a/Source/WebCore/loader/FrameLoader.cpp_sec12
1158
    // Protect frame from getting blown away inside dispatchBeforeLoadEvent in loadWithDocumentLoader.
1158
    // Protect frame from getting blown away inside dispatchBeforeLoadEvent in loadWithDocumentLoader.
1159
    Ref<Frame> protect(m_frame);
1159
    Ref<Frame> protect(m_frame);
1160
1160
1161
    KURL url = request.resourceRequest().url();
1161
    URL url = request.resourceRequest().url();
1162
1162
1163
    ASSERT(m_frame.document());
1163
    ASSERT(m_frame.document());
1164
    if (!request.requester()->canDisplay(url)) {
1164
    if (!request.requester()->canDisplay(url)) {
Lines 1199-1205 void FrameLoader::loadFrameRequest(const FrameLoadRequest& request, bool lockHis a/Source/WebCore/loader/FrameLoader.cpp_sec13
1199
    }
1199
    }
1200
}
1200
}
1201
1201
1202
void FrameLoader::loadURL(const KURL& newURL, const String& referrer, const String& frameName, bool lockHistory, FrameLoadType newLoadType,
1202
void FrameLoader::loadURL(const URL& newURL, const String& referrer, const String& frameName, bool lockHistory, FrameLoadType newLoadType,
1203
    PassRefPtr<Event> event, PassRefPtr<FormState> prpFormState)
1203
    PassRefPtr<Event> event, PassRefPtr<FormState> prpFormState)
1204
{
1204
{
1205
    if (m_inStopAllLoaders)
1205
    if (m_inStopAllLoaders)
Lines 1272-1285 void FrameLoader::loadURL(const KURL& newURL, const String& referrer, const Stri a/Source/WebCore/loader/FrameLoader.cpp_sec14
1272
    }
1272
    }
1273
}
1273
}
1274
1274
1275
SubstituteData FrameLoader::defaultSubstituteDataForURL(const KURL& url)
1275
SubstituteData FrameLoader::defaultSubstituteDataForURL(const URL& url)
1276
{
1276
{
1277
    if (!shouldTreatURLAsSrcdocDocument(url))
1277
    if (!shouldTreatURLAsSrcdocDocument(url))
1278
        return SubstituteData();
1278
        return SubstituteData();
1279
    String srcdoc = m_frame.ownerElement()->fastGetAttribute(srcdocAttr);
1279
    String srcdoc = m_frame.ownerElement()->fastGetAttribute(srcdocAttr);
1280
    ASSERT(!srcdoc.isNull());
1280
    ASSERT(!srcdoc.isNull());
1281
    CString encodedSrcdoc = srcdoc.utf8();
1281
    CString encodedSrcdoc = srcdoc.utf8();
1282
    return SubstituteData(SharedBuffer::create(encodedSrcdoc.data(), encodedSrcdoc.length()), "text/html", "UTF-8", KURL());
1282
    return SubstituteData(SharedBuffer::create(encodedSrcdoc.data(), encodedSrcdoc.length()), "text/html", "UTF-8", URL());
1283
}
1283
}
1284
1284
1285
void FrameLoader::load(const FrameLoadRequest& passedRequest)
1285
void FrameLoader::load(const FrameLoadRequest& passedRequest)
Lines 1386-1392 void FrameLoader::loadWithDocumentLoader(DocumentLoader* loader, FrameLoadType t a/Source/WebCore/loader/FrameLoader.cpp_sec15
1386
    RefPtr<FormState> formState = prpFormState;
1386
    RefPtr<FormState> formState = prpFormState;
1387
    bool isFormSubmission = formState;
1387
    bool isFormSubmission = formState;
1388
1388
1389
    const KURL& newURL = loader->request().url();
1389
    const URL& newURL = loader->request().url();
1390
    const String& httpMethod = loader->request().httpMethod();
1390
    const String& httpMethod = loader->request().httpMethod();
1391
1391
1392
    if (shouldPerformFragmentNavigation(isFormSubmission, httpMethod, policyChecker().loadType(), newURL)) {
1392
    if (shouldPerformFragmentNavigation(isFormSubmission, httpMethod, policyChecker().loadType(), newURL)) {
Lines 1438-1444 const ResourceRequest& FrameLoader::initialRequest() const a/Source/WebCore/loader/FrameLoader.cpp_sec16
1438
    return activeDocumentLoader()->originalRequest();
1438
    return activeDocumentLoader()->originalRequest();
1439
}
1439
}
1440
1440
1441
bool FrameLoader::willLoadMediaElementURL(KURL& url)
1441
bool FrameLoader::willLoadMediaElementURL(URL& url)
1442
{
1442
{
1443
    ResourceRequest request(url);
1443
    ResourceRequest request(url);
1444
1444
Lines 1454-1460 bool FrameLoader::willLoadMediaElementURL(KURL& url) a/Source/WebCore/loader/FrameLoader.cpp_sec17
1454
1454
1455
bool FrameLoader::shouldReloadToHandleUnreachableURL(DocumentLoader* docLoader)
1455
bool FrameLoader::shouldReloadToHandleUnreachableURL(DocumentLoader* docLoader)
1456
{
1456
{
1457
    KURL unreachableURL = docLoader->unreachableURL();
1457
    URL unreachableURL = docLoader->unreachableURL();
1458
1458
1459
    if (unreachableURL.isEmpty())
1459
    if (unreachableURL.isEmpty())
1460
        return false;
1460
        return false;
Lines 1482-1488 void FrameLoader::reloadWithOverrideEncoding(const String& encoding) a/Source/WebCore/loader/FrameLoader.cpp_sec18
1482
        return;
1482
        return;
1483
1483
1484
    ResourceRequest request = m_documentLoader->request();
1484
    ResourceRequest request = m_documentLoader->request();
1485
    KURL unreachableURL = m_documentLoader->unreachableURL();
1485
    URL unreachableURL = m_documentLoader->unreachableURL();
1486
    if (!unreachableURL.isEmpty())
1486
    if (!unreachableURL.isEmpty())
1487
        request.setURL(unreachableURL);
1487
        request.setURL(unreachableURL);
1488
1488
Lines 1498-1504 void FrameLoader::reloadWithOverrideEncoding(const String& encoding) a/Source/WebCore/loader/FrameLoader.cpp_sec19
1498
    loadWithDocumentLoader(loader.get(), FrameLoadTypeReload, 0);
1498
    loadWithDocumentLoader(loader.get(), FrameLoadTypeReload, 0);
1499
}
1499
}
1500
1500
1501
void FrameLoader::reloadWithOverrideURL(const KURL& overrideUrl, bool endToEndReload)
1501
void FrameLoader::reloadWithOverrideURL(const URL& overrideUrl, bool endToEndReload)
1502
{
1502
{
1503
    if (!m_documentLoader)
1503
    if (!m_documentLoader)
1504
        return;
1504
        return;
Lines 1523-1529 void FrameLoader::reload(bool endToEndReload) a/Source/WebCore/loader/FrameLoader.cpp_sec20
1523
1523
1524
    // Replace error-page URL with the URL we were trying to reach.
1524
    // Replace error-page URL with the URL we were trying to reach.
1525
    ResourceRequest initialRequest = m_documentLoader->request();
1525
    ResourceRequest initialRequest = m_documentLoader->request();
1526
    KURL unreachableURL = m_documentLoader->unreachableURL();
1526
    URL unreachableURL = m_documentLoader->unreachableURL();
1527
    if (!unreachableURL.isEmpty())
1527
    if (!unreachableURL.isEmpty())
1528
        initialRequest.setURL(unreachableURL);
1528
        initialRequest.setURL(unreachableURL);
1529
1529
Lines 1917-1923 void FrameLoader::clientRedirectCancelledOrFinished(bool cancelWithLoadInProgres a/Source/WebCore/loader/FrameLoader.cpp_sec21
1917
    m_sentRedirectNotification = false;
1917
    m_sentRedirectNotification = false;
1918
}
1918
}
1919
1919
1920
void FrameLoader::clientRedirected(const KURL& url, double seconds, double fireDate, bool lockBackForwardList)
1920
void FrameLoader::clientRedirected(const URL& url, double seconds, double fireDate, bool lockBackForwardList)
1921
{
1921
{
1922
    m_client.dispatchWillPerformClientRedirect(url, seconds, fireDate);
1922
    m_client.dispatchWillPerformClientRedirect(url, seconds, fireDate);
1923
    
1923
    
Lines 1932-1938 void FrameLoader::clientRedirected(const KURL& url, double seconds, double fireD a/Source/WebCore/loader/FrameLoader.cpp_sec22
1932
    m_quickRedirectComing = (lockBackForwardList || history().currentItemShouldBeReplaced()) && m_documentLoader && !m_isExecutingJavaScriptFormAction;
1932
    m_quickRedirectComing = (lockBackForwardList || history().currentItemShouldBeReplaced()) && m_documentLoader && !m_isExecutingJavaScriptFormAction;
1933
}
1933
}
1934
1934
1935
bool FrameLoader::shouldReload(const KURL& currentURL, const KURL& destinationURL)
1935
bool FrameLoader::shouldReload(const URL& currentURL, const URL& destinationURL)
1936
{
1936
{
1937
    // This function implements the rule: "Don't reload if navigating by fragment within
1937
    // This function implements the rule: "Don't reload if navigating by fragment within
1938
    // the same URL, but do reload if going to a new URL or to the same URL with no
1938
    // the same URL, but do reload if going to a new URL or to the same URL with no
Lines 1982-1988 void FrameLoader::open(CachedFrameBase& cachedFrame) a/Source/WebCore/loader/FrameLoader.cpp_sec23
1982
    // Don't re-emit the load event.
1982
    // Don't re-emit the load event.
1983
    m_didCallImplicitClose = true;
1983
    m_didCallImplicitClose = true;
1984
1984
1985
    KURL url = cachedFrame.url();
1985
    URL url = cachedFrame.url();
1986
1986
1987
    // FIXME: I suspect this block of code doesn't do anything.
1987
    // FIXME: I suspect this block of code doesn't do anything.
1988
    if (url.protocolIsInHTTPFamily() && !url.host().isEmpty() && url.path().isEmpty())
1988
    if (url.protocolIsInHTTPFamily() && !url.host().isEmpty() && url.path().isEmpty())
Lines 2142-2148 void FrameLoader::checkLoadCompleteForThisFrame() a/Source/WebCore/loader/FrameLoader.cpp_sec24
2142
                if (pdl == m_provisionalDocumentLoader)
2142
                if (pdl == m_provisionalDocumentLoader)
2143
                    clearProvisionalLoad();
2143
                    clearProvisionalLoad();
2144
                else if (activeDocumentLoader()) {
2144
                else if (activeDocumentLoader()) {
2145
                    KURL unreachableURL = activeDocumentLoader()->unreachableURL();
2145
                    URL unreachableURL = activeDocumentLoader()->unreachableURL();
2146
                    if (!unreachableURL.isEmpty() && unreachableURL == pdl->request().url())
2146
                    if (!unreachableURL.isEmpty() && unreachableURL == pdl->request().url())
2147
                        shouldReset = false;
2147
                        shouldReset = false;
2148
                }
2148
                }
Lines 2230-2241 void FrameLoader::continueLoadAfterWillSubmitForm() a/Source/WebCore/loader/FrameLoader.cpp_sec25
2230
    m_provisionalDocumentLoader->startLoadingMainResource();
2230
    m_provisionalDocumentLoader->startLoadingMainResource();
2231
}
2231
}
2232
2232
2233
static KURL originatingURLFromBackForwardList(Page* page)
2233
static URL originatingURLFromBackForwardList(Page* page)
2234
{
2234
{
2235
    // FIXME: Can this logic be replaced with m_frame.document()->firstPartyForCookies()?
2235
    // FIXME: Can this logic be replaced with m_frame.document()->firstPartyForCookies()?
2236
    // It has the same meaning of "page a user thinks is the current one".
2236
    // It has the same meaning of "page a user thinks is the current one".
2237
2237
2238
    KURL originalURL;
2238
    URL originalURL;
2239
    int backCount = page->backForward().backCount();
2239
    int backCount = page->backForward().backCount();
2240
    for (int backIndex = 0; backIndex <= backCount; backIndex++) {
2240
    for (int backIndex = 0; backIndex <= backCount; backIndex++) {
2241
        // FIXME: At one point we had code here to check a "was user gesture" flag.
2241
        // FIXME: At one point we had code here to check a "was user gesture" flag.
Lines 2249-2260 static KURL originatingURLFromBackForwardList(Page* page) a/Source/WebCore/loader/FrameLoader.cpp_sec26
2249
            return originalURL;
2249
            return originalURL;
2250
    }
2250
    }
2251
2251
2252
    return KURL();
2252
    return URL();
2253
}
2253
}
2254
2254
2255
void FrameLoader::setOriginalURLForDownloadRequest(ResourceRequest& request)
2255
void FrameLoader::setOriginalURLForDownloadRequest(ResourceRequest& request)
2256
{
2256
{
2257
    KURL originalURL;
2257
    URL originalURL;
2258
    
2258
    
2259
    // If there is no referrer, assume that the download was initiated directly, so current document is
2259
    // If there is no referrer, assume that the download was initiated directly, so current document is
2260
    // completely unrelated to it. See <rdar://problem/5294691>.
2260
    // completely unrelated to it. See <rdar://problem/5294691>.
Lines 2280-2286 void FrameLoader::setOriginalURLForDownloadRequest(ResourceRequest& request) a/Source/WebCore/loader/FrameLoader.cpp_sec27
2280
            hostOnlyURLString = makeString(originalURL.protocol(), "://", originalURL.host());
2280
            hostOnlyURLString = makeString(originalURL.protocol(), "://", originalURL.host());
2281
2281
2282
        // FIXME: Rename firstPartyForCookies back to mainDocumentURL. It was a mistake to think that it was only used for cookies.
2282
        // FIXME: Rename firstPartyForCookies back to mainDocumentURL. It was a mistake to think that it was only used for cookies.
2283
        request.setFirstPartyForCookies(KURL(KURL(), hostOnlyURLString));
2283
        request.setFirstPartyForCookies(URL(URL(), hostOnlyURLString));
2284
    }
2284
    }
2285
}
2285
}
2286
2286
Lines 2372-2378 int FrameLoader::numPendingOrLoadingRequests(bool recurse) const a/Source/WebCore/loader/FrameLoader.cpp_sec28
2372
    return count;
2372
    return count;
2373
}
2373
}
2374
2374
2375
String FrameLoader::userAgent(const KURL& url) const
2375
String FrameLoader::userAgent(const URL& url) const
2376
{
2376
{
2377
    String userAgent = m_client.userAgent(url);
2377
    String userAgent = m_client.userAgent(url);
2378
    InspectorInstrumentation::applyUserAgentOverride(&m_frame, &userAgent);
2378
    InspectorInstrumentation::applyUserAgentOverride(&m_frame, &userAgent);
Lines 2539-2545 void FrameLoader::loadPostRequest(const ResourceRequest& inRequest, const String a/Source/WebCore/loader/FrameLoader.cpp_sec29
2539
    // bunch of parameters that would come in here and then be built back up to a ResourceRequest.  In case
2539
    // bunch of parameters that would come in here and then be built back up to a ResourceRequest.  In case
2540
    // any caller depends on the immutability of the original ResourceRequest, I'm rebuilding a ResourceRequest
2540
    // any caller depends on the immutability of the original ResourceRequest, I'm rebuilding a ResourceRequest
2541
    // from scratch as it did all along.
2541
    // from scratch as it did all along.
2542
    const KURL& url = inRequest.url();
2542
    const URL& url = inRequest.url();
2543
    RefPtr<FormData> formData = inRequest.httpBody();
2543
    RefPtr<FormData> formData = inRequest.httpBody();
2544
    const String& contentType = inRequest.httpContentType();
2544
    const String& contentType = inRequest.httpContentType();
2545
    String origin = inRequest.httpOrigin();
2545
    String origin = inRequest.httpOrigin();
Lines 2626-2632 void FrameLoader::receivedMainResourceError(const ResourceError& error) a/Source/WebCore/loader/FrameLoader.cpp_sec30
2626
2626
2627
    if (m_state == FrameStateProvisional && m_provisionalDocumentLoader) {
2627
    if (m_state == FrameStateProvisional && m_provisionalDocumentLoader) {
2628
        if (m_submittedFormURL == m_provisionalDocumentLoader->originalRequestCopy().url())
2628
        if (m_submittedFormURL == m_provisionalDocumentLoader->originalRequestCopy().url())
2629
            m_submittedFormURL = KURL();
2629
            m_submittedFormURL = URL();
2630
            
2630
            
2631
        // We might have made a page cache item, but now we're bailing out due to an error before we ever
2631
        // We might have made a page cache item, but now we're bailing out due to an error before we ever
2632
        // transitioned to the new page (before WebFrameState == commit).  The goal here is to restore any state
2632
        // transitioned to the new page (before WebFrameState == commit).  The goal here is to restore any state
Lines 2671-2677 void FrameLoader::continueFragmentScrollAfterNavigationPolicy(const ResourceRequ a/Source/WebCore/loader/FrameLoader.cpp_sec31
2671
    loadInSameDocument(request.url(), 0, !isRedirect);
2671
    loadInSameDocument(request.url(), 0, !isRedirect);
2672
}
2672
}
2673
2673
2674
bool FrameLoader::shouldPerformFragmentNavigation(bool isFormSubmission, const String& httpMethod, FrameLoadType loadType, const KURL& url)
2674
bool FrameLoader::shouldPerformFragmentNavigation(bool isFormSubmission, const String& httpMethod, FrameLoadType loadType, const URL& url)
2675
{
2675
{
2676
    // We don't do this if we are submitting a form with method other than "GET", explicitly reloading,
2676
    // We don't do this if we are submitting a form with method other than "GET", explicitly reloading,
2677
    // currently displaying a frameset, or if the URL does not have a fragment.
2677
    // currently displaying a frameset, or if the URL does not have a fragment.
Lines 2689-2695 bool FrameLoader::shouldPerformFragmentNavigation(bool isFormSubmission, const S a/Source/WebCore/loader/FrameLoader.cpp_sec32
2689
        && !m_frame.document()->isFrameSet();
2689
        && !m_frame.document()->isFrameSet();
2690
}
2690
}
2691
2691
2692
void FrameLoader::scrollToFragmentWithParentBoundary(const KURL& url)
2692
void FrameLoader::scrollToFragmentWithParentBoundary(const URL& url)
2693
{
2693
{
2694
    FrameView* view = m_frame.view();
2694
    FrameView* view = m_frame.view();
2695
    if (!view)
2695
    if (!view)
Lines 2745-2751 bool FrameLoader::shouldClose() a/Source/WebCore/loader/FrameLoader.cpp_sec33
2745
    }
2745
    }
2746
2746
2747
    if (!shouldClose)
2747
    if (!shouldClose)
2748
        m_submittedFormURL = KURL();
2748
        m_submittedFormURL = URL();
2749
2749
2750
    m_currentNavigationHasShownBeforeUnloadConfirmPanel = false;
2750
    m_currentNavigationHasShownBeforeUnloadConfirmPanel = false;
2751
    return shouldClose;
2751
    return shouldClose;
Lines 2977-2983 void FrameLoader::applyUserAgent(ResourceRequest& request) a/Source/WebCore/loader/FrameLoader.cpp_sec34
2977
    request.setHTTPUserAgent(userAgent);
2977
    request.setHTTPUserAgent(userAgent);
2978
}
2978
}
2979
2979
2980
bool FrameLoader::shouldInterruptLoadForXFrameOptions(const String& content, const KURL& url, unsigned long requestIdentifier)
2980
bool FrameLoader::shouldInterruptLoadForXFrameOptions(const String& content, const URL& url, unsigned long requestIdentifier)
2981
{
2981
{
2982
    FeatureObserver::observe(m_frame.document(), FeatureObserver::XFrameOptions);
2982
    FeatureObserver::observe(m_frame.document(), FeatureObserver::XFrameOptions);
2983
2983
Lines 3035-3048 void FrameLoader::loadProvisionalItemFromCachedPage() a/Source/WebCore/loader/FrameLoader.cpp_sec35
3035
    commitProvisionalLoad();
3035
    commitProvisionalLoad();
3036
}
3036
}
3037
3037
3038
bool FrameLoader::shouldTreatURLAsSameAsCurrent(const KURL& url) const
3038
bool FrameLoader::shouldTreatURLAsSameAsCurrent(const URL& url) const
3039
{
3039
{
3040
    if (!history().currentItem())
3040
    if (!history().currentItem())
3041
        return false;
3041
        return false;
3042
    return url == history().currentItem()->url() || url == history().currentItem()->originalURL();
3042
    return url == history().currentItem()->url() || url == history().currentItem()->originalURL();
3043
}
3043
}
3044
3044
3045
bool FrameLoader::shouldTreatURLAsSrcdocDocument(const KURL& url) const
3045
bool FrameLoader::shouldTreatURLAsSrcdocDocument(const URL& url) const
3046
{
3046
{
3047
    if (!equalIgnoringCase(url.string(), "about:srcdoc"))
3047
    if (!equalIgnoringCase(url.string(), "about:srcdoc"))
3048
        return false;
3048
        return false;
Lines 3131-3139 void FrameLoader::loadDifferentDocumentItem(HistoryItem* item, FrameLoadType loa a/Source/WebCore/loader/FrameLoader.cpp_sec36
3131
        return;
3131
        return;
3132
    }
3132
    }
3133
3133
3134
    KURL itemURL = item->url();
3134
    URL itemURL = item->url();
3135
    KURL itemOriginalURL = item->originalURL();
3135
    URL itemOriginalURL = item->originalURL();
3136
    KURL currentURL;
3136
    URL currentURL;
3137
    if (documentLoader())
3137
    if (documentLoader())
3138
        currentURL = documentLoader()->url();
3138
        currentURL = documentLoader()->url();
3139
    RefPtr<FormData> formData = item->formData();
3139
    RefPtr<FormData> formData = item->formData();
- a/Source/WebCore/loader/FrameLoader.h -23 / +23 lines
Lines 103-109 public: a/Source/WebCore/loader/FrameLoader.h_sec1
103
    void setupForReplace();
103
    void setupForReplace();
104
104
105
    // FIXME: These are all functions which start loads. We have too many.
105
    // FIXME: These are all functions which start loads. We have too many.
106
    void loadURLIntoChildFrame(const KURL&, const String& referer, Frame*);
106
    void loadURLIntoChildFrame(const URL&, const String& referer, Frame*);
107
    void loadFrameRequest(const FrameLoadRequest&, bool lockHistory, bool lockBackForwardList,  // Called by submitForm, calls loadPostRequest and loadURL.
107
    void loadFrameRequest(const FrameLoadRequest&, bool lockHistory, bool lockBackForwardList,  // Called by submitForm, calls loadPostRequest and loadURL.
108
        PassRefPtr<Event>, PassRefPtr<FormState>, ShouldSendReferrer);
108
        PassRefPtr<Event>, PassRefPtr<FormState>, ShouldSendReferrer);
109
109
Lines 114-126 public: a/Source/WebCore/loader/FrameLoader.h_sec2
114
#endif
114
#endif
115
    unsigned long loadResourceSynchronously(const ResourceRequest&, StoredCredentials, ClientCredentialPolicy, ResourceError&, ResourceResponse&, Vector<char>& data);
115
    unsigned long loadResourceSynchronously(const ResourceRequest&, StoredCredentials, ClientCredentialPolicy, ResourceError&, ResourceResponse&, Vector<char>& data);
116
116
117
    void changeLocation(SecurityOrigin*, const KURL&, const String& referrer, bool lockHistory = true, bool lockBackForwardList = true, bool refresh = false);
117
    void changeLocation(SecurityOrigin*, const URL&, const String& referrer, bool lockHistory = true, bool lockBackForwardList = true, bool refresh = false);
118
    void urlSelected(const KURL&, const String& target, PassRefPtr<Event>, bool lockHistory, bool lockBackForwardList, ShouldSendReferrer);
118
    void urlSelected(const URL&, const String& target, PassRefPtr<Event>, bool lockHistory, bool lockBackForwardList, ShouldSendReferrer);
119
    void submitForm(PassRefPtr<FormSubmission>);
119
    void submitForm(PassRefPtr<FormSubmission>);
120
120
121
    void reload(bool endToEndReload = false);
121
    void reload(bool endToEndReload = false);
122
    void reloadWithOverrideEncoding(const String& overrideEncoding);
122
    void reloadWithOverrideEncoding(const String& overrideEncoding);
123
    void reloadWithOverrideURL(const KURL& overrideUrl, bool endToEndReload = false);
123
    void reloadWithOverrideURL(const URL& overrideUrl, bool endToEndReload = false);
124
124
125
    void open(CachedFrameBase&);
125
    void open(CachedFrameBase&);
126
    void loadItem(HistoryItem*, FrameLoadType);
126
    void loadItem(HistoryItem*, FrameLoadType);
Lines 159-165 public: a/Source/WebCore/loader/FrameLoader.h_sec3
159
    const ResourceRequest& initialRequest() const;
159
    const ResourceRequest& initialRequest() const;
160
    void receivedMainResourceError(const ResourceError&);
160
    void receivedMainResourceError(const ResourceError&);
161
161
162
    bool willLoadMediaElementURL(KURL&);
162
    bool willLoadMediaElementURL(URL&);
163
163
164
    void handleFallbackContent();
164
    void handleFallbackContent();
165
165
Lines 175-181 public: a/Source/WebCore/loader/FrameLoader.h_sec4
175
    void didChangeTitle(DocumentLoader*);
175
    void didChangeTitle(DocumentLoader*);
176
    void didChangeIcons(IconType);
176
    void didChangeIcons(IconType);
177
177
178
    bool shouldTreatURLAsSrcdocDocument(const KURL&) const;
178
    bool shouldTreatURLAsSrcdocDocument(const URL&) const;
179
179
180
    FrameLoadType loadType() const;
180
    FrameLoadType loadType() const;
181
181
Lines 208-214 public: a/Source/WebCore/loader/FrameLoader.h_sec5
208
    void receivedFirstData();
208
    void receivedFirstData();
209
209
210
    void handledOnloadEvents();
210
    void handledOnloadEvents();
211
    String userAgent(const KURL&) const;
211
    String userAgent(const URL&) const;
212
212
213
    void dispatchDidClearWindowObjectInWorld(DOMWrapperWorld*);
213
    void dispatchDidClearWindowObjectInWorld(DOMWrapperWorld*);
214
    void dispatchDidClearWindowObjectsInAllWorlds();
214
    void dispatchDidClearWindowObjectsInAllWorlds();
Lines 219-225 public: a/Source/WebCore/loader/FrameLoader.h_sec6
219
    void forceSandboxFlags(SandboxFlags flags) { m_forcedSandboxFlags |= flags; }
219
    void forceSandboxFlags(SandboxFlags flags) { m_forcedSandboxFlags |= flags; }
220
    SandboxFlags effectiveSandboxFlags() const;
220
    SandboxFlags effectiveSandboxFlags() const;
221
221
222
    bool checkIfFormActionAllowedByCSP(const KURL&) const;
222
    bool checkIfFormActionAllowedByCSP(const URL&) const;
223
223
224
    Frame* opener();
224
    Frame* opener();
225
    void setOpener(Frame*);
225
    void setOpener(Frame*);
Lines 230-236 public: a/Source/WebCore/loader/FrameLoader.h_sec7
230
230
231
    void frameDetached();
231
    void frameDetached();
232
232
233
    void setOutgoingReferrer(const KURL&);
233
    void setOutgoingReferrer(const URL&);
234
234
235
    void loadDone();
235
    void loadDone();
236
    void finishedParsing();
236
    void finishedParsing();
Lines 248-258 public: a/Source/WebCore/loader/FrameLoader.h_sec8
248
248
249
    void applyUserAgent(ResourceRequest&);
249
    void applyUserAgent(ResourceRequest&);
250
250
251
    bool shouldInterruptLoadForXFrameOptions(const String&, const KURL&, unsigned long requestIdentifier);
251
    bool shouldInterruptLoadForXFrameOptions(const String&, const URL&, unsigned long requestIdentifier);
252
252
253
    void completed();
253
    void completed();
254
    bool allAncestorsAreComplete() const; // including this
254
    bool allAncestorsAreComplete() const; // including this
255
    void clientRedirected(const KURL&, double delay, double fireDate, bool lockBackForwardList);
255
    void clientRedirected(const URL&, double delay, double fireDate, bool lockBackForwardList);
256
    void clientRedirectCancelledOrFinished(bool cancelWithLoadInProgress);
256
    void clientRedirectCancelledOrFinished(bool cancelWithLoadInProgress);
257
257
258
    // FIXME: This is public because this asynchronous callback from the FrameLoaderClient
258
    // FIXME: This is public because this asynchronous callback from the FrameLoaderClient
Lines 264-270 public: a/Source/WebCore/loader/FrameLoader.h_sec9
264
264
265
    bool suppressOpenerInNewFrame() const { return m_suppressOpenerInNewFrame; }
265
    bool suppressOpenerInNewFrame() const { return m_suppressOpenerInNewFrame; }
266
266
267
    static ObjectContentType defaultObjectContentType(const KURL&, const String& mimeType, bool shouldPreferPlugInsForImages);
267
    static ObjectContentType defaultObjectContentType(const URL&, const String& mimeType, bool shouldPreferPlugInsForImages);
268
268
269
    bool quickRedirectComing() const { return m_quickRedirectComing; }
269
    bool quickRedirectComing() const { return m_quickRedirectComing; }
270
270
Lines 284-290 public: a/Source/WebCore/loader/FrameLoader.h_sec10
284
284
285
    void loadProgressingStatusChanged();
285
    void loadProgressingStatusChanged();
286
286
287
    const KURL& previousURL() const { return m_previousURL; }
287
    const URL& previousURL() const { return m_previousURL; }
288
288
289
    void forcePageTransitionIfNeeded();
289
    void forcePageTransitionIfNeeded();
290
290
Lines 304-310 private: a/Source/WebCore/loader/FrameLoader.h_sec11
304
    void loadProvisionalItemFromCachedPage();
304
    void loadProvisionalItemFromCachedPage();
305
305
306
    void updateFirstPartyForCookies();
306
    void updateFirstPartyForCookies();
307
    void setFirstPartyForCookies(const KURL&);
307
    void setFirstPartyForCookies(const URL&);
308
    
308
    
309
    void addExtraFieldsToRequest(ResourceRequest&, FrameLoadType, bool isMainResource);
309
    void addExtraFieldsToRequest(ResourceRequest&, FrameLoadType, bool isMainResource);
310
310
Lines 312-318 private: a/Source/WebCore/loader/FrameLoader.h_sec12
312
    void transitionToCommitted(CachedPage*);
312
    void transitionToCommitted(CachedPage*);
313
    void frameLoadCompleted();
313
    void frameLoadCompleted();
314
314
315
    SubstituteData defaultSubstituteDataForURL(const KURL&);
315
    SubstituteData defaultSubstituteDataForURL(const URL&);
316
316
317
    static void callContinueLoadAfterNavigationPolicy(void*, const ResourceRequest&, PassRefPtr<FormState>, bool shouldContinue);
317
    static void callContinueLoadAfterNavigationPolicy(void*, const ResourceRequest&, PassRefPtr<FormState>, bool shouldContinue);
318
    static void callContinueLoadAfterNewWindowPolicy(void*, const ResourceRequest&, PassRefPtr<FormState>, const String& frameName, const NavigationAction&, bool shouldContinue);
318
    static void callContinueLoadAfterNewWindowPolicy(void*, const ResourceRequest&, PassRefPtr<FormState>, const String& frameName, const NavigationAction&, bool shouldContinue);
Lines 324-331 private: a/Source/WebCore/loader/FrameLoader.h_sec13
324
    void continueLoadAfterNewWindowPolicy(const ResourceRequest&, PassRefPtr<FormState>, const String& frameName, const NavigationAction&, bool shouldContinue);
324
    void continueLoadAfterNewWindowPolicy(const ResourceRequest&, PassRefPtr<FormState>, const String& frameName, const NavigationAction&, bool shouldContinue);
325
    void continueFragmentScrollAfterNavigationPolicy(const ResourceRequest&, bool shouldContinue);
325
    void continueFragmentScrollAfterNavigationPolicy(const ResourceRequest&, bool shouldContinue);
326
326
327
    bool shouldPerformFragmentNavigation(bool isFormSubmission, const String& httpMethod, FrameLoadType, const KURL&);
327
    bool shouldPerformFragmentNavigation(bool isFormSubmission, const String& httpMethod, FrameLoadType, const URL&);
328
    void scrollToFragmentWithParentBoundary(const KURL&);
328
    void scrollToFragmentWithParentBoundary(const URL&);
329
329
330
    void checkLoadCompleteForThisFrame();
330
    void checkLoadCompleteForThisFrame();
331
331
Lines 352-370 private: a/Source/WebCore/loader/FrameLoader.h_sec14
352
352
353
    void loadPostRequest(const ResourceRequest&, const String& referrer,                // Called by loadFrameRequest, calls loadWithNavigationAction
353
    void loadPostRequest(const ResourceRequest&, const String& referrer,                // Called by loadFrameRequest, calls loadWithNavigationAction
354
        const String& frameName, bool lockHistory, FrameLoadType, PassRefPtr<Event>, PassRefPtr<FormState>);
354
        const String& frameName, bool lockHistory, FrameLoadType, PassRefPtr<Event>, PassRefPtr<FormState>);
355
    void loadURL(const KURL&, const String& referrer, const String& frameName,          // Called by loadFrameRequest, calls loadWithNavigationAction or dispatches to navigation policy delegate
355
    void loadURL(const URL&, const String& referrer, const String& frameName,          // Called by loadFrameRequest, calls loadWithNavigationAction or dispatches to navigation policy delegate
356
        bool lockHistory, FrameLoadType, PassRefPtr<Event>, PassRefPtr<FormState>);                                                         
356
        bool lockHistory, FrameLoadType, PassRefPtr<Event>, PassRefPtr<FormState>);                                                         
357
357
358
    void reloadWithRequest(const ResourceRequest&, bool endToEndReload);
358
    void reloadWithRequest(const ResourceRequest&, bool endToEndReload);
359
359
360
    bool shouldReload(const KURL& currentURL, const KURL& destinationURL);
360
    bool shouldReload(const URL& currentURL, const URL& destinationURL);
361
361
362
    void requestFromDelegate(ResourceRequest&, unsigned long& identifier, ResourceError&);
362
    void requestFromDelegate(ResourceRequest&, unsigned long& identifier, ResourceError&);
363
363
364
    void detachChildren();
364
    void detachChildren();
365
    void closeAndRemoveChild(Frame*);
365
    void closeAndRemoveChild(Frame*);
366
366
367
    void loadInSameDocument(const KURL&, PassRefPtr<SerializedScriptValue> stateObject, bool isNewNavigation);
367
    void loadInSameDocument(const URL&, PassRefPtr<SerializedScriptValue> stateObject, bool isNewNavigation);
368
368
369
    void prepareForLoadStart();
369
    void prepareForLoadStart();
370
    void provisionalLoadStarted();
370
    void provisionalLoadStarted();
Lines 376-382 private: a/Source/WebCore/loader/FrameLoader.h_sec15
376
    void scheduleCheckLoadComplete();
376
    void scheduleCheckLoadComplete();
377
    void startCheckCompleteTimer();
377
    void startCheckCompleteTimer();
378
378
379
    bool shouldTreatURLAsSameAsCurrent(const KURL&) const;
379
    bool shouldTreatURLAsSameAsCurrent(const URL&) const;
380
380
381
    void dispatchGlobalObjectAvailableInAllWorlds();
381
    void dispatchGlobalObjectAvailableInAllWorlds();
382
382
Lines 427-433 private: a/Source/WebCore/loader/FrameLoader.h_sec16
427
427
428
    bool m_needsClear;
428
    bool m_needsClear;
429
429
430
    KURL m_submittedFormURL;
430
    URL m_submittedFormURL;
431
431
432
    Timer<FrameLoader> m_checkTimer;
432
    Timer<FrameLoader> m_checkTimer;
433
    bool m_shouldCallCheckCompleted;
433
    bool m_shouldCallCheckCompleted;
Lines 446-452 private: a/Source/WebCore/loader/FrameLoader.h_sec17
446
446
447
    RefPtr<FrameNetworkingContext> m_networkingContext;
447
    RefPtr<FrameNetworkingContext> m_networkingContext;
448
448
449
    KURL m_previousURL;
449
    URL m_previousURL;
450
    RefPtr<HistoryItem> m_requestedHistoryItem;
450
    RefPtr<HistoryItem> m_requestedHistoryItem;
451
    OwnPtr<PageActivityAssertionToken> m_activityAssertion;
451
    OwnPtr<PageActivityAssertionToken> m_activityAssertion;
452
};
452
};
- a/Source/WebCore/loader/FrameLoaderClient.h -18 / +18 lines
Lines 76-82 namespace WebCore { a/Source/WebCore/loader/FrameLoaderClient.h_sec1
76
#endif
76
#endif
77
    class HTMLPlugInElement;
77
    class HTMLPlugInElement;
78
    class IntSize;
78
    class IntSize;
79
    class KURL;
79
    class URL;
80
    class MessageEvent;
80
    class MessageEvent;
81
    class NavigationAction;
81
    class NavigationAction;
82
    class Page;
82
    class Page;
Lines 140-146 namespace WebCore { a/Source/WebCore/loader/FrameLoaderClient.h_sec2
140
        virtual void dispatchDidHandleOnloadEvents() = 0;
140
        virtual void dispatchDidHandleOnloadEvents() = 0;
141
        virtual void dispatchDidReceiveServerRedirectForProvisionalLoad() = 0;
141
        virtual void dispatchDidReceiveServerRedirectForProvisionalLoad() = 0;
142
        virtual void dispatchDidCancelClientRedirect() = 0;
142
        virtual void dispatchDidCancelClientRedirect() = 0;
143
        virtual void dispatchWillPerformClientRedirect(const KURL&, double interval, double fireDate) = 0;
143
        virtual void dispatchWillPerformClientRedirect(const URL&, double interval, double fireDate) = 0;
144
        virtual void dispatchDidNavigateWithinPage() { }
144
        virtual void dispatchDidNavigateWithinPage() { }
145
        virtual void dispatchDidChangeLocationWithinPage() = 0;
145
        virtual void dispatchDidChangeLocationWithinPage() = 0;
146
        virtual void dispatchDidPushStateWithinPage() = 0;
146
        virtual void dispatchDidPushStateWithinPage() = 0;
Lines 214-221 namespace WebCore { a/Source/WebCore/loader/FrameLoaderClient.h_sec3
214
        // The indicated security origin has run active content (such as a
214
        // The indicated security origin has run active content (such as a
215
        // script) from an insecure source.  Note that the insecure content can
215
        // script) from an insecure source.  Note that the insecure content can
216
        // spread to other frames in the same origin.
216
        // spread to other frames in the same origin.
217
        virtual void didRunInsecureContent(SecurityOrigin*, const KURL&) = 0;
217
        virtual void didRunInsecureContent(SecurityOrigin*, const URL&) = 0;
218
        virtual void didDetectXSS(const KURL&, bool didBlockEntirePage) = 0;
218
        virtual void didDetectXSS(const URL&, bool didBlockEntirePage) = 0;
219
219
220
        virtual ResourceError cancelledError(const ResourceRequest&) = 0;
220
        virtual ResourceError cancelledError(const ResourceRequest&) = 0;
221
        virtual ResourceError blockedError(const ResourceRequest&) = 0;
221
        virtual ResourceError blockedError(const ResourceRequest&) = 0;
Lines 242-250 namespace WebCore { a/Source/WebCore/loader/FrameLoaderClient.h_sec4
242
        virtual void prepareForDataSourceReplacement() = 0;
242
        virtual void prepareForDataSourceReplacement() = 0;
243
243
244
        virtual PassRefPtr<DocumentLoader> createDocumentLoader(const ResourceRequest&, const SubstituteData&) = 0;
244
        virtual PassRefPtr<DocumentLoader> createDocumentLoader(const ResourceRequest&, const SubstituteData&) = 0;
245
        virtual void setTitle(const StringWithDirection&, const KURL&) = 0;
245
        virtual void setTitle(const StringWithDirection&, const URL&) = 0;
246
246
247
        virtual String userAgent(const KURL&) = 0;
247
        virtual String userAgent(const URL&) = 0;
248
        
248
        
249
        virtual void savePlatformDataToCachedFrame(CachedFrame*) = 0;
249
        virtual void savePlatformDataToCachedFrame(CachedFrame*) = 0;
250
        virtual void transitionToCommittedFromCachedFrame(CachedFrame*) = 0;
250
        virtual void transitionToCommittedFromCachedFrame(CachedFrame*) = 0;
Lines 258-278 namespace WebCore { a/Source/WebCore/loader/FrameLoaderClient.h_sec5
258
        virtual bool canCachePage() const = 0;
258
        virtual bool canCachePage() const = 0;
259
        virtual void convertMainResourceLoadToDownload(DocumentLoader*, const ResourceRequest&, const ResourceResponse&) = 0;
259
        virtual void convertMainResourceLoadToDownload(DocumentLoader*, const ResourceRequest&, const ResourceResponse&) = 0;
260
260
261
        virtual PassRefPtr<Frame> createFrame(const KURL& url, const String& name, HTMLFrameOwnerElement* ownerElement, const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight) = 0;
261
        virtual PassRefPtr<Frame> createFrame(const URL& url, const String& name, HTMLFrameOwnerElement* ownerElement, const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight) = 0;
262
        virtual PassRefPtr<Widget> createPlugin(const IntSize&, HTMLPlugInElement*, const KURL&, const Vector<String>&, const Vector<String>&, const String&, bool loadManually) = 0;
262
        virtual PassRefPtr<Widget> createPlugin(const IntSize&, HTMLPlugInElement*, const URL&, const Vector<String>&, const Vector<String>&, const String&, bool loadManually) = 0;
263
        virtual void recreatePlugin(Widget*) = 0;
263
        virtual void recreatePlugin(Widget*) = 0;
264
        virtual void redirectDataToPlugin(Widget* pluginWidget) = 0;
264
        virtual void redirectDataToPlugin(Widget* pluginWidget) = 0;
265
265
266
        virtual PassRefPtr<Widget> createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const KURL& baseURL, const Vector<String>& paramNames, const Vector<String>& paramValues) = 0;
266
        virtual PassRefPtr<Widget> createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const URL& baseURL, const Vector<String>& paramNames, const Vector<String>& paramValues) = 0;
267
267
268
        virtual void dispatchDidFailToStartPlugin(const PluginView*) const { }
268
        virtual void dispatchDidFailToStartPlugin(const PluginView*) const { }
269
#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
269
#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
270
        virtual PassRefPtr<Widget> createMediaPlayerProxyPlugin(const IntSize&, HTMLMediaElement*, const KURL&, const Vector<String>&, const Vector<String>&, const String&) = 0;
270
        virtual PassRefPtr<Widget> createMediaPlayerProxyPlugin(const IntSize&, HTMLMediaElement*, const URL&, const Vector<String>&, const Vector<String>&, const String&) = 0;
271
        virtual void hideMediaPlayerProxyPlugin(Widget*) = 0;
271
        virtual void hideMediaPlayerProxyPlugin(Widget*) = 0;
272
        virtual void showMediaPlayerProxyPlugin(Widget*) = 0;
272
        virtual void showMediaPlayerProxyPlugin(Widget*) = 0;
273
#endif
273
#endif
274
274
275
        virtual ObjectContentType objectContentType(const KURL&, const String& mimeType, bool shouldPreferPlugInsForImages) = 0;
275
        virtual ObjectContentType objectContentType(const URL&, const String& mimeType, bool shouldPreferPlugInsForImages) = 0;
276
        virtual String overrideMediaType() const = 0;
276
        virtual String overrideMediaType() const = 0;
277
277
278
        virtual void dispatchDidClearWindowObjectInWorld(DOMWrapperWorld*) = 0;
278
        virtual void dispatchDidClearWindowObjectInWorld(DOMWrapperWorld*) = 0;
Lines 294-309 namespace WebCore { a/Source/WebCore/loader/FrameLoaderClient.h_sec6
294
#endif
294
#endif
295
295
296
        virtual bool shouldAlwaysUsePluginDocument(const String& /*mimeType*/) const { return false; }
296
        virtual bool shouldAlwaysUsePluginDocument(const String& /*mimeType*/) const { return false; }
297
        virtual bool shouldLoadMediaElementURL(const KURL&) const { return true; }
297
        virtual bool shouldLoadMediaElementURL(const URL&) const { return true; }
298
298
299
        virtual void didChangeScrollOffset() { }
299
        virtual void didChangeScrollOffset() { }
300
300
301
        virtual bool allowScript(bool enabledPerSettings) { return enabledPerSettings; }
301
        virtual bool allowScript(bool enabledPerSettings) { return enabledPerSettings; }
302
        virtual bool allowScriptFromSource(bool enabledPerSettings, const KURL&) { return enabledPerSettings; }
302
        virtual bool allowScriptFromSource(bool enabledPerSettings, const URL&) { return enabledPerSettings; }
303
        virtual bool allowPlugins(bool enabledPerSettings) { return enabledPerSettings; }
303
        virtual bool allowPlugins(bool enabledPerSettings) { return enabledPerSettings; }
304
        virtual bool allowImage(bool enabledPerSettings, const KURL&) { return enabledPerSettings; }
304
        virtual bool allowImage(bool enabledPerSettings, const URL&) { return enabledPerSettings; }
305
        virtual bool allowDisplayingInsecureContent(bool enabledPerSettings, SecurityOrigin*, const KURL&) { return enabledPerSettings; }
305
        virtual bool allowDisplayingInsecureContent(bool enabledPerSettings, SecurityOrigin*, const URL&) { return enabledPerSettings; }
306
        virtual bool allowRunningInsecureContent(bool enabledPerSettings, SecurityOrigin*, const KURL&) { return enabledPerSettings; }
306
        virtual bool allowRunningInsecureContent(bool enabledPerSettings, SecurityOrigin*, const URL&) { return enabledPerSettings; }
307
307
308
        // This callback notifies the client that the frame was about to run
308
        // This callback notifies the client that the frame was about to run
309
        // JavaScript but did not because allowScript returned false. We
309
        // JavaScript but did not because allowScript returned false. We
Lines 315-325 namespace WebCore { a/Source/WebCore/loader/FrameLoaderClient.h_sec7
315
        virtual void didNotAllowPlugins() { }
315
        virtual void didNotAllowPlugins() { }
316
316
317
        // Clients that generally disallow universal access can make exceptions for particular URLs.
317
        // Clients that generally disallow universal access can make exceptions for particular URLs.
318
        virtual bool shouldForceUniversalAccessFromLocalURL(const KURL&) { return false; }
318
        virtual bool shouldForceUniversalAccessFromLocalURL(const URL&) { return false; }
319
319
320
        virtual PassRefPtr<FrameNetworkingContext> createNetworkingContext() = 0;
320
        virtual PassRefPtr<FrameNetworkingContext> createNetworkingContext() = 0;
321
321
322
        virtual bool shouldPaintBrokenImage(const KURL&) const { return true; }
322
        virtual bool shouldPaintBrokenImage(const URL&) const { return true; }
323
323
324
        // Returns true if the embedder intercepted the postMessage call
324
        // Returns true if the embedder intercepted the postMessage call
325
        virtual bool willCheckAndDispatchMessageEvent(SecurityOrigin* /*target*/, MessageEvent*) const { return false; }
325
        virtual bool willCheckAndDispatchMessageEvent(SecurityOrigin* /*target*/, MessageEvent*) const { return false; }
- a/Source/WebCore/loader/HistoryController.cpp -9 / +9 lines
Lines 54-60 a/Source/WebCore/loader/HistoryController.cpp_sec1
54
54
55
namespace WebCore {
55
namespace WebCore {
56
56
57
static inline void addVisitedLink(Page* page, const KURL& url)
57
static inline void addVisitedLink(Page* page, const URL& url)
58
{
58
{
59
    platformStrategies()->visitedLinkStrategy()->addVisitedLink(page, visitedLinkHash(url.string()));
59
    platformStrategies()->visitedLinkStrategy()->addVisitedLink(page, visitedLinkHash(url.string()));
60
}
60
}
Lines 347-353 void HistoryController::updateForStandardLoad(HistoryUpdateType updateType) a/Source/WebCore/loader/HistoryController.cpp_sec2
347
    FrameLoader& frameLoader = m_frame.loader();
347
    FrameLoader& frameLoader = m_frame.loader();
348
348
349
    bool needPrivacy = m_frame.settings().privateBrowsingEnabled();
349
    bool needPrivacy = m_frame.settings().privateBrowsingEnabled();
350
    const KURL& historyURL = frameLoader.documentLoader()->urlForHistory();
350
    const URL& historyURL = frameLoader.documentLoader()->urlForHistory();
351
351
352
    if (!frameLoader.documentLoader()->isClientRedirect()) {
352
    if (!frameLoader.documentLoader()->isClientRedirect()) {
353
        if (!historyURL.isEmpty()) {
353
        if (!historyURL.isEmpty()) {
Lines 384-390 void HistoryController::updateForRedirectWithLockedBackForwardList() a/Source/WebCore/loader/HistoryController.cpp_sec3
384
#endif
384
#endif
385
    
385
    
386
    bool needPrivacy = m_frame.settings().privateBrowsingEnabled();
386
    bool needPrivacy = m_frame.settings().privateBrowsingEnabled();
387
    const KURL& historyURL = m_frame.loader().documentLoader()->urlForHistory();
387
    const URL& historyURL = m_frame.loader().documentLoader()->urlForHistory();
388
388
389
    if (m_frame.loader().documentLoader()->isClientRedirect()) {
389
    if (m_frame.loader().documentLoader()->isClientRedirect()) {
390
        if (!m_currentItem && !m_frame.tree().parent()) {
390
        if (!m_currentItem && !m_frame.tree().parent()) {
Lines 432-438 void HistoryController::updateForClientRedirect() a/Source/WebCore/loader/HistoryController.cpp_sec4
432
    }
432
    }
433
433
434
    bool needPrivacy = m_frame.settings().privateBrowsingEnabled();
434
    bool needPrivacy = m_frame.settings().privateBrowsingEnabled();
435
    const KURL& historyURL = m_frame.loader().documentLoader()->urlForHistory();
435
    const URL& historyURL = m_frame.loader().documentLoader()->urlForHistory();
436
436
437
    if (!historyURL.isEmpty() && !needPrivacy) {
437
    if (!historyURL.isEmpty() && !needPrivacy) {
438
        if (Page* page = m_frame.page())
438
        if (Page* page = m_frame.page())
Lines 603-612 void HistoryController::initializeItem(HistoryItem* item) a/Source/WebCore/loader/HistoryController.cpp_sec5
603
    DocumentLoader* documentLoader = m_frame.loader().documentLoader();
603
    DocumentLoader* documentLoader = m_frame.loader().documentLoader();
604
    ASSERT(documentLoader);
604
    ASSERT(documentLoader);
605
605
606
    KURL unreachableURL = documentLoader->unreachableURL();
606
    URL unreachableURL = documentLoader->unreachableURL();
607
607
608
    KURL url;
608
    URL url;
609
    KURL originalURL;
609
    URL originalURL;
610
610
611
    if (!unreachableURL.isEmpty()) {
611
    if (!unreachableURL.isEmpty()) {
612
        url = unreachableURL;
612
        url = unreachableURL;
Lines 852-858 void HistoryController::pushState(PassRefPtr<SerializedScriptValue> stateObject, a/Source/WebCore/loader/HistoryController.cpp_sec6
852
    if (m_frame.settings().privateBrowsingEnabled())
852
    if (m_frame.settings().privateBrowsingEnabled())
853
        return;
853
        return;
854
854
855
    addVisitedLink(page, KURL(ParsedURLString, urlString));
855
    addVisitedLink(page, URL(ParsedURLString, urlString));
856
    m_frame.loader().client().updateGlobalHistory();
856
    m_frame.loader().client().updateGlobalHistory();
857
857
858
}
858
}
Lines 873-879 void HistoryController::replaceState(PassRefPtr<SerializedScriptValue> stateObje a/Source/WebCore/loader/HistoryController.cpp_sec7
873
        return;
873
        return;
874
874
875
    ASSERT(m_frame.page());
875
    ASSERT(m_frame.page());
876
    addVisitedLink(m_frame.page(), KURL(ParsedURLString, urlString));
876
    addVisitedLink(m_frame.page(), URL(ParsedURLString, urlString));
877
    m_frame.loader().client().updateGlobalHistory();
877
    m_frame.loader().client().updateGlobalHistory();
878
}
878
}
879
879
- a/Source/WebCore/loader/LinkLoader.cpp -2 / +1 lines
Lines 85-92 void LinkLoader::notifyFinished(CachedResource* resource) a/Source/WebCore/loader/LinkLoader.cpp_sec1
85
    m_cachedLinkResource = 0;
85
    m_cachedLinkResource = 0;
86
}
86
}
87
87
88
bool LinkLoader::loadLink(const LinkRelAttribute& relAttribute, const String& type,
88
bool LinkLoader::loadLink(const LinkRelAttribute& relAttribute, const String& type, const String& sizes, const URL& href, Document* document)
89
                          const String& sizes, const KURL& href, Document* document)
90
{
89
{
91
    // We'll record this URL per document, even if we later only use it in top level frames
90
    // We'll record this URL per document, even if we later only use it in top level frames
92
    if (relAttribute.m_iconType != InvalidIcon && href.isValid() && !href.isEmpty()) {
91
    if (relAttribute.m_iconType != InvalidIcon && href.isValid() && !href.isEmpty()) {
- a/Source/WebCore/loader/LinkLoader.h -2 / +2 lines
Lines 42-48 a/Source/WebCore/loader/LinkLoader.h_sec1
42
namespace WebCore {
42
namespace WebCore {
43
43
44
class Document;
44
class Document;
45
class KURL;
45
class URL;
46
struct LinkRelAttribute;
46
struct LinkRelAttribute;
47
47
48
// The LinkLoader can load link rel types icon, dns-prefetch, subresource and prefetch.
48
// The LinkLoader can load link rel types icon, dns-prefetch, subresource and prefetch.
Lines 56-62 public: a/Source/WebCore/loader/LinkLoader.h_sec2
56
    virtual void notifyFinished(CachedResource*);
56
    virtual void notifyFinished(CachedResource*);
57
57
58
    void released();
58
    void released();
59
    bool loadLink(const LinkRelAttribute&, const String& type, const String& sizes, const KURL&, Document*);
59
    bool loadLink(const LinkRelAttribute&, const String& type, const String& sizes, const URL&, Document*);
60
60
61
private:
61
private:
62
    void linkLoadTimerFired(Timer<LinkLoader>*);
62
    void linkLoadTimerFired(Timer<LinkLoader>*);
- a/Source/WebCore/loader/MixedContentChecker.cpp -4 / +4 lines
Lines 54-60 FrameLoaderClient& MixedContentChecker::client() const a/Source/WebCore/loader/MixedContentChecker.cpp_sec1
54
}
54
}
55
55
56
// static
56
// static
57
bool MixedContentChecker::isMixedContent(SecurityOrigin* securityOrigin, const KURL& url)
57
bool MixedContentChecker::isMixedContent(SecurityOrigin* securityOrigin, const URL& url)
58
{
58
{
59
    if (securityOrigin->protocol() != "https")
59
    if (securityOrigin->protocol() != "https")
60
        return false; // We only care about HTTPS security origins.
60
        return false; // We only care about HTTPS security origins.
Lines 63-69 bool MixedContentChecker::isMixedContent(SecurityOrigin* securityOrigin, const K a/Source/WebCore/loader/MixedContentChecker.cpp_sec2
63
    return !SecurityOrigin::isSecure(url);
63
    return !SecurityOrigin::isSecure(url);
64
}
64
}
65
65
66
bool MixedContentChecker::canDisplayInsecureContent(SecurityOrigin* securityOrigin, const KURL& url) const
66
bool MixedContentChecker::canDisplayInsecureContent(SecurityOrigin* securityOrigin, const URL& url) const
67
{
67
{
68
    if (!isMixedContent(securityOrigin, url))
68
    if (!isMixedContent(securityOrigin, url))
69
        return true;
69
        return true;
Lines 77-83 bool MixedContentChecker::canDisplayInsecureContent(SecurityOrigin* securityOrig a/Source/WebCore/loader/MixedContentChecker.cpp_sec3
77
    return allowed;
77
    return allowed;
78
}
78
}
79
79
80
bool MixedContentChecker::canRunInsecureContent(SecurityOrigin* securityOrigin, const KURL& url) const
80
bool MixedContentChecker::canRunInsecureContent(SecurityOrigin* securityOrigin, const URL& url) const
81
{
81
{
82
    if (!isMixedContent(securityOrigin, url))
82
    if (!isMixedContent(securityOrigin, url))
83
        return true;
83
        return true;
Lines 91-97 bool MixedContentChecker::canRunInsecureContent(SecurityOrigin* securityOrigin, a/Source/WebCore/loader/MixedContentChecker.cpp_sec4
91
    return allowed;
91
    return allowed;
92
}
92
}
93
93
94
void MixedContentChecker::logWarning(bool allowed, const String& action, const KURL& target) const
94
void MixedContentChecker::logWarning(bool allowed, const String& action, const URL& target) const
95
{
95
{
96
    String message = makeString((allowed ? "" : "[blocked] "), "The page at ", m_frame->document()->url().stringCenterEllipsizedToLength(), " ", action, " insecure content from ", target.stringCenterEllipsizedToLength(), ".\n");
96
    String message = makeString((allowed ? "" : "[blocked] "), "The page at ", m_frame->document()->url().stringCenterEllipsizedToLength(), " ", action, " insecure content from ", target.stringCenterEllipsizedToLength(), ".\n");
97
    m_frame->document()->addConsoleMessage(SecurityMessageSource, WarningMessageLevel, message);
97
    m_frame->document()->addConsoleMessage(SecurityMessageSource, WarningMessageLevel, message);
- a/Source/WebCore/loader/MixedContentChecker.h -5 / +5 lines
Lines 38-44 namespace WebCore { a/Source/WebCore/loader/MixedContentChecker.h_sec1
38
38
39
class Frame;
39
class Frame;
40
class FrameLoaderClient;
40
class FrameLoaderClient;
41
class KURL;
41
class URL;
42
class SecurityOrigin;
42
class SecurityOrigin;
43
43
44
class MixedContentChecker {
44
class MixedContentChecker {
Lines 46-60 class MixedContentChecker { a/Source/WebCore/loader/MixedContentChecker.h_sec2
46
public:
46
public:
47
    MixedContentChecker(Frame*);
47
    MixedContentChecker(Frame*);
48
48
49
    bool canDisplayInsecureContent(SecurityOrigin*, const KURL&) const;
49
    bool canDisplayInsecureContent(SecurityOrigin*, const URL&) const;
50
    bool canRunInsecureContent(SecurityOrigin*, const KURL&) const;
50
    bool canRunInsecureContent(SecurityOrigin*, const URL&) const;
51
    static bool isMixedContent(SecurityOrigin*, const KURL&);
51
    static bool isMixedContent(SecurityOrigin*, const URL&);
52
52
53
private:
53
private:
54
    // FIXME: This should probably have a separate client from FrameLoader.
54
    // FIXME: This should probably have a separate client from FrameLoader.
55
    FrameLoaderClient& client() const;
55
    FrameLoaderClient& client() const;
56
56
57
    void logWarning(bool allowed, const String& action, const KURL&) const;
57
    void logWarning(bool allowed, const String& action, const URL&) const;
58
58
59
    Frame* m_frame;
59
    Frame* m_frame;
60
};
60
};
- a/Source/WebCore/loader/NavigationAction.h -2 / +2 lines
Lines 31-37 a/Source/WebCore/loader/NavigationAction.h_sec1
31
31
32
#include "Event.h"
32
#include "Event.h"
33
#include "FrameLoaderTypes.h"
33
#include "FrameLoaderTypes.h"
34
#include "KURL.h"
34
#include "URL.h"
35
#include "ResourceRequest.h"
35
#include "ResourceRequest.h"
36
#include <wtf/Forward.h>
36
#include <wtf/Forward.h>
37
37
Lines 48-54 namespace WebCore { a/Source/WebCore/loader/NavigationAction.h_sec2
48
48
49
        bool isEmpty() const { return m_resourceRequest.url().isEmpty(); }
49
        bool isEmpty() const { return m_resourceRequest.url().isEmpty(); }
50
50
51
        KURL url() const { return m_resourceRequest.url(); }
51
        URL url() const { return m_resourceRequest.url(); }
52
        const ResourceRequest& resourceRequest() const { return m_resourceRequest; }
52
        const ResourceRequest& resourceRequest() const { return m_resourceRequest; }
53
53
54
        NavigationType type() const { return m_type; }
54
        NavigationType type() const { return m_type; }
- a/Source/WebCore/loader/NavigationScheduler.cpp -7 / +7 lines
Lines 109-115 protected: a/Source/WebCore/loader/NavigationScheduler.cpp_sec1
109
    virtual void fire(Frame* frame)
109
    virtual void fire(Frame* frame)
110
    {
110
    {
111
        UserGestureIndicator gestureIndicator(wasUserGesture() ? DefinitelyProcessingUserGesture : DefinitelyNotProcessingUserGesture);
111
        UserGestureIndicator gestureIndicator(wasUserGesture() ? DefinitelyProcessingUserGesture : DefinitelyNotProcessingUserGesture);
112
        frame->loader().changeLocation(m_securityOrigin.get(), KURL(ParsedURLString, m_url), m_referrer, lockHistory(), lockBackForwardList(), false);
112
        frame->loader().changeLocation(m_securityOrigin.get(), URL(ParsedURLString, m_url), m_referrer, lockHistory(), lockBackForwardList(), false);
113
    }
113
    }
114
114
115
    virtual void didStartTimer(Frame* frame, Timer<NavigationScheduler>* timer)
115
    virtual void didStartTimer(Frame* frame, Timer<NavigationScheduler>* timer)
Lines 119-125 protected: a/Source/WebCore/loader/NavigationScheduler.cpp_sec2
119
        m_haveToldClient = true;
119
        m_haveToldClient = true;
120
120
121
        UserGestureIndicator gestureIndicator(wasUserGesture() ? DefinitelyProcessingUserGesture : DefinitelyNotProcessingUserGesture);
121
        UserGestureIndicator gestureIndicator(wasUserGesture() ? DefinitelyProcessingUserGesture : DefinitelyNotProcessingUserGesture);
122
        frame->loader().clientRedirected(KURL(ParsedURLString, m_url), delay(), currentTime() + timer->nextFireInterval(), lockBackForwardList());
122
        frame->loader().clientRedirected(URL(ParsedURLString, m_url), delay(), currentTime() + timer->nextFireInterval(), lockBackForwardList());
123
    }
123
    }
124
124
125
    virtual void didStopTimer(Frame* frame, bool newLoadInProgress)
125
    virtual void didStopTimer(Frame* frame, bool newLoadInProgress)
Lines 160-167 public: a/Source/WebCore/loader/NavigationScheduler.cpp_sec3
160
    virtual void fire(Frame* frame)
160
    virtual void fire(Frame* frame)
161
    {
161
    {
162
        UserGestureIndicator gestureIndicator(wasUserGesture() ? DefinitelyProcessingUserGesture : DefinitelyNotProcessingUserGesture);
162
        UserGestureIndicator gestureIndicator(wasUserGesture() ? DefinitelyProcessingUserGesture : DefinitelyNotProcessingUserGesture);
163
        bool refresh = equalIgnoringFragmentIdentifier(frame->document()->url(), KURL(ParsedURLString, url()));
163
        bool refresh = equalIgnoringFragmentIdentifier(frame->document()->url(), URL(ParsedURLString, url()));
164
        frame->loader().changeLocation(securityOrigin(), KURL(ParsedURLString, url()), referrer(), lockHistory(), lockBackForwardList(), refresh);
164
        frame->loader().changeLocation(securityOrigin(), URL(ParsedURLString, url()), referrer(), lockHistory(), lockBackForwardList(), refresh);
165
    }
165
    }
166
};
166
};
167
167
Lines 181-187 public: a/Source/WebCore/loader/NavigationScheduler.cpp_sec4
181
    virtual void fire(Frame* frame)
181
    virtual void fire(Frame* frame)
182
    {
182
    {
183
        UserGestureIndicator gestureIndicator(wasUserGesture() ? DefinitelyProcessingUserGesture : DefinitelyNotProcessingUserGesture);
183
        UserGestureIndicator gestureIndicator(wasUserGesture() ? DefinitelyProcessingUserGesture : DefinitelyNotProcessingUserGesture);
184
        frame->loader().changeLocation(securityOrigin(), KURL(ParsedURLString, url()), referrer(), lockHistory(), lockBackForwardList(), true);
184
        frame->loader().changeLocation(securityOrigin(), URL(ParsedURLString, url()), referrer(), lockHistory(), lockBackForwardList(), true);
185
    }
185
    }
186
};
186
};
187
187
Lines 350-356 void NavigationScheduler::scheduleLocationChange(SecurityOrigin* securityOrigin, a/Source/WebCore/loader/NavigationScheduler.cpp_sec5
350
350
351
    // If the URL we're going to navigate to is the same as the current one, except for the
351
    // If the URL we're going to navigate to is the same as the current one, except for the
352
    // fragment part, we don't need to schedule the location change.
352
    // fragment part, we don't need to schedule the location change.
353
    KURL parsedURL(ParsedURLString, url);
353
    URL parsedURL(ParsedURLString, url);
354
    if (parsedURL.hasFragmentIdentifier() && equalIgnoringFragmentIdentifier(m_frame->document()->url(), parsedURL)) {
354
    if (parsedURL.hasFragmentIdentifier() && equalIgnoringFragmentIdentifier(m_frame->document()->url(), parsedURL)) {
355
        loader.changeLocation(securityOrigin, m_frame->document()->completeURL(url), referrer, lockHistory, lockBackForwardList);
355
        loader.changeLocation(securityOrigin, m_frame->document()->completeURL(url), referrer, lockHistory, lockBackForwardList);
356
        return;
356
        return;
Lines 388-394 void NavigationScheduler::scheduleRefresh() a/Source/WebCore/loader/NavigationScheduler.cpp_sec6
388
{
388
{
389
    if (!shouldScheduleNavigation())
389
    if (!shouldScheduleNavigation())
390
        return;
390
        return;
391
    const KURL& url = m_frame->document()->url();
391
    const URL& url = m_frame->document()->url();
392
    if (url.isEmpty())
392
    if (url.isEmpty())
393
        return;
393
        return;
394
394
- a/Source/WebCore/loader/PingLoader.cpp -3 / +3 lines
Lines 50-56 a/Source/WebCore/loader/PingLoader.cpp_sec1
50
50
51
namespace WebCore {
51
namespace WebCore {
52
52
53
void PingLoader::loadImage(Frame* frame, const KURL& url)
53
void PingLoader::loadImage(Frame* frame, const URL& url)
54
{
54
{
55
    if (!frame->document()->securityOrigin()->canDisplay(url)) {
55
    if (!frame->document()->securityOrigin()->canDisplay(url)) {
56
        FrameLoader::reportLocalLoadFailed(frame, url);
56
        FrameLoader::reportLocalLoadFailed(frame, url);
Lines 74-80 void PingLoader::loadImage(Frame* frame, const KURL& url) a/Source/WebCore/loader/PingLoader.cpp_sec2
74
}
74
}
75
75
76
// http://www.whatwg.org/specs/web-apps/current-work/multipage/links.html#hyperlink-auditing
76
// http://www.whatwg.org/specs/web-apps/current-work/multipage/links.html#hyperlink-auditing
77
void PingLoader::sendPing(Frame* frame, const KURL& pingURL, const KURL& destinationURL)
77
void PingLoader::sendPing(Frame* frame, const URL& pingURL, const URL& destinationURL)
78
{
78
{
79
    ResourceRequest request(pingURL);
79
    ResourceRequest request(pingURL);
80
#if PLATFORM(BLACKBERRY)
80
#if PLATFORM(BLACKBERRY)
Lines 105-111 void PingLoader::sendPing(Frame* frame, const KURL& pingURL, const KURL& destina a/Source/WebCore/loader/PingLoader.cpp_sec3
105
    UNUSED_PARAM(leakedPingLoader);
105
    UNUSED_PARAM(leakedPingLoader);
106
}
106
}
107
107
108
void PingLoader::sendViolationReport(Frame* frame, const KURL& reportURL, PassRefPtr<FormData> report)
108
void PingLoader::sendViolationReport(Frame* frame, const URL& reportURL, PassRefPtr<FormData> report)
109
{
109
{
110
    ResourceRequest request(reportURL);
110
    ResourceRequest request(reportURL);
111
#if PLATFORM(BLACKBERRY)
111
#if PLATFORM(BLACKBERRY)
- a/Source/WebCore/loader/PingLoader.h -4 / +4 lines
Lines 41-47 namespace WebCore { a/Source/WebCore/loader/PingLoader.h_sec1
41
41
42
class FormData;
42
class FormData;
43
class Frame;
43
class Frame;
44
class KURL;
44
class URL;
45
class ResourceError;
45
class ResourceError;
46
class ResourceHandle;
46
class ResourceHandle;
47
class ResourceResponse;
47
class ResourceResponse;
Lines 54-62 class ResourceResponse; a/Source/WebCore/loader/PingLoader.h_sec2
54
class PingLoader : private ResourceHandleClient {
54
class PingLoader : private ResourceHandleClient {
55
    WTF_MAKE_NONCOPYABLE(PingLoader); WTF_MAKE_FAST_ALLOCATED;
55
    WTF_MAKE_NONCOPYABLE(PingLoader); WTF_MAKE_FAST_ALLOCATED;
56
public:
56
public:
57
    static void loadImage(Frame*, const KURL& url);
57
    static void loadImage(Frame*, const URL& url);
58
    static void sendPing(Frame*, const KURL& pingURL, const KURL& destinationURL);
58
    static void sendPing(Frame*, const URL& pingURL, const URL& destinationURL);
59
    static void sendViolationReport(Frame*, const KURL& reportURL, PassRefPtr<FormData> report);
59
    static void sendViolationReport(Frame*, const URL& reportURL, PassRefPtr<FormData> report);
60
60
61
    virtual ~PingLoader();
61
    virtual ~PingLoader();
62
62
- a/Source/WebCore/loader/PlaceholderDocument.h -2 / +2 lines
Lines 32-38 namespace WebCore { a/Source/WebCore/loader/PlaceholderDocument.h_sec1
32
32
33
class PlaceholderDocument FINAL : public Document {
33
class PlaceholderDocument FINAL : public Document {
34
public:
34
public:
35
    static PassRefPtr<PlaceholderDocument> create(Frame* frame, const KURL& url)
35
    static PassRefPtr<PlaceholderDocument> create(Frame* frame, const URL& url)
36
    {
36
    {
37
        return adoptRef(new PlaceholderDocument(frame, url));
37
        return adoptRef(new PlaceholderDocument(frame, url));
38
    }
38
    }
Lines 40-46 public: a/Source/WebCore/loader/PlaceholderDocument.h_sec2
40
private:
40
private:
41
    virtual void createRenderTree() OVERRIDE;
41
    virtual void createRenderTree() OVERRIDE;
42
42
43
    PlaceholderDocument(Frame* frame, const KURL& url)
43
    PlaceholderDocument(Frame* frame, const URL& url)
44
        : Document(frame, url)
44
        : Document(frame, url)
45
    {
45
    {
46
    }
46
    }
- a/Source/WebCore/loader/ResourceLoadScheduler.cpp -3 / +3 lines
Lines 30-36 a/Source/WebCore/loader/ResourceLoadScheduler.cpp_sec1
30
#include "Frame.h"
30
#include "Frame.h"
31
#include "FrameLoader.h"
31
#include "FrameLoader.h"
32
#include "InspectorInstrumentation.h"
32
#include "InspectorInstrumentation.h"
33
#include "KURL.h"
33
#include "URL.h"
34
#include "LoaderStrategy.h"
34
#include "LoaderStrategy.h"
35
#include "Logging.h"
35
#include "Logging.h"
36
#include "NetscapePlugInStreamLoader.h"
36
#include "NetscapePlugInStreamLoader.h"
Lines 48-54 static const unsigned maxRequestsInFlightForNonHTTPProtocols = 20; a/Source/WebCore/loader/ResourceLoadScheduler.cpp_sec2
48
// Match the parallel connection count used by the networking layer.
48
// Match the parallel connection count used by the networking layer.
49
static unsigned maxRequestsInFlightPerHost;
49
static unsigned maxRequestsInFlightPerHost;
50
50
51
ResourceLoadScheduler::HostInformation* ResourceLoadScheduler::hostForURL(const KURL& url, CreateHostPolicy createHostPolicy)
51
ResourceLoadScheduler::HostInformation* ResourceLoadScheduler::hostForURL(const URL& url, CreateHostPolicy createHostPolicy)
52
{
52
{
53
    if (!url.protocolIsInHTTPFamily())
53
    if (!url.protocolIsInHTTPFamily())
54
        return m_nonHTTPProtocolHost;
54
        return m_nonHTTPProtocolHost;
Lines 160-166 void ResourceLoadScheduler::remove(ResourceLoader* resourceLoader) a/Source/WebCore/loader/ResourceLoadScheduler.cpp_sec3
160
    scheduleServePendingRequests();
160
    scheduleServePendingRequests();
161
}
161
}
162
162
163
void ResourceLoadScheduler::crossOriginRedirectReceived(ResourceLoader* resourceLoader, const KURL& redirectURL)
163
void ResourceLoadScheduler::crossOriginRedirectReceived(ResourceLoader* resourceLoader, const URL& redirectURL)
164
{
164
{
165
    HostInformation* oldHost = hostForURL(resourceLoader->url());
165
    HostInformation* oldHost = hostForURL(resourceLoader->url());
166
    ASSERT(oldHost);
166
    ASSERT(oldHost);
- a/Source/WebCore/loader/ResourceLoadScheduler.h -3 / +3 lines
Lines 38-44 namespace WebCore { a/Source/WebCore/loader/ResourceLoadScheduler.h_sec1
38
38
39
class CachedResource;
39
class CachedResource;
40
class Frame;
40
class Frame;
41
class KURL;
41
class URL;
42
class NetscapePlugInStreamLoader;
42
class NetscapePlugInStreamLoader;
43
class NetscapePlugInStreamLoaderClient;
43
class NetscapePlugInStreamLoaderClient;
44
class ResourceLoader;
44
class ResourceLoader;
Lines 53-59 public: a/Source/WebCore/loader/ResourceLoadScheduler.h_sec2
53
    virtual PassRefPtr<SubresourceLoader> scheduleSubresourceLoad(Frame*, CachedResource*, const ResourceRequest&, ResourceLoadPriority, const ResourceLoaderOptions&);
53
    virtual PassRefPtr<SubresourceLoader> scheduleSubresourceLoad(Frame*, CachedResource*, const ResourceRequest&, ResourceLoadPriority, const ResourceLoaderOptions&);
54
    virtual PassRefPtr<NetscapePlugInStreamLoader> schedulePluginStreamLoad(Frame*, NetscapePlugInStreamLoaderClient*, const ResourceRequest&);
54
    virtual PassRefPtr<NetscapePlugInStreamLoader> schedulePluginStreamLoad(Frame*, NetscapePlugInStreamLoaderClient*, const ResourceRequest&);
55
    virtual void remove(ResourceLoader*);
55
    virtual void remove(ResourceLoader*);
56
    virtual void crossOriginRedirectReceived(ResourceLoader*, const KURL& redirectURL);
56
    virtual void crossOriginRedirectReceived(ResourceLoader*, const URL& redirectURL);
57
    
57
    
58
    virtual void servePendingRequests(ResourceLoadPriority minimumPriority = ResourceLoadPriorityVeryLow);
58
    virtual void servePendingRequests(ResourceLoadPriority minimumPriority = ResourceLoadPriorityVeryLow);
59
    virtual void suspendPendingRequests();
59
    virtual void suspendPendingRequests();
Lines 104-110 private: a/Source/WebCore/loader/ResourceLoadScheduler.h_sec3
104
        FindOnly
104
        FindOnly
105
    };
105
    };
106
    
106
    
107
    HostInformation* hostForURL(const KURL&, CreateHostPolicy = FindOnly);
107
    HostInformation* hostForURL(const URL&, CreateHostPolicy = FindOnly);
108
    void servePendingRequests(HostInformation*, ResourceLoadPriority);
108
    void servePendingRequests(HostInformation*, ResourceLoadPriority);
109
109
110
    typedef HashMap<String, HostInformation*, StringHash> HostMap;
110
    typedef HashMap<String, HostInformation*, StringHash> HostMap;
- a/Source/WebCore/loader/ResourceLoader.h -2 / +2 lines
Lines 44-50 class AuthenticationChallenge; a/Source/WebCore/loader/ResourceLoader.h_sec1
44
class DocumentLoader;
44
class DocumentLoader;
45
class Frame;
45
class Frame;
46
class FrameLoader;
46
class FrameLoader;
47
class KURL;
47
class URL;
48
class ResourceBuffer;
48
class ResourceBuffer;
49
class ResourceHandle;
49
class ResourceHandle;
50
50
Lines 132-138 public: a/Source/WebCore/loader/ResourceLoader.h_sec2
132
    virtual bool shouldCacheResponse(ResourceHandle*, CFCachedURLResponseRef) OVERRIDE;
132
    virtual bool shouldCacheResponse(ResourceHandle*, CFCachedURLResponseRef) OVERRIDE;
133
#endif
133
#endif
134
134
135
    const KURL& url() const { return m_request.url(); } 
135
    const URL& url() const { return m_request.url(); } 
136
    ResourceHandle* handle() const { return m_handle.get(); }
136
    ResourceHandle* handle() const { return m_handle.get(); }
137
    bool shouldSendResourceLoadCallbacks() const { return m_options.sendLoadCallbacks == SendCallbacks; }
137
    bool shouldSendResourceLoadCallbacks() const { return m_options.sendLoadCallbacks == SendCallbacks; }
138
    void setSendCallbackPolicy(SendCallbackPolicy sendLoadCallbacks) { m_options.sendLoadCallbacks = sendLoadCallbacks; }
138
    void setSendCallbackPolicy(SendCallbackPolicy sendLoadCallbacks) { m_options.sendLoadCallbacks = sendLoadCallbacks; }
- a/Source/WebCore/loader/SinkDocument.cpp -1 / +1 lines
Lines 47-53 private: a/Source/WebCore/loader/SinkDocument.cpp_sec1
47
    virtual void appendBytes(DocumentWriter*, const char*, size_t) { }
47
    virtual void appendBytes(DocumentWriter*, const char*, size_t) { }
48
};
48
};
49
49
50
SinkDocument::SinkDocument(Frame* frame, const KURL& url)
50
SinkDocument::SinkDocument(Frame* frame, const URL& url)
51
    : HTMLDocument(frame, url)
51
    : HTMLDocument(frame, url)
52
{
52
{
53
    setCompatibilityMode(QuirksMode);
53
    setCompatibilityMode(QuirksMode);
- a/Source/WebCore/loader/SinkDocument.h -2 / +2 lines
Lines 32-44 namespace WebCore { a/Source/WebCore/loader/SinkDocument.h_sec1
32
32
33
class SinkDocument FINAL : public HTMLDocument {
33
class SinkDocument FINAL : public HTMLDocument {
34
public:
34
public:
35
    static PassRefPtr<SinkDocument> create(Frame* frame, const KURL& url)
35
    static PassRefPtr<SinkDocument> create(Frame* frame, const URL& url)
36
    {
36
    {
37
        return adoptRef(new SinkDocument(frame, url));
37
        return adoptRef(new SinkDocument(frame, url));
38
    }
38
    }
39
39
40
private:
40
private:
41
    SinkDocument(Frame*, const KURL&);
41
    SinkDocument(Frame*, const URL&);
42
    
42
    
43
    virtual PassRefPtr<DocumentParser> createParser();
43
    virtual PassRefPtr<DocumentParser> createParser();
44
};
44
};
- a/Source/WebCore/loader/SubframeLoader.cpp -15 / +15 lines
Lines 78-85 void SubframeLoader::clear() a/Source/WebCore/loader/SubframeLoader.cpp_sec1
78
bool SubframeLoader::requestFrame(HTMLFrameOwnerElement* ownerElement, const String& urlString, const AtomicString& frameName, bool lockHistory, bool lockBackForwardList)
78
bool SubframeLoader::requestFrame(HTMLFrameOwnerElement* ownerElement, const String& urlString, const AtomicString& frameName, bool lockHistory, bool lockBackForwardList)
79
{
79
{
80
    // Support for <frame src="javascript:string">
80
    // Support for <frame src="javascript:string">
81
    KURL scriptURL;
81
    URL scriptURL;
82
    KURL url;
82
    URL url;
83
    if (protocolIsJavaScript(urlString)) {
83
    if (protocolIsJavaScript(urlString)) {
84
        scriptURL = completeURL(urlString); // completeURL() encodes the URL.
84
        scriptURL = completeURL(urlString); // completeURL() encodes the URL.
85
        url = blankURL();
85
        url = blankURL();
Lines 98-104 bool SubframeLoader::requestFrame(HTMLFrameOwnerElement* ownerElement, const Str a/Source/WebCore/loader/SubframeLoader.cpp_sec2
98
    
98
    
99
bool SubframeLoader::resourceWillUsePlugin(const String& url, const String& mimeType, bool shouldPreferPlugInsForImages)
99
bool SubframeLoader::resourceWillUsePlugin(const String& url, const String& mimeType, bool shouldPreferPlugInsForImages)
100
{
100
{
101
    KURL completedURL;
101
    URL completedURL;
102
    if (!url.isEmpty())
102
    if (!url.isEmpty())
103
        completedURL = completeURL(url);
103
        completedURL = completeURL(url);
104
104
Lines 106-112 bool SubframeLoader::resourceWillUsePlugin(const String& url, const String& mime a/Source/WebCore/loader/SubframeLoader.cpp_sec3
106
    return shouldUsePlugin(completedURL, mimeType, shouldPreferPlugInsForImages, false, useFallback);
106
    return shouldUsePlugin(completedURL, mimeType, shouldPreferPlugInsForImages, false, useFallback);
107
}
107
}
108
108
109
bool SubframeLoader::pluginIsLoadable(HTMLPlugInImageElement* pluginElement, const KURL& url, const String& mimeType)
109
bool SubframeLoader::pluginIsLoadable(HTMLPlugInImageElement* pluginElement, const URL& url, const String& mimeType)
110
{
110
{
111
    if (MIMETypeRegistry::isJavaAppletMIMEType(mimeType)) {
111
    if (MIMETypeRegistry::isJavaAppletMIMEType(mimeType)) {
112
        if (!m_frame->settings().isJavaEnabled())
112
        if (!m_frame->settings().isJavaEnabled())
Lines 141-147 bool SubframeLoader::pluginIsLoadable(HTMLPlugInImageElement* pluginElement, con a/Source/WebCore/loader/SubframeLoader.cpp_sec4
141
    return true;
141
    return true;
142
}
142
}
143
143
144
bool SubframeLoader::requestPlugin(HTMLPlugInImageElement* ownerElement, const KURL& url, const String& mimeType, const Vector<String>& paramNames, const Vector<String>& paramValues, bool useFallback)
144
bool SubframeLoader::requestPlugin(HTMLPlugInImageElement* ownerElement, const URL& url, const String& mimeType, const Vector<String>& paramNames, const Vector<String>& paramValues, bool useFallback)
145
{
145
{
146
    // Application plug-ins are plug-ins implemented by the user agent, for example Qt plug-ins,
146
    // Application plug-ins are plug-ins implemented by the user agent, for example Qt plug-ins,
147
    // as opposed to third-party code such as Flash. The user agent decides whether or not they are
147
    // as opposed to third-party code such as Flash. The user agent decides whether or not they are
Lines 219-225 bool SubframeLoader::requestObject(HTMLPlugInImageElement* ownerElement, const S a/Source/WebCore/loader/SubframeLoader.cpp_sec5
219
    if (!renderer)
219
    if (!renderer)
220
        return false;
220
        return false;
221
221
222
    KURL completedURL;
222
    URL completedURL;
223
    if (!url.isEmpty())
223
    if (!url.isEmpty())
224
        completedURL = completeURL(url);
224
        completedURL = completeURL(url);
225
225
Lines 237-248 bool SubframeLoader::requestObject(HTMLPlugInImageElement* ownerElement, const S a/Source/WebCore/loader/SubframeLoader.cpp_sec6
237
}
237
}
238
238
239
#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
239
#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
240
PassRefPtr<Widget> SubframeLoader::loadMediaPlayerProxyPlugin(Node* node, const KURL& url,
240
PassRefPtr<Widget> SubframeLoader::loadMediaPlayerProxyPlugin(Node* node, const URL& url,
241
    const Vector<String>& paramNames, const Vector<String>& paramValues)
241
    const Vector<String>& paramNames, const Vector<String>& paramValues)
242
{
242
{
243
    ASSERT(node->hasTagName(videoTag) || isHTMLAudioElement(node));
243
    ASSERT(node->hasTagName(videoTag) || isHTMLAudioElement(node));
244
244
245
    KURL completedURL;
245
    URL completedURL;
246
    if (!url.isEmpty())
246
    if (!url.isEmpty())
247
        completedURL = completeURL(url);
247
        completedURL = completeURL(url);
248
248
Lines 292-298 PassRefPtr<Widget> SubframeLoader::createJavaAppletWidget(const IntSize& size, H a/Source/WebCore/loader/SubframeLoader.cpp_sec7
292
    }
292
    }
293
293
294
    if (!codeBaseURLString.isEmpty()) {
294
    if (!codeBaseURLString.isEmpty()) {
295
        KURL codeBaseURL = completeURL(codeBaseURLString);
295
        URL codeBaseURL = completeURL(codeBaseURLString);
296
        if (!element->document().securityOrigin()->canDisplay(codeBaseURL)) {
296
        if (!element->document().securityOrigin()->canDisplay(codeBaseURL)) {
297
            FrameLoader::reportLocalLoadFailed(m_frame, codeBaseURL.string());
297
            FrameLoader::reportLocalLoadFailed(m_frame, codeBaseURL.string());
298
            return 0;
298
            return 0;
Lines 306-312 PassRefPtr<Widget> SubframeLoader::createJavaAppletWidget(const IntSize& size, H a/Source/WebCore/loader/SubframeLoader.cpp_sec8
306
306
307
    if (baseURLString.isEmpty())
307
    if (baseURLString.isEmpty())
308
        baseURLString = m_frame->document()->baseURL().string();
308
        baseURLString = m_frame->document()->baseURL().string();
309
    KURL baseURL = completeURL(baseURLString);
309
    URL baseURL = completeURL(baseURLString);
310
310
311
    RefPtr<Widget> widget;
311
    RefPtr<Widget> widget;
312
    if (allowPlugins(AboutToInstantiatePlugin))
312
    if (allowPlugins(AboutToInstantiatePlugin))
Lines 326-332 PassRefPtr<Widget> SubframeLoader::createJavaAppletWidget(const IntSize& size, H a/Source/WebCore/loader/SubframeLoader.cpp_sec9
326
    return widget;
326
    return widget;
327
}
327
}
328
328
329
Frame* SubframeLoader::loadOrRedirectSubframe(HTMLFrameOwnerElement* ownerElement, const KURL& url, const AtomicString& frameName, bool lockHistory, bool lockBackForwardList)
329
Frame* SubframeLoader::loadOrRedirectSubframe(HTMLFrameOwnerElement* ownerElement, const URL& url, const AtomicString& frameName, bool lockHistory, bool lockBackForwardList)
330
{
330
{
331
    Frame* frame = ownerElement->contentFrame();
331
    Frame* frame = ownerElement->contentFrame();
332
    if (frame)
332
    if (frame)
Lines 338-344 Frame* SubframeLoader::loadOrRedirectSubframe(HTMLFrameOwnerElement* ownerElemen a/Source/WebCore/loader/SubframeLoader.cpp_sec10
338
    return ownerElement->contentFrame();
338
    return ownerElement->contentFrame();
339
}
339
}
340
340
341
Frame* SubframeLoader::loadSubframe(HTMLFrameOwnerElement* ownerElement, const KURL& url, const String& name, const String& referrer)
341
Frame* SubframeLoader::loadSubframe(HTMLFrameOwnerElement* ownerElement, const URL& url, const String& name, const String& referrer)
342
{
342
{
343
    RefPtr<Frame> protect(m_frame);
343
    RefPtr<Frame> protect(m_frame);
344
344
Lines 403-409 bool SubframeLoader::allowPlugins(ReasonForCallingAllowPlugins reason) a/Source/WebCore/loader/SubframeLoader.cpp_sec11
403
    return allowed;
403
    return allowed;
404
}
404
}
405
405
406
bool SubframeLoader::shouldUsePlugin(const KURL& url, const String& mimeType, bool shouldPreferPlugInsForImages, bool hasFallback, bool& useFallback)
406
bool SubframeLoader::shouldUsePlugin(const URL& url, const String& mimeType, bool shouldPreferPlugInsForImages, bool hasFallback, bool& useFallback)
407
{
407
{
408
    if (m_frame->loader().client().shouldAlwaysUsePluginDocument(mimeType)) {
408
    if (m_frame->loader().client().shouldAlwaysUsePluginDocument(mimeType)) {
409
        useFallback = false;
409
        useFallback = false;
Lines 430-436 Document* SubframeLoader::document() const a/Source/WebCore/loader/SubframeLoader.cpp_sec12
430
    return m_frame->document();
430
    return m_frame->document();
431
}
431
}
432
432
433
bool SubframeLoader::loadPlugin(HTMLPlugInImageElement* pluginElement, const KURL& url, const String& mimeType,
433
bool SubframeLoader::loadPlugin(HTMLPlugInImageElement* pluginElement, const URL& url, const String& mimeType,
434
    const Vector<String>& paramNames, const Vector<String>& paramValues, bool useFallback)
434
    const Vector<String>& paramNames, const Vector<String>& paramValues, bool useFallback)
435
{
435
{
436
    RenderEmbeddedObject* renderer = pluginElement->renderEmbeddedObject();
436
    RenderEmbeddedObject* renderer = pluginElement->renderEmbeddedObject();
Lines 462-468 bool SubframeLoader::loadPlugin(HTMLPlugInImageElement* pluginElement, const KUR a/Source/WebCore/loader/SubframeLoader.cpp_sec13
462
    return true;
462
    return true;
463
}
463
}
464
464
465
KURL SubframeLoader::completeURL(const String& url) const
465
URL SubframeLoader::completeURL(const String& url) const
466
{
466
{
467
    ASSERT(m_frame->document());
467
    ASSERT(m_frame->document());
468
    return m_frame->document()->completeURL(url);
468
    return m_frame->document()->completeURL(url);
- a/Source/WebCore/loader/SubframeLoader.h -9 / +9 lines
Lines 47-53 class HTMLAppletElement; a/Source/WebCore/loader/SubframeLoader.h_sec1
47
class HTMLFrameOwnerElement;
47
class HTMLFrameOwnerElement;
48
class HTMLPlugInImageElement;
48
class HTMLPlugInImageElement;
49
class IntSize;
49
class IntSize;
50
class KURL;
50
class URL;
51
#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
51
#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
52
class Node;
52
class Node;
53
#endif
53
#endif
Lines 68-74 public: a/Source/WebCore/loader/SubframeLoader.h_sec2
68
#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
68
#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
69
    // FIXME: This should take Element* instead of Node*, or better yet the
69
    // FIXME: This should take Element* instead of Node*, or better yet the
70
    // specific type of Element which this code depends on.
70
    // specific type of Element which this code depends on.
71
    PassRefPtr<Widget> loadMediaPlayerProxyPlugin(Node*, const KURL&, const Vector<String>& paramNames, const Vector<String>& paramValues);
71
    PassRefPtr<Widget> loadMediaPlayerProxyPlugin(Node*, const URL&, const Vector<String>& paramNames, const Vector<String>& paramValues);
72
#endif
72
#endif
73
73
74
    PassRefPtr<Widget> createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const Vector<String>& paramNames, const Vector<String>& paramValues);
74
    PassRefPtr<Widget> createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const Vector<String>& paramNames, const Vector<String>& paramValues);
Lines 80-100 public: a/Source/WebCore/loader/SubframeLoader.h_sec3
80
    bool resourceWillUsePlugin(const String& url, const String& mimeType, bool shouldPreferPlugInsForImages);
80
    bool resourceWillUsePlugin(const String& url, const String& mimeType, bool shouldPreferPlugInsForImages);
81
81
82
private:
82
private:
83
    bool requestPlugin(HTMLPlugInImageElement*, const KURL&, const String& serviceType, const Vector<String>& paramNames, const Vector<String>& paramValues, bool useFallback);
83
    bool requestPlugin(HTMLPlugInImageElement*, const URL&, const String& serviceType, const Vector<String>& paramNames, const Vector<String>& paramValues, bool useFallback);
84
    Frame* loadOrRedirectSubframe(HTMLFrameOwnerElement*, const KURL&, const AtomicString& frameName, bool lockHistory, bool lockBackForwardList);
84
    Frame* loadOrRedirectSubframe(HTMLFrameOwnerElement*, const URL&, const AtomicString& frameName, bool lockHistory, bool lockBackForwardList);
85
    Frame* loadSubframe(HTMLFrameOwnerElement*, const KURL&, const String& name, const String& referrer);
85
    Frame* loadSubframe(HTMLFrameOwnerElement*, const URL&, const String& name, const String& referrer);
86
    bool loadPlugin(HTMLPlugInImageElement*, const KURL&, const String& mimeType,
86
    bool loadPlugin(HTMLPlugInImageElement*, const URL&, const String& mimeType,
87
        const Vector<String>& paramNames, const Vector<String>& paramValues, bool useFallback);
87
        const Vector<String>& paramNames, const Vector<String>& paramValues, bool useFallback);
88
88
89
    bool shouldUsePlugin(const KURL&, const String& mimeType, bool shouldPreferPlugInsForImages, bool hasFallback, bool& useFallback);
89
    bool shouldUsePlugin(const URL&, const String& mimeType, bool shouldPreferPlugInsForImages, bool hasFallback, bool& useFallback);
90
    bool pluginIsLoadable(HTMLPlugInImageElement*, const KURL&, const String& mimeType);
90
    bool pluginIsLoadable(HTMLPlugInImageElement*, const URL&, const String& mimeType);
91
91
92
    Document* document() const;
92
    Document* document() const;
93
93
94
    bool m_containsPlugins;
94
    bool m_containsPlugins;
95
    Frame* m_frame;
95
    Frame* m_frame;
96
96
97
    KURL completeURL(const String&) const;
97
    URL completeURL(const String&) const;
98
};
98
};
99
99
100
} // namespace WebCore
100
} // namespace WebCore
- a/Source/WebCore/loader/SubresourceLoader.cpp -1 / +1 lines
Lines 123-129 bool SubresourceLoader::isSubresourceLoader() a/Source/WebCore/loader/SubresourceLoader.cpp_sec1
123
void SubresourceLoader::willSendRequest(ResourceRequest& newRequest, const ResourceResponse& redirectResponse)
123
void SubresourceLoader::willSendRequest(ResourceRequest& newRequest, const ResourceResponse& redirectResponse)
124
{
124
{
125
    // Store the previous URL because the call to ResourceLoader::willSendRequest will modify it.
125
    // Store the previous URL because the call to ResourceLoader::willSendRequest will modify it.
126
    KURL previousURL = request().url();
126
    URL previousURL = request().url();
127
    Ref<SubresourceLoader> protect(*this);
127
    Ref<SubresourceLoader> protect(*this);
128
128
129
    ASSERT(!newRequest.isNull());
129
    ASSERT(!newRequest.isNull());
- a/Source/WebCore/loader/SubstituteData.h -7 / +7 lines
Lines 26-32 a/Source/WebCore/loader/SubstituteData.h_sec1
26
#ifndef SubstituteData_h
26
#ifndef SubstituteData_h
27
#define SubstituteData_h
27
#define SubstituteData_h
28
28
29
#include "KURL.h"
29
#include "URL.h"
30
#include "SharedBuffer.h"
30
#include "SharedBuffer.h"
31
#include <wtf/PassRefPtr.h>
31
#include <wtf/PassRefPtr.h>
32
#include <wtf/RefPtr.h>
32
#include <wtf/RefPtr.h>
Lines 41-48 namespace WebCore { a/Source/WebCore/loader/SubstituteData.h_sec2
41
        }
41
        }
42
42
43
        SubstituteData(PassRefPtr<SharedBuffer> content, const String& mimeType,
43
        SubstituteData(PassRefPtr<SharedBuffer> content, const String& mimeType,
44
                       const String& textEncoding, const KURL& failingURL,
44
                const String& textEncoding, const URL& failingURL,
45
                       const KURL& responseURL = KURL(), bool shouldRevealToSessionHistory = false)
45
                const URL& responseURL = URL(), bool shouldRevealToSessionHistory = false)
46
            : m_content(content)
46
            : m_content(content)
47
            , m_mimeType(mimeType)
47
            , m_mimeType(mimeType)
48
            , m_textEncoding(textEncoding)
48
            , m_textEncoding(textEncoding)
Lines 60-74 namespace WebCore { a/Source/WebCore/loader/SubstituteData.h_sec3
60
        const SharedBuffer* content() const { return m_content.get(); }
60
        const SharedBuffer* content() const { return m_content.get(); }
61
        const String& mimeType() const { return m_mimeType; }
61
        const String& mimeType() const { return m_mimeType; }
62
        const String& textEncoding() const { return m_textEncoding; }
62
        const String& textEncoding() const { return m_textEncoding; }
63
        const KURL& failingURL() const { return m_failingURL; }
63
        const URL& failingURL() const { return m_failingURL; }
64
        const KURL& responseURL() const { return m_responseURL; }
64
        const URL& responseURL() const { return m_responseURL; }
65
        
65
        
66
    private:
66
    private:
67
        RefPtr<SharedBuffer> m_content;
67
        RefPtr<SharedBuffer> m_content;
68
        String m_mimeType;
68
        String m_mimeType;
69
        String m_textEncoding;
69
        String m_textEncoding;
70
        KURL m_failingURL;
70
        URL m_failingURL;
71
        KURL m_responseURL;
71
        URL m_responseURL;
72
        bool m_shouldRevealToSessionHistory;
72
        bool m_shouldRevealToSessionHistory;
73
    };
73
    };
74
74
- a/Source/WebCore/loader/SubstituteResource.h -4 / +4 lines
Lines 28-34 a/Source/WebCore/loader/SubstituteResource.h_sec1
28
28
29
#include <wtf/RefCounted.h>
29
#include <wtf/RefCounted.h>
30
30
31
#include "KURL.h"
31
#include "URL.h"
32
#include "ResourceResponse.h"
32
#include "ResourceResponse.h"
33
#include "SharedBuffer.h"
33
#include "SharedBuffer.h"
34
34
Lines 40-51 class SubstituteResource : public RefCounted<SubstituteResource> { a/Source/WebCore/loader/SubstituteResource.h_sec2
40
public:
40
public:
41
    virtual ~SubstituteResource() { }
41
    virtual ~SubstituteResource() { }
42
42
43
    const KURL& url() const { return m_url; }
43
    const URL& url() const { return m_url; }
44
    const ResourceResponse& response() const { return m_response; }
44
    const ResourceResponse& response() const { return m_response; }
45
    SharedBuffer* data() const { return m_data.get(); }
45
    SharedBuffer* data() const { return m_data.get(); }
46
46
47
protected:
47
protected:
48
    SubstituteResource(const KURL& url, const ResourceResponse& response, PassRefPtr<SharedBuffer> data)
48
    SubstituteResource(const URL& url, const ResourceResponse& response, PassRefPtr<SharedBuffer> data)
49
        : m_url(url)
49
        : m_url(url)
50
        , m_response(response)
50
        , m_response(response)
51
        , m_data(data)
51
        , m_data(data)
Lines 54-60 protected: a/Source/WebCore/loader/SubstituteResource.h_sec3
54
    }
54
    }
55
    
55
    
56
private:
56
private:
57
    KURL m_url;
57
    URL m_url;
58
    ResourceResponse m_response;
58
    ResourceResponse m_response;
59
    RefPtr<SharedBuffer> m_data;
59
    RefPtr<SharedBuffer> m_data;
60
};
60
};
- a/Source/WebCore/loader/TextTrackLoader.cpp -1 / +1 lines
Lines 146-152 void TextTrackLoader::notifyFinished(CachedResource* resource) a/Source/WebCore/loader/TextTrackLoader.cpp_sec1
146
    cancelLoad();
146
    cancelLoad();
147
}
147
}
148
148
149
bool TextTrackLoader::load(const KURL& url, const String& crossOriginMode)
149
bool TextTrackLoader::load(const URL& url, const String& crossOriginMode)
150
{
150
{
151
    cancelLoad();
151
    cancelLoad();
152
152
- a/Source/WebCore/loader/TextTrackLoader.h -1 / +1 lines
Lines 64-70 public: a/Source/WebCore/loader/TextTrackLoader.h_sec1
64
    }
64
    }
65
    virtual ~TextTrackLoader();
65
    virtual ~TextTrackLoader();
66
    
66
    
67
    bool load(const KURL&, const String& crossOriginMode);
67
    bool load(const URL&, const String& crossOriginMode);
68
    void cancelLoad();
68
    void cancelLoad();
69
    void getNewCues(Vector<RefPtr<TextTrackCue> >& outputCues);
69
    void getNewCues(Vector<RefPtr<TextTrackCue> >& outputCues);
70
#if ENABLE(WEBVTT_REGIONS)
70
#if ENABLE(WEBVTT_REGIONS)
- a/Source/WebCore/loader/appcache/ApplicationCache.cpp -8 / +8 lines
Lines 37-43 a/Source/WebCore/loader/appcache/ApplicationCache.cpp_sec1
37
37
38
namespace WebCore {
38
namespace WebCore {
39
 
39
 
40
static inline bool fallbackURLLongerThan(const std::pair<KURL, KURL>& lhs, const std::pair<KURL, KURL>& rhs)
40
static inline bool fallbackURLLongerThan(const std::pair<URL, URL>& lhs, const std::pair<URL, URL>& rhs)
41
{
41
{
42
    return lhs.first.string().length() > rhs.first.string().length();
42
    return lhs.first.string().length() > rhs.first.string().length();
43
}
43
}
Lines 117-123 unsigned ApplicationCache::removeResource(const String& url) a/Source/WebCore/loader/appcache/ApplicationCache.cpp_sec2
117
    
117
    
118
ApplicationCacheResource* ApplicationCache::resourceForURL(const String& url)
118
ApplicationCacheResource* ApplicationCache::resourceForURL(const String& url)
119
{
119
{
120
    ASSERT(!KURL(ParsedURLString, url).hasFragmentIdentifier());
120
    ASSERT(!URL(ParsedURLString, url).hasFragmentIdentifier());
121
    return m_resources.get(url);
121
    return m_resources.get(url);
122
}    
122
}    
123
123
Lines 138-157 ApplicationCacheResource* ApplicationCache::resourceForRequest(const ResourceReq a/Source/WebCore/loader/appcache/ApplicationCache.cpp_sec3
138
    if (!requestIsHTTPOrHTTPSGet(request))
138
    if (!requestIsHTTPOrHTTPSGet(request))
139
        return 0;
139
        return 0;
140
140
141
    KURL url(request.url());
141
    URL url(request.url());
142
    if (url.hasFragmentIdentifier())
142
    if (url.hasFragmentIdentifier())
143
        url.removeFragmentIdentifier();
143
        url.removeFragmentIdentifier();
144
144
145
    return resourceForURL(url);
145
    return resourceForURL(url);
146
}
146
}
147
147
148
void ApplicationCache::setOnlineWhitelist(const Vector<KURL>& onlineWhitelist)
148
void ApplicationCache::setOnlineWhitelist(const Vector<URL>& onlineWhitelist)
149
{
149
{
150
    ASSERT(m_onlineWhitelist.isEmpty());
150
    ASSERT(m_onlineWhitelist.isEmpty());
151
    m_onlineWhitelist = onlineWhitelist; 
151
    m_onlineWhitelist = onlineWhitelist; 
152
}
152
}
153
153
154
bool ApplicationCache::isURLInOnlineWhitelist(const KURL& url)
154
bool ApplicationCache::isURLInOnlineWhitelist(const URL& url)
155
{
155
{
156
    size_t whitelistSize = m_onlineWhitelist.size();
156
    size_t whitelistSize = m_onlineWhitelist.size();
157
    for (size_t i = 0; i < whitelistSize; ++i) {
157
    for (size_t i = 0; i < whitelistSize; ++i) {
Lines 169-175 void ApplicationCache::setFallbackURLs(const FallbackURLVector& fallbackURLs) a/Source/WebCore/loader/appcache/ApplicationCache.cpp_sec4
169
    std::stable_sort(m_fallbackURLs.begin(), m_fallbackURLs.end(), fallbackURLLongerThan);
169
    std::stable_sort(m_fallbackURLs.begin(), m_fallbackURLs.end(), fallbackURLLongerThan);
170
}
170
}
171
171
172
bool ApplicationCache::urlMatchesFallbackNamespace(const KURL& url, KURL* fallbackURL)
172
bool ApplicationCache::urlMatchesFallbackNamespace(const URL& url, URL* fallbackURL)
173
{
173
{
174
    size_t fallbackCount = m_fallbackURLs.size();
174
    size_t fallbackCount = m_fallbackURLs.size();
175
    for (size_t i = 0; i < fallbackCount; ++i) {
175
    for (size_t i = 0; i < fallbackCount; ++i) {
Lines 193-205 void ApplicationCache::clearStorageID() a/Source/WebCore/loader/appcache/ApplicationCache.cpp_sec5
193
    
193
    
194
void ApplicationCache::deleteCacheForOrigin(SecurityOrigin* origin)
194
void ApplicationCache::deleteCacheForOrigin(SecurityOrigin* origin)
195
{
195
{
196
    Vector<KURL> urls;
196
    Vector<URL> urls;
197
    if (!cacheStorage().manifestURLs(&urls)) {
197
    if (!cacheStorage().manifestURLs(&urls)) {
198
        LOG_ERROR("Failed to retrieve ApplicationCache manifest URLs");
198
        LOG_ERROR("Failed to retrieve ApplicationCache manifest URLs");
199
        return;
199
        return;
200
    }
200
    }
201
201
202
    KURL originURL(KURL(), origin->toString());
202
    URL originURL(URL(), origin->toString());
203
203
204
    size_t count = urls.size();
204
    size_t count = urls.size();
205
    for (size_t i = 0; i < count; ++i) {
205
    for (size_t i = 0; i < count; ++i) {
- a/Source/WebCore/loader/appcache/ApplicationCache.h -7 / +7 lines
Lines 38-48 namespace WebCore { a/Source/WebCore/loader/appcache/ApplicationCache.h_sec1
38
class ApplicationCacheGroup;
38
class ApplicationCacheGroup;
39
class ApplicationCacheResource;
39
class ApplicationCacheResource;
40
class DocumentLoader;
40
class DocumentLoader;
41
class KURL;
41
class URL;
42
class ResourceRequest;
42
class ResourceRequest;
43
class SecurityOrigin;
43
class SecurityOrigin;
44
44
45
typedef Vector<std::pair<KURL, KURL> > FallbackURLVector;
45
typedef Vector<std::pair<URL, URL> > FallbackURLVector;
46
46
47
class ApplicationCache : public RefCounted<ApplicationCache> {
47
class ApplicationCache : public RefCounted<ApplicationCache> {
48
public:
48
public:
Lines 68-80 public: a/Source/WebCore/loader/appcache/ApplicationCache.h_sec2
68
68
69
    void setAllowsAllNetworkRequests(bool value) { m_allowAllNetworkRequests = value; }
69
    void setAllowsAllNetworkRequests(bool value) { m_allowAllNetworkRequests = value; }
70
    bool allowsAllNetworkRequests() const { return m_allowAllNetworkRequests; }
70
    bool allowsAllNetworkRequests() const { return m_allowAllNetworkRequests; }
71
    void setOnlineWhitelist(const Vector<KURL>& onlineWhitelist);
71
    void setOnlineWhitelist(const Vector<URL>& onlineWhitelist);
72
    const Vector<KURL>& onlineWhitelist() const { return m_onlineWhitelist; }
72
    const Vector<URL>& onlineWhitelist() const { return m_onlineWhitelist; }
73
    bool isURLInOnlineWhitelist(const KURL&); // There is an entry in online whitelist that has the same origin as the resource's URL and that is a prefix match for the resource's URL.
73
    bool isURLInOnlineWhitelist(const URL&); // There is an entry in online whitelist that has the same origin as the resource's URL and that is a prefix match for the resource's URL.
74
74
75
    void setFallbackURLs(const FallbackURLVector&);
75
    void setFallbackURLs(const FallbackURLVector&);
76
    const FallbackURLVector& fallbackURLs() const { return m_fallbackURLs; }
76
    const FallbackURLVector& fallbackURLs() const { return m_fallbackURLs; }
77
    bool urlMatchesFallbackNamespace(const KURL&, KURL* fallbackURL = 0);
77
    bool urlMatchesFallbackNamespace(const URL&, URL* fallbackURL = 0);
78
    
78
    
79
#ifndef NDEBUG
79
#ifndef NDEBUG
80
    void dump();
80
    void dump();
Lines 102-108 private: a/Source/WebCore/loader/appcache/ApplicationCache.h_sec3
102
    ApplicationCacheResource* m_manifest;
102
    ApplicationCacheResource* m_manifest;
103
103
104
    bool m_allowAllNetworkRequests;
104
    bool m_allowAllNetworkRequests;
105
    Vector<KURL> m_onlineWhitelist;
105
    Vector<URL> m_onlineWhitelist;
106
    FallbackURLVector m_fallbackURLs;
106
    FallbackURLVector m_fallbackURLs;
107
107
108
    // The total size of the resources belonging to this Application Cache instance.
108
    // The total size of the resources belonging to this Application Cache instance.
- a/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp -12 / +12 lines
Lines 56-62 a/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp_sec1
56
56
57
namespace WebCore {
57
namespace WebCore {
58
58
59
ApplicationCacheGroup::ApplicationCacheGroup(const KURL& manifestURL, bool isCopy)
59
ApplicationCacheGroup::ApplicationCacheGroup(const URL& manifestURL, bool isCopy)
60
    : m_manifestURL(manifestURL)
60
    : m_manifestURL(manifestURL)
61
    , m_origin(SecurityOrigin::create(manifestURL))
61
    , m_origin(SecurityOrigin::create(manifestURL))
62
    , m_updateStatus(Idle)
62
    , m_updateStatus(Idle)
Lines 101-107 ApplicationCache* ApplicationCacheGroup::cacheForMainRequest(const ResourceReque a/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp_sec2
101
    if (!ApplicationCache::requestIsHTTPOrHTTPSGet(request))
101
    if (!ApplicationCache::requestIsHTTPOrHTTPSGet(request))
102
        return 0;
102
        return 0;
103
103
104
    KURL url(request.url());
104
    URL url(request.url());
105
    if (url.hasFragmentIdentifier())
105
    if (url.hasFragmentIdentifier())
106
        url.removeFragmentIdentifier();
106
        url.removeFragmentIdentifier();
107
107
Lines 120-126 ApplicationCache* ApplicationCacheGroup::fallbackCacheForMainRequest(const Resou a/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp_sec3
120
    if (!ApplicationCache::requestIsHTTPOrHTTPSGet(request))
120
    if (!ApplicationCache::requestIsHTTPOrHTTPSGet(request))
121
        return 0;
121
        return 0;
122
122
123
    KURL url(request.url());
123
    URL url(request.url());
124
    if (url.hasFragmentIdentifier())
124
    if (url.hasFragmentIdentifier())
125
        url.removeFragmentIdentifier();
125
        url.removeFragmentIdentifier();
126
126
Lines 134-140 ApplicationCache* ApplicationCacheGroup::fallbackCacheForMainRequest(const Resou a/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp_sec4
134
    return 0;
134
    return 0;
135
}
135
}
136
136
137
void ApplicationCacheGroup::selectCache(Frame* frame, const KURL& passedManifestURL)
137
void ApplicationCacheGroup::selectCache(Frame* frame, const URL& passedManifestURL)
138
{
138
{
139
    ASSERT(frame && frame->page());
139
    ASSERT(frame && frame->page());
140
    
140
    
Lines 152-158 void ApplicationCacheGroup::selectCache(Frame* frame, const KURL& passedManifest a/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp_sec5
152
        return;
152
        return;
153
    }
153
    }
154
154
155
    KURL manifestURL(passedManifestURL);
155
    URL manifestURL(passedManifestURL);
156
    if (manifestURL.hasFragmentIdentifier())
156
    if (manifestURL.hasFragmentIdentifier())
157
        manifestURL.removeFragmentIdentifier();
157
        manifestURL.removeFragmentIdentifier();
158
158
Lines 167-173 void ApplicationCacheGroup::selectCache(Frame* frame, const KURL& passedManifest a/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp_sec6
167
            mainResourceCache->group()->update(frame, ApplicationCacheUpdateWithBrowsingContext);
167
            mainResourceCache->group()->update(frame, ApplicationCacheUpdateWithBrowsingContext);
168
        } else {
168
        } else {
169
            // The main resource was loaded from cache, so the cache must have an entry for it. Mark it as foreign.
169
            // The main resource was loaded from cache, so the cache must have an entry for it. Mark it as foreign.
170
            KURL resourceURL(documentLoader->responseURL());
170
            URL resourceURL(documentLoader->responseURL());
171
            if (resourceURL.hasFragmentIdentifier())
171
            if (resourceURL.hasFragmentIdentifier())
172
                resourceURL.removeFragmentIdentifier();
172
                resourceURL.removeFragmentIdentifier();
173
            ApplicationCacheResource* resource = mainResourceCache->resourceForURL(resourceURL);
173
            ApplicationCacheResource* resource = mainResourceCache->resourceForURL(resourceURL);
Lines 235-241 void ApplicationCacheGroup::finishedLoadingMainResource(DocumentLoader* loader) a/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp_sec7
235
{
235
{
236
    ASSERT(m_pendingMasterResourceLoaders.contains(loader));
236
    ASSERT(m_pendingMasterResourceLoaders.contains(loader));
237
    ASSERT(m_completionType == None || m_pendingEntries.isEmpty());
237
    ASSERT(m_completionType == None || m_pendingEntries.isEmpty());
238
    KURL url = loader->url();
238
    URL url = loader->url();
239
    if (url.hasFragmentIdentifier())
239
    if (url.hasFragmentIdentifier())
240
        url.removeFragmentIdentifier();
240
        url.removeFragmentIdentifier();
241
241
Lines 475-481 void ApplicationCacheGroup::abort(Frame* frame) a/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp_sec8
475
    cacheUpdateFailed();
475
    cacheUpdateFailed();
476
}
476
}
477
477
478
PassRefPtr<ResourceHandle> ApplicationCacheGroup::createResourceHandle(const KURL& url, ApplicationCacheResource* newestCachedResource)
478
PassRefPtr<ResourceHandle> ApplicationCacheGroup::createResourceHandle(const URL& url, ApplicationCacheResource* newestCachedResource)
479
{
479
{
480
    ResourceRequest request(url);
480
    ResourceRequest request(url);
481
    m_frame->loader().applyUserAgent(request);
481
    m_frame->loader().applyUserAgent(request);
Lines 536-542 void ApplicationCacheGroup::didReceiveResponse(ResourceHandle* handle, const Res a/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp_sec9
536
    
536
    
537
    ASSERT(handle == m_currentHandle);
537
    ASSERT(handle == m_currentHandle);
538
538
539
    KURL url(handle->firstRequest().url());
539
    URL url(handle->firstRequest().url());
540
    if (url.hasFragmentIdentifier())
540
    if (url.hasFragmentIdentifier())
541
        url.removeFragmentIdentifier();
541
        url.removeFragmentIdentifier();
542
    
542
    
Lines 670-676 void ApplicationCacheGroup::didFail(ResourceHandle* handle, const ResourceError& a/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp_sec10
670
    ASSERT(handle == m_currentHandle);
670
    ASSERT(handle == m_currentHandle);
671
671
672
    unsigned type = m_currentResource ? m_currentResource->type() : m_pendingEntries.get(handle->firstRequest().url());
672
    unsigned type = m_currentResource ? m_currentResource->type() : m_pendingEntries.get(handle->firstRequest().url());
673
    KURL url(handle->firstRequest().url());
673
    URL url(handle->firstRequest().url());
674
    if (url.hasFragmentIdentifier())
674
    if (url.hasFragmentIdentifier())
675
        url.removeFragmentIdentifier();
675
        url.removeFragmentIdentifier();
676
676
Lines 1024-1030 void ApplicationCacheGroup::startLoadingEntry() a/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp_sec11
1024
1024
1025
    ASSERT(!m_currentHandle);
1025
    ASSERT(!m_currentHandle);
1026
    
1026
    
1027
    m_currentHandle = createResourceHandle(KURL(ParsedURLString, it->key), m_newestCache ? m_newestCache->resourceForURL(it->key) : 0);
1027
    m_currentHandle = createResourceHandle(URL(ParsedURLString, it->key), m_newestCache ? m_newestCache->resourceForURL(it->key) : 0);
1028
}
1028
}
1029
1029
1030
void ApplicationCacheGroup::deliverDelayedMainResources()
1030
void ApplicationCacheGroup::deliverDelayedMainResources()
Lines 1051-1057 void ApplicationCacheGroup::deliverDelayedMainResources() a/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp_sec12
1051
void ApplicationCacheGroup::addEntry(const String& url, unsigned type)
1051
void ApplicationCacheGroup::addEntry(const String& url, unsigned type)
1052
{
1052
{
1053
    ASSERT(m_cacheBeingUpdated);
1053
    ASSERT(m_cacheBeingUpdated);
1054
    ASSERT(!KURL(ParsedURLString, url).hasFragmentIdentifier());
1054
    ASSERT(!URL(ParsedURLString, url).hasFragmentIdentifier());
1055
    
1055
    
1056
    // Don't add the URL if we already have an master resource in the cache
1056
    // Don't add the URL if we already have an master resource in the cache
1057
    // (i.e., the main resource finished loading before the manifest).
1057
    // (i.e., the main resource finished loading before the manifest).
- a/Source/WebCore/loader/appcache/ApplicationCacheGroup.h -6 / +6 lines
Lines 27-33 a/Source/WebCore/loader/appcache/ApplicationCacheGroup.h_sec1
27
#define ApplicationCacheGroup_h
27
#define ApplicationCacheGroup_h
28
28
29
#include "DOMApplicationCache.h"
29
#include "DOMApplicationCache.h"
30
#include "KURL.h"
30
#include "URL.h"
31
#include "ResourceHandleClient.h"
31
#include "ResourceHandleClient.h"
32
#include "SharedBuffer.h"
32
#include "SharedBuffer.h"
33
#include <wtf/Noncopyable.h>
33
#include <wtf/Noncopyable.h>
Lines 53-59 enum ApplicationCacheUpdateOption { a/Source/WebCore/loader/appcache/ApplicationCacheGroup.h_sec2
53
class ApplicationCacheGroup : ResourceHandleClient {
53
class ApplicationCacheGroup : ResourceHandleClient {
54
    WTF_MAKE_NONCOPYABLE(ApplicationCacheGroup); WTF_MAKE_FAST_ALLOCATED;
54
    WTF_MAKE_NONCOPYABLE(ApplicationCacheGroup); WTF_MAKE_FAST_ALLOCATED;
55
public:
55
public:
56
    ApplicationCacheGroup(const KURL& manifestURL, bool isCopy = false);    
56
    ApplicationCacheGroup(const URL& manifestURL, bool isCopy = false);    
57
    ~ApplicationCacheGroup();
57
    ~ApplicationCacheGroup();
58
    
58
    
59
    enum UpdateStatus { Idle, Checking, Downloading };
59
    enum UpdateStatus { Idle, Checking, Downloading };
Lines 61-70 public: a/Source/WebCore/loader/appcache/ApplicationCacheGroup.h_sec3
61
    static ApplicationCache* cacheForMainRequest(const ResourceRequest&, DocumentLoader*);
61
    static ApplicationCache* cacheForMainRequest(const ResourceRequest&, DocumentLoader*);
62
    static ApplicationCache* fallbackCacheForMainRequest(const ResourceRequest&, DocumentLoader*);
62
    static ApplicationCache* fallbackCacheForMainRequest(const ResourceRequest&, DocumentLoader*);
63
    
63
    
64
    static void selectCache(Frame*, const KURL& manifestURL);
64
    static void selectCache(Frame*, const URL& manifestURL);
65
    static void selectCacheWithoutManifestURL(Frame*);
65
    static void selectCacheWithoutManifestURL(Frame*);
66
    
66
    
67
    const KURL& manifestURL() const { return m_manifestURL; }
67
    const URL& manifestURL() const { return m_manifestURL; }
68
    const SecurityOrigin* origin() const { return m_origin.get(); }
68
    const SecurityOrigin* origin() const { return m_origin.get(); }
69
    UpdateStatus updateStatus() const { return m_updateStatus; }
69
    UpdateStatus updateStatus() const { return m_updateStatus; }
70
    void setUpdateStatus(UpdateStatus status);
70
    void setUpdateStatus(UpdateStatus status);
Lines 103-109 private: a/Source/WebCore/loader/appcache/ApplicationCacheGroup.h_sec4
103
103
104
    void scheduleReachedMaxAppCacheSizeCallback();
104
    void scheduleReachedMaxAppCacheSizeCallback();
105
105
106
    PassRefPtr<ResourceHandle> createResourceHandle(const KURL&, ApplicationCacheResource* newestCachedResource);
106
    PassRefPtr<ResourceHandle> createResourceHandle(const URL&, ApplicationCacheResource* newestCachedResource);
107
107
108
    // For normal resource loading, WebKit client is asked about each resource individually. Since application cache does not belong to any particular document,
108
    // For normal resource loading, WebKit client is asked about each resource individually. Since application cache does not belong to any particular document,
109
    // the existing client callback cannot be used, so assume that any client that enables application cache also wants it to use credential storage.
109
    // the existing client callback cannot be used, so assume that any client that enables application cache also wants it to use credential storage.
Lines 133-139 private: a/Source/WebCore/loader/appcache/ApplicationCacheGroup.h_sec5
133
    
133
    
134
    void stopLoading();
134
    void stopLoading();
135
    
135
    
136
    KURL m_manifestURL;
136
    URL m_manifestURL;
137
    RefPtr<SecurityOrigin> m_origin;
137
    RefPtr<SecurityOrigin> m_origin;
138
    UpdateStatus m_updateStatus;
138
    UpdateStatus m_updateStatus;
139
    
139
    
- a/Source/WebCore/loader/appcache/ApplicationCacheHost.cpp -6 / +6 lines
Lines 67-73 void ApplicationCacheHost::selectCacheWithoutManifest() a/Source/WebCore/loader/appcache/ApplicationCacheHost.cpp_sec1
67
    ApplicationCacheGroup::selectCacheWithoutManifestURL(m_documentLoader->frame());
67
    ApplicationCacheGroup::selectCacheWithoutManifestURL(m_documentLoader->frame());
68
}
68
}
69
69
70
void ApplicationCacheHost::selectCacheWithManifest(const KURL& manifestURL)
70
void ApplicationCacheHost::selectCacheWithManifest(const URL& manifestURL)
71
{
71
{
72
    ApplicationCacheGroup::selectCache(m_documentLoader->frame(), manifestURL);
72
    ApplicationCacheGroup::selectCache(m_documentLoader->frame(), manifestURL);
73
}
73
}
Lines 86-93 void ApplicationCacheHost::maybeLoadMainResource(ResourceRequest& request, Subst a/Source/WebCore/loader/appcache/ApplicationCacheHost.cpp_sec2
86
            substituteData = SubstituteData(resource->data(),
86
            substituteData = SubstituteData(resource->data(),
87
                                            resource->response().mimeType(),
87
                                            resource->response().mimeType(),
88
                                            resource->response().textEncodingName(),
88
                                            resource->response().textEncodingName(),
89
                                            KURL(),
89
                                            URL(),
90
                                            KURL(),
90
                                            URL(),
91
                                            SubstituteData::ShouldRevealToSessionHistory);
91
                                            SubstituteData::ShouldRevealToSessionHistory);
92
        }
92
        }
93
    }
93
    }
Lines 157-163 void ApplicationCacheHost::finishedLoadingMainResource() a/Source/WebCore/loader/appcache/ApplicationCacheHost.cpp_sec3
157
        group->finishedLoadingMainResource(m_documentLoader);
157
        group->finishedLoadingMainResource(m_documentLoader);
158
}
158
}
159
159
160
bool ApplicationCacheHost::maybeLoadResource(ResourceLoader* loader, ResourceRequest& request, const KURL& originalURL)
160
bool ApplicationCacheHost::maybeLoadResource(ResourceLoader* loader, ResourceRequest& request, const URL& originalURL)
161
{
161
{
162
    if (!isApplicationCacheEnabled())
162
    if (!isApplicationCacheEnabled())
163
        return false;
163
        return false;
Lines 303-309 ApplicationCacheHost::CacheInfo ApplicationCacheHost::applicationCacheInfo() a/Source/WebCore/loader/appcache/ApplicationCacheHost.cpp_sec4
303
{
303
{
304
    ApplicationCache* cache = applicationCache();
304
    ApplicationCache* cache = applicationCache();
305
    if (!cache || !cache->isComplete())
305
    if (!cache || !cache->isComplete())
306
        return CacheInfo(KURL(), 0, 0, 0);
306
        return CacheInfo(URL(), 0, 0, 0);
307
  
307
  
308
    // FIXME: Add "Creation Time" and "Update Time" to Application Caches.
308
    // FIXME: Add "Creation Time" and "Update Time" to Application Caches.
309
    return CacheInfo(cache->manifestResource()->url(), 0, 0, cache->estimatedSizeInStorage());
309
    return CacheInfo(cache->manifestResource()->url(), 0, 0, cache->estimatedSizeInStorage());
Lines 378-384 bool ApplicationCacheHost::getApplicationCacheFallbackResource(const ResourceReq a/Source/WebCore/loader/appcache/ApplicationCacheHost.cpp_sec5
378
    if (!ApplicationCache::requestIsHTTPOrHTTPSGet(request))
378
    if (!ApplicationCache::requestIsHTTPOrHTTPSGet(request))
379
        return false;
379
        return false;
380
380
381
    KURL fallbackURL;
381
    URL fallbackURL;
382
    if (cache->isURLInOnlineWhitelist(request.url()))
382
    if (cache->isURLInOnlineWhitelist(request.url()))
383
        return false;
383
        return false;
384
    if (!cache->urlMatchesFallbackNamespace(request.url(), &fallbackURL))
384
    if (!cache->urlMatchesFallbackNamespace(request.url(), &fallbackURL))
- a/Source/WebCore/loader/appcache/ApplicationCacheHost.h -7 / +7 lines
Lines 31-37 a/Source/WebCore/loader/appcache/ApplicationCacheHost.h_sec1
31
#ifndef ApplicationCacheHost_h
31
#ifndef ApplicationCacheHost_h
32
#define ApplicationCacheHost_h
32
#define ApplicationCacheHost_h
33
33
34
#include "KURL.h"
34
#include "URL.h"
35
#include <wtf/Deque.h>
35
#include <wtf/Deque.h>
36
#include <wtf/OwnPtr.h>
36
#include <wtf/OwnPtr.h>
37
#include <wtf/PassRefPtr.h>
37
#include <wtf/PassRefPtr.h>
Lines 78-96 namespace WebCore { a/Source/WebCore/loader/appcache/ApplicationCacheHost.h_sec2
78
78
79
#if ENABLE(INSPECTOR)
79
#if ENABLE(INSPECTOR)
80
        struct CacheInfo {
80
        struct CacheInfo {
81
            CacheInfo(const KURL& manifest, double creationTime, double updateTime, long long size)
81
            CacheInfo(const URL& manifest, double creationTime, double updateTime, long long size)
82
                : m_manifest(manifest)
82
                : m_manifest(manifest)
83
                , m_creationTime(creationTime)
83
                , m_creationTime(creationTime)
84
                , m_updateTime(updateTime)
84
                , m_updateTime(updateTime)
85
                , m_size(size) { }
85
                , m_size(size) { }
86
            KURL m_manifest;
86
            URL m_manifest;
87
            double m_creationTime;
87
            double m_creationTime;
88
            double m_updateTime;
88
            double m_updateTime;
89
            long long m_size;
89
            long long m_size;
90
        };
90
        };
91
91
92
        struct ResourceInfo {
92
        struct ResourceInfo {
93
            ResourceInfo(const KURL& resource, bool isMaster, bool isManifest, bool isFallback, bool isForeign, bool isExplicit, long long size)
93
            ResourceInfo(const URL& resource, bool isMaster, bool isManifest, bool isFallback, bool isForeign, bool isExplicit, long long size)
94
                : m_resource(resource)
94
                : m_resource(resource)
95
                , m_isMaster(isMaster)
95
                , m_isMaster(isMaster)
96
                , m_isManifest(isManifest)
96
                , m_isManifest(isManifest)
Lines 98-104 namespace WebCore { a/Source/WebCore/loader/appcache/ApplicationCacheHost.h_sec3
98
                , m_isForeign(isForeign)
98
                , m_isForeign(isForeign)
99
                , m_isExplicit(isExplicit)
99
                , m_isExplicit(isExplicit)
100
                , m_size(size) { }
100
                , m_size(size) { }
101
            KURL m_resource;
101
            URL m_resource;
102
            bool m_isMaster;
102
            bool m_isMaster;
103
            bool m_isManifest;
103
            bool m_isManifest;
104
            bool m_isFallback;
104
            bool m_isFallback;
Lines 114-120 namespace WebCore { a/Source/WebCore/loader/appcache/ApplicationCacheHost.h_sec4
114
        ~ApplicationCacheHost();
114
        ~ApplicationCacheHost();
115
115
116
        void selectCacheWithoutManifest();
116
        void selectCacheWithoutManifest();
117
        void selectCacheWithManifest(const KURL& manifestURL);
117
        void selectCacheWithManifest(const URL& manifestURL);
118
118
119
        void maybeLoadMainResource(ResourceRequest&, SubstituteData&);
119
        void maybeLoadMainResource(ResourceRequest&, SubstituteData&);
120
        void maybeLoadMainResourceForRedirect(ResourceRequest&, SubstituteData&);
120
        void maybeLoadMainResourceForRedirect(ResourceRequest&, SubstituteData&);
Lines 123-129 namespace WebCore { a/Source/WebCore/loader/appcache/ApplicationCacheHost.h_sec5
123
        void finishedLoadingMainResource();
123
        void finishedLoadingMainResource();
124
        void failedLoadingMainResource();
124
        void failedLoadingMainResource();
125
125
126
        bool maybeLoadResource(ResourceLoader*, ResourceRequest&, const KURL& originalURL);
126
        bool maybeLoadResource(ResourceLoader*, ResourceRequest&, const URL& originalURL);
127
        bool maybeLoadFallbackForRedirect(ResourceLoader*, ResourceRequest&, const ResourceResponse&);
127
        bool maybeLoadFallbackForRedirect(ResourceLoader*, ResourceRequest&, const ResourceResponse&);
128
        bool maybeLoadFallbackForResponse(ResourceLoader*, const ResourceResponse&);
128
        bool maybeLoadFallbackForResponse(ResourceLoader*, const ResourceResponse&);
129
        bool maybeLoadFallbackForError(ResourceLoader*, const ResourceError&);
129
        bool maybeLoadFallbackForError(ResourceLoader*, const ResourceError&);
- a/Source/WebCore/loader/appcache/ApplicationCacheResource.cpp -1 / +1 lines
Lines 29-35 a/Source/WebCore/loader/appcache/ApplicationCacheResource.cpp_sec1
29
29
30
namespace WebCore {
30
namespace WebCore {
31
31
32
ApplicationCacheResource::ApplicationCacheResource(const KURL& url, const ResourceResponse& response, unsigned type, PassRefPtr<SharedBuffer> data, const String& path)
32
ApplicationCacheResource::ApplicationCacheResource(const URL& url, const ResourceResponse& response, unsigned type, PassRefPtr<SharedBuffer> data, const String& path)
33
    : SubstituteResource(url, response, data)
33
    : SubstituteResource(url, response, data)
34
    , m_type(type)
34
    , m_type(type)
35
    , m_storageID(0)
35
    , m_storageID(0)
- a/Source/WebCore/loader/appcache/ApplicationCacheResource.h -2 / +2 lines
Lines 40-46 public: a/Source/WebCore/loader/appcache/ApplicationCacheResource.h_sec1
40
        Fallback = 1 << 4
40
        Fallback = 1 << 4
41
    };
41
    };
42
        
42
        
43
    static PassRefPtr<ApplicationCacheResource> create(const KURL& url, const ResourceResponse& response, unsigned type, PassRefPtr<SharedBuffer> buffer = SharedBuffer::create(), const String& path = String())
43
    static PassRefPtr<ApplicationCacheResource> create(const URL& url, const ResourceResponse& response, unsigned type, PassRefPtr<SharedBuffer> buffer = SharedBuffer::create(), const String& path = String())
44
    {
44
    {
45
        ASSERT(!url.hasFragmentIdentifier());
45
        ASSERT(!url.hasFragmentIdentifier());
46
        return adoptRef(new ApplicationCacheResource(url, response, type, buffer, path));
46
        return adoptRef(new ApplicationCacheResource(url, response, type, buffer, path));
Lines 62-68 public: a/Source/WebCore/loader/appcache/ApplicationCacheResource.h_sec2
62
#endif
62
#endif
63
    
63
    
64
private:
64
private:
65
    ApplicationCacheResource(const KURL&, const ResourceResponse&, unsigned type, PassRefPtr<SharedBuffer>, const String& path);
65
    ApplicationCacheResource(const URL&, const ResourceResponse&, unsigned type, PassRefPtr<SharedBuffer>, const String& path);
66
66
67
    unsigned m_type;
67
    unsigned m_type;
68
    unsigned m_storageID;
68
    unsigned m_storageID;
- a/Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp -19 / +19 lines
Lines 31-37 a/Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp_sec1
31
#include "ApplicationCacheHost.h"
31
#include "ApplicationCacheHost.h"
32
#include "ApplicationCacheResource.h"
32
#include "ApplicationCacheResource.h"
33
#include "FileSystem.h"
33
#include "FileSystem.h"
34
#include "KURL.h"
34
#include "URL.h"
35
#include "NotImplemented.h"
35
#include "NotImplemented.h"
36
#include "SQLiteStatement.h"
36
#include "SQLiteStatement.h"
37
#include "SQLiteTransaction.h"
37
#include "SQLiteTransaction.h"
Lines 87-93 private: a/Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp_sec2
87
    Vector<Record> m_records;
87
    Vector<Record> m_records;
88
};
88
};
89
89
90
static unsigned urlHostHash(const KURL& url)
90
static unsigned urlHostHash(const URL& url)
91
{
91
{
92
    unsigned hostStart = url.hostStart();
92
    unsigned hostStart = url.hostStart();
93
    unsigned hostEnd = url.hostEnd();
93
    unsigned hostEnd = url.hostEnd();
Lines 100-106 static unsigned urlHostHash(const KURL& url) a/Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp_sec3
100
    return AlreadyHashed::avoidDeletedValue(StringHasher::computeHashAndMaskTop8Bits(urlString.characters16() + hostStart, hostEnd - hostStart));
100
    return AlreadyHashed::avoidDeletedValue(StringHasher::computeHashAndMaskTop8Bits(urlString.characters16() + hostStart, hostEnd - hostStart));
101
}
101
}
102
102
103
ApplicationCacheGroup* ApplicationCacheStorage::loadCacheGroup(const KURL& manifestURL)
103
ApplicationCacheGroup* ApplicationCacheStorage::loadCacheGroup(const URL& manifestURL)
104
{
104
{
105
    openDatabase(false);
105
    openDatabase(false);
106
    if (!m_database.isOpen())
106
    if (!m_database.isOpen())
Lines 135-141 ApplicationCacheGroup* ApplicationCacheStorage::loadCacheGroup(const KURL& manif a/Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp_sec4
135
    return group;
135
    return group;
136
}    
136
}    
137
137
138
ApplicationCacheGroup* ApplicationCacheStorage::findOrCreateCacheGroup(const KURL& manifestURL)
138
ApplicationCacheGroup* ApplicationCacheStorage::findOrCreateCacheGroup(const URL& manifestURL)
139
{
139
{
140
    ASSERT(!manifestURL.hasFragmentIdentifier());
140
    ASSERT(!manifestURL.hasFragmentIdentifier());
141
141
Lines 160-166 ApplicationCacheGroup* ApplicationCacheStorage::findOrCreateCacheGroup(const KUR a/Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp_sec5
160
    return group;
160
    return group;
161
}
161
}
162
162
163
ApplicationCacheGroup* ApplicationCacheStorage::findInMemoryCacheGroup(const KURL& manifestURL) const
163
ApplicationCacheGroup* ApplicationCacheStorage::findInMemoryCacheGroup(const URL& manifestURL) const
164
{
164
{
165
    return m_cachesInMemory.get(manifestURL);
165
    return m_cachesInMemory.get(manifestURL);
166
}
166
}
Lines 189-195 void ApplicationCacheStorage::loadManifestHostHashes() a/Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp_sec6
189
        m_cacheHostSet.add(static_cast<unsigned>(statement.getColumnInt64(0)));
189
        m_cacheHostSet.add(static_cast<unsigned>(statement.getColumnInt64(0)));
190
}    
190
}    
191
191
192
ApplicationCacheGroup* ApplicationCacheStorage::cacheGroupForURL(const KURL& url)
192
ApplicationCacheGroup* ApplicationCacheStorage::cacheGroupForURL(const URL& url)
193
{
193
{
194
    ASSERT(!url.hasFragmentIdentifier());
194
    ASSERT(!url.hasFragmentIdentifier());
195
    
195
    
Lines 229-235 ApplicationCacheGroup* ApplicationCacheStorage::cacheGroupForURL(const KURL& url a/Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp_sec7
229
    
229
    
230
    int result;
230
    int result;
231
    while ((result = statement.step()) == SQLResultRow) {
231
    while ((result = statement.step()) == SQLResultRow) {
232
        KURL manifestURL = KURL(ParsedURLString, statement.getColumnText(1));
232
        URL manifestURL = URL(ParsedURLString, statement.getColumnText(1));
233
233
234
        if (m_cachesInMemory.contains(manifestURL))
234
        if (m_cachesInMemory.contains(manifestURL))
235
            continue;
235
            continue;
Lines 266-272 ApplicationCacheGroup* ApplicationCacheStorage::cacheGroupForURL(const KURL& url a/Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp_sec8
266
    return 0;
266
    return 0;
267
}
267
}
268
268
269
ApplicationCacheGroup* ApplicationCacheStorage::fallbackCacheGroupForURL(const KURL& url)
269
ApplicationCacheGroup* ApplicationCacheStorage::fallbackCacheGroupForURL(const URL& url)
270
{
270
{
271
    ASSERT(!url.hasFragmentIdentifier());
271
    ASSERT(!url.hasFragmentIdentifier());
272
272
Lines 278-284 ApplicationCacheGroup* ApplicationCacheStorage::fallbackCacheGroupForURL(const K a/Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp_sec9
278
        ASSERT(!group->isObsolete());
278
        ASSERT(!group->isObsolete());
279
279
280
        if (ApplicationCache* cache = group->newestCache()) {
280
        if (ApplicationCache* cache = group->newestCache()) {
281
            KURL fallbackURL;
281
            URL fallbackURL;
282
            if (cache->isURLInOnlineWhitelist(url))
282
            if (cache->isURLInOnlineWhitelist(url))
283
                continue;
283
                continue;
284
            if (!cache->urlMatchesFallbackNamespace(url, &fallbackURL))
284
            if (!cache->urlMatchesFallbackNamespace(url, &fallbackURL))
Lines 299-305 ApplicationCacheGroup* ApplicationCacheStorage::fallbackCacheGroupForURL(const K a/Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp_sec10
299
    
299
    
300
    int result;
300
    int result;
301
    while ((result = statement.step()) == SQLResultRow) {
301
    while ((result = statement.step()) == SQLResultRow) {
302
        KURL manifestURL = KURL(ParsedURLString, statement.getColumnText(1));
302
        URL manifestURL = URL(ParsedURLString, statement.getColumnText(1));
303
303
304
        if (m_cachesInMemory.contains(manifestURL))
304
        if (m_cachesInMemory.contains(manifestURL))
305
            continue;
305
            continue;
Lines 313-319 ApplicationCacheGroup* ApplicationCacheStorage::fallbackCacheGroupForURL(const K a/Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp_sec11
313
        unsigned newestCacheID = static_cast<unsigned>(statement.getColumnInt64(2));
313
        unsigned newestCacheID = static_cast<unsigned>(statement.getColumnInt64(2));
314
        RefPtr<ApplicationCache> cache = loadCache(newestCacheID);
314
        RefPtr<ApplicationCache> cache = loadCache(newestCacheID);
315
315
316
        KURL fallbackURL;
316
        URL fallbackURL;
317
        if (cache->isURLInOnlineWhitelist(url))
317
        if (cache->isURLInOnlineWhitelist(url))
318
            continue;
318
            continue;
319
        if (!cache->urlMatchesFallbackNamespace(url, &fallbackURL))
319
        if (!cache->urlMatchesFallbackNamespace(url, &fallbackURL))
Lines 729-735 bool ApplicationCacheStorage::store(ApplicationCache* cache, ResourceStorageIDJo a/Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp_sec12
729
    }
729
    }
730
    
730
    
731
    // Store the online whitelist
731
    // Store the online whitelist
732
    const Vector<KURL>& onlineWhitelist = cache->onlineWhitelist();
732
    const Vector<URL>& onlineWhitelist = cache->onlineWhitelist();
733
    {
733
    {
734
        size_t whitelistSize = onlineWhitelist.size();
734
        size_t whitelistSize = onlineWhitelist.size();
735
        for (size_t i = 0; i < whitelistSize; ++i) {
735
        for (size_t i = 0; i < whitelistSize; ++i) {
Lines 1110-1116 PassRefPtr<ApplicationCache> ApplicationCacheStorage::loadCache(unsigned storage a/Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp_sec13
1110
1110
1111
    int result;
1111
    int result;
1112
    while ((result = cacheStatement.step()) == SQLResultRow) {
1112
    while ((result = cacheStatement.step()) == SQLResultRow) {
1113
        KURL url(ParsedURLString, cacheStatement.getColumnText(0));
1113
        URL url(ParsedURLString, cacheStatement.getColumnText(0));
1114
        
1114
        
1115
        int httpStatusCode = cacheStatement.getColumnInt(1);
1115
        int httpStatusCode = cacheStatement.getColumnInt(1);
1116
1116
Lines 1156-1164 PassRefPtr<ApplicationCache> ApplicationCacheStorage::loadCache(unsigned storage a/Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp_sec14
1156
        return 0;
1156
        return 0;
1157
    whitelistStatement.bindInt64(1, storageID);
1157
    whitelistStatement.bindInt64(1, storageID);
1158
    
1158
    
1159
    Vector<KURL> whitelist;
1159
    Vector<URL> whitelist;
1160
    while ((result = whitelistStatement.step()) == SQLResultRow) 
1160
    while ((result = whitelistStatement.step()) == SQLResultRow) 
1161
        whitelist.append(KURL(ParsedURLString, whitelistStatement.getColumnText(0)));
1161
        whitelist.append(URL(ParsedURLString, whitelistStatement.getColumnText(0)));
1162
1162
1163
    if (result != SQLResultDone)
1163
    if (result != SQLResultDone)
1164
        LOG_ERROR("Could not load cache online whitelist, error \"%s\"", m_database.lastErrorMsg());
1164
        LOG_ERROR("Could not load cache online whitelist, error \"%s\"", m_database.lastErrorMsg());
Lines 1188-1194 PassRefPtr<ApplicationCache> ApplicationCacheStorage::loadCache(unsigned storage a/Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp_sec15
1188
    
1188
    
1189
    FallbackURLVector fallbackURLs;
1189
    FallbackURLVector fallbackURLs;
1190
    while ((result = fallbackStatement.step()) == SQLResultRow) 
1190
    while ((result = fallbackStatement.step()) == SQLResultRow) 
1191
        fallbackURLs.append(make_pair(KURL(ParsedURLString, fallbackStatement.getColumnText(0)), KURL(ParsedURLString, fallbackStatement.getColumnText(1))));
1191
        fallbackURLs.append(make_pair(URL(ParsedURLString, fallbackStatement.getColumnText(0)), URL(ParsedURLString, fallbackStatement.getColumnText(1))));
1192
1192
1193
    if (result != SQLResultDone)
1193
    if (result != SQLResultDone)
1194
        LOG_ERROR("Could not load fallback URLs, error \"%s\"", m_database.lastErrorMsg());
1194
        LOG_ERROR("Could not load fallback URLs, error \"%s\"", m_database.lastErrorMsg());
Lines 1337-1343 bool ApplicationCacheStorage::storeCopyOfCache(const String& cacheDirectory, App a/Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp_sec16
1337
    return copyStorage.storeNewestCache(groupCopy.get());
1337
    return copyStorage.storeNewestCache(groupCopy.get());
1338
}
1338
}
1339
1339
1340
bool ApplicationCacheStorage::manifestURLs(Vector<KURL>* urls)
1340
bool ApplicationCacheStorage::manifestURLs(Vector<URL>* urls)
1341
{
1341
{
1342
    ASSERT(urls);
1342
    ASSERT(urls);
1343
    openDatabase(false);
1343
    openDatabase(false);
Lines 1350-1356 bool ApplicationCacheStorage::manifestURLs(Vector<KURL>* urls) a/Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp_sec17
1350
        return false;
1350
        return false;
1351
1351
1352
    while (selectURLs.step() == SQLResultRow)
1352
    while (selectURLs.step() == SQLResultRow)
1353
        urls->append(KURL(ParsedURLString, selectURLs.getColumnText(0)));
1353
        urls->append(URL(ParsedURLString, selectURLs.getColumnText(0)));
1354
1354
1355
    return true;
1355
    return true;
1356
}
1356
}
Lines 1514-1520 long long ApplicationCacheStorage::flatFileAreaSize() a/Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp_sec18
1514
1514
1515
void ApplicationCacheStorage::getOriginsWithCache(HashSet<RefPtr<SecurityOrigin> >& origins)
1515
void ApplicationCacheStorage::getOriginsWithCache(HashSet<RefPtr<SecurityOrigin> >& origins)
1516
{
1516
{
1517
    Vector<KURL> urls;
1517
    Vector<URL> urls;
1518
    if (!manifestURLs(&urls)) {
1518
    if (!manifestURLs(&urls)) {
1519
        LOG_ERROR("Failed to retrieve ApplicationCache manifest URLs");
1519
        LOG_ERROR("Failed to retrieve ApplicationCache manifest URLs");
1520
        return;
1520
        return;
- a/Source/WebCore/loader/appcache/ApplicationCacheStorage.h -7 / +7 lines
Lines 39-45 class ApplicationCache; a/Source/WebCore/loader/appcache/ApplicationCacheStorage.h_sec1
39
class ApplicationCacheGroup;
39
class ApplicationCacheGroup;
40
class ApplicationCacheHost;
40
class ApplicationCacheHost;
41
class ApplicationCacheResource;
41
class ApplicationCacheResource;
42
class KURL;
42
class URL;
43
class SecurityOrigin;
43
class SecurityOrigin;
44
class SharedBuffer;
44
class SharedBuffer;
45
template <class T> class StorageIDJournal;
45
template <class T> class StorageIDJournal;
Lines 69-79 public: a/Source/WebCore/loader/appcache/ApplicationCacheStorage.h_sec2
69
    bool storeUpdatedQuotaForOrigin(const SecurityOrigin*, int64_t quota);
69
    bool storeUpdatedQuotaForOrigin(const SecurityOrigin*, int64_t quota);
70
    bool checkOriginQuota(ApplicationCacheGroup*, ApplicationCache* oldCache, ApplicationCache* newCache, int64_t& totalSpaceNeeded);
70
    bool checkOriginQuota(ApplicationCacheGroup*, ApplicationCache* oldCache, ApplicationCache* newCache, int64_t& totalSpaceNeeded);
71
71
72
    ApplicationCacheGroup* cacheGroupForURL(const KURL&); // Cache to load a main resource from.
72
    ApplicationCacheGroup* cacheGroupForURL(const URL&); // Cache to load a main resource from.
73
    ApplicationCacheGroup* fallbackCacheGroupForURL(const KURL&); // Cache that has a fallback entry to load a main resource from if normal loading fails.
73
    ApplicationCacheGroup* fallbackCacheGroupForURL(const URL&); // Cache that has a fallback entry to load a main resource from if normal loading fails.
74
74
75
    ApplicationCacheGroup* findOrCreateCacheGroup(const KURL& manifestURL);
75
    ApplicationCacheGroup* findOrCreateCacheGroup(const URL& manifestURL);
76
    ApplicationCacheGroup* findInMemoryCacheGroup(const KURL& manifestURL) const;
76
    ApplicationCacheGroup* findInMemoryCacheGroup(const URL& manifestURL) const;
77
    void cacheGroupDestroyed(ApplicationCacheGroup*);
77
    void cacheGroupDestroyed(ApplicationCacheGroup*);
78
    void cacheGroupMadeObsolete(ApplicationCacheGroup*);
78
    void cacheGroupMadeObsolete(ApplicationCacheGroup*);
79
        
79
        
Lines 89-95 public: a/Source/WebCore/loader/appcache/ApplicationCacheStorage.h_sec3
89
    
89
    
90
    static bool storeCopyOfCache(const String& cacheDirectory, ApplicationCacheHost*);
90
    static bool storeCopyOfCache(const String& cacheDirectory, ApplicationCacheHost*);
91
91
92
    bool manifestURLs(Vector<KURL>* urls);
92
    bool manifestURLs(Vector<URL>* urls);
93
    bool cacheGroupSize(const String& manifestURL, int64_t* size);
93
    bool cacheGroupSize(const String& manifestURL, int64_t* size);
94
    bool deleteCacheGroup(const String& manifestURL);
94
    bool deleteCacheGroup(const String& manifestURL);
95
    void vacuumDatabaseFile();
95
    void vacuumDatabaseFile();
Lines 102-108 public: a/Source/WebCore/loader/appcache/ApplicationCacheStorage.h_sec4
102
private:
102
private:
103
    ApplicationCacheStorage();
103
    ApplicationCacheStorage();
104
    PassRefPtr<ApplicationCache> loadCache(unsigned storageID);
104
    PassRefPtr<ApplicationCache> loadCache(unsigned storageID);
105
    ApplicationCacheGroup* loadCacheGroup(const KURL& manifestURL);
105
    ApplicationCacheGroup* loadCacheGroup(const URL& manifestURL);
106
    
106
    
107
    typedef StorageIDJournal<ApplicationCacheResource> ResourceStorageIDJournal;
107
    typedef StorageIDJournal<ApplicationCacheResource> ResourceStorageIDJournal;
108
    typedef StorageIDJournal<ApplicationCacheGroup> GroupStorageIDJournal;
108
    typedef StorageIDJournal<ApplicationCacheGroup> GroupStorageIDJournal;
- a/Source/WebCore/loader/appcache/DOMApplicationCache.h -1 / +1 lines
Lines 41-47 a/Source/WebCore/loader/appcache/DOMApplicationCache.h_sec1
41
namespace WebCore {
41
namespace WebCore {
42
42
43
class Frame;
43
class Frame;
44
class KURL;
44
class URL;
45
45
46
// FIXME: This class should be marked FINAL once <http://webkit.org/b/121747> is fixed.
46
// FIXME: This class should be marked FINAL once <http://webkit.org/b/121747> is fixed.
47
class DOMApplicationCache : public ScriptWrappable, public RefCounted<DOMApplicationCache>, public EventTargetWithInlineData, public DOMWindowProperty {
47
class DOMApplicationCache : public ScriptWrappable, public RefCounted<DOMApplicationCache>, public EventTargetWithInlineData, public DOMWindowProperty {
- a/Source/WebCore/loader/appcache/ManifestParser.cpp -5 / +5 lines
Lines 26-33 a/Source/WebCore/loader/appcache/ManifestParser.cpp_sec1
26
#include "config.h"
26
#include "config.h"
27
#include "ManifestParser.h"
27
#include "ManifestParser.h"
28
28
29
#include "KURL.h"
30
#include "TextResourceDecoder.h"
29
#include "TextResourceDecoder.h"
30
#include "URL.h"
31
#include <wtf/unicode/CharacterNames.h>
31
#include <wtf/unicode/CharacterNames.h>
32
32
33
using namespace std;
33
using namespace std;
Lines 36-42 namespace WebCore { a/Source/WebCore/loader/appcache/ManifestParser.cpp_sec2
36
36
37
enum Mode { Explicit, Fallback, OnlineWhitelist, Unknown };
37
enum Mode { Explicit, Fallback, OnlineWhitelist, Unknown };
38
    
38
    
39
bool parseManifest(const KURL& manifestURL, const char* data, int length, Manifest& manifest)
39
bool parseManifest(const URL& manifestURL, const char* data, int length, Manifest& manifest)
40
{
40
{
41
    ASSERT(manifest.explicitURLs.isEmpty());
41
    ASSERT(manifest.explicitURLs.isEmpty());
42
    ASSERT(manifest.onlineWhitelistedURLs.isEmpty());
42
    ASSERT(manifest.onlineWhitelistedURLs.isEmpty());
Lines 114-120 bool parseManifest(const KURL& manifestURL, const char* data, int length, Manife a/Source/WebCore/loader/appcache/ManifestParser.cpp_sec3
114
                continue;
114
                continue;
115
            }
115
            }
116
116
117
            KURL url(manifestURL, String(line.characters(), p - line.characters()));
117
            URL url(manifestURL, String(line.characters(), p - line.characters()));
118
            
118
            
119
            if (!url.isValid())
119
            if (!url.isValid())
120
                continue;
120
                continue;
Lines 146-152 bool parseManifest(const KURL& manifestURL, const char* data, int length, Manife a/Source/WebCore/loader/appcache/ManifestParser.cpp_sec4
146
                continue;
146
                continue;
147
            }
147
            }
148
            
148
            
149
            KURL namespaceURL(manifestURL, String(line.characters(), p - line.characters()));
149
            URL namespaceURL(manifestURL, String(line.characters(), p - line.characters()));
150
            if (!namespaceURL.isValid())
150
            if (!namespaceURL.isValid())
151
                continue;
151
                continue;
152
            if (namespaceURL.hasFragmentIdentifier())
152
            if (namespaceURL.hasFragmentIdentifier())
Lines 164-170 bool parseManifest(const KURL& manifestURL, const char* data, int length, Manife a/Source/WebCore/loader/appcache/ManifestParser.cpp_sec5
164
            while (p < lineEnd && *p != '\t' && *p != ' ') 
164
            while (p < lineEnd && *p != '\t' && *p != ' ') 
165
                p++;
165
                p++;
166
166
167
            KURL fallbackURL(manifestURL, String(fallbackStart, p - fallbackStart));
167
            URL fallbackURL(manifestURL, String(fallbackStart, p - fallbackStart));
168
            if (!fallbackURL.isValid())
168
            if (!fallbackURL.isValid())
169
                continue;
169
                continue;
170
            if (fallbackURL.hasFragmentIdentifier())
170
            if (fallbackURL.hasFragmentIdentifier())
- a/Source/WebCore/loader/appcache/ManifestParser.h -3 / +3 lines
Lines 30-45 a/Source/WebCore/loader/appcache/ManifestParser.h_sec1
30
30
31
namespace WebCore {
31
namespace WebCore {
32
32
33
    class KURL;
33
    class URL;
34
34
35
    struct Manifest {
35
    struct Manifest {
36
        Vector<KURL> onlineWhitelistedURLs;
36
        Vector<URL> onlineWhitelistedURLs;
37
        HashSet<String> explicitURLs;
37
        HashSet<String> explicitURLs;
38
        FallbackURLVector fallbackURLs;
38
        FallbackURLVector fallbackURLs;
39
        bool allowAllNetworkRequests; // Wildcard found in NETWORK section.
39
        bool allowAllNetworkRequests; // Wildcard found in NETWORK section.
40
    };
40
    };
41
41
42
    bool parseManifest(const KURL& manifestURL, const char* data, int length, Manifest&);
42
    bool parseManifest(const URL& manifestURL, const char* data, int length, Manifest&);
43
43
44
}
44
}
45
45
- a/Source/WebCore/loader/archive/ArchiveFactory.cpp -3 / +3 lines
Lines 45-56 a/Source/WebCore/loader/archive/ArchiveFactory.cpp_sec1
45
45
46
namespace WebCore {
46
namespace WebCore {
47
47
48
typedef PassRefPtr<Archive> RawDataCreationFunction(const KURL&, SharedBuffer*);
48
typedef PassRefPtr<Archive> RawDataCreationFunction(const URL&, SharedBuffer*);
49
typedef HashMap<String, RawDataCreationFunction*, CaseFoldingHash> ArchiveMIMETypesMap;
49
typedef HashMap<String, RawDataCreationFunction*, CaseFoldingHash> ArchiveMIMETypesMap;
50
50
51
// The create functions in the archive classes return PassRefPtr to concrete subclasses
51
// The create functions in the archive classes return PassRefPtr to concrete subclasses
52
// of Archive. This adaptor makes the functions have a uniform return type.
52
// of Archive. This adaptor makes the functions have a uniform return type.
53
template <typename ArchiveClass> static PassRefPtr<Archive> archiveFactoryCreate(const KURL& url, SharedBuffer* buffer)
53
template <typename ArchiveClass> static PassRefPtr<Archive> archiveFactoryCreate(const URL& url, SharedBuffer* buffer)
54
{
54
{
55
    return ArchiveClass::create(url, buffer);
55
    return ArchiveClass::create(url, buffer);
56
}
56
}
Lines 82-88 bool ArchiveFactory::isArchiveMimeType(const String& mimeType) a/Source/WebCore/loader/archive/ArchiveFactory.cpp_sec2
82
    return !mimeType.isEmpty() && archiveMIMETypes().contains(mimeType);
82
    return !mimeType.isEmpty() && archiveMIMETypes().contains(mimeType);
83
}
83
}
84
84
85
PassRefPtr<Archive> ArchiveFactory::create(const KURL& url, SharedBuffer* data, const String& mimeType)
85
PassRefPtr<Archive> ArchiveFactory::create(const URL& url, SharedBuffer* data, const String& mimeType)
86
{
86
{
87
    RawDataCreationFunction* function = mimeType.isEmpty() ? 0 : archiveMIMETypes().get(mimeType);
87
    RawDataCreationFunction* function = mimeType.isEmpty() ? 0 : archiveMIMETypes().get(mimeType);
88
    return function ? function(url, data) : PassRefPtr<Archive>(0);
88
    return function ? function(url, data) : PassRefPtr<Archive>(0);
- a/Source/WebCore/loader/archive/ArchiveFactory.h -1 / +1 lines
Lines 41-47 class SharedBuffer; a/Source/WebCore/loader/archive/ArchiveFactory.h_sec1
41
class ArchiveFactory {
41
class ArchiveFactory {
42
public:
42
public:
43
    static bool isArchiveMimeType(const String&);
43
    static bool isArchiveMimeType(const String&);
44
    static PassRefPtr<Archive> create(const KURL&, SharedBuffer* data, const String& mimeType);
44
    static PassRefPtr<Archive> create(const URL&, SharedBuffer* data, const String& mimeType);
45
    static void registerKnownArchiveMIMETypes();
45
    static void registerKnownArchiveMIMETypes();
46
};
46
};
47
47
- a/Source/WebCore/loader/archive/ArchiveResource.cpp -3 / +3 lines
Lines 33-39 a/Source/WebCore/loader/archive/ArchiveResource.cpp_sec1
33
33
34
namespace WebCore {
34
namespace WebCore {
35
35
36
inline ArchiveResource::ArchiveResource(PassRefPtr<SharedBuffer> data, const KURL& url, const String& mimeType, const String& textEncoding, const String& frameName, const ResourceResponse& response)
36
inline ArchiveResource::ArchiveResource(PassRefPtr<SharedBuffer> data, const URL& url, const String& mimeType, const String& textEncoding, const String& frameName, const ResourceResponse& response)
37
    : SubstituteResource(url, response, data)
37
    : SubstituteResource(url, response, data)
38
    , m_mimeType(mimeType)
38
    , m_mimeType(mimeType)
39
    , m_textEncoding(textEncoding)
39
    , m_textEncoding(textEncoding)
Lines 42-48 inline ArchiveResource::ArchiveResource(PassRefPtr<SharedBuffer> data, const KUR a/Source/WebCore/loader/archive/ArchiveResource.cpp_sec2
42
{
42
{
43
}
43
}
44
44
45
PassRefPtr<ArchiveResource> ArchiveResource::create(PassRefPtr<SharedBuffer> data, const KURL& url, const String& mimeType, const String& textEncoding, const String& frameName, const ResourceResponse& response)
45
PassRefPtr<ArchiveResource> ArchiveResource::create(PassRefPtr<SharedBuffer> data, const URL& url, const String& mimeType, const String& textEncoding, const String& frameName, const ResourceResponse& response)
46
{
46
{
47
    if (!data)
47
    if (!data)
48
        return 0;
48
        return 0;
Lines 54-60 PassRefPtr<ArchiveResource> ArchiveResource::create(PassRefPtr<SharedBuffer> dat a/Source/WebCore/loader/archive/ArchiveResource.cpp_sec3
54
    return adoptRef(new ArchiveResource(data, url, mimeType, textEncoding, frameName, response));
54
    return adoptRef(new ArchiveResource(data, url, mimeType, textEncoding, frameName, response));
55
}
55
}
56
56
57
PassRefPtr<ArchiveResource> ArchiveResource::create(PassRefPtr<SharedBuffer> data, const KURL& url, const ResourceResponse& response)
57
PassRefPtr<ArchiveResource> ArchiveResource::create(PassRefPtr<SharedBuffer> data, const URL& url, const ResourceResponse& response)
58
{
58
{
59
    return create(data, url, response.mimeType(), response.textEncodingName(), String(), response);
59
    return create(data, url, response.mimeType(), response.textEncodingName(), String(), response);
60
}
60
}
- a/Source/WebCore/loader/archive/ArchiveResource.h -3 / +3 lines
Lines 35-42 namespace WebCore { a/Source/WebCore/loader/archive/ArchiveResource.h_sec1
35
35
36
class ArchiveResource : public SubstituteResource {
36
class ArchiveResource : public SubstituteResource {
37
public:
37
public:
38
    static PassRefPtr<ArchiveResource> create(PassRefPtr<SharedBuffer>, const KURL&, const ResourceResponse&);
38
    static PassRefPtr<ArchiveResource> create(PassRefPtr<SharedBuffer>, const URL&, const ResourceResponse&);
39
    static PassRefPtr<ArchiveResource> create(PassRefPtr<SharedBuffer>, const KURL&,
39
    static PassRefPtr<ArchiveResource> create(PassRefPtr<SharedBuffer>, const URL&,
40
        const String& mimeType, const String& textEncoding, const String& frameName,
40
        const String& mimeType, const String& textEncoding, const String& frameName,
41
        const ResourceResponse& = ResourceResponse());
41
        const ResourceResponse& = ResourceResponse());
42
42
Lines 48-54 public: a/Source/WebCore/loader/archive/ArchiveResource.h_sec2
48
    bool shouldIgnoreWhenUnarchiving() const { return m_shouldIgnoreWhenUnarchiving; }
48
    bool shouldIgnoreWhenUnarchiving() const { return m_shouldIgnoreWhenUnarchiving; }
49
49
50
private:
50
private:
51
    ArchiveResource(PassRefPtr<SharedBuffer>, const KURL&, const String& mimeType, const String& textEncoding, const String& frameName, const ResourceResponse&);
51
    ArchiveResource(PassRefPtr<SharedBuffer>, const URL&, const String& mimeType, const String& textEncoding, const String& frameName, const ResourceResponse&);
52
52
53
    String m_mimeType;
53
    String m_mimeType;
54
    String m_textEncoding;
54
    String m_textEncoding;
- a/Source/WebCore/loader/archive/ArchiveResourceCollection.cpp -3 / +3 lines
Lines 68-78 void ArchiveResourceCollection::addResource(PassRefPtr<ArchiveResource> resource a/Source/WebCore/loader/archive/ArchiveResourceCollection.cpp_sec1
68
    if (!resource)
68
    if (!resource)
69
        return;
69
        return;
70
70
71
    const KURL& url = resource->url(); // get before passing PassRefPtr (which sets it to 0)
71
    const URL& url = resource->url(); // get before passing PassRefPtr (which sets it to 0)
72
    m_subresources.set(url, resource);
72
    m_subresources.set(url, resource);
73
}
73
}
74
74
75
ArchiveResource* ArchiveResourceCollection::archiveResourceForURL(const KURL& url)
75
ArchiveResource* ArchiveResourceCollection::archiveResourceForURL(const URL& url)
76
{
76
{
77
    ArchiveResource* resource = m_subresources.get(url);
77
    ArchiveResource* resource = m_subresources.get(url);
78
    if (!resource)
78
    if (!resource)
Lines 81-87 ArchiveResource* ArchiveResourceCollection::archiveResourceForURL(const KURL& ur a/Source/WebCore/loader/archive/ArchiveResourceCollection.cpp_sec2
81
    return resource;
81
    return resource;
82
}
82
}
83
83
84
PassRefPtr<Archive> ArchiveResourceCollection::popSubframeArchive(const String& frameName, const KURL& url)
84
PassRefPtr<Archive> ArchiveResourceCollection::popSubframeArchive(const String& frameName, const URL& url)
85
{
85
{
86
    RefPtr<Archive> archive = m_subframes.take(frameName);
86
    RefPtr<Archive> archive = m_subframes.take(frameName);
87
    if (archive)
87
    if (archive)
- a/Source/WebCore/loader/archive/ArchiveResourceCollection.h -3 / +3 lines
Lines 31-37 a/Source/WebCore/loader/archive/ArchiveResourceCollection.h_sec1
31
31
32
#include "Archive.h"
32
#include "Archive.h"
33
#include "ArchiveResource.h"
33
#include "ArchiveResource.h"
34
#include "KURL.h"
34
#include "URL.h"
35
#include <wtf/text/WTFString.h>
35
#include <wtf/text/WTFString.h>
36
36
37
#include <wtf/HashMap.h>
37
#include <wtf/HashMap.h>
Lines 47-54 public: a/Source/WebCore/loader/archive/ArchiveResourceCollection.h_sec2
47
    void addResource(PassRefPtr<ArchiveResource>);
47
    void addResource(PassRefPtr<ArchiveResource>);
48
    void addAllResources(Archive*);
48
    void addAllResources(Archive*);
49
    
49
    
50
    ArchiveResource* archiveResourceForURL(const KURL&);
50
    ArchiveResource* archiveResourceForURL(const URL&);
51
    PassRefPtr<Archive> popSubframeArchive(const String& frameName, const KURL&);
51
    PassRefPtr<Archive> popSubframeArchive(const String& frameName, const URL&);
52
    
52
    
53
private:    
53
private:    
54
    HashMap<String, RefPtr<ArchiveResource> > m_subresources;
54
    HashMap<String, RefPtr<ArchiveResource> > m_subresources;
- a/Source/WebCore/loader/archive/cf/LegacyWebArchive.cpp -12 / +12 lines
Lines 40-46 a/Source/WebCore/loader/archive/cf/LegacyWebArchive.cpp_sec1
40
#include "HTMLNames.h"
40
#include "HTMLNames.h"
41
#include "IconDatabase.h"
41
#include "IconDatabase.h"
42
#include "Image.h"
42
#include "Image.h"
43
#include "KURLHash.h"
43
#include "URLHash.h"
44
#include "Logging.h"
44
#include "Logging.h"
45
#include "MemoryCache.h"
45
#include "MemoryCache.h"
46
#include "Page.h"
46
#include "Page.h"
Lines 227-233 PassRefPtr<ArchiveResource> LegacyWebArchive::createResource(CFDictionaryRef dic a/Source/WebCore/loader/archive/cf/LegacyWebArchive.cpp_sec2
227
        response = createResourceResponseFromPropertyListData(resourceResponseData, resourceResponseVersion);
227
        response = createResourceResponseFromPropertyListData(resourceResponseData, resourceResponseVersion);
228
    }
228
    }
229
    
229
    
230
    return ArchiveResource::create(SharedBuffer::wrapCFData(resourceData), KURL(KURL(), url), mimeType, textEncoding, frameName, response);
230
    return ArchiveResource::create(SharedBuffer::wrapCFData(resourceData), URL(URL(), url), mimeType, textEncoding, frameName, response);
231
}
231
}
232
232
233
PassRefPtr<LegacyWebArchive> LegacyWebArchive::create()
233
PassRefPtr<LegacyWebArchive> LegacyWebArchive::create()
Lines 255-264 PassRefPtr<LegacyWebArchive> LegacyWebArchive::create(PassRefPtr<ArchiveResource a/Source/WebCore/loader/archive/cf/LegacyWebArchive.cpp_sec3
255
255
256
PassRefPtr<LegacyWebArchive> LegacyWebArchive::create(SharedBuffer* data)
256
PassRefPtr<LegacyWebArchive> LegacyWebArchive::create(SharedBuffer* data)
257
{
257
{
258
    return create(KURL(), data);
258
    return create(URL(), data);
259
}
259
}
260
260
261
PassRefPtr<LegacyWebArchive> LegacyWebArchive::create(const KURL&, SharedBuffer* data)
261
PassRefPtr<LegacyWebArchive> LegacyWebArchive::create(const URL&, SharedBuffer* data)
262
{
262
{
263
    LOG(Archives, "LegacyWebArchive - Creating from raw data");
263
    LOG(Archives, "LegacyWebArchive - Creating from raw data");
264
    
264
    
Lines 501-518 PassRefPtr<LegacyWebArchive> LegacyWebArchive::create(const String& markupString a/Source/WebCore/loader/archive/cf/LegacyWebArchive.cpp_sec4
501
    ASSERT(frame);
501
    ASSERT(frame);
502
    
502
    
503
    const ResourceResponse& response = frame->loader().documentLoader()->response();
503
    const ResourceResponse& response = frame->loader().documentLoader()->response();
504
    KURL responseURL = response.url();
504
    URL responseURL = response.url();
505
    
505
    
506
    // it's possible to have a response without a URL here
506
    // it's possible to have a response without a URL here
507
    // <rdar://problem/5454935>
507
    // <rdar://problem/5454935>
508
    if (responseURL.isNull())
508
    if (responseURL.isNull())
509
        responseURL = KURL(ParsedURLString, emptyString());
509
        responseURL = URL(ParsedURLString, emptyString());
510
        
510
        
511
    RefPtr<ArchiveResource> mainResource = ArchiveResource::create(utf8Buffer(markupString), responseURL, response.mimeType(), "UTF-8", frame->tree().uniqueName());
511
    RefPtr<ArchiveResource> mainResource = ArchiveResource::create(utf8Buffer(markupString), responseURL, response.mimeType(), "UTF-8", frame->tree().uniqueName());
512
512
513
    Vector<PassRefPtr<LegacyWebArchive> > subframeArchives;
513
    Vector<PassRefPtr<LegacyWebArchive> > subframeArchives;
514
    Vector<PassRefPtr<ArchiveResource> > subresources;
514
    Vector<PassRefPtr<ArchiveResource> > subresources;
515
    HashSet<KURL> uniqueSubresources;
515
    HashSet<URL> uniqueSubresources;
516
516
517
    size_t nodesSize = nodes.size();    
517
    size_t nodesSize = nodes.size();    
518
    for (size_t i = 0; i < nodesSize; ++i) {
518
    for (size_t i = 0; i < nodesSize; ++i) {
Lines 530-542 PassRefPtr<LegacyWebArchive> LegacyWebArchive::create(const String& markupString a/Source/WebCore/loader/archive/cf/LegacyWebArchive.cpp_sec5
530
            else
530
            else
531
                LOG_ERROR("Unabled to archive subframe %s", childFrame->tree().uniqueName().string().utf8().data());
531
                LOG_ERROR("Unabled to archive subframe %s", childFrame->tree().uniqueName().string().utf8().data());
532
        } else {
532
        } else {
533
            ListHashSet<KURL> subresourceURLs;
533
            ListHashSet<URL> subresourceURLs;
534
            node->getSubresourceURLs(subresourceURLs);
534
            node->getSubresourceURLs(subresourceURLs);
535
            
535
            
536
            DocumentLoader* documentLoader = frame->loader().documentLoader();
536
            DocumentLoader* documentLoader = frame->loader().documentLoader();
537
            ListHashSet<KURL>::iterator iterEnd = subresourceURLs.end();
537
            ListHashSet<URL>::iterator iterEnd = subresourceURLs.end();
538
            for (ListHashSet<KURL>::iterator iter = subresourceURLs.begin(); iter != iterEnd; ++iter) {
538
            for (ListHashSet<URL>::iterator iter = subresourceURLs.begin(); iter != iterEnd; ++iter) {
539
                const KURL& subresourceURL = *iter;
539
                const URL& subresourceURL = *iter;
540
                if (uniqueSubresources.contains(subresourceURL))
540
                if (uniqueSubresources.contains(subresourceURL))
541
                    continue;
541
                    continue;
542
542
Lines 573-579 PassRefPtr<LegacyWebArchive> LegacyWebArchive::create(const String& markupString a/Source/WebCore/loader/archive/cf/LegacyWebArchive.cpp_sec6
573
        const String& iconURL = iconDatabase().synchronousIconURLForPageURL(responseURL);
573
        const String& iconURL = iconDatabase().synchronousIconURLForPageURL(responseURL);
574
        if (!iconURL.isEmpty() && iconDatabase().synchronousIconDataKnownForIconURL(iconURL)) {
574
        if (!iconURL.isEmpty() && iconDatabase().synchronousIconDataKnownForIconURL(iconURL)) {
575
            if (Image* iconImage = iconDatabase().synchronousIconForPageURL(responseURL, IntSize(16, 16))) {
575
            if (Image* iconImage = iconDatabase().synchronousIconForPageURL(responseURL, IntSize(16, 16))) {
576
                if (RefPtr<ArchiveResource> resource = ArchiveResource::create(iconImage->data(), KURL(ParsedURLString, iconURL), "image/x-icon", "", ""))
576
                if (RefPtr<ArchiveResource> resource = ArchiveResource::create(iconImage->data(), URL(ParsedURLString, iconURL), "image/x-icon", "", ""))
577
                    subresources.append(resource.release());
577
                    subresources.append(resource.release());
578
            }
578
            }
579
        }
579
        }
- a/Source/WebCore/loader/archive/cf/LegacyWebArchive.h -1 / +1 lines
Lines 47-53 class LegacyWebArchive : public Archive { a/Source/WebCore/loader/archive/cf/LegacyWebArchive.h_sec1
47
public:
47
public:
48
    static PassRefPtr<LegacyWebArchive> create();
48
    static PassRefPtr<LegacyWebArchive> create();
49
    static PassRefPtr<LegacyWebArchive> create(SharedBuffer*);
49
    static PassRefPtr<LegacyWebArchive> create(SharedBuffer*);
50
    static PassRefPtr<LegacyWebArchive> create(const KURL&, SharedBuffer*);
50
    static PassRefPtr<LegacyWebArchive> create(const URL&, SharedBuffer*);
51
    static PassRefPtr<LegacyWebArchive> create(PassRefPtr<ArchiveResource> mainResource, Vector<PassRefPtr<ArchiveResource> >& subresources, Vector<PassRefPtr<LegacyWebArchive> >& subframeArchives);
51
    static PassRefPtr<LegacyWebArchive> create(PassRefPtr<ArchiveResource> mainResource, Vector<PassRefPtr<ArchiveResource> >& subresources, Vector<PassRefPtr<LegacyWebArchive> >& subframeArchives);
52
    static PassRefPtr<LegacyWebArchive> create(Node*, FrameFilter* = 0);
52
    static PassRefPtr<LegacyWebArchive> create(Node*, FrameFilter* = 0);
53
    static PassRefPtr<LegacyWebArchive> create(Frame*);
53
    static PassRefPtr<LegacyWebArchive> create(Frame*);
- a/Source/WebCore/loader/archive/mhtml/MHTMLArchive.cpp -1 / +1 lines
Lines 108-114 PassRefPtr<MHTMLArchive> MHTMLArchive::create() a/Source/WebCore/loader/archive/mhtml/MHTMLArchive.cpp_sec1
108
    return adoptRef(new MHTMLArchive);
108
    return adoptRef(new MHTMLArchive);
109
}
109
}
110
110
111
PassRefPtr<MHTMLArchive> MHTMLArchive::create(const KURL& url, SharedBuffer* data)
111
PassRefPtr<MHTMLArchive> MHTMLArchive::create(const URL& url, SharedBuffer* data)
112
{
112
{
113
    // For security reasons we only load MHTML pages from local URLs.
113
    // For security reasons we only load MHTML pages from local URLs.
114
    if (!SchemeRegistry::shouldTreatURLSchemeAsLocal(url.protocol()))
114
    if (!SchemeRegistry::shouldTreatURLSchemeAsLocal(url.protocol()))
- a/Source/WebCore/loader/archive/mhtml/MHTMLArchive.h -1 / +1 lines
Lines 46-52 public: a/Source/WebCore/loader/archive/mhtml/MHTMLArchive.h_sec1
46
    virtual Type type() const { return MHTML; }
46
    virtual Type type() const { return MHTML; }
47
47
48
    static PassRefPtr<MHTMLArchive> create();
48
    static PassRefPtr<MHTMLArchive> create();
49
    static PassRefPtr<MHTMLArchive> create(const KURL&, SharedBuffer*);
49
    static PassRefPtr<MHTMLArchive> create(const URL&, SharedBuffer*);
50
50
51
    static PassRefPtr<SharedBuffer> generateMHTMLData(Page*);
51
    static PassRefPtr<SharedBuffer> generateMHTMLData(Page*);
52
    // Binary encoding results in smaller MHTML files but they might not work in other browsers.
52
    // Binary encoding results in smaller MHTML files but they might not work in other browsers.
- a/Source/WebCore/loader/archive/mhtml/MHTMLParser.cpp -1 / +1 lines
Lines 217-223 PassRefPtr<ArchiveResource> MHTMLParser::parseNextPart(const MIMEHeader& mimeHea a/Source/WebCore/loader/archive/mhtml/MHTMLParser.cpp_sec1
217
    // FIXME: the URL in the MIME header could be relative, we should resolve it if it is.
217
    // FIXME: the URL in the MIME header could be relative, we should resolve it if it is.
218
    // The specs mentions 5 ways to resolve a URL: http://tools.ietf.org/html/rfc2557#section-5
218
    // The specs mentions 5 ways to resolve a URL: http://tools.ietf.org/html/rfc2557#section-5
219
    // IE and Firefox (UNMht) seem to generate only absolute URLs.
219
    // IE and Firefox (UNMht) seem to generate only absolute URLs.
220
    KURL location = KURL(KURL(), mimeHeader.contentLocation());
220
    URL location = URL(URL(), mimeHeader.contentLocation());
221
    return ArchiveResource::create(contentBuffer, location, mimeHeader.contentType(), mimeHeader.charset(), String());
221
    return ArchiveResource::create(contentBuffer, location, mimeHeader.contentType(), mimeHeader.charset(), String());
222
}
222
}
223
223
- a/Source/WebCore/loader/cache/CachedFont.cpp -1 / +1 lines
Lines 117-123 FontPlatformData CachedFont::platformDataFromCustomData(float size, bool bold, b a/Source/WebCore/loader/cache/CachedFont.cpp_sec1
117
bool CachedFont::ensureSVGFontData()
117
bool CachedFont::ensureSVGFontData()
118
{
118
{
119
    if (!m_externalSVGDocument && !errorOccurred() && !isLoading() && m_data) {
119
    if (!m_externalSVGDocument && !errorOccurred() && !isLoading() && m_data) {
120
        m_externalSVGDocument = SVGDocument::create(0, KURL());
120
        m_externalSVGDocument = SVGDocument::create(0, URL());
121
121
122
        RefPtr<TextResourceDecoder> decoder = TextResourceDecoder::create("application/xml");
122
        RefPtr<TextResourceDecoder> decoder = TextResourceDecoder::create("application/xml");
123
        String svgSource = decoder->decode(m_data->data(), m_data->size());
123
        String svgSource = decoder->decode(m_data->data(), m_data->size());
- a/Source/WebCore/loader/cache/CachedResource.cpp -3 / +3 lines
Lines 34-40 a/Source/WebCore/loader/cache/CachedResource.cpp_sec1
34
#include "FrameLoader.h"
34
#include "FrameLoader.h"
35
#include "FrameLoaderClient.h"
35
#include "FrameLoaderClient.h"
36
#include "InspectorInstrumentation.h"
36
#include "InspectorInstrumentation.h"
37
#include "KURL.h"
37
#include "URL.h"
38
#include "LoaderStrategy.h"
38
#include "LoaderStrategy.h"
39
#include "Logging.h"
39
#include "Logging.h"
40
#include "MemoryCache.h"
40
#include "MemoryCache.h"
Lines 230-236 CachedResource::CachedResource(const ResourceRequest& request, Type type) a/Source/WebCore/loader/cache/CachedResource.cpp_sec2
230
230
231
    if (!m_resourceRequest.url().hasFragmentIdentifier())
231
    if (!m_resourceRequest.url().hasFragmentIdentifier())
232
        return;
232
        return;
233
    KURL urlForCache = MemoryCache::removeFragmentIdentifierIfNeeded(m_resourceRequest.url());
233
    URL urlForCache = MemoryCache::removeFragmentIdentifierIfNeeded(m_resourceRequest.url());
234
    if (urlForCache.hasFragmentIdentifier())
234
    if (urlForCache.hasFragmentIdentifier())
235
        return;
235
        return;
236
    m_fragmentIdentifierForRequest = m_resourceRequest.url().fragmentIdentifier();
236
    m_fragmentIdentifierForRequest = m_resourceRequest.url().fragmentIdentifier();
Lines 344-350 void CachedResource::load(CachedResourceLoader* cachedResourceLoader, const Reso a/Source/WebCore/loader/cache/CachedResource.cpp_sec3
344
    // We should look into removing the expectation of that knowledge from the platform network stacks.
344
    // We should look into removing the expectation of that knowledge from the platform network stacks.
345
    ResourceRequest request(m_resourceRequest);
345
    ResourceRequest request(m_resourceRequest);
346
    if (!m_fragmentIdentifierForRequest.isNull()) {
346
    if (!m_fragmentIdentifierForRequest.isNull()) {
347
        KURL url = request.url();
347
        URL url = request.url();
348
        url.setFragmentIdentifier(m_fragmentIdentifierForRequest);
348
        url.setFragmentIdentifier(m_fragmentIdentifierForRequest);
349
        request.setURL(url);
349
        request.setURL(url);
350
        m_fragmentIdentifierForRequest = String();
350
        m_fragmentIdentifierForRequest = String();
- a/Source/WebCore/loader/cache/CachedResource.h -1 / +1 lines
Lines 112-118 public: a/Source/WebCore/loader/cache/CachedResource.h_sec1
112
    virtual bool shouldIgnoreHTTPStatusCodeErrors() const { return false; }
112
    virtual bool shouldIgnoreHTTPStatusCodeErrors() const { return false; }
113
113
114
    ResourceRequest& resourceRequest() { return m_resourceRequest; }
114
    ResourceRequest& resourceRequest() { return m_resourceRequest; }
115
    const KURL& url() const { return m_resourceRequest.url();}
115
    const URL& url() const { return m_resourceRequest.url();}
116
#if ENABLE(CACHE_PARTITIONING)
116
#if ENABLE(CACHE_PARTITIONING)
117
    const String& cachePartition() const { return m_resourceRequest.cachePartition(); }
117
    const String& cachePartition() const { return m_resourceRequest.cachePartition(); }
118
#endif
118
#endif
- a/Source/WebCore/loader/cache/CachedResourceLoader.cpp -12 / +12 lines
Lines 142-154 CachedResourceLoader::~CachedResourceLoader() a/Source/WebCore/loader/cache/CachedResourceLoader.cpp_sec1
142
142
143
CachedResource* CachedResourceLoader::cachedResource(const String& resourceURL) const 
143
CachedResource* CachedResourceLoader::cachedResource(const String& resourceURL) const 
144
{
144
{
145
    KURL url = m_document->completeURL(resourceURL);
145
    URL url = m_document->completeURL(resourceURL);
146
    return cachedResource(url); 
146
    return cachedResource(url); 
147
}
147
}
148
148
149
CachedResource* CachedResourceLoader::cachedResource(const KURL& resourceURL) const
149
CachedResource* CachedResourceLoader::cachedResource(const URL& resourceURL) const
150
{
150
{
151
    KURL url = MemoryCache::removeFragmentIdentifierIfNeeded(resourceURL);
151
    URL url = MemoryCache::removeFragmentIdentifierIfNeeded(resourceURL);
152
    return m_documentResources.get(url).get(); 
152
    return m_documentResources.get(url).get(); 
153
}
153
}
154
154
Lines 161-167 CachedResourceHandle<CachedImage> CachedResourceLoader::requestImage(CachedResou a/Source/WebCore/loader/cache/CachedResourceLoader.cpp_sec2
161
{
161
{
162
    if (Frame* f = frame()) {
162
    if (Frame* f = frame()) {
163
        if (f->loader().pageDismissalEventBeingDispatched() != FrameLoader::NoDismissal) {
163
        if (f->loader().pageDismissalEventBeingDispatched() != FrameLoader::NoDismissal) {
164
            KURL requestURL = request.resourceRequest().url();
164
            URL requestURL = request.resourceRequest().url();
165
            if (requestURL.isValid() && canRequest(CachedResource::ImageResource, requestURL, request.options(), request.forPreload()))
165
            if (requestURL.isValid() && canRequest(CachedResource::ImageResource, requestURL, request.options(), request.forPreload()))
166
                PingLoader::loadImage(f, requestURL);
166
                PingLoader::loadImage(f, requestURL);
167
            return 0;
167
            return 0;
Lines 197-203 CachedResourceHandle<CachedCSSStyleSheet> CachedResourceLoader::requestCSSStyleS a/Source/WebCore/loader/cache/CachedResourceLoader.cpp_sec3
197
197
198
CachedResourceHandle<CachedCSSStyleSheet> CachedResourceLoader::requestUserCSSStyleSheet(CachedResourceRequest& request)
198
CachedResourceHandle<CachedCSSStyleSheet> CachedResourceLoader::requestUserCSSStyleSheet(CachedResourceRequest& request)
199
{
199
{
200
    KURL url = MemoryCache::removeFragmentIdentifierIfNeeded(request.resourceRequest().url());
200
    URL url = MemoryCache::removeFragmentIdentifierIfNeeded(request.resourceRequest().url());
201
201
202
#if ENABLE(CACHE_PARTITIONING)
202
#if ENABLE(CACHE_PARTITIONING)
203
    request.mutableResourceRequest().setCachePartition(document()->topOrigin()->cachePartition());
203
    request.mutableResourceRequest().setCachePartition(document()->topOrigin()->cachePartition());
Lines 259-265 CachedResourceHandle<CachedRawResource> CachedResourceLoader::requestMainResourc a/Source/WebCore/loader/cache/CachedResourceLoader.cpp_sec4
259
    return static_cast<CachedRawResource*>(requestResource(CachedResource::MainResource, request).get());
259
    return static_cast<CachedRawResource*>(requestResource(CachedResource::MainResource, request).get());
260
}
260
}
261
261
262
bool CachedResourceLoader::checkInsecureContent(CachedResource::Type type, const KURL& url) const
262
bool CachedResourceLoader::checkInsecureContent(CachedResource::Type type, const URL& url) const
263
{
263
{
264
    switch (type) {
264
    switch (type) {
265
    case CachedResource::Script:
265
    case CachedResource::Script:
Lines 304-310 bool CachedResourceLoader::checkInsecureContent(CachedResource::Type type, const a/Source/WebCore/loader/cache/CachedResourceLoader.cpp_sec5
304
    return true;
304
    return true;
305
}
305
}
306
306
307
bool CachedResourceLoader::canRequest(CachedResource::Type type, const KURL& url, const ResourceLoaderOptions& options, bool forPreload)
307
bool CachedResourceLoader::canRequest(CachedResource::Type type, const URL& url, const ResourceLoaderOptions& options, bool forPreload)
308
{
308
{
309
    if (document() && !document()->securityOrigin()->canDisplay(url)) {
309
    if (document() && !document()->securityOrigin()->canDisplay(url)) {
310
        if (!forPreload)
310
        if (!forPreload)
Lines 435-441 bool CachedResourceLoader::shouldContinueAfterNotifyingLoadedFromMemoryCache(Cac a/Source/WebCore/loader/cache/CachedResourceLoader.cpp_sec6
435
435
436
CachedResourceHandle<CachedResource> CachedResourceLoader::requestResource(CachedResource::Type type, CachedResourceRequest& request)
436
CachedResourceHandle<CachedResource> CachedResourceLoader::requestResource(CachedResource::Type type, CachedResourceRequest& request)
437
{
437
{
438
    KURL url = request.resourceRequest().url();
438
    URL url = request.resourceRequest().url();
439
    
439
    
440
    LOG(ResourceLoading, "CachedResourceLoader::requestResource '%s', charset '%s', priority=%d, forPreload=%u", url.stringCenterEllipsizedToLength().latin1().data(), request.charset().latin1().data(), request.priority(), request.forPreload());
440
    LOG(ResourceLoading, "CachedResourceLoader::requestResource '%s', charset '%s', priority=%d, forPreload=%u", url.stringCenterEllipsizedToLength().latin1().data(), request.charset().latin1().data(), request.priority(), request.forPreload());
441
    
441
    
Lines 660-666 CachedResourceLoader::RevalidationPolicy CachedResourceLoader::determineRevalida a/Source/WebCore/loader/cache/CachedResourceLoader.cpp_sec7
660
    return Use;
660
    return Use;
661
}
661
}
662
662
663
void CachedResourceLoader::printAccessDeniedMessage(const KURL& url) const
663
void CachedResourceLoader::printAccessDeniedMessage(const URL& url) const
664
{
664
{
665
    if (url.isNull())
665
    if (url.isNull())
666
        return;
666
        return;
Lines 703-714 void CachedResourceLoader::setImagesEnabled(bool enable) a/Source/WebCore/loader/cache/CachedResourceLoader.cpp_sec8
703
    reloadImagesIfNotDeferred();
703
    reloadImagesIfNotDeferred();
704
}
704
}
705
705
706
bool CachedResourceLoader::clientDefersImage(const KURL& url) const
706
bool CachedResourceLoader::clientDefersImage(const URL& url) const
707
{
707
{
708
    return frame() && !frame()->loader().client().allowImage(m_imagesEnabled, url);
708
    return frame() && !frame()->loader().client().allowImage(m_imagesEnabled, url);
709
}
709
}
710
710
711
bool CachedResourceLoader::shouldDeferImageLoad(const KURL& url) const
711
bool CachedResourceLoader::shouldDeferImageLoad(const URL& url) const
712
{
712
{
713
    return clientDefersImage(url) || !m_autoLoadImages;
713
    return clientDefersImage(url) || !m_autoLoadImages;
714
}
714
}
Lines 887-893 void CachedResourceLoader::requestPreload(CachedResource::Type type, CachedResou a/Source/WebCore/loader/cache/CachedResourceLoader.cpp_sec9
887
887
888
bool CachedResourceLoader::isPreloaded(const String& urlString) const
888
bool CachedResourceLoader::isPreloaded(const String& urlString) const
889
{
889
{
890
    const KURL& url = m_document->completeURL(urlString);
890
    const URL& url = m_document->completeURL(urlString);
891
891
892
    if (m_preloads) {
892
    if (m_preloads) {
893
        ListHashSet<CachedResource*>::iterator end = m_preloads->end();
893
        ListHashSet<CachedResource*>::iterator end = m_preloads->end();
- a/Source/WebCore/loader/cache/CachedResourceLoader.h -7 / +7 lines
Lines 53-59 class Document; a/Source/WebCore/loader/cache/CachedResourceLoader.h_sec1
53
class DocumentLoader;
53
class DocumentLoader;
54
class Frame;
54
class Frame;
55
class ImageLoader;
55
class ImageLoader;
56
class KURL;
56
class URL;
57
57
58
// The CachedResourceLoader provides a per-context interface to the MemoryCache
58
// The CachedResourceLoader provides a per-context interface to the MemoryCache
59
// and enforces a bunch of security checks and rules for resource revalidation.
59
// and enforces a bunch of security checks and rules for resource revalidation.
Lines 97-106 public: a/Source/WebCore/loader/cache/CachedResourceLoader.h_sec2
97
#endif
97
#endif
98
98
99
    // Logs an access denied message to the console for the specified URL.
99
    // Logs an access denied message to the console for the specified URL.
100
    void printAccessDeniedMessage(const KURL& url) const;
100
    void printAccessDeniedMessage(const URL& url) const;
101
101
102
    CachedResource* cachedResource(const String& url) const;
102
    CachedResource* cachedResource(const String& url) const;
103
    CachedResource* cachedResource(const KURL& url) const;
103
    CachedResource* cachedResource(const URL& url) const;
104
    
104
    
105
    typedef HashMap<String, CachedResourceHandle<CachedResource> > DocumentResourceMap;
105
    typedef HashMap<String, CachedResourceHandle<CachedResource> > DocumentResourceMap;
106
    const DocumentResourceMap& allCachedResources() const { return m_documentResources; }
106
    const DocumentResourceMap& allCachedResources() const { return m_documentResources; }
Lines 110-116 public: a/Source/WebCore/loader/cache/CachedResourceLoader.h_sec3
110
110
111
    void setImagesEnabled(bool);
111
    void setImagesEnabled(bool);
112
112
113
    bool shouldDeferImageLoad(const KURL&) const;
113
    bool shouldDeferImageLoad(const URL&) const;
114
    
114
    
115
    CachePolicy cachePolicy(CachedResource::Type) const;
115
    CachePolicy cachePolicy(CachedResource::Type) const;
116
    
116
    
Lines 133-139 public: a/Source/WebCore/loader/cache/CachedResourceLoader.h_sec4
133
    void preload(CachedResource::Type, CachedResourceRequest&, const String& charset);
133
    void preload(CachedResource::Type, CachedResourceRequest&, const String& charset);
134
    void checkForPendingPreloads();
134
    void checkForPendingPreloads();
135
    void printPreloadStats();
135
    void printPreloadStats();
136
    bool canRequest(CachedResource::Type, const KURL&, const ResourceLoaderOptions&, bool forPreload = false);
136
    bool canRequest(CachedResource::Type, const URL&, const ResourceLoaderOptions&, bool forPreload = false);
137
137
138
    static const ResourceLoaderOptions& defaultCachedResourceOptions();
138
    static const ResourceLoaderOptions& defaultCachedResourceOptions();
139
139
Lines 152-163 private: a/Source/WebCore/loader/cache/CachedResourceLoader.h_sec5
152
    RevalidationPolicy determineRevalidationPolicy(CachedResource::Type, ResourceRequest&, bool forPreload, CachedResource* existingResource, CachedResourceRequest::DeferOption) const;
152
    RevalidationPolicy determineRevalidationPolicy(CachedResource::Type, ResourceRequest&, bool forPreload, CachedResource* existingResource, CachedResourceRequest::DeferOption) const;
153
    
153
    
154
    bool shouldContinueAfterNotifyingLoadedFromMemoryCache(CachedResource*);
154
    bool shouldContinueAfterNotifyingLoadedFromMemoryCache(CachedResource*);
155
    bool checkInsecureContent(CachedResource::Type, const KURL&) const;
155
    bool checkInsecureContent(CachedResource::Type, const URL&) const;
156
156
157
    void garbageCollectDocumentResourcesTimerFired(Timer<CachedResourceLoader>*);
157
    void garbageCollectDocumentResourcesTimerFired(Timer<CachedResourceLoader>*);
158
    void performPostLoadActions();
158
    void performPostLoadActions();
159
159
160
    bool clientDefersImage(const KURL&) const;
160
    bool clientDefersImage(const URL&) const;
161
    void reloadImagesIfNotDeferred();
161
    void reloadImagesIfNotDeferred();
162
    
162
    
163
    HashSet<String> m_validatedURLs;
163
    HashSet<String> m_validatedURLs;
- a/Source/WebCore/loader/cache/CachedStyleSheetClient.h -3 / +3 lines
Lines 32-46 a/Source/WebCore/loader/cache/CachedStyleSheetClient.h_sec1
32
namespace WebCore {
32
namespace WebCore {
33
33
34
class CachedCSSStyleSheet;
34
class CachedCSSStyleSheet;
35
class KURL;
35
class URL;
36
36
37
class CachedStyleSheetClient : public CachedResourceClient {
37
class CachedStyleSheetClient : public CachedResourceClient {
38
public:
38
public:
39
    virtual ~CachedStyleSheetClient() { }
39
    virtual ~CachedStyleSheetClient() { }
40
    static CachedResourceClientType expectedType() { return StyleSheetType; }
40
    static CachedResourceClientType expectedType() { return StyleSheetType; }
41
    virtual CachedResourceClientType resourceClientType() const { return expectedType(); }
41
    virtual CachedResourceClientType resourceClientType() const { return expectedType(); }
42
    virtual void setCSSStyleSheet(const String& /* href */, const KURL& /* baseURL */, const String& /* charset */, const CachedCSSStyleSheet*) { }
42
    virtual void setCSSStyleSheet(const String& /* href */, const URL& /* baseURL */, const String& /* charset */, const CachedCSSStyleSheet*) { }
43
    virtual void setXSLStyleSheet(const String& /* href */, const KURL& /* baseURL */, const String& /* sheet */) { }
43
    virtual void setXSLStyleSheet(const String& /* href */, const URL& /* baseURL */, const String& /* sheet */) { }
44
};
44
};
45
45
46
} // namespace WebCore
46
} // namespace WebCore
- a/Source/WebCore/loader/cache/MemoryCache.cpp -4 / +4 lines
Lines 74-80 MemoryCache::MemoryCache() a/Source/WebCore/loader/cache/MemoryCache.cpp_sec1
74
{
74
{
75
}
75
}
76
76
77
KURL MemoryCache::removeFragmentIdentifierIfNeeded(const KURL& originalURL)
77
URL MemoryCache::removeFragmentIdentifierIfNeeded(const URL& originalURL)
78
{
78
{
79
    if (!originalURL.hasFragmentIdentifier())
79
    if (!originalURL.hasFragmentIdentifier())
80
        return originalURL;
80
        return originalURL;
Lines 83-89 KURL MemoryCache::removeFragmentIdentifierIfNeeded(const KURL& originalURL) a/Source/WebCore/loader/cache/MemoryCache.cpp_sec2
83
    // to be unique even when they differ by the fragment identifier only.
83
    // to be unique even when they differ by the fragment identifier only.
84
    if (!originalURL.protocolIsInHTTPFamily())
84
    if (!originalURL.protocolIsInHTTPFamily())
85
        return originalURL;
85
        return originalURL;
86
    KURL url = originalURL;
86
    URL url = originalURL;
87
    url.removeFragmentIdentifier();
87
    url.removeFragmentIdentifier();
88
    return url;
88
    return url;
89
}
89
}
Lines 163-169 void MemoryCache::revalidationFailed(CachedResource* revalidatingResource) a/Source/WebCore/loader/cache/MemoryCache.cpp_sec3
163
    revalidatingResource->clearResourceToRevalidate();
163
    revalidatingResource->clearResourceToRevalidate();
164
}
164
}
165
165
166
CachedResource* MemoryCache::resourceForURL(const KURL& resourceURL)
166
CachedResource* MemoryCache::resourceForURL(const URL& resourceURL)
167
{
167
{
168
    return resourceForRequest(ResourceRequest(resourceURL));
168
    return resourceForRequest(ResourceRequest(resourceURL));
169
}
169
}
Lines 171-177 CachedResource* MemoryCache::resourceForURL(const KURL& resourceURL) a/Source/WebCore/loader/cache/MemoryCache.cpp_sec4
171
CachedResource* MemoryCache::resourceForRequest(const ResourceRequest& request)
171
CachedResource* MemoryCache::resourceForRequest(const ResourceRequest& request)
172
{
172
{
173
    ASSERT(WTF::isMainThread());
173
    ASSERT(WTF::isMainThread());
174
    KURL url = removeFragmentIdentifierIfNeeded(request.url());
174
    URL url = removeFragmentIdentifierIfNeeded(request.url());
175
#if ENABLE(CACHE_PARTITIONING)
175
#if ENABLE(CACHE_PARTITIONING)
176
    CachedResourceItem* item = m_resources.get(url);
176
    CachedResourceItem* item = m_resources.get(url);
177
    CachedResource* resource = 0;
177
    CachedResource* resource = 0;
- a/Source/WebCore/loader/cache/MemoryCache.h -3 / +3 lines
Lines 38-44 namespace WebCore { a/Source/WebCore/loader/cache/MemoryCache.h_sec1
38
class CachedCSSStyleSheet;
38
class CachedCSSStyleSheet;
39
class CachedResource;
39
class CachedResource;
40
class CachedResourceLoader;
40
class CachedResourceLoader;
41
class KURL;
41
class URL;
42
class ResourceRequest;
42
class ResourceRequest;
43
class ResourceResponse;
43
class ResourceResponse;
44
class ScriptExecutionContext;
44
class ScriptExecutionContext;
Lines 112-124 public: a/Source/WebCore/loader/cache/MemoryCache.h_sec2
112
        TypeStatistic fonts;
112
        TypeStatistic fonts;
113
    };
113
    };
114
114
115
    CachedResource* resourceForURL(const KURL&);
115
    CachedResource* resourceForURL(const URL&);
116
    CachedResource* resourceForRequest(const ResourceRequest&);
116
    CachedResource* resourceForRequest(const ResourceRequest&);
117
    
117
    
118
    bool add(CachedResource* resource);
118
    bool add(CachedResource* resource);
119
    void remove(CachedResource* resource) { evict(resource); }
119
    void remove(CachedResource* resource) { evict(resource); }
120
120
121
    static KURL removeFragmentIdentifierIfNeeded(const KURL& originalURL);
121
    static URL removeFragmentIdentifierIfNeeded(const URL& originalURL);
122
    
122
    
123
    void revalidationSucceeded(CachedResource* revalidatingResource, const ResourceResponse&);
123
    void revalidationSucceeded(CachedResource* revalidatingResource, const ResourceResponse&);
124
    void revalidationFailed(CachedResource* revalidatingResource);
124
    void revalidationFailed(CachedResource* revalidatingResource);
- a/Source/WebCore/loader/icon/IconController.cpp -7 / +7 lines
Lines 60-69 IconController::~IconController() a/Source/WebCore/loader/icon/IconController.cpp_sec1
60
{
60
{
61
}
61
}
62
62
63
KURL IconController::url()
63
URL IconController::url()
64
{
64
{
65
    IconURLs iconURLs = urlsForTypes(Favicon);
65
    IconURLs iconURLs = urlsForTypes(Favicon);
66
    return iconURLs.isEmpty() ? KURL() : iconURLs[0].m_iconURL;
66
    return iconURLs.isEmpty() ? URL() : iconURLs[0].m_iconURL;
67
}
67
}
68
68
69
IconURL IconController::iconURL(IconType iconType) const
69
IconURL IconController::iconURL(IconType iconType) const
Lines 119-125 IconURLs IconController::urlsForTypes(int iconTypesMask) a/Source/WebCore/loader/icon/IconController.cpp_sec2
119
    return iconURLs;
119
    return iconURLs;
120
}
120
}
121
121
122
void IconController::commitToDatabase(const KURL& icon)
122
void IconController::commitToDatabase(const URL& icon)
123
{
123
{
124
    LOG(IconDatabase, "Committing iconURL %s to database for pageURLs %s and %s", icon.string().ascii().data(), m_frame->document()->url().string().ascii().data(), m_frame->loader().initialRequest().url().string().ascii().data());
124
    LOG(IconDatabase, "Committing iconURL %s to database for pageURLs %s and %s", icon.string().ascii().data(), m_frame->document()->url().string().ascii().data(), m_frame->loader().initialRequest().url().string().ascii().data());
125
    iconDatabase().setIconURLForPageURL(icon.string(), m_frame->document()->url().string());
125
    iconDatabase().setIconURLForPageURL(icon.string(), m_frame->document()->url().string());
Lines 140-146 void IconController::startLoader() a/Source/WebCore/loader/icon/IconController.cpp_sec3
140
    if (!documentCanHaveIcon(m_frame->document()->url()))
140
    if (!documentCanHaveIcon(m_frame->document()->url()))
141
        return;
141
        return;
142
142
143
    KURL iconURL(url());
143
    URL iconURL(url());
144
    String urlString(iconURL.string());
144
    String urlString(iconURL.string());
145
    if (urlString.isEmpty())
145
    if (urlString.isEmpty())
146
        return;
146
        return;
Lines 206-212 void IconController::continueLoadWithDecision(IconLoadDecision iconLoadDecision) a/Source/WebCore/loader/icon/IconController.cpp_sec4
206
        return;
206
        return;
207
207
208
    if (iconLoadDecision == IconLoadNo) {
208
    if (iconLoadDecision == IconLoadNo) {
209
        KURL iconURL(url());
209
        URL iconURL(url());
210
        String urlString(iconURL.string());
210
        String urlString(iconURL.string());
211
        if (urlString.isEmpty())
211
        if (urlString.isEmpty())
212
            return;
212
            return;
Lines 253-263 bool IconController::appendToIconURLs(IconType iconType, IconURLs* iconURLs) a/Source/WebCore/loader/icon/IconController.cpp_sec5
253
IconURL IconController::defaultURL(IconType iconType)
253
IconURL IconController::defaultURL(IconType iconType)
254
{
254
{
255
    // Don't return a favicon iconURL unless we're http or https
255
    // Don't return a favicon iconURL unless we're http or https
256
    KURL documentURL = m_frame->document()->url();
256
    URL documentURL = m_frame->document()->url();
257
    if (!documentURL.protocolIsInHTTPFamily())
257
    if (!documentURL.protocolIsInHTTPFamily())
258
        return IconURL();
258
        return IconURL();
259
259
260
    KURL url;
260
    URL url;
261
    bool couldSetProtocol = url.setProtocol(documentURL.protocol());
261
    bool couldSetProtocol = url.setProtocol(documentURL.protocol());
262
    ASSERT_UNUSED(couldSetProtocol, couldSetProtocol);
262
    ASSERT_UNUSED(couldSetProtocol, couldSetProtocol);
263
    url.setHost(documentURL.host());
263
    url.setHost(documentURL.host());
- a/Source/WebCore/loader/icon/IconController.h -3 / +3 lines
Lines 33-39 a/Source/WebCore/loader/icon/IconController.h_sec1
33
33
34
#include "IconDatabaseBase.h"
34
#include "IconDatabaseBase.h"
35
#include "IconURL.h"
35
#include "IconURL.h"
36
#include "KURL.h"
36
#include "URL.h"
37
37
38
namespace WebCore {
38
namespace WebCore {
39
39
Lines 47-53 public: a/Source/WebCore/loader/icon/IconController.h_sec2
47
    explicit IconController(Frame*);
47
    explicit IconController(Frame*);
48
    ~IconController();
48
    ~IconController();
49
49
50
    KURL url();
50
    URL url();
51
    IconURLs urlsForTypes(int iconTypesMask);
51
    IconURLs urlsForTypes(int iconTypesMask);
52
    IconURL iconURL(IconType) const;
52
    IconURL iconURL(IconType) const;
53
53
Lines 57-63 public: a/Source/WebCore/loader/icon/IconController.h_sec3
57
    void loadDecisionReceived(IconLoadDecision);
57
    void loadDecisionReceived(IconLoadDecision);
58
    void continueLoadWithDecision(IconLoadDecision);
58
    void continueLoadWithDecision(IconLoadDecision);
59
59
60
    void commitToDatabase(const KURL& icon);
60
    void commitToDatabase(const URL& icon);
61
61
62
private:
62
private:
63
    bool appendToIconURLs(IconType, IconURLs*);
63
    bool appendToIconURLs(IconType, IconURLs*);
- a/Source/WebCore/loader/icon/IconDatabase.h -1 / +1 lines
Lines 51-57 class IntSize; a/Source/WebCore/loader/icon/IconDatabase.h_sec1
51
class IconDatabaseClient;
51
class IconDatabaseClient;
52
class IconRecord;
52
class IconRecord;
53
class IconSnapshot;
53
class IconSnapshot;
54
class KURL;
54
class URL;
55
class PageURLRecord;
55
class PageURLRecord;
56
class PageURLSnapshot;
56
class PageURLSnapshot;
57
class SharedBuffer;
57
class SharedBuffer;
- a/Source/WebCore/loader/icon/IconDatabaseBase.cpp -1 / +1 lines
Lines 27-33 a/Source/WebCore/loader/icon/IconDatabaseBase.cpp_sec1
27
#include "IconDatabaseBase.h"
27
#include "IconDatabaseBase.h"
28
28
29
#include "IconDatabase.h"
29
#include "IconDatabase.h"
30
#include "KURL.h"
30
#include "URL.h"
31
#include "SharedBuffer.h"
31
#include "SharedBuffer.h"
32
32
33
namespace WebCore {
33
namespace WebCore {
- a/Source/WebCore/loader/mac/LoaderNSURLExtras.mm -2 / +2 lines
Lines 32-38 a/Source/WebCore/loader/mac/LoaderNSURLExtras.mm_sec1
32
32
33
#import <wtf/Assertions.h>
33
#import <wtf/Assertions.h>
34
#import <wtf/Vector.h>
34
#import <wtf/Vector.h>
35
#import "KURL.h"
35
#import "URL.h"
36
#import "LocalizedStrings.h"
36
#import "LocalizedStrings.h"
37
#import "MIMETypeRegistry.h"
37
#import "MIMETypeRegistry.h"
38
#import "WebCoreNSStringExtras.h"
38
#import "WebCoreNSStringExtras.h"
Lines 58-64 NSString *suggestedFilenameWithMIMEType(NSURL *url, const String& mimeType) a/Source/WebCore/loader/mac/LoaderNSURLExtras.mm_sec2
58
58
59
    if ([filename length] == 0 || [lastPathComponent isEqualToString:@"/"]) {
59
    if ([filename length] == 0 || [lastPathComponent isEqualToString:@"/"]) {
60
        // lastPathComponent is no good, try the host.
60
        // lastPathComponent is no good, try the host.
61
        NSString *host = KURL(url).host();
61
        NSString *host = URL(url).host();
62
        filename = filenameByFixingIllegalCharacters(host);
62
        filename = filenameByFixingIllegalCharacters(host);
63
        if ([filename length] == 0) {
63
        if ([filename length] == 0) {
64
            // Can't make a filename using this URL, use "unknown".
64
            // Can't make a filename using this URL, use "unknown".
- a/Source/WebCore/page/CaptionUserPreferences.cpp -1 / +1 lines
Lines 236-242 void CaptionUserPreferences::setCaptionsStyleSheetOverride(const String& overrid a/Source/WebCore/page/CaptionUserPreferences.cpp_sec1
236
void CaptionUserPreferences::updateCaptionStyleSheetOveride()
236
void CaptionUserPreferences::updateCaptionStyleSheetOveride()
237
{
237
{
238
    // Identify our override style sheet with a unique URL - a new scheme and a UUID.
238
    // Identify our override style sheet with a unique URL - a new scheme and a UUID.
239
    DEFINE_STATIC_LOCAL(KURL, captionsStyleSheetURL, (ParsedURLString, "user-captions-override:01F6AF12-C3B0-4F70-AF5E-A3E00234DC23"));
239
    DEFINE_STATIC_LOCAL(URL, captionsStyleSheetURL, (ParsedURLString, "user-captions-override:01F6AF12-C3B0-4F70-AF5E-A3E00234DC23"));
240
240
241
    pageGroup()->removeUserStyleSheetFromWorld(mainThreadNormalWorld(), captionsStyleSheetURL);
241
    pageGroup()->removeUserStyleSheetFromWorld(mainThreadNormalWorld(), captionsStyleSheetURL);
242
242
- a/Source/WebCore/page/CaptionUserPreferencesMediaAF.cpp -1 / +1 lines
Lines 35-41 a/Source/WebCore/page/CaptionUserPreferencesMediaAF.cpp_sec1
35
#include "DOMWrapperWorld.h"
35
#include "DOMWrapperWorld.h"
36
#include "FloatConversion.h"
36
#include "FloatConversion.h"
37
#include "HTMLMediaElement.h"
37
#include "HTMLMediaElement.h"
38
#include "KURL.h"
39
#include "Language.h"
38
#include "Language.h"
40
#include "LocalizedStrings.h"
39
#include "LocalizedStrings.h"
41
#include "Logging.h"
40
#include "Logging.h"
Lines 44-49 a/Source/WebCore/page/CaptionUserPreferencesMediaAF.cpp_sec2
44
#include "SoftLinking.h"
43
#include "SoftLinking.h"
45
#include "TextTrackCue.h"
44
#include "TextTrackCue.h"
46
#include "TextTrackList.h"
45
#include "TextTrackList.h"
46
#include "URL.h"
47
#include "UserStyleSheetTypes.h"
47
#include "UserStyleSheetTypes.h"
48
#include <wtf/RetainPtr.h>
48
#include <wtf/RetainPtr.h>
49
#include <wtf/text/StringBuilder.h>
49
#include <wtf/text/StringBuilder.h>
- a/Source/WebCore/page/ContentSecurityPolicy.cpp -70 / +70 lines
Lines 36-42 a/Source/WebCore/page/ContentSecurityPolicy.cpp_sec1
36
#include "Frame.h"
36
#include "Frame.h"
37
#include "InspectorInstrumentation.h"
37
#include "InspectorInstrumentation.h"
38
#include "InspectorValues.h"
38
#include "InspectorValues.h"
39
#include "KURL.h"
39
#include "URL.h"
40
#include "PingLoader.h"
40
#include "PingLoader.h"
41
#include "RuntimeEnabledFeatures.h"
41
#include "RuntimeEnabledFeatures.h"
42
#include "SchemeRegistry.h"
42
#include "SchemeRegistry.h"
Lines 240-246 public: a/Source/WebCore/page/ContentSecurityPolicy.cpp_sec2
240
    {
240
    {
241
    }
241
    }
242
242
243
    bool matches(const KURL& url) const
243
    bool matches(const URL& url) const
244
    {
244
    {
245
        if (!schemeMatches(url))
245
        if (!schemeMatches(url))
246
            return false;
246
            return false;
Lines 250-256 public: a/Source/WebCore/page/ContentSecurityPolicy.cpp_sec3
250
    }
250
    }
251
251
252
private:
252
private:
253
    bool schemeMatches(const KURL& url) const
253
    bool schemeMatches(const URL& url) const
254
    {
254
    {
255
        if (m_scheme.isEmpty()) {
255
        if (m_scheme.isEmpty()) {
256
            String protectedResourceScheme(m_policy->securityOrigin()->protocol());
256
            String protectedResourceScheme(m_policy->securityOrigin()->protocol());
Lines 263-269 private: a/Source/WebCore/page/ContentSecurityPolicy.cpp_sec4
263
        return equalIgnoringCase(url.protocol(), m_scheme);
263
        return equalIgnoringCase(url.protocol(), m_scheme);
264
    }
264
    }
265
265
266
    bool hostMatches(const KURL& url) const
266
    bool hostMatches(const URL& url) const
267
    {
267
    {
268
        const String& host = url.host();
268
        const String& host = url.host();
269
        if (equalIgnoringCase(host, m_host))
269
        if (equalIgnoringCase(host, m_host))
Lines 272-278 private: a/Source/WebCore/page/ContentSecurityPolicy.cpp_sec5
272
272
273
    }
273
    }
274
274
275
    bool pathMatches(const KURL& url) const
275
    bool pathMatches(const URL& url) const
276
    {
276
    {
277
        if (m_path.isEmpty())
277
        if (m_path.isEmpty())
278
            return true;
278
            return true;
Lines 285-291 private: a/Source/WebCore/page/ContentSecurityPolicy.cpp_sec6
285
        return path == m_path;
285
        return path == m_path;
286
    }
286
    }
287
287
288
    bool portMatches(const KURL& url) const
288
    bool portMatches(const URL& url) const
289
    {
289
    {
290
        if (m_portHasWildcard)
290
        if (m_portHasWildcard)
291
            return true;
291
            return true;
Lines 321-327 public: a/Source/WebCore/page/ContentSecurityPolicy.cpp_sec7
321
    CSPSourceList(ContentSecurityPolicy*, const String& directiveName);
321
    CSPSourceList(ContentSecurityPolicy*, const String& directiveName);
322
322
323
    void parse(const String&);
323
    void parse(const String&);
324
    bool matches(const KURL&);
324
    bool matches(const URL&);
325
    bool allowInline() const { return m_allowInline; }
325
    bool allowInline() const { return m_allowInline; }
326
    bool allowEval() const { return m_allowEval; }
326
    bool allowEval() const { return m_allowEval; }
327
327
Lines 364-375 void CSPSourceList::parse(const String& value) a/Source/WebCore/page/ContentSecurityPolicy.cpp_sec8
364
    parse(value.characters(), value.characters() + value.length());
364
    parse(value.characters(), value.characters() + value.length());
365
}
365
}
366
366
367
bool CSPSourceList::matches(const KURL& url)
367
bool CSPSourceList::matches(const URL& url)
368
{
368
{
369
    if (m_allowStar)
369
    if (m_allowStar)
370
        return true;
370
        return true;
371
371
372
    KURL effectiveURL = SecurityOrigin::shouldUseInnerURL(url) ? SecurityOrigin::extractInnerURL(url) : url;
372
    URL effectiveURL = SecurityOrigin::shouldUseInnerURL(url) ? SecurityOrigin::extractInnerURL(url) : url;
373
373
374
    for (size_t i = 0; i < m_list.size(); ++i) {
374
    for (size_t i = 0; i < m_list.size(); ++i) {
375
        if (m_list[i].matches(effectiveURL))
375
        if (m_list[i].matches(effectiveURL))
Lines 814-820 public: a/Source/WebCore/page/ContentSecurityPolicy.cpp_sec9
814
        m_sourceList.parse(value);
814
        m_sourceList.parse(value);
815
    }
815
    }
816
816
817
    bool allows(const KURL& url)
817
    bool allows(const URL& url)
818
    {
818
    {
819
        return m_sourceList.matches(url.isEmpty() ? policy()->url() : url);
819
        return m_sourceList.matches(url.isEmpty() ? policy()->url() : url);
820
    }
820
    }
Lines 839-863 public: a/Source/WebCore/page/ContentSecurityPolicy.cpp_sec10
839
    bool allowInlineScript(const String& contextURL, const WTF::OrdinalNumber& contextLine, ContentSecurityPolicy::ReportingStatus) const;
839
    bool allowInlineScript(const String& contextURL, const WTF::OrdinalNumber& contextLine, ContentSecurityPolicy::ReportingStatus) const;
840
    bool allowInlineStyle(const String& contextURL, const WTF::OrdinalNumber& contextLine, ContentSecurityPolicy::ReportingStatus) const;
840
    bool allowInlineStyle(const String& contextURL, const WTF::OrdinalNumber& contextLine, ContentSecurityPolicy::ReportingStatus) const;
841
    bool allowEval(JSC::ExecState*, ContentSecurityPolicy::ReportingStatus) const;
841
    bool allowEval(JSC::ExecState*, ContentSecurityPolicy::ReportingStatus) const;
842
    bool allowScriptNonce(const String& nonce, const String& contextURL, const WTF::OrdinalNumber& contextLine, const KURL&) const;
842
    bool allowScriptNonce(const String& nonce, const String& contextURL, const WTF::OrdinalNumber& contextLine, const URL&) const;
843
    bool allowPluginType(const String& type, const String& typeAttribute, const KURL&, ContentSecurityPolicy::ReportingStatus) const;
843
    bool allowPluginType(const String& type, const String& typeAttribute, const URL&, ContentSecurityPolicy::ReportingStatus) const;
844
844
845
    bool allowScriptFromSource(const KURL&, ContentSecurityPolicy::ReportingStatus) const;
845
    bool allowScriptFromSource(const URL&, ContentSecurityPolicy::ReportingStatus) const;
846
    bool allowObjectFromSource(const KURL&, ContentSecurityPolicy::ReportingStatus) const;
846
    bool allowObjectFromSource(const URL&, ContentSecurityPolicy::ReportingStatus) const;
847
    bool allowChildFrameFromSource(const KURL&, ContentSecurityPolicy::ReportingStatus) const;
847
    bool allowChildFrameFromSource(const URL&, ContentSecurityPolicy::ReportingStatus) const;
848
    bool allowImageFromSource(const KURL&, ContentSecurityPolicy::ReportingStatus) const;
848
    bool allowImageFromSource(const URL&, ContentSecurityPolicy::ReportingStatus) const;
849
    bool allowStyleFromSource(const KURL&, ContentSecurityPolicy::ReportingStatus) const;
849
    bool allowStyleFromSource(const URL&, ContentSecurityPolicy::ReportingStatus) const;
850
    bool allowFontFromSource(const KURL&, ContentSecurityPolicy::ReportingStatus) const;
850
    bool allowFontFromSource(const URL&, ContentSecurityPolicy::ReportingStatus) const;
851
    bool allowMediaFromSource(const KURL&, ContentSecurityPolicy::ReportingStatus) const;
851
    bool allowMediaFromSource(const URL&, ContentSecurityPolicy::ReportingStatus) const;
852
    bool allowConnectToSource(const KURL&, ContentSecurityPolicy::ReportingStatus) const;
852
    bool allowConnectToSource(const URL&, ContentSecurityPolicy::ReportingStatus) const;
853
    bool allowFormAction(const KURL&, ContentSecurityPolicy::ReportingStatus) const;
853
    bool allowFormAction(const URL&, ContentSecurityPolicy::ReportingStatus) const;
854
    bool allowBaseURI(const KURL&, ContentSecurityPolicy::ReportingStatus) const;
854
    bool allowBaseURI(const URL&, ContentSecurityPolicy::ReportingStatus) const;
855
855
856
    void gatherReportURIs(DOMStringList&) const;
856
    void gatherReportURIs(DOMStringList&) const;
857
    const String& evalDisabledErrorMessage() const { return m_evalDisabledErrorMessage; }
857
    const String& evalDisabledErrorMessage() const { return m_evalDisabledErrorMessage; }
858
    ContentSecurityPolicy::ReflectedXSSDisposition reflectedXSSDisposition() const { return m_reflectedXSSDisposition; }
858
    ContentSecurityPolicy::ReflectedXSSDisposition reflectedXSSDisposition() const { return m_reflectedXSSDisposition; }
859
    bool isReportOnly() const { return m_reportOnly; }
859
    bool isReportOnly() const { return m_reportOnly; }
860
    const Vector<KURL>& reportURIs() const { return m_reportURIs; }
860
    const Vector<URL>& reportURIs() const { return m_reportURIs; }
861
861
862
private:
862
private:
863
    CSPDirectiveList(ContentSecurityPolicy*, ContentSecurityPolicy::HeaderType);
863
    CSPDirectiveList(ContentSecurityPolicy*, ContentSecurityPolicy::HeaderType);
Lines 876-887 private: a/Source/WebCore/page/ContentSecurityPolicy.cpp_sec11
876
    void setCSPDirective(const String& name, const String& value, OwnPtr<CSPDirectiveType>&);
876
    void setCSPDirective(const String& name, const String& value, OwnPtr<CSPDirectiveType>&);
877
877
878
    SourceListDirective* operativeDirective(SourceListDirective*) const;
878
    SourceListDirective* operativeDirective(SourceListDirective*) const;
879
    void reportViolation(const String& directiveText, const String& effectiveDirective, const String& consoleMessage, const KURL& blockedURL = KURL(), const String& contextURL = String(), const WTF::OrdinalNumber& contextLine = WTF::OrdinalNumber::beforeFirst(), JSC::ExecState* = 0) const;
879
    void reportViolation(const String& directiveText, const String& effectiveDirective, const String& consoleMessage, const URL& blockedURL = URL(), const String& contextURL = String(), const WTF::OrdinalNumber& contextLine = WTF::OrdinalNumber::beforeFirst(), JSC::ExecState* = 0) const;
880
880
881
    bool checkEval(SourceListDirective*) const;
881
    bool checkEval(SourceListDirective*) const;
882
    bool checkInline(SourceListDirective*) const;
882
    bool checkInline(SourceListDirective*) const;
883
    bool checkNonce(NonceDirective*, const String&) const;
883
    bool checkNonce(NonceDirective*, const String&) const;
884
    bool checkSource(SourceListDirective*, const KURL&) const;
884
    bool checkSource(SourceListDirective*, const URL&) const;
885
    bool checkMediaType(MediaListDirective*, const String& type, const String& typeAttribute) const;
885
    bool checkMediaType(MediaListDirective*, const String& type, const String& typeAttribute) const;
886
886
887
    void setEvalDisabledErrorMessage(const String& errorMessage) { m_evalDisabledErrorMessage = errorMessage; }
887
    void setEvalDisabledErrorMessage(const String& errorMessage) { m_evalDisabledErrorMessage = errorMessage; }
Lines 890-896 private: a/Source/WebCore/page/ContentSecurityPolicy.cpp_sec12
890
    bool checkInlineAndReportViolation(SourceListDirective*, const String& consoleMessage, const String& contextURL, const WTF::OrdinalNumber& contextLine, bool isScript) const;
890
    bool checkInlineAndReportViolation(SourceListDirective*, const String& consoleMessage, const String& contextURL, const WTF::OrdinalNumber& contextLine, bool isScript) const;
891
    bool checkNonceAndReportViolation(NonceDirective*, const String& nonce, const String& consoleMessage, const String& contextURL, const WTF::OrdinalNumber& contextLine) const;
891
    bool checkNonceAndReportViolation(NonceDirective*, const String& nonce, const String& consoleMessage, const String& contextURL, const WTF::OrdinalNumber& contextLine) const;
892
892
893
    bool checkSourceAndReportViolation(SourceListDirective*, const KURL&, const String& effectiveDirective) const;
893
    bool checkSourceAndReportViolation(SourceListDirective*, const URL&, const String& effectiveDirective) const;
894
    bool checkMediaTypeAndReportViolation(MediaListDirective*, const String& type, const String& typeAttribute, const String& consoleMessage) const;
894
    bool checkMediaTypeAndReportViolation(MediaListDirective*, const String& type, const String& typeAttribute, const String& consoleMessage) const;
895
895
896
    bool denyIfEnforcingPolicy() const { return m_reportOnly; }
896
    bool denyIfEnforcingPolicy() const { return m_reportOnly; }
Lines 918-924 private: a/Source/WebCore/page/ContentSecurityPolicy.cpp_sec13
918
    OwnPtr<SourceListDirective> m_scriptSrc;
918
    OwnPtr<SourceListDirective> m_scriptSrc;
919
    OwnPtr<SourceListDirective> m_styleSrc;
919
    OwnPtr<SourceListDirective> m_styleSrc;
920
920
921
    Vector<KURL> m_reportURIs;
921
    Vector<URL> m_reportURIs;
922
922
923
    String m_evalDisabledErrorMessage;
923
    String m_evalDisabledErrorMessage;
924
};
924
};
Lines 949-955 PassOwnPtr<CSPDirectiveList> CSPDirectiveList::create(ContentSecurityPolicy* pol a/Source/WebCore/page/ContentSecurityPolicy.cpp_sec14
949
    return directives.release();
949
    return directives.release();
950
}
950
}
951
951
952
void CSPDirectiveList::reportViolation(const String& directiveText, const String& effectiveDirective, const String& consoleMessage, const KURL& blockedURL, const String& contextURL, const WTF::OrdinalNumber& contextLine, JSC::ExecState* state) const
952
void CSPDirectiveList::reportViolation(const String& directiveText, const String& effectiveDirective, const String& consoleMessage, const URL& blockedURL, const String& contextURL, const WTF::OrdinalNumber& contextLine, JSC::ExecState* state) const
953
{
953
{
954
    String message = m_reportOnly ? "[Report Only] " + consoleMessage : consoleMessage;
954
    String message = m_reportOnly ? "[Report Only] " + consoleMessage : consoleMessage;
955
    m_policy->reportViolation(directiveText, effectiveDirective, message, blockedURL, m_reportURIs, m_header, contextURL, contextLine, state);
955
    m_policy->reportViolation(directiveText, effectiveDirective, message, blockedURL, m_reportURIs, m_header, contextURL, contextLine, state);
Lines 970-976 bool CSPDirectiveList::checkNonce(NonceDirective* directive, const String& nonce a/Source/WebCore/page/ContentSecurityPolicy.cpp_sec15
970
    return !directive || directive->allows(nonce);
970
    return !directive || directive->allows(nonce);
971
}
971
}
972
972
973
bool CSPDirectiveList::checkSource(SourceListDirective* directive, const KURL& url) const
973
bool CSPDirectiveList::checkSource(SourceListDirective* directive, const URL& url) const
974
{
974
{
975
    return !directive || directive->allows(url);
975
    return !directive || directive->allows(url);
976
}
976
}
Lines 998-1004 bool CSPDirectiveList::checkEvalAndReportViolation(SourceListDirective* directiv a/Source/WebCore/page/ContentSecurityPolicy.cpp_sec16
998
    if (directive == m_defaultSrc)
998
    if (directive == m_defaultSrc)
999
        suffix = " Note that 'script-src' was not explicitly set, so 'default-src' is used as a fallback.";
999
        suffix = " Note that 'script-src' was not explicitly set, so 'default-src' is used as a fallback.";
1000
1000
1001
    reportViolation(directive->text(), scriptSrc, consoleMessage + "\"" + directive->text() + "\"." + suffix + "\n", KURL(), contextURL, contextLine, state);
1001
    reportViolation(directive->text(), scriptSrc, consoleMessage + "\"" + directive->text() + "\"." + suffix + "\n", URL(), contextURL, contextLine, state);
1002
    if (!m_reportOnly) {
1002
    if (!m_reportOnly) {
1003
        m_policy->reportBlockedScriptExecutionToInspector(directive->text());
1003
        m_policy->reportBlockedScriptExecutionToInspector(directive->text());
1004
        return false;
1004
        return false;
Lines 1010-1016 bool CSPDirectiveList::checkNonceAndReportViolation(NonceDirective* directive, c a/Source/WebCore/page/ContentSecurityPolicy.cpp_sec17
1010
{
1010
{
1011
    if (checkNonce(directive, nonce))
1011
    if (checkNonce(directive, nonce))
1012
        return true;
1012
        return true;
1013
    reportViolation(directive->text(), scriptNonce, consoleMessage + "\"" + directive->text() + "\".\n", KURL(), contextURL, contextLine);
1013
    reportViolation(directive->text(), scriptNonce, consoleMessage + "\"" + directive->text() + "\".\n", URL(), contextURL, contextLine);
1014
    return denyIfEnforcingPolicy();
1014
    return denyIfEnforcingPolicy();
1015
}
1015
}
1016
1016
Lines 1023-1029 bool CSPDirectiveList::checkMediaTypeAndReportViolation(MediaListDirective* dire a/Source/WebCore/page/ContentSecurityPolicy.cpp_sec18
1023
    if (typeAttribute.isEmpty())
1023
    if (typeAttribute.isEmpty())
1024
        message = message + " When enforcing the 'plugin-types' directive, the plugin's media type must be explicitly declared with a 'type' attribute on the containing element (e.g. '<object type=\"[TYPE GOES HERE]\" ...>').";
1024
        message = message + " When enforcing the 'plugin-types' directive, the plugin's media type must be explicitly declared with a 'type' attribute on the containing element (e.g. '<object type=\"[TYPE GOES HERE]\" ...>').";
1025
1025
1026
    reportViolation(directive->text(), pluginTypes, message + "\n", KURL());
1026
    reportViolation(directive->text(), pluginTypes, message + "\n", URL());
1027
    return denyIfEnforcingPolicy();
1027
    return denyIfEnforcingPolicy();
1028
}
1028
}
1029
1029
Lines 1036-1042 bool CSPDirectiveList::checkInlineAndReportViolation(SourceListDirective* direct a/Source/WebCore/page/ContentSecurityPolicy.cpp_sec19
1036
    if (directive == m_defaultSrc)
1036
    if (directive == m_defaultSrc)
1037
        suffix = makeString(" Note that '", (isScript ? "script" : "style"), "-src' was not explicitly set, so 'default-src' is used as a fallback.");
1037
        suffix = makeString(" Note that '", (isScript ? "script" : "style"), "-src' was not explicitly set, so 'default-src' is used as a fallback.");
1038
1038
1039
    reportViolation(directive->text(), isScript ? scriptSrc : styleSrc, consoleMessage + "\"" + directive->text() + "\"." + suffix + "\n", KURL(), contextURL, contextLine);
1039
    reportViolation(directive->text(), isScript ? scriptSrc : styleSrc, consoleMessage + "\"" + directive->text() + "\"." + suffix + "\n", URL(), contextURL, contextLine);
1040
1040
1041
    if (!m_reportOnly) {
1041
    if (!m_reportOnly) {
1042
        if (isScript)
1042
        if (isScript)
Lines 1046-1052 bool CSPDirectiveList::checkInlineAndReportViolation(SourceListDirective* direct a/Source/WebCore/page/ContentSecurityPolicy.cpp_sec20
1046
    return true;
1046
    return true;
1047
}
1047
}
1048
1048
1049
bool CSPDirectiveList::checkSourceAndReportViolation(SourceListDirective* directive, const KURL& url, const String& effectiveDirective) const
1049
bool CSPDirectiveList::checkSourceAndReportViolation(SourceListDirective* directive, const URL& url, const String& effectiveDirective) const
1050
{
1050
{
1051
    if (checkSource(directive, url))
1051
    if (checkSource(directive, url))
1052
        return true;
1052
        return true;
Lines 1129-1135 bool CSPDirectiveList::allowEval(JSC::ExecState* state, ContentSecurityPolicy::R a/Source/WebCore/page/ContentSecurityPolicy.cpp_sec21
1129
        checkEval(operativeDirective(m_scriptSrc.get()));
1129
        checkEval(operativeDirective(m_scriptSrc.get()));
1130
}
1130
}
1131
1131
1132
bool CSPDirectiveList::allowScriptNonce(const String& nonce, const String& contextURL, const WTF::OrdinalNumber& contextLine, const KURL& url) const
1132
bool CSPDirectiveList::allowScriptNonce(const String& nonce, const String& contextURL, const WTF::OrdinalNumber& contextLine, const URL& url) const
1133
{
1133
{
1134
    DEFINE_STATIC_LOCAL(String, consoleMessage, (ASCIILiteral("Refused to execute script because it violates the following Content Security Policy directive: ")));
1134
    DEFINE_STATIC_LOCAL(String, consoleMessage, (ASCIILiteral("Refused to execute script because it violates the following Content Security Policy directive: ")));
1135
    if (url.isEmpty())
1135
    if (url.isEmpty())
Lines 1137-1157 bool CSPDirectiveList::allowScriptNonce(const String& nonce, const String& conte a/Source/WebCore/page/ContentSecurityPolicy.cpp_sec22
1137
    return checkNonceAndReportViolation(m_scriptNonce.get(), nonce, "Refused to load '" + url.stringCenterEllipsizedToLength() + "' because it violates the following Content Security Policy directive: ", contextURL, contextLine);
1137
    return checkNonceAndReportViolation(m_scriptNonce.get(), nonce, "Refused to load '" + url.stringCenterEllipsizedToLength() + "' because it violates the following Content Security Policy directive: ", contextURL, contextLine);
1138
}
1138
}
1139
1139
1140
bool CSPDirectiveList::allowPluginType(const String& type, const String& typeAttribute, const KURL& url, ContentSecurityPolicy::ReportingStatus reportingStatus) const
1140
bool CSPDirectiveList::allowPluginType(const String& type, const String& typeAttribute, const URL& url, ContentSecurityPolicy::ReportingStatus reportingStatus) const
1141
{
1141
{
1142
    return reportingStatus == ContentSecurityPolicy::SendReport ?
1142
    return reportingStatus == ContentSecurityPolicy::SendReport ?
1143
        checkMediaTypeAndReportViolation(m_pluginTypes.get(), type, typeAttribute, "Refused to load '" + url.stringCenterEllipsizedToLength() + "' (MIME type '" + typeAttribute + "') because it violates the following Content Security Policy Directive: ") :
1143
        checkMediaTypeAndReportViolation(m_pluginTypes.get(), type, typeAttribute, "Refused to load '" + url.stringCenterEllipsizedToLength() + "' (MIME type '" + typeAttribute + "') because it violates the following Content Security Policy Directive: ") :
1144
        checkMediaType(m_pluginTypes.get(), type, typeAttribute);
1144
        checkMediaType(m_pluginTypes.get(), type, typeAttribute);
1145
}
1145
}
1146
1146
1147
bool CSPDirectiveList::allowScriptFromSource(const KURL& url, ContentSecurityPolicy::ReportingStatus reportingStatus) const
1147
bool CSPDirectiveList::allowScriptFromSource(const URL& url, ContentSecurityPolicy::ReportingStatus reportingStatus) const
1148
{
1148
{
1149
    return reportingStatus == ContentSecurityPolicy::SendReport ?
1149
    return reportingStatus == ContentSecurityPolicy::SendReport ?
1150
        checkSourceAndReportViolation(operativeDirective(m_scriptSrc.get()), url, scriptSrc) :
1150
        checkSourceAndReportViolation(operativeDirective(m_scriptSrc.get()), url, scriptSrc) :
1151
        checkSource(operativeDirective(m_scriptSrc.get()), url);
1151
        checkSource(operativeDirective(m_scriptSrc.get()), url);
1152
}
1152
}
1153
1153
1154
bool CSPDirectiveList::allowObjectFromSource(const KURL& url, ContentSecurityPolicy::ReportingStatus reportingStatus) const
1154
bool CSPDirectiveList::allowObjectFromSource(const URL& url, ContentSecurityPolicy::ReportingStatus reportingStatus) const
1155
{
1155
{
1156
    if (url.isBlankURL())
1156
    if (url.isBlankURL())
1157
        return true;
1157
        return true;
Lines 1160-1166 bool CSPDirectiveList::allowObjectFromSource(const KURL& url, ContentSecurityPol a/Source/WebCore/page/ContentSecurityPolicy.cpp_sec23
1160
        checkSource(operativeDirective(m_objectSrc.get()), url);
1160
        checkSource(operativeDirective(m_objectSrc.get()), url);
1161
}
1161
}
1162
1162
1163
bool CSPDirectiveList::allowChildFrameFromSource(const KURL& url, ContentSecurityPolicy::ReportingStatus reportingStatus) const
1163
bool CSPDirectiveList::allowChildFrameFromSource(const URL& url, ContentSecurityPolicy::ReportingStatus reportingStatus) const
1164
{
1164
{
1165
    if (url.isBlankURL())
1165
    if (url.isBlankURL())
1166
        return true;
1166
        return true;
Lines 1169-1203 bool CSPDirectiveList::allowChildFrameFromSource(const KURL& url, ContentSecurit a/Source/WebCore/page/ContentSecurityPolicy.cpp_sec24
1169
        checkSource(operativeDirective(m_frameSrc.get()), url);
1169
        checkSource(operativeDirective(m_frameSrc.get()), url);
1170
}
1170
}
1171
1171
1172
bool CSPDirectiveList::allowImageFromSource(const KURL& url, ContentSecurityPolicy::ReportingStatus reportingStatus) const
1172
bool CSPDirectiveList::allowImageFromSource(const URL& url, ContentSecurityPolicy::ReportingStatus reportingStatus) const
1173
{
1173
{
1174
    return reportingStatus == ContentSecurityPolicy::SendReport ?
1174
    return reportingStatus == ContentSecurityPolicy::SendReport ?
1175
        checkSourceAndReportViolation(operativeDirective(m_imgSrc.get()), url, imgSrc) :
1175
        checkSourceAndReportViolation(operativeDirective(m_imgSrc.get()), url, imgSrc) :
1176
        checkSource(operativeDirective(m_imgSrc.get()), url);
1176
        checkSource(operativeDirective(m_imgSrc.get()), url);
1177
}
1177
}
1178
1178
1179
bool CSPDirectiveList::allowStyleFromSource(const KURL& url, ContentSecurityPolicy::ReportingStatus reportingStatus) const
1179
bool CSPDirectiveList::allowStyleFromSource(const URL& url, ContentSecurityPolicy::ReportingStatus reportingStatus) const
1180
{
1180
{
1181
    return reportingStatus == ContentSecurityPolicy::SendReport ?
1181
    return reportingStatus == ContentSecurityPolicy::SendReport ?
1182
        checkSourceAndReportViolation(operativeDirective(m_styleSrc.get()), url, styleSrc) :
1182
        checkSourceAndReportViolation(operativeDirective(m_styleSrc.get()), url, styleSrc) :
1183
        checkSource(operativeDirective(m_styleSrc.get()), url);
1183
        checkSource(operativeDirective(m_styleSrc.get()), url);
1184
}
1184
}
1185
1185
1186
bool CSPDirectiveList::allowFontFromSource(const KURL& url, ContentSecurityPolicy::ReportingStatus reportingStatus) const
1186
bool CSPDirectiveList::allowFontFromSource(const URL& url, ContentSecurityPolicy::ReportingStatus reportingStatus) const
1187
{
1187
{
1188
    return reportingStatus == ContentSecurityPolicy::SendReport ?
1188
    return reportingStatus == ContentSecurityPolicy::SendReport ?
1189
        checkSourceAndReportViolation(operativeDirective(m_fontSrc.get()), url, fontSrc) :
1189
        checkSourceAndReportViolation(operativeDirective(m_fontSrc.get()), url, fontSrc) :
1190
        checkSource(operativeDirective(m_fontSrc.get()), url);
1190
        checkSource(operativeDirective(m_fontSrc.get()), url);
1191
}
1191
}
1192
1192
1193
bool CSPDirectiveList::allowMediaFromSource(const KURL& url, ContentSecurityPolicy::ReportingStatus reportingStatus) const
1193
bool CSPDirectiveList::allowMediaFromSource(const URL& url, ContentSecurityPolicy::ReportingStatus reportingStatus) const
1194
{
1194
{
1195
    return reportingStatus == ContentSecurityPolicy::SendReport ?
1195
    return reportingStatus == ContentSecurityPolicy::SendReport ?
1196
        checkSourceAndReportViolation(operativeDirective(m_mediaSrc.get()), url, mediaSrc) :
1196
        checkSourceAndReportViolation(operativeDirective(m_mediaSrc.get()), url, mediaSrc) :
1197
        checkSource(operativeDirective(m_mediaSrc.get()), url);
1197
        checkSource(operativeDirective(m_mediaSrc.get()), url);
1198
}
1198
}
1199
1199
1200
bool CSPDirectiveList::allowConnectToSource(const KURL& url, ContentSecurityPolicy::ReportingStatus reportingStatus) const
1200
bool CSPDirectiveList::allowConnectToSource(const URL& url, ContentSecurityPolicy::ReportingStatus reportingStatus) const
1201
{
1201
{
1202
    return reportingStatus == ContentSecurityPolicy::SendReport ?
1202
    return reportingStatus == ContentSecurityPolicy::SendReport ?
1203
        checkSourceAndReportViolation(operativeDirective(m_connectSrc.get()), url, connectSrc) :
1203
        checkSourceAndReportViolation(operativeDirective(m_connectSrc.get()), url, connectSrc) :
Lines 1210-1223 void CSPDirectiveList::gatherReportURIs(DOMStringList& list) const a/Source/WebCore/page/ContentSecurityPolicy.cpp_sec25
1210
        list.append(m_reportURIs[i].string());
1210
        list.append(m_reportURIs[i].string());
1211
}
1211
}
1212
1212
1213
bool CSPDirectiveList::allowFormAction(const KURL& url, ContentSecurityPolicy::ReportingStatus reportingStatus) const
1213
bool CSPDirectiveList::allowFormAction(const URL& url, ContentSecurityPolicy::ReportingStatus reportingStatus) const
1214
{
1214
{
1215
    return reportingStatus == ContentSecurityPolicy::SendReport ?
1215
    return reportingStatus == ContentSecurityPolicy::SendReport ?
1216
        checkSourceAndReportViolation(m_formAction.get(), url, formAction) :
1216
        checkSourceAndReportViolation(m_formAction.get(), url, formAction) :
1217
        checkSource(m_formAction.get(), url);
1217
        checkSource(m_formAction.get(), url);
1218
}
1218
}
1219
1219
1220
bool CSPDirectiveList::allowBaseURI(const KURL& url, ContentSecurityPolicy::ReportingStatus reportingStatus) const
1220
bool CSPDirectiveList::allowBaseURI(const URL& url, ContentSecurityPolicy::ReportingStatus reportingStatus) const
1221
{
1221
{
1222
    return reportingStatus == ContentSecurityPolicy::SendReport ?
1222
    return reportingStatus == ContentSecurityPolicy::SendReport ?
1223
        checkSourceAndReportViolation(m_baseURI.get(), url, baseURI) :
1223
        checkSourceAndReportViolation(m_baseURI.get(), url, baseURI) :
Lines 1537-1544 bool isAllowedByAllWithContext(const CSPDirectiveListVector& policies, const Str a/Source/WebCore/page/ContentSecurityPolicy.cpp_sec26
1537
    return true;
1537
    return true;
1538
}
1538
}
1539
1539
1540
template<bool (CSPDirectiveList::*allowed)(const String&, const String&, const WTF::OrdinalNumber&, const KURL&) const>
1540
template<bool (CSPDirectiveList::*allowed)(const String&, const String&, const WTF::OrdinalNumber&, const URL&) const>
1541
bool isAllowedByAllWithNonce(const CSPDirectiveListVector& policies, const String& nonce, const String& contextURL, const WTF::OrdinalNumber& contextLine, const KURL& url)
1541
bool isAllowedByAllWithNonce(const CSPDirectiveListVector& policies, const String& nonce, const String& contextURL, const WTF::OrdinalNumber& contextLine, const URL& url)
1542
{
1542
{
1543
    for (size_t i = 0; i < policies.size(); ++i) {
1543
    for (size_t i = 0; i < policies.size(); ++i) {
1544
        if (!(policies[i].get()->*allowed)(nonce, contextURL, contextLine, url))
1544
        if (!(policies[i].get()->*allowed)(nonce, contextURL, contextLine, url))
Lines 1547-1554 bool isAllowedByAllWithNonce(const CSPDirectiveListVector& policies, const Strin a/Source/WebCore/page/ContentSecurityPolicy.cpp_sec27
1547
    return true;
1547
    return true;
1548
}
1548
}
1549
1549
1550
template<bool (CSPDirectiveList::*allowFromURL)(const KURL&, ContentSecurityPolicy::ReportingStatus) const>
1550
template<bool (CSPDirectiveList::*allowFromURL)(const URL&, ContentSecurityPolicy::ReportingStatus) const>
1551
bool isAllowedByAllWithURL(const CSPDirectiveListVector& policies, const KURL& url, ContentSecurityPolicy::ReportingStatus reportingStatus)
1551
bool isAllowedByAllWithURL(const CSPDirectiveListVector& policies, const URL& url, ContentSecurityPolicy::ReportingStatus reportingStatus)
1552
{
1552
{
1553
    if (SchemeRegistry::schemeShouldBypassContentSecurityPolicy(url.protocol()))
1553
    if (SchemeRegistry::schemeShouldBypassContentSecurityPolicy(url.protocol()))
1554
        return true;
1554
        return true;
Lines 1596-1607 String ContentSecurityPolicy::evalDisabledErrorMessage() const a/Source/WebCore/page/ContentSecurityPolicy.cpp_sec28
1596
    return String();
1596
    return String();
1597
}
1597
}
1598
1598
1599
bool ContentSecurityPolicy::allowScriptNonce(const String& nonce, const String& contextURL, const WTF::OrdinalNumber& contextLine, const KURL& url) const
1599
bool ContentSecurityPolicy::allowScriptNonce(const String& nonce, const String& contextURL, const WTF::OrdinalNumber& contextLine, const URL& url) const
1600
{
1600
{
1601
    return isAllowedByAllWithNonce<&CSPDirectiveList::allowScriptNonce>(m_policies, nonce, contextURL, contextLine, url);
1601
    return isAllowedByAllWithNonce<&CSPDirectiveList::allowScriptNonce>(m_policies, nonce, contextURL, contextLine, url);
1602
}
1602
}
1603
1603
1604
bool ContentSecurityPolicy::allowPluginType(const String& type, const String& typeAttribute, const KURL& url, ContentSecurityPolicy::ReportingStatus reportingStatus) const
1604
bool ContentSecurityPolicy::allowPluginType(const String& type, const String& typeAttribute, const URL& url, ContentSecurityPolicy::ReportingStatus reportingStatus) const
1605
{
1605
{
1606
    for (size_t i = 0; i < m_policies.size(); ++i) {
1606
    for (size_t i = 0; i < m_policies.size(); ++i) {
1607
        if (!m_policies[i]->allowPluginType(type, typeAttribute, url, reportingStatus))
1607
        if (!m_policies[i]->allowPluginType(type, typeAttribute, url, reportingStatus))
Lines 1610-1661 bool ContentSecurityPolicy::allowPluginType(const String& type, const String& ty a/Source/WebCore/page/ContentSecurityPolicy.cpp_sec29
1610
    return true;
1610
    return true;
1611
}
1611
}
1612
1612
1613
bool ContentSecurityPolicy::allowScriptFromSource(const KURL& url, ContentSecurityPolicy::ReportingStatus reportingStatus) const
1613
bool ContentSecurityPolicy::allowScriptFromSource(const URL& url, ContentSecurityPolicy::ReportingStatus reportingStatus) const
1614
{
1614
{
1615
    return isAllowedByAllWithURL<&CSPDirectiveList::allowScriptFromSource>(m_policies, url, reportingStatus);
1615
    return isAllowedByAllWithURL<&CSPDirectiveList::allowScriptFromSource>(m_policies, url, reportingStatus);
1616
}
1616
}
1617
1617
1618
bool ContentSecurityPolicy::allowObjectFromSource(const KURL& url, ContentSecurityPolicy::ReportingStatus reportingStatus) const
1618
bool ContentSecurityPolicy::allowObjectFromSource(const URL& url, ContentSecurityPolicy::ReportingStatus reportingStatus) const
1619
{
1619
{
1620
    return isAllowedByAllWithURL<&CSPDirectiveList::allowObjectFromSource>(m_policies, url, reportingStatus);
1620
    return isAllowedByAllWithURL<&CSPDirectiveList::allowObjectFromSource>(m_policies, url, reportingStatus);
1621
}
1621
}
1622
1622
1623
bool ContentSecurityPolicy::allowChildFrameFromSource(const KURL& url, ContentSecurityPolicy::ReportingStatus reportingStatus) const
1623
bool ContentSecurityPolicy::allowChildFrameFromSource(const URL& url, ContentSecurityPolicy::ReportingStatus reportingStatus) const
1624
{
1624
{
1625
    return isAllowedByAllWithURL<&CSPDirectiveList::allowChildFrameFromSource>(m_policies, url, reportingStatus);
1625
    return isAllowedByAllWithURL<&CSPDirectiveList::allowChildFrameFromSource>(m_policies, url, reportingStatus);
1626
}
1626
}
1627
1627
1628
bool ContentSecurityPolicy::allowImageFromSource(const KURL& url, ContentSecurityPolicy::ReportingStatus reportingStatus) const
1628
bool ContentSecurityPolicy::allowImageFromSource(const URL& url, ContentSecurityPolicy::ReportingStatus reportingStatus) const
1629
{
1629
{
1630
    return isAllowedByAllWithURL<&CSPDirectiveList::allowImageFromSource>(m_policies, url, reportingStatus);
1630
    return isAllowedByAllWithURL<&CSPDirectiveList::allowImageFromSource>(m_policies, url, reportingStatus);
1631
}
1631
}
1632
1632
1633
bool ContentSecurityPolicy::allowStyleFromSource(const KURL& url, ContentSecurityPolicy::ReportingStatus reportingStatus) const
1633
bool ContentSecurityPolicy::allowStyleFromSource(const URL& url, ContentSecurityPolicy::ReportingStatus reportingStatus) const
1634
{
1634
{
1635
    return isAllowedByAllWithURL<&CSPDirectiveList::allowStyleFromSource>(m_policies, url, reportingStatus);
1635
    return isAllowedByAllWithURL<&CSPDirectiveList::allowStyleFromSource>(m_policies, url, reportingStatus);
1636
}
1636
}
1637
1637
1638
bool ContentSecurityPolicy::allowFontFromSource(const KURL& url, ContentSecurityPolicy::ReportingStatus reportingStatus) const
1638
bool ContentSecurityPolicy::allowFontFromSource(const URL& url, ContentSecurityPolicy::ReportingStatus reportingStatus) const
1639
{
1639
{
1640
    return isAllowedByAllWithURL<&CSPDirectiveList::allowFontFromSource>(m_policies, url, reportingStatus);
1640
    return isAllowedByAllWithURL<&CSPDirectiveList::allowFontFromSource>(m_policies, url, reportingStatus);
1641
}
1641
}
1642
1642
1643
bool ContentSecurityPolicy::allowMediaFromSource(const KURL& url, ContentSecurityPolicy::ReportingStatus reportingStatus) const
1643
bool ContentSecurityPolicy::allowMediaFromSource(const URL& url, ContentSecurityPolicy::ReportingStatus reportingStatus) const
1644
{
1644
{
1645
    return isAllowedByAllWithURL<&CSPDirectiveList::allowMediaFromSource>(m_policies, url, reportingStatus);
1645
    return isAllowedByAllWithURL<&CSPDirectiveList::allowMediaFromSource>(m_policies, url, reportingStatus);
1646
}
1646
}
1647
1647
1648
bool ContentSecurityPolicy::allowConnectToSource(const KURL& url, ContentSecurityPolicy::ReportingStatus reportingStatus) const
1648
bool ContentSecurityPolicy::allowConnectToSource(const URL& url, ContentSecurityPolicy::ReportingStatus reportingStatus) const
1649
{
1649
{
1650
    return isAllowedByAllWithURL<&CSPDirectiveList::allowConnectToSource>(m_policies, url, reportingStatus);
1650
    return isAllowedByAllWithURL<&CSPDirectiveList::allowConnectToSource>(m_policies, url, reportingStatus);
1651
}
1651
}
1652
1652
1653
bool ContentSecurityPolicy::allowFormAction(const KURL& url, ContentSecurityPolicy::ReportingStatus reportingStatus) const
1653
bool ContentSecurityPolicy::allowFormAction(const URL& url, ContentSecurityPolicy::ReportingStatus reportingStatus) const
1654
{
1654
{
1655
    return isAllowedByAllWithURL<&CSPDirectiveList::allowFormAction>(m_policies, url, reportingStatus);
1655
    return isAllowedByAllWithURL<&CSPDirectiveList::allowFormAction>(m_policies, url, reportingStatus);
1656
}
1656
}
1657
1657
1658
bool ContentSecurityPolicy::allowBaseURI(const KURL& url, ContentSecurityPolicy::ReportingStatus reportingStatus) const
1658
bool ContentSecurityPolicy::allowBaseURI(const URL& url, ContentSecurityPolicy::ReportingStatus reportingStatus) const
1659
{
1659
{
1660
    return isAllowedByAllWithURL<&CSPDirectiveList::allowBaseURI>(m_policies, url, reportingStatus);
1660
    return isAllowedByAllWithURL<&CSPDirectiveList::allowBaseURI>(m_policies, url, reportingStatus);
1661
}
1661
}
Lines 1686-1697 SecurityOrigin* ContentSecurityPolicy::securityOrigin() const a/Source/WebCore/page/ContentSecurityPolicy.cpp_sec30
1686
    return m_scriptExecutionContext->securityOrigin();
1686
    return m_scriptExecutionContext->securityOrigin();
1687
}
1687
}
1688
1688
1689
const KURL& ContentSecurityPolicy::url() const
1689
const URL& ContentSecurityPolicy::url() const
1690
{
1690
{
1691
    return m_scriptExecutionContext->url();
1691
    return m_scriptExecutionContext->url();
1692
}
1692
}
1693
1693
1694
KURL ContentSecurityPolicy::completeURL(const String& url) const
1694
URL ContentSecurityPolicy::completeURL(const String& url) const
1695
{
1695
{
1696
    return m_scriptExecutionContext->completeURL(url);
1696
    return m_scriptExecutionContext->completeURL(url);
1697
}
1697
}
Lines 1701-1707 void ContentSecurityPolicy::enforceSandboxFlags(SandboxFlags mask) const a/Source/WebCore/page/ContentSecurityPolicy.cpp_sec31
1701
    m_scriptExecutionContext->enforceSandboxFlags(mask);
1701
    m_scriptExecutionContext->enforceSandboxFlags(mask);
1702
}
1702
}
1703
1703
1704
static String stripURLForUseInReport(Document* document, const KURL& url)
1704
static String stripURLForUseInReport(Document* document, const URL& url)
1705
{
1705
{
1706
    if (!url.isValid())
1706
    if (!url.isValid())
1707
        return String();
1707
        return String();
Lines 1711-1717 static String stripURLForUseInReport(Document* document, const KURL& url) a/Source/WebCore/page/ContentSecurityPolicy.cpp_sec32
1711
}
1711
}
1712
1712
1713
#if ENABLE(CSP_NEXT)
1713
#if ENABLE(CSP_NEXT)
1714
static void gatherSecurityPolicyViolationEventData(SecurityPolicyViolationEventInit& init, Document* document, const String& directiveText, const String& effectiveDirective, const KURL& blockedURL, const String& header)
1714
static void gatherSecurityPolicyViolationEventData(SecurityPolicyViolationEventInit& init, Document* document, const String& directiveText, const String& effectiveDirective, const URL& blockedURL, const String& header)
1715
{
1715
{
1716
    init.documentURI = document->url().string();
1716
    init.documentURI = document->url().string();
1717
    init.referrer = document->referrer();
1717
    init.referrer = document->referrer();
Lines 1729-1742 static void gatherSecurityPolicyViolationEventData(SecurityPolicyViolationEventI a/Source/WebCore/page/ContentSecurityPolicy.cpp_sec33
1729
    const ScriptCallFrame& callFrame = getFirstNonNativeFrame(stack);
1729
    const ScriptCallFrame& callFrame = getFirstNonNativeFrame(stack);
1730
1730
1731
    if (callFrame.lineNumber()) {
1731
    if (callFrame.lineNumber()) {
1732
        KURL source = KURL(ParsedURLString, callFrame.sourceURL());
1732
        URL source = URL(ParsedURLString, callFrame.sourceURL());
1733
        init.sourceFile = stripURLForUseInReport(document, source);
1733
        init.sourceFile = stripURLForUseInReport(document, source);
1734
        init.lineNumber = callFrame.lineNumber();
1734
        init.lineNumber = callFrame.lineNumber();
1735
    }
1735
    }
1736
}
1736
}
1737
#endif
1737
#endif
1738
1738
1739
void ContentSecurityPolicy::reportViolation(const String& directiveText, const String& effectiveDirective, const String& consoleMessage, const KURL& blockedURL, const Vector<KURL>& reportURIs, const String& header, const String& contextURL, const WTF::OrdinalNumber& contextLine, JSC::ExecState* state) const
1739
void ContentSecurityPolicy::reportViolation(const String& directiveText, const String& effectiveDirective, const String& consoleMessage, const URL& blockedURL, const Vector<URL>& reportURIs, const String& header, const String& contextURL, const WTF::OrdinalNumber& contextLine, JSC::ExecState* state) const
1740
{
1740
{
1741
    logToConsole(consoleMessage, contextURL, contextLine, state);
1741
    logToConsole(consoleMessage, contextURL, contextLine, state);
1742
1742
Lines 1789-1795 void ContentSecurityPolicy::reportViolation(const String& directiveText, const S a/Source/WebCore/page/ContentSecurityPolicy.cpp_sec34
1789
        const ScriptCallFrame& callFrame = getFirstNonNativeFrame(stack);
1789
        const ScriptCallFrame& callFrame = getFirstNonNativeFrame(stack);
1790
1790
1791
        if (callFrame.lineNumber()) {
1791
        if (callFrame.lineNumber()) {
1792
            KURL source = KURL(ParsedURLString, callFrame.sourceURL());
1792
            URL source = URL(ParsedURLString, callFrame.sourceURL());
1793
            cspReport->setString("source-file", stripURLForUseInReport(document, source));
1793
            cspReport->setString("source-file", stripURLForUseInReport(document, source));
1794
            cspReport->setNumber("line-number", callFrame.lineNumber());
1794
            cspReport->setNumber("line-number", callFrame.lineNumber());
1795
        }
1795
        }
- a/Source/WebCore/page/ContentSecurityPolicy.h -17 / +17 lines
Lines 26-32 a/Source/WebCore/page/ContentSecurityPolicy.h_sec1
26
#ifndef ContentSecurityPolicy_h
26
#ifndef ContentSecurityPolicy_h
27
#define ContentSecurityPolicy_h
27
#define ContentSecurityPolicy_h
28
28
29
#include "KURL.h"
29
#include "URL.h"
30
#include "ScriptState.h"
30
#include "ScriptState.h"
31
#include <wtf/PassOwnPtr.h>
31
#include <wtf/PassOwnPtr.h>
32
#include <wtf/RefCounted.h>
32
#include <wtf/RefCounted.h>
Lines 92-110 public: a/Source/WebCore/page/ContentSecurityPolicy.h_sec2
92
    bool allowInlineScript(const String& contextURL, const WTF::OrdinalNumber& contextLine, ReportingStatus = SendReport) const;
92
    bool allowInlineScript(const String& contextURL, const WTF::OrdinalNumber& contextLine, ReportingStatus = SendReport) const;
93
    bool allowInlineStyle(const String& contextURL, const WTF::OrdinalNumber& contextLine, ReportingStatus = SendReport) const;
93
    bool allowInlineStyle(const String& contextURL, const WTF::OrdinalNumber& contextLine, ReportingStatus = SendReport) const;
94
    bool allowEval(JSC::ExecState* = 0, ReportingStatus = SendReport) const;
94
    bool allowEval(JSC::ExecState* = 0, ReportingStatus = SendReport) const;
95
    bool allowScriptNonce(const String& nonce, const String& contextURL, const WTF::OrdinalNumber& contextLine, const KURL& = KURL()) const;
95
    bool allowScriptNonce(const String& nonce, const String& contextURL, const WTF::OrdinalNumber& contextLine, const URL& = URL()) const;
96
    bool allowPluginType(const String& type, const String& typeAttribute, const KURL&, ReportingStatus = SendReport) const;
96
    bool allowPluginType(const String& type, const String& typeAttribute, const URL&, ReportingStatus = SendReport) const;
97
97
98
    bool allowScriptFromSource(const KURL&, ReportingStatus = SendReport) const;
98
    bool allowScriptFromSource(const URL&, ReportingStatus = SendReport) const;
99
    bool allowObjectFromSource(const KURL&, ReportingStatus = SendReport) const;
99
    bool allowObjectFromSource(const URL&, ReportingStatus = SendReport) const;
100
    bool allowChildFrameFromSource(const KURL&, ReportingStatus = SendReport) const;
100
    bool allowChildFrameFromSource(const URL&, ReportingStatus = SendReport) const;
101
    bool allowImageFromSource(const KURL&, ReportingStatus = SendReport) const;
101
    bool allowImageFromSource(const URL&, ReportingStatus = SendReport) const;
102
    bool allowStyleFromSource(const KURL&, ReportingStatus = SendReport) const;
102
    bool allowStyleFromSource(const URL&, ReportingStatus = SendReport) const;
103
    bool allowFontFromSource(const KURL&, ReportingStatus = SendReport) const;
103
    bool allowFontFromSource(const URL&, ReportingStatus = SendReport) const;
104
    bool allowMediaFromSource(const KURL&, ReportingStatus = SendReport) const;
104
    bool allowMediaFromSource(const URL&, ReportingStatus = SendReport) const;
105
    bool allowConnectToSource(const KURL&, ReportingStatus = SendReport) const;
105
    bool allowConnectToSource(const URL&, ReportingStatus = SendReport) const;
106
    bool allowFormAction(const KURL&, ReportingStatus = SendReport) const;
106
    bool allowFormAction(const URL&, ReportingStatus = SendReport) const;
107
    bool allowBaseURI(const KURL&, ReportingStatus = SendReport) const;
107
    bool allowBaseURI(const URL&, ReportingStatus = SendReport) const;
108
108
109
    ReflectedXSSDisposition reflectedXSSDisposition() const;
109
    ReflectedXSSDisposition reflectedXSSDisposition() const;
110
110
Lines 124-135 public: a/Source/WebCore/page/ContentSecurityPolicy.h_sec3
124
    void reportInvalidReflectedXSS(const String&) const;
124
    void reportInvalidReflectedXSS(const String&) const;
125
    void reportMissingReportURI(const String&) const;
125
    void reportMissingReportURI(const String&) const;
126
    void reportUnsupportedDirective(const String&) const;
126
    void reportUnsupportedDirective(const String&) const;
127
    void reportViolation(const String& directiveText, const String& effectiveDirective, const String& consoleMessage, const KURL& blockedURL, const Vector<KURL>& reportURIs, const String& header, const String& contextURL = String(), const WTF::OrdinalNumber& contextLine = WTF::OrdinalNumber::beforeFirst(), JSC::ExecState* = 0) const;
127
    void reportViolation(const String& directiveText, const String& effectiveDirective, const String& consoleMessage, const URL& blockedURL, const Vector<URL>& reportURIs, const String& header, const String& contextURL = String(), const WTF::OrdinalNumber& contextLine = WTF::OrdinalNumber::beforeFirst(), JSC::ExecState* = 0) const;
128
128
129
    void reportBlockedScriptExecutionToInspector(const String& directiveText) const;
129
    void reportBlockedScriptExecutionToInspector(const String& directiveText) const;
130
130
131
    const KURL& url() const;
131
    const URL& url() const;
132
    KURL completeURL(const String&) const;
132
    URL completeURL(const String&) const;
133
    SecurityOrigin* securityOrigin() const;
133
    SecurityOrigin* securityOrigin() const;
134
    void enforceSandboxFlags(SandboxFlags) const;
134
    void enforceSandboxFlags(SandboxFlags) const;
135
    String evalDisabledErrorMessage() const;
135
    String evalDisabledErrorMessage() const;
- a/Source/WebCore/page/ContextMenuClient.h -2 / +2 lines
Lines 37-43 namespace WebCore { a/Source/WebCore/page/ContextMenuClient.h_sec1
37
    class ContextMenuItem;
37
    class ContextMenuItem;
38
    class Frame;
38
    class Frame;
39
    class HitTestResult;
39
    class HitTestResult;
40
    class KURL;
40
    class URL;
41
41
42
    class ContextMenuClient {
42
    class ContextMenuClient {
43
    public:
43
    public:
Lines 52-58 namespace WebCore { a/Source/WebCore/page/ContextMenuClient.h_sec2
52
52
53
        virtual void contextMenuItemSelected(ContextMenuItem*, const ContextMenu*) = 0;
53
        virtual void contextMenuItemSelected(ContextMenuItem*, const ContextMenu*) = 0;
54
54
55
        virtual void downloadURL(const KURL& url) = 0;
55
        virtual void downloadURL(const URL& url) = 0;
56
        virtual void searchWithGoogle(const Frame*) = 0;
56
        virtual void searchWithGoogle(const Frame*) = 0;
57
        virtual void lookUpInDictionary(Frame*) = 0;
57
        virtual void lookUpInDictionary(Frame*) = 0;
58
        virtual bool isSpeaking() = 0;
58
        virtual bool isSpeaking() = 0;
- a/Source/WebCore/page/ContextMenuController.cpp -5 / +5 lines
Lines 171-177 void ContextMenuController::showContextMenu(Event* event) a/Source/WebCore/page/ContextMenuController.cpp_sec1
171
    event->setDefaultHandled();
171
    event->setDefaultHandled();
172
}
172
}
173
173
174
static void openNewWindow(const KURL& urlToLoad, Frame* frame)
174
static void openNewWindow(const URL& urlToLoad, Frame* frame)
175
{
175
{
176
    if (Page* oldPage = frame->page()) {
176
    if (Page* oldPage = frame->page()) {
177
        FrameLoadRequest request(frame->document()->securityOrigin(), ResourceRequest(urlToLoad, frame->loader().outgoingReferrer()));
177
        FrameLoadRequest request(frame->document()->securityOrigin(), ResourceRequest(urlToLoad, frame->loader().outgoingReferrer()));
Lines 820-826 void ContextMenuController::populate() a/Source/WebCore/page/ContextMenuController.cpp_sec2
820
820
821
    if (!m_hitTestResult.isContentEditable()) {
821
    if (!m_hitTestResult.isContentEditable()) {
822
        FrameLoader& loader = frame->loader();
822
        FrameLoader& loader = frame->loader();
823
        KURL linkURL = m_hitTestResult.absoluteLinkURL();
823
        URL linkURL = m_hitTestResult.absoluteLinkURL();
824
        if (!linkURL.isEmpty()) {
824
        if (!linkURL.isEmpty()) {
825
            if (loader.client().canHandleRequest(ResourceRequest(linkURL))) {
825
            if (loader.client().canHandleRequest(ResourceRequest(linkURL))) {
826
                appendItem(OpenLinkItem, m_contextMenu.get());
826
                appendItem(OpenLinkItem, m_contextMenu.get());
Lines 834-840 void ContextMenuController::populate() a/Source/WebCore/page/ContextMenuController.cpp_sec3
834
            appendItem(CopyLinkItem, m_contextMenu.get());
834
            appendItem(CopyLinkItem, m_contextMenu.get());
835
        }
835
        }
836
836
837
        KURL imageURL = m_hitTestResult.absoluteImageURL();
837
        URL imageURL = m_hitTestResult.absoluteImageURL();
838
        if (!imageURL.isEmpty()) {
838
        if (!imageURL.isEmpty()) {
839
            if (!linkURL.isEmpty())
839
            if (!linkURL.isEmpty())
840
                appendItem(*separatorItem(), m_contextMenu.get());
840
                appendItem(*separatorItem(), m_contextMenu.get());
Lines 848-854 void ContextMenuController::populate() a/Source/WebCore/page/ContextMenuController.cpp_sec4
848
#endif
848
#endif
849
        }
849
        }
850
850
851
        KURL mediaURL = m_hitTestResult.absoluteMediaURL();
851
        URL mediaURL = m_hitTestResult.absoluteMediaURL();
852
        if (!mediaURL.isEmpty()) {
852
        if (!mediaURL.isEmpty()) {
853
            if (!linkURL.isEmpty() || !imageURL.isEmpty())
853
            if (!linkURL.isEmpty() || !imageURL.isEmpty())
854
                appendItem(*separatorItem(), m_contextMenu.get());
854
                appendItem(*separatorItem(), m_contextMenu.get());
Lines 991-997 void ContextMenuController::populate() a/Source/WebCore/page/ContextMenuController.cpp_sec5
991
        }
991
        }
992
992
993
        FrameLoader& loader = frame->loader();
993
        FrameLoader& loader = frame->loader();
994
        KURL linkURL = m_hitTestResult.absoluteLinkURL();
994
        URL linkURL = m_hitTestResult.absoluteLinkURL();
995
        if (!linkURL.isEmpty()) {
995
        if (!linkURL.isEmpty()) {
996
            if (loader.client().canHandleRequest(ResourceRequest(linkURL))) {
996
            if (loader.client().canHandleRequest(ResourceRequest(linkURL))) {
997
                appendItem(OpenLinkItem, m_contextMenu.get());
997
                appendItem(OpenLinkItem, m_contextMenu.get());
- a/Source/WebCore/page/DOMSecurityPolicy.cpp -4 / +4 lines
Lines 48-69 bool isPolicyActiveInContext(ScriptExecutionContext* context) a/Source/WebCore/page/DOMSecurityPolicy.cpp_sec1
48
    return context->contentSecurityPolicy()->isActive();
48
    return context->contentSecurityPolicy()->isActive();
49
}
49
}
50
50
51
template<bool (ContentSecurityPolicy::*allowWithType)(const String&, const String&, const KURL&, ContentSecurityPolicy::ReportingStatus) const>
51
template<bool (ContentSecurityPolicy::*allowWithType)(const String&, const String&, const URL&, ContentSecurityPolicy::ReportingStatus) const>
52
bool isAllowedWithType(ScriptExecutionContext* context, const String& type)
52
bool isAllowedWithType(ScriptExecutionContext* context, const String& type)
53
{
53
{
54
    if (!isPolicyActiveInContext(context))
54
    if (!isPolicyActiveInContext(context))
55
        return true;
55
        return true;
56
56
57
    return (context->contentSecurityPolicy()->*allowWithType)(type, type, KURL(), ContentSecurityPolicy::SuppressReport);
57
    return (context->contentSecurityPolicy()->*allowWithType)(type, type, URL(), ContentSecurityPolicy::SuppressReport);
58
}
58
}
59
59
60
template<bool (ContentSecurityPolicy::*allowWithURL)(const KURL&, ContentSecurityPolicy::ReportingStatus) const>
60
template<bool (ContentSecurityPolicy::*allowWithURL)(const URL&, ContentSecurityPolicy::ReportingStatus) const>
61
bool isAllowedWithURL(ScriptExecutionContext* context, const String& url)
61
bool isAllowedWithURL(ScriptExecutionContext* context, const String& url)
62
{
62
{
63
    if (!isPolicyActiveInContext(context))
63
    if (!isPolicyActiveInContext(context))
64
        return true;
64
        return true;
65
65
66
    KURL parsedURL = context->completeURL(url);
66
    URL parsedURL = context->completeURL(url);
67
    if (!parsedURL.isValid())
67
    if (!parsedURL.isValid())
68
        return false; // FIXME: Figure out how to throw a JavaScript error.
68
        return false; // FIXME: Figure out how to throw a JavaScript error.
69
69
- a/Source/WebCore/page/DOMWindow.cpp -7 / +7 lines
Lines 70-76 a/Source/WebCore/page/DOMWindow.cpp_sec1
70
#include "HTMLFrameOwnerElement.h"
70
#include "HTMLFrameOwnerElement.h"
71
#include "History.h"
71
#include "History.h"
72
#include "InspectorInstrumentation.h"
72
#include "InspectorInstrumentation.h"
73
#include "KURL.h"
73
#include "URL.h"
74
#include "Location.h"
74
#include "Location.h"
75
#include "MediaQueryList.h"
75
#include "MediaQueryList.h"
76
#include "MediaQueryMatcher.h"
76
#include "MediaQueryMatcher.h"
Lines 1769-1775 void DOMWindow::setLocation(const String& urlString, DOMWindow* activeWindow, DO a/Source/WebCore/page/DOMWindow.cpp_sec2
1769
    if (!firstFrame)
1769
    if (!firstFrame)
1770
        return;
1770
        return;
1771
1771
1772
    KURL completedURL = firstFrame->document()->completeURL(urlString);
1772
    URL completedURL = firstFrame->document()->completeURL(urlString);
1773
    if (completedURL.isNull())
1773
    if (completedURL.isNull())
1774
        return;
1774
        return;
1775
1775
Lines 1794-1800 void DOMWindow::printErrorMessage(const String& message) a/Source/WebCore/page/DOMWindow.cpp_sec3
1794
1794
1795
String DOMWindow::crossDomainAccessErrorMessage(DOMWindow* activeWindow)
1795
String DOMWindow::crossDomainAccessErrorMessage(DOMWindow* activeWindow)
1796
{
1796
{
1797
    const KURL& activeWindowURL = activeWindow->document()->url();
1797
    const URL& activeWindowURL = activeWindow->document()->url();
1798
    if (activeWindowURL.isNull())
1798
    if (activeWindowURL.isNull())
1799
        return String();
1799
        return String();
1800
1800
Lines 1806-1813 String DOMWindow::crossDomainAccessErrorMessage(DOMWindow* activeWindow) a/Source/WebCore/page/DOMWindow.cpp_sec4
1806
    String message = "Blocked a frame with origin \"" + activeOrigin->toString() + "\" from accessing a frame with origin \"" + targetOrigin->toString() + "\". ";
1806
    String message = "Blocked a frame with origin \"" + activeOrigin->toString() + "\" from accessing a frame with origin \"" + targetOrigin->toString() + "\". ";
1807
1807
1808
    // Sandbox errors: Use the origin of the frames' location, rather than their actual origin (since we know that at least one will be "null").
1808
    // Sandbox errors: Use the origin of the frames' location, rather than their actual origin (since we know that at least one will be "null").
1809
    KURL activeURL = activeWindow->document()->url();
1809
    URL activeURL = activeWindow->document()->url();
1810
    KURL targetURL = document()->url();
1810
    URL targetURL = document()->url();
1811
    if (document()->isSandboxed(SandboxOrigin) || activeWindow->document()->isSandboxed(SandboxOrigin)) {
1811
    if (document()->isSandboxed(SandboxOrigin) || activeWindow->document()->isSandboxed(SandboxOrigin)) {
1812
        message = "Blocked a frame at \"" + SecurityOrigin::create(activeURL)->toString() + "\" from accessing a frame at \"" + SecurityOrigin::create(targetURL)->toString() + "\". ";
1812
        message = "Blocked a frame at \"" + SecurityOrigin::create(activeURL)->toString() + "\" from accessing a frame at \"" + SecurityOrigin::create(targetURL)->toString() + "\". ";
1813
        if (document()->isSandboxed(SandboxOrigin) && activeWindow->document()->isSandboxed(SandboxOrigin))
1813
        if (document()->isSandboxed(SandboxOrigin) && activeWindow->document()->isSandboxed(SandboxOrigin))
Lines 1862-1868 PassRefPtr<Frame> DOMWindow::createWindow(const String& urlString, const AtomicS a/Source/WebCore/page/DOMWindow.cpp_sec5
1862
{
1862
{
1863
    Frame* activeFrame = activeWindow->frame();
1863
    Frame* activeFrame = activeWindow->frame();
1864
1864
1865
    KURL completedURL = urlString.isEmpty() ? KURL(ParsedURLString, emptyString()) : firstFrame->document()->completeURL(urlString);
1865
    URL completedURL = urlString.isEmpty() ? URL(ParsedURLString, emptyString()) : firstFrame->document()->completeURL(urlString);
1866
    if (!completedURL.isEmpty() && !completedURL.isValid()) {
1866
    if (!completedURL.isEmpty() && !completedURL.isValid()) {
1867
        // Don't expose client code to invalid URLs.
1867
        // Don't expose client code to invalid URLs.
1868
        activeWindow->printErrorMessage("Unable to open a window with invalid URL '" + completedURL.string() + "'.\n");
1868
        activeWindow->printErrorMessage("Unable to open a window with invalid URL '" + completedURL.string() + "'.\n");
Lines 1940-1946 PassRefPtr<DOMWindow> DOMWindow::open(const String& urlString, const AtomicStrin a/Source/WebCore/page/DOMWindow.cpp_sec6
1940
        if (!activeDocument->canNavigate(targetFrame))
1940
        if (!activeDocument->canNavigate(targetFrame))
1941
            return 0;
1941
            return 0;
1942
1942
1943
        KURL completedURL = firstFrame->document()->completeURL(urlString);
1943
        URL completedURL = firstFrame->document()->completeURL(urlString);
1944
1944
1945
        if (targetFrame->document()->domWindow()->isInsecureScriptAccess(activeWindow, completedURL))
1945
        if (targetFrame->document()->domWindow()->isInsecureScriptAccess(activeWindow, completedURL))
1946
            return targetFrame->document()->domWindow();
1946
            return targetFrame->document()->domWindow();
- a/Source/WebCore/page/DOMWindow.h -1 / +1 lines
Lines 30-36 a/Source/WebCore/page/DOMWindow.h_sec1
30
#include "ContextDestructionObserver.h"
30
#include "ContextDestructionObserver.h"
31
#include "EventTarget.h"
31
#include "EventTarget.h"
32
#include "FrameDestructionObserver.h"
32
#include "FrameDestructionObserver.h"
33
#include "KURL.h"
33
#include "URL.h"
34
#include "Supplementable.h"
34
#include "Supplementable.h"
35
35
36
namespace WebCore {
36
namespace WebCore {
- a/Source/WebCore/page/DragController.cpp -3 / +3 lines
Lines 742-753 bool DragController::startDrag(Frame* src, const DragState& state, DragOperation a/Source/WebCore/page/DragController.cpp_sec1
742
        // hidden or moved out from under the cursor. Regardless, we don't want to start a drag on
742
        // hidden or moved out from under the cursor. Regardless, we don't want to start a drag on
743
        // something that's not actually under the drag origin.
743
        // something that's not actually under the drag origin.
744
        return false;
744
        return false;
745
    KURL linkURL = hitTestResult.absoluteLinkURL();
745
    URL linkURL = hitTestResult.absoluteLinkURL();
746
    KURL imageURL = hitTestResult.absoluteImageURL();
746
    URL imageURL = hitTestResult.absoluteImageURL();
747
747
748
    IntPoint mouseDraggedPoint = src->view()->windowToContents(dragEvent.position());
748
    IntPoint mouseDraggedPoint = src->view()->windowToContents(dragEvent.position());
749
749
750
    m_draggingImageURL = KURL();
750
    m_draggingImageURL = URL();
751
    m_sourceDragOperation = srcOp;
751
    m_sourceDragOperation = srcOp;
752
752
753
    DragImageRef dragImage = 0;
753
    DragImageRef dragImage = 0;
- a/Source/WebCore/page/DragController.h -4 / +4 lines
Lines 29-35 a/Source/WebCore/page/DragController.h_sec1
29
#include "DragActions.h"
29
#include "DragActions.h"
30
#include "DragImage.h"
30
#include "DragImage.h"
31
#include "IntPoint.h"
31
#include "IntPoint.h"
32
#include "KURL.h"
32
#include "URL.h"
33
33
34
namespace WebCore {
34
namespace WebCore {
35
35
Lines 68-74 namespace WebCore { a/Source/WebCore/page/DragController.h_sec2
68
        void setDidInitiateDrag(bool initiated) { m_didInitiateDrag = initiated; } 
68
        void setDidInitiateDrag(bool initiated) { m_didInitiateDrag = initiated; } 
69
        bool didInitiateDrag() const { return m_didInitiateDrag; }
69
        bool didInitiateDrag() const { return m_didInitiateDrag; }
70
        DragOperation sourceDragOperation() const { return m_sourceDragOperation; }
70
        DragOperation sourceDragOperation() const { return m_sourceDragOperation; }
71
        const KURL& draggingImageURL() const { return m_draggingImageURL; }
71
        const URL& draggingImageURL() const { return m_draggingImageURL; }
72
        void setDragOffset(const IntPoint& offset) { m_dragOffset = offset; }
72
        void setDragOffset(const IntPoint& offset) { m_dragOffset = offset; }
73
        const IntPoint& dragOffset() const { return m_dragOffset; }
73
        const IntPoint& dragOffset() const { return m_dragOffset; }
74
        DragSourceAction dragSourceAction() const { return m_dragSourceAction; }
74
        DragSourceAction dragSourceAction() const { return m_dragSourceAction; }
Lines 109-115 namespace WebCore { a/Source/WebCore/page/DragController.h_sec3
109
        void doImageDrag(Element*, const IntPoint&, const IntRect&, Clipboard*, Frame*, IntPoint&);
109
        void doImageDrag(Element*, const IntPoint&, const IntRect&, Clipboard*, Frame*, IntPoint&);
110
        void doSystemDrag(DragImageRef, const IntPoint&, const IntPoint&, Clipboard*, Frame*, bool forLink);
110
        void doSystemDrag(DragImageRef, const IntPoint&, const IntPoint&, Clipboard*, Frame*, bool forLink);
111
        void cleanupAfterSystemDrag();
111
        void cleanupAfterSystemDrag();
112
        void declareAndWriteDragImage(Clipboard*, Element*, const KURL&, const String& label);
112
        void declareAndWriteDragImage(Clipboard*, Element*, const URL&, const String& label);
113
113
114
        Page& m_page;
114
        Page& m_page;
115
        DragClient& m_client;
115
        DragClient& m_client;
Lines 124-130 namespace WebCore { a/Source/WebCore/page/DragController.h_sec4
124
        bool m_didInitiateDrag;
124
        bool m_didInitiateDrag;
125
        DragOperation m_sourceDragOperation; // Set in startDrag when a drag starts from a mouse down within WebKit
125
        DragOperation m_sourceDragOperation; // Set in startDrag when a drag starts from a mouse down within WebKit
126
        IntPoint m_dragOffset;
126
        IntPoint m_dragOffset;
127
        KURL m_draggingImageURL;
127
        URL m_draggingImageURL;
128
    };
128
    };
129
129
130
}
130
}
- a/Source/WebCore/page/EventSource.cpp -2 / +2 lines
Lines 59-65 namespace WebCore { a/Source/WebCore/page/EventSource.cpp_sec1
59
59
60
const unsigned long long EventSource::defaultReconnectDelay = 3000;
60
const unsigned long long EventSource::defaultReconnectDelay = 3000;
61
61
62
inline EventSource::EventSource(ScriptExecutionContext* context, const KURL& url, const Dictionary& eventSourceInit)
62
inline EventSource::EventSource(ScriptExecutionContext* context, const URL& url, const Dictionary& eventSourceInit)
63
    : ActiveDOMObject(context)
63
    : ActiveDOMObject(context)
64
    , m_url(url)
64
    , m_url(url)
65
    , m_withCredentials(false)
65
    , m_withCredentials(false)
Lines 80-86 PassRefPtr<EventSource> EventSource::create(ScriptExecutionContext* context, con a/Source/WebCore/page/EventSource.cpp_sec2
80
        return 0;
80
        return 0;
81
    }
81
    }
82
82
83
    KURL fullURL = context->completeURL(url);
83
    URL fullURL = context->completeURL(url);
84
    if (!fullURL.isValid()) {
84
    if (!fullURL.isValid()) {
85
        ec = SYNTAX_ERR;
85
        ec = SYNTAX_ERR;
86
        return 0;
86
        return 0;
- a/Source/WebCore/page/EventSource.h -3 / +3 lines
Lines 34-42 a/Source/WebCore/page/EventSource.h_sec1
34
34
35
#include "ActiveDOMObject.h"
35
#include "ActiveDOMObject.h"
36
#include "EventTarget.h"
36
#include "EventTarget.h"
37
#include "KURL.h"
38
#include "ThreadableLoaderClient.h"
37
#include "ThreadableLoaderClient.h"
39
#include "Timer.h"
38
#include "Timer.h"
39
#include "URL.h"
40
#include <wtf/RefPtr.h>
40
#include <wtf/RefPtr.h>
41
#include <wtf/Vector.h>
41
#include <wtf/Vector.h>
42
42
Lines 80-86 public: a/Source/WebCore/page/EventSource.h_sec2
80
    virtual ScriptExecutionContext* scriptExecutionContext() const OVERRIDE FINAL { return ActiveDOMObject::scriptExecutionContext(); }
80
    virtual ScriptExecutionContext* scriptExecutionContext() const OVERRIDE FINAL { return ActiveDOMObject::scriptExecutionContext(); }
81
81
82
private:
82
private:
83
    EventSource(ScriptExecutionContext*, const KURL&, const Dictionary&);
83
    EventSource(ScriptExecutionContext*, const URL&, const Dictionary&);
84
84
85
    virtual void refEventTarget() OVERRIDE FINAL { ref(); }
85
    virtual void refEventTarget() OVERRIDE FINAL { ref(); }
86
    virtual void derefEventTarget() OVERRIDE FINAL { deref(); }
86
    virtual void derefEventTarget() OVERRIDE FINAL { deref(); }
Lines 104-110 private: a/Source/WebCore/page/EventSource.h_sec3
104
    void parseEventStreamLine(unsigned pos, int fieldLength, int lineLength);
104
    void parseEventStreamLine(unsigned pos, int fieldLength, int lineLength);
105
    PassRefPtr<MessageEvent> createMessageEvent();
105
    PassRefPtr<MessageEvent> createMessageEvent();
106
106
107
    KURL m_url;
107
    URL m_url;
108
    bool m_withCredentials;
108
    bool m_withCredentials;
109
    State m_state;
109
    State m_state;
110
110
- a/Source/WebCore/page/Frame.cpp -1 / +1 lines
Lines 946-952 void Frame::deviceOrPageScaleFactorChanged() a/Source/WebCore/page/Frame.cpp_sec1
946
}
946
}
947
#endif
947
#endif
948
948
949
bool Frame::isURLAllowed(const KURL& url) const
949
bool Frame::isURLAllowed(const URL& url) const
950
{
950
{
951
    // We allow one level of self-reference because some sites depend on that,
951
    // We allow one level of self-reference because some sites depend on that,
952
    // but we don't allow more than one.
952
    // but we don't allow more than one.
- a/Source/WebCore/page/Frame.h -1 / +1 lines
Lines 193-199 namespace WebCore { a/Source/WebCore/page/Frame.h_sec1
193
        void resumeActiveDOMObjectsAndAnimations();
193
        void resumeActiveDOMObjectsAndAnimations();
194
        bool activeDOMObjectsAndAnimationsSuspended() const { return m_activeDOMObjectsAndAnimationsSuspendedCount > 0; }
194
        bool activeDOMObjectsAndAnimationsSuspended() const { return m_activeDOMObjectsAndAnimationsSuspendedCount > 0; }
195
195
196
        bool isURLAllowed(const KURL&) const;
196
        bool isURLAllowed(const URL&) const;
197
197
198
    // ========
198
    // ========
199
199
- a/Source/WebCore/page/FrameView.cpp -1 / +1 lines
Lines 1824-1830 void FrameView::restoreScrollbar() a/Source/WebCore/page/FrameView.cpp_sec1
1824
    setScrollbarsSuppressed(false);
1824
    setScrollbarsSuppressed(false);
1825
}
1825
}
1826
1826
1827
bool FrameView::scrollToFragment(const KURL& url)
1827
bool FrameView::scrollToFragment(const URL& url)
1828
{
1828
{
1829
    // If our URL has no ref, then we have no place we need to jump to.
1829
    // If our URL has no ref, then we have no place we need to jump to.
1830
    // OTOH If CSS target was set previously, we want to set it to 0, recalc
1830
    // OTOH If CSS target was set previously, we want to set it to 0, recalc
- a/Source/WebCore/page/FrameView.h -2 / +2 lines
Lines 45-51 class Event; a/Source/WebCore/page/FrameView.h_sec1
45
class FloatSize;
45
class FloatSize;
46
class Frame;
46
class Frame;
47
class HTMLFrameOwnerElement;
47
class HTMLFrameOwnerElement;
48
class KURL;
48
class URL;
49
class Node;
49
class Node;
50
class Page;
50
class Page;
51
class RenderBox;
51
class RenderBox;
Lines 325-331 public: a/Source/WebCore/page/FrameView.h_sec2
325
    // NO OTHER PLATFORM BESIDES MAC SHOULD USE THIS METHOD.
325
    // NO OTHER PLATFORM BESIDES MAC SHOULD USE THIS METHOD.
326
    void adjustPageHeightDeprecated(float* newBottom, float oldTop, float oldBottom, float bottomLimit);
326
    void adjustPageHeightDeprecated(float* newBottom, float oldTop, float oldBottom, float bottomLimit);
327
327
328
    bool scrollToFragment(const KURL&);
328
    bool scrollToFragment(const URL&);
329
    bool scrollToAnchor(const String&);
329
    bool scrollToAnchor(const String&);
330
    void maintainScrollPositionAtAnchor(Node*);
330
    void maintainScrollPositionAtAnchor(Node*);
331
    void scrollElementToRect(Element*, const IntRect&);
331
    void scrollElementToRect(Element*, const IntRect&);
- a/Source/WebCore/page/History.cpp -4 / +4 lines
Lines 127-139 void History::go(ScriptExecutionContext* context, int distance) a/Source/WebCore/page/History.cpp_sec1
127
    m_frame->navigationScheduler().scheduleHistoryNavigation(distance);
127
    m_frame->navigationScheduler().scheduleHistoryNavigation(distance);
128
}
128
}
129
129
130
KURL History::urlForState(const String& urlString)
130
URL History::urlForState(const String& urlString)
131
{
131
{
132
    KURL baseURL = m_frame->document()->baseURL();
132
    URL baseURL = m_frame->document()->baseURL();
133
    if (urlString.isEmpty())
133
    if (urlString.isEmpty())
134
        return baseURL;
134
        return baseURL;
135
135
136
    return KURL(baseURL, urlString);
136
    return URL(baseURL, urlString);
137
}
137
}
138
138
139
void History::stateObjectAdded(PassRefPtr<SerializedScriptValue> data, const String& title, const String& urlString, StateObjectType stateObjectType, ExceptionCode& ec)
139
void History::stateObjectAdded(PassRefPtr<SerializedScriptValue> data, const String& title, const String& urlString, StateObjectType stateObjectType, ExceptionCode& ec)
Lines 141-147 void History::stateObjectAdded(PassRefPtr<SerializedScriptValue> data, const Str a/Source/WebCore/page/History.cpp_sec2
141
    if (!m_frame || !m_frame->page())
141
    if (!m_frame || !m_frame->page())
142
        return;
142
        return;
143
    
143
    
144
    KURL fullURL = urlForState(urlString);
144
    URL fullURL = urlForState(urlString);
145
    if (!fullURL.isValid() || !m_frame->document()->securityOrigin()->canRequest(fullURL)) {
145
    if (!fullURL.isValid() || !m_frame->document()->securityOrigin()->canRequest(fullURL)) {
146
        ec = SECURITY_ERR;
146
        ec = SECURITY_ERR;
147
        return;
147
        return;
- a/Source/WebCore/page/History.h -2 / +2 lines
Lines 27-35 a/Source/WebCore/page/History.h_sec1
27
#define History_h
27
#define History_h
28
28
29
#include "DOMWindowProperty.h"
29
#include "DOMWindowProperty.h"
30
#include "KURL.h"
31
#include "ScriptWrappable.h"
30
#include "ScriptWrappable.h"
32
#include "SerializedScriptValue.h"
31
#include "SerializedScriptValue.h"
32
#include "URL.h"
33
#include <wtf/Forward.h>
33
#include <wtf/Forward.h>
34
#include <wtf/PassRefPtr.h>
34
#include <wtf/PassRefPtr.h>
35
#include <wtf/RefCounted.h>
35
#include <wtf/RefCounted.h>
Lines 66-72 public: a/Source/WebCore/page/History.h_sec2
66
private:
66
private:
67
    explicit History(Frame*);
67
    explicit History(Frame*);
68
68
69
    KURL urlForState(const String& url);
69
    URL urlForState(const String& url);
70
70
71
    PassRefPtr<SerializedScriptValue> stateInternal() const;
71
    PassRefPtr<SerializedScriptValue> stateInternal() const;
72
72
- a/Source/WebCore/page/Location.cpp -14 / +14 lines
Lines 34-40 a/Source/WebCore/page/Location.cpp_sec1
34
#include "ExceptionCode.h"
34
#include "ExceptionCode.h"
35
#include "Frame.h"
35
#include "Frame.h"
36
#include "FrameLoader.h"
36
#include "FrameLoader.h"
37
#include "KURL.h"
37
#include "URL.h"
38
#include "SecurityOrigin.h"
38
#include "SecurityOrigin.h"
39
39
40
namespace WebCore {
40
namespace WebCore {
Lines 44-54 Location::Location(Frame* frame) a/Source/WebCore/page/Location.cpp_sec2
44
{
44
{
45
}
45
}
46
46
47
inline const KURL& Location::url() const
47
inline const URL& Location::url() const
48
{
48
{
49
    ASSERT(m_frame);
49
    ASSERT(m_frame);
50
50
51
    const KURL& url = m_frame->document()->url();
51
    const URL& url = m_frame->document()->url();
52
    if (!url.isValid())
52
    if (!url.isValid())
53
        return blankURL(); // Use "about:blank" while the page is still loading (before we have a frame).
53
        return blankURL(); // Use "about:blank" while the page is still loading (before we have a frame).
54
54
Lines 78-84 String Location::host() const a/Source/WebCore/page/Location.cpp_sec3
78
78
79
    // Note: this is the IE spec. The NS spec swaps the two, it says
79
    // Note: this is the IE spec. The NS spec swaps the two, it says
80
    // "The hostname property is the concatenation of the host and port properties, separated by a colon."
80
    // "The hostname property is the concatenation of the host and port properties, separated by a colon."
81
    const KURL& url = this->url();
81
    const URL& url = this->url();
82
    return url.hasPort() ? url.host() + ":" + String::number(url.port()) : url.host();
82
    return url.hasPort() ? url.host() + ":" + String::number(url.port()) : url.host();
83
}
83
}
84
84
Lines 95-101 String Location::port() const a/Source/WebCore/page/Location.cpp_sec4
95
    if (!m_frame)
95
    if (!m_frame)
96
        return String();
96
        return String();
97
97
98
    const KURL& url = this->url();
98
    const URL& url = this->url();
99
    return url.hasPort() ? String::number(url.port()) : "";
99
    return url.hasPort() ? String::number(url.port()) : "";
100
}
100
}
101
101
Lines 104-110 String Location::pathname() const a/Source/WebCore/page/Location.cpp_sec5
104
    if (!m_frame)
104
    if (!m_frame)
105
        return String();
105
        return String();
106
106
107
    const KURL& url = this->url();
107
    const URL& url = this->url();
108
    return url.path().isEmpty() ? "/" : url.path();
108
    return url.path().isEmpty() ? "/" : url.path();
109
}
109
}
110
110
Lines 113-119 String Location::search() const a/Source/WebCore/page/Location.cpp_sec6
113
    if (!m_frame)
113
    if (!m_frame)
114
        return String();
114
        return String();
115
115
116
    const KURL& url = this->url();
116
    const URL& url = this->url();
117
    return url.query().isEmpty() ? emptyString() : "?" + url.query();
117
    return url.query().isEmpty() ? emptyString() : "?" + url.query();
118
}
118
}
119
119
Lines 154-160 void Location::setProtocol(const String& protocol, DOMWindow* activeWindow, DOMW a/Source/WebCore/page/Location.cpp_sec7
154
{
154
{
155
    if (!m_frame)
155
    if (!m_frame)
156
        return;
156
        return;
157
    KURL url = m_frame->document()->url();
157
    URL url = m_frame->document()->url();
158
    if (!url.setProtocol(protocol)) {
158
    if (!url.setProtocol(protocol)) {
159
        ec = SYNTAX_ERR;
159
        ec = SYNTAX_ERR;
160
        return;
160
        return;
Lines 166-172 void Location::setHost(const String& host, DOMWindow* activeWindow, DOMWindow* f a/Source/WebCore/page/Location.cpp_sec8
166
{
166
{
167
    if (!m_frame)
167
    if (!m_frame)
168
        return;
168
        return;
169
    KURL url = m_frame->document()->url();
169
    URL url = m_frame->document()->url();
170
    url.setHostAndPort(host);
170
    url.setHostAndPort(host);
171
    setLocation(url.string(), activeWindow, firstWindow);
171
    setLocation(url.string(), activeWindow, firstWindow);
172
}
172
}
Lines 175-181 void Location::setHostname(const String& hostname, DOMWindow* activeWindow, DOMW a/Source/WebCore/page/Location.cpp_sec9
175
{
175
{
176
    if (!m_frame)
176
    if (!m_frame)
177
        return;
177
        return;
178
    KURL url = m_frame->document()->url();
178
    URL url = m_frame->document()->url();
179
    url.setHost(hostname);
179
    url.setHost(hostname);
180
    setLocation(url.string(), activeWindow, firstWindow);
180
    setLocation(url.string(), activeWindow, firstWindow);
181
}
181
}
Lines 184-190 void Location::setPort(const String& portString, DOMWindow* activeWindow, DOMWin a/Source/WebCore/page/Location.cpp_sec10
184
{
184
{
185
    if (!m_frame)
185
    if (!m_frame)
186
        return;
186
        return;
187
    KURL url = m_frame->document()->url();
187
    URL url = m_frame->document()->url();
188
    int port = portString.toInt();
188
    int port = portString.toInt();
189
    if (port < 0 || port > 0xFFFF || portString.isEmpty())
189
    if (port < 0 || port > 0xFFFF || portString.isEmpty())
190
        url.removePort();
190
        url.removePort();
Lines 197-203 void Location::setPathname(const String& pathname, DOMWindow* activeWindow, DOMW a/Source/WebCore/page/Location.cpp_sec11
197
{
197
{
198
    if (!m_frame)
198
    if (!m_frame)
199
        return;
199
        return;
200
    KURL url = m_frame->document()->url();
200
    URL url = m_frame->document()->url();
201
    url.setPath(pathname);
201
    url.setPath(pathname);
202
    setLocation(url.string(), activeWindow, firstWindow);
202
    setLocation(url.string(), activeWindow, firstWindow);
203
}
203
}
Lines 206-212 void Location::setSearch(const String& search, DOMWindow* activeWindow, DOMWindo a/Source/WebCore/page/Location.cpp_sec12
206
{
206
{
207
    if (!m_frame)
207
    if (!m_frame)
208
        return;
208
        return;
209
    KURL url = m_frame->document()->url();
209
    URL url = m_frame->document()->url();
210
    url.setQuery(search);
210
    url.setQuery(search);
211
    setLocation(url.string(), activeWindow, firstWindow);
211
    setLocation(url.string(), activeWindow, firstWindow);
212
}
212
}
Lines 215-221 void Location::setHash(const String& hash, DOMWindow* activeWindow, DOMWindow* f a/Source/WebCore/page/Location.cpp_sec13
215
{
215
{
216
    if (!m_frame)
216
    if (!m_frame)
217
        return;
217
        return;
218
    KURL url = m_frame->document()->url();
218
    URL url = m_frame->document()->url();
219
    String oldFragmentIdentifier = url.fragmentIdentifier();
219
    String oldFragmentIdentifier = url.fragmentIdentifier();
220
    String newFragmentIdentifier = hash;
220
    String newFragmentIdentifier = hash;
221
    if (hash[0] == '#')
221
    if (hash[0] == '#')
- a/Source/WebCore/page/Location.h -2 / +2 lines
Lines 40-46 namespace WebCore { a/Source/WebCore/page/Location.h_sec1
40
40
41
class DOMWindow;
41
class DOMWindow;
42
class Frame;
42
class Frame;
43
class KURL;
43
class URL;
44
44
45
typedef int ExceptionCode;
45
typedef int ExceptionCode;
46
46
Lines 80-86 private: a/Source/WebCore/page/Location.h_sec2
80
80
81
    void setLocation(const String&, DOMWindow* activeWindow, DOMWindow* firstWindow);
81
    void setLocation(const String&, DOMWindow* activeWindow, DOMWindow* firstWindow);
82
82
83
    const KURL& url() const;
83
    const URL& url() const;
84
};
84
};
85
85
86
} // namespace WebCore
86
} // namespace WebCore
- a/Source/WebCore/page/Page.cpp -1 / +1 lines
Lines 961-967 void Page::userStyleSheetLocationChanged() a/Source/WebCore/page/Page.cpp_sec1
961
{
961
{
962
    // FIXME: Eventually we will move to a model of just being handed the sheet
962
    // FIXME: Eventually we will move to a model of just being handed the sheet
963
    // text instead of loading the URL ourselves.
963
    // text instead of loading the URL ourselves.
964
    KURL url = m_settings->userStyleSheetLocation();
964
    URL url = m_settings->userStyleSheetLocation();
965
    
965
    
966
    // Allow any local file URL scheme to be loaded.
966
    // Allow any local file URL scheme to be loaded.
967
    if (SchemeRegistry::shouldTreatURLSchemeAsLocal(url.protocol()))
967
    if (SchemeRegistry::shouldTreatURLSchemeAsLocal(url.protocol()))
- a/Source/WebCore/page/PageGroup.cpp -5 / +5 lines
Lines 215-221 inline void PageGroup::addVisitedLink(LinkHash hash) a/Source/WebCore/page/PageGroup.cpp_sec1
215
    pageCache()->markPagesForVistedLinkStyleRecalc();
215
    pageCache()->markPagesForVistedLinkStyleRecalc();
216
}
216
}
217
217
218
void PageGroup::addVisitedLink(const KURL& url)
218
void PageGroup::addVisitedLink(const URL& url)
219
{
219
{
220
    if (!shouldTrackVisitedLinks)
220
    if (!shouldTrackVisitedLinks)
221
        return;
221
        return;
Lines 273-279 StorageNamespace* PageGroup::transientLocalStorage(SecurityOrigin* topOrigin) a/Source/WebCore/page/PageGroup.cpp_sec2
273
    return result.iterator->value.get();
273
    return result.iterator->value.get();
274
}
274
}
275
275
276
void PageGroup::addUserScriptToWorld(DOMWrapperWorld* world, const String& source, const KURL& url,
276
void PageGroup::addUserScriptToWorld(DOMWrapperWorld* world, const String& source, const URL& url,
277
                                     const Vector<String>& whitelist, const Vector<String>& blacklist,
277
                                     const Vector<String>& whitelist, const Vector<String>& blacklist,
278
                                     UserScriptInjectionTime injectionTime, UserContentInjectedFrames injectedFrames)
278
                                     UserScriptInjectionTime injectionTime, UserContentInjectedFrames injectedFrames)
279
{
279
{
Lines 288-294 void PageGroup::addUserScriptToWorld(DOMWrapperWorld* world, const String& sourc a/Source/WebCore/page/PageGroup.cpp_sec3
288
    scriptsInWorld->append(userScript.release());
288
    scriptsInWorld->append(userScript.release());
289
}
289
}
290
290
291
void PageGroup::addUserStyleSheetToWorld(DOMWrapperWorld* world, const String& source, const KURL& url,
291
void PageGroup::addUserStyleSheetToWorld(DOMWrapperWorld* world, const String& source, const URL& url,
292
                                         const Vector<String>& whitelist, const Vector<String>& blacklist,
292
                                         const Vector<String>& whitelist, const Vector<String>& blacklist,
293
                                         UserContentInjectedFrames injectedFrames,
293
                                         UserContentInjectedFrames injectedFrames,
294
                                         UserStyleLevel level,
294
                                         UserStyleLevel level,
Lines 308-314 void PageGroup::addUserStyleSheetToWorld(DOMWrapperWorld* world, const String& s a/Source/WebCore/page/PageGroup.cpp_sec4
308
        invalidateInjectedStyleSheetCacheInAllFrames();
308
        invalidateInjectedStyleSheetCacheInAllFrames();
309
}
309
}
310
310
311
void PageGroup::removeUserScriptFromWorld(DOMWrapperWorld* world, const KURL& url)
311
void PageGroup::removeUserScriptFromWorld(DOMWrapperWorld* world, const URL& url)
312
{
312
{
313
    ASSERT_ARG(world, world);
313
    ASSERT_ARG(world, world);
314
314
Lines 329-335 void PageGroup::removeUserScriptFromWorld(DOMWrapperWorld* world, const KURL& ur a/Source/WebCore/page/PageGroup.cpp_sec5
329
        m_userScripts->remove(it);
329
        m_userScripts->remove(it);
330
}
330
}
331
331
332
void PageGroup::removeUserStyleSheetFromWorld(DOMWrapperWorld* world, const KURL& url)
332
void PageGroup::removeUserStyleSheetFromWorld(DOMWrapperWorld* world, const URL& url)
333
{
333
{
334
    ASSERT_ARG(world, world);
334
    ASSERT_ARG(world, world);
335
335
- a/Source/WebCore/page/PageGroup.h -6 / +6 lines
Lines 40-46 namespace WebCore { a/Source/WebCore/page/PageGroup.h_sec1
40
    class CaptionPreferencesChangedListener;
40
    class CaptionPreferencesChangedListener;
41
    class CaptionUserPreferences;
41
    class CaptionUserPreferences;
42
#endif
42
#endif
43
    class KURL;
43
    class URL;
44
    class GroupSettings;
44
    class GroupSettings;
45
    class IDBFactoryBackendInterface;
45
    class IDBFactoryBackendInterface;
46
    class Page;
46
    class Page;
Lines 73-79 namespace WebCore { a/Source/WebCore/page/PageGroup.h_sec2
73
73
74
        bool isLinkVisited(LinkHash);
74
        bool isLinkVisited(LinkHash);
75
75
76
        void addVisitedLink(const KURL&);
76
        void addVisitedLink(const URL&);
77
        void addVisitedLink(const UChar*, size_t);
77
        void addVisitedLink(const UChar*, size_t);
78
        void addVisitedLinkHash(LinkHash);
78
        void addVisitedLinkHash(LinkHash);
79
        void removeVisitedLinks();
79
        void removeVisitedLinks();
Lines 89-104 namespace WebCore { a/Source/WebCore/page/PageGroup.h_sec3
89
89
90
        StorageNamespace* transientLocalStorage(SecurityOrigin* topOrigin);
90
        StorageNamespace* transientLocalStorage(SecurityOrigin* topOrigin);
91
91
92
        void addUserScriptToWorld(DOMWrapperWorld*, const String& source, const KURL&,
92
        void addUserScriptToWorld(DOMWrapperWorld*, const String& source, const URL&,
93
                                  const Vector<String>& whitelist, const Vector<String>& blacklist,
93
                                  const Vector<String>& whitelist, const Vector<String>& blacklist,
94
                                  UserScriptInjectionTime, UserContentInjectedFrames);
94
                                  UserScriptInjectionTime, UserContentInjectedFrames);
95
        void addUserStyleSheetToWorld(DOMWrapperWorld*, const String& source, const KURL&,
95
        void addUserStyleSheetToWorld(DOMWrapperWorld*, const String& source, const URL&,
96
                                      const Vector<String>& whitelist, const Vector<String>& blacklist,
96
                                      const Vector<String>& whitelist, const Vector<String>& blacklist,
97
                                      UserContentInjectedFrames,
97
                                      UserContentInjectedFrames,
98
                                      UserStyleLevel level = UserStyleUserLevel,
98
                                      UserStyleLevel level = UserStyleUserLevel,
99
                                      UserStyleInjectionTime injectionTime = InjectInExistingDocuments);
99
                                      UserStyleInjectionTime injectionTime = InjectInExistingDocuments);
100
        void removeUserScriptFromWorld(DOMWrapperWorld*, const KURL&);
100
        void removeUserScriptFromWorld(DOMWrapperWorld*, const URL&);
101
        void removeUserStyleSheetFromWorld(DOMWrapperWorld*, const KURL&);
101
        void removeUserStyleSheetFromWorld(DOMWrapperWorld*, const URL&);
102
102
103
        void removeUserScriptsFromWorld(DOMWrapperWorld*);
103
        void removeUserScriptsFromWorld(DOMWrapperWorld*);
104
        void removeUserStyleSheetsFromWorld(DOMWrapperWorld*);
104
        void removeUserStyleSheetsFromWorld(DOMWrapperWorld*);
- a/Source/WebCore/page/PageSerializer.cpp -13 / +13 lines
Lines 156-162 void SerializerMarkupAccumulator::appendCustomAttributes(StringBuilder& out, Ele a/Source/WebCore/page/PageSerializer.cpp_sec1
156
    if (!frame)
156
    if (!frame)
157
        return;
157
        return;
158
158
159
    KURL url = frame->document()->url();
159
    URL url = frame->document()->url();
160
    if (url.isValid() && !url.isBlankURL())
160
    if (url.isValid() && !url.isBlankURL())
161
        return;
161
        return;
162
162
Lines 175-181 PageSerializer::Resource::Resource() a/Source/WebCore/page/PageSerializer.cpp_sec2
175
{
175
{
176
}
176
}
177
177
178
PageSerializer::Resource::Resource(const KURL& url, const String& mimeType, PassRefPtr<SharedBuffer> data)
178
PageSerializer::Resource::Resource(const URL& url, const String& mimeType, PassRefPtr<SharedBuffer> data)
179
    : url(url)
179
    : url(url)
180
    , mimeType(mimeType)
180
    , mimeType(mimeType)
181
    , data(data)
181
    , data(data)
Lines 196-202 void PageSerializer::serialize(Page* page) a/Source/WebCore/page/PageSerializer.cpp_sec3
196
void PageSerializer::serializeFrame(Frame* frame)
196
void PageSerializer::serializeFrame(Frame* frame)
197
{
197
{
198
    Document* document = frame->document();
198
    Document* document = frame->document();
199
    KURL url = document->url();
199
    URL url = document->url();
200
    if (!url.isValid() || url.isBlankURL()) {
200
    if (!url.isValid() || url.isBlankURL()) {
201
        // For blank frames we generate a fake URL so they can be referenced by their containing frame.
201
        // For blank frames we generate a fake URL so they can be referenced by their containing frame.
202
        url = urlForBlankFrame(frame);
202
        url = urlForBlankFrame(frame);
Lines 234-252 void PageSerializer::serializeFrame(Frame* frame) a/Source/WebCore/page/PageSerializer.cpp_sec4
234
234
235
        if (isHTMLImageElement(element)) {
235
        if (isHTMLImageElement(element)) {
236
            HTMLImageElement* imageElement = toHTMLImageElement(element);
236
            HTMLImageElement* imageElement = toHTMLImageElement(element);
237
            KURL url = document->completeURL(imageElement->getAttribute(HTMLNames::srcAttr));
237
            URL url = document->completeURL(imageElement->getAttribute(HTMLNames::srcAttr));
238
            CachedImage* cachedImage = imageElement->cachedImage();
238
            CachedImage* cachedImage = imageElement->cachedImage();
239
            addImageToResources(cachedImage, imageElement->renderer(), url);
239
            addImageToResources(cachedImage, imageElement->renderer(), url);
240
        } else if (element->hasTagName(HTMLNames::linkTag)) {
240
        } else if (element->hasTagName(HTMLNames::linkTag)) {
241
            HTMLLinkElement* linkElement = static_cast<HTMLLinkElement*>(element);
241
            HTMLLinkElement* linkElement = static_cast<HTMLLinkElement*>(element);
242
            if (CSSStyleSheet* sheet = linkElement->sheet()) {
242
            if (CSSStyleSheet* sheet = linkElement->sheet()) {
243
                KURL url = document->completeURL(linkElement->getAttribute(HTMLNames::hrefAttr));
243
                URL url = document->completeURL(linkElement->getAttribute(HTMLNames::hrefAttr));
244
                serializeCSSStyleSheet(sheet, url);
244
                serializeCSSStyleSheet(sheet, url);
245
                ASSERT(m_resourceURLs.contains(url));
245
                ASSERT(m_resourceURLs.contains(url));
246
            }
246
            }
247
        } else if (isHTMLStyleElement(element)) {
247
        } else if (isHTMLStyleElement(element)) {
248
            if (CSSStyleSheet* sheet = toHTMLStyleElement(element)->sheet())
248
            if (CSSStyleSheet* sheet = toHTMLStyleElement(element)->sheet())
249
                serializeCSSStyleSheet(sheet, KURL());
249
                serializeCSSStyleSheet(sheet, URL());
250
        }
250
        }
251
    }
251
    }
252
252
Lines 254-260 void PageSerializer::serializeFrame(Frame* frame) a/Source/WebCore/page/PageSerializer.cpp_sec5
254
        serializeFrame(childFrame);
254
        serializeFrame(childFrame);
255
}
255
}
256
256
257
void PageSerializer::serializeCSSStyleSheet(CSSStyleSheet* styleSheet, const KURL& url)
257
void PageSerializer::serializeCSSStyleSheet(CSSStyleSheet* styleSheet, const URL& url)
258
{
258
{
259
    StringBuilder cssText;
259
    StringBuilder cssText;
260
    for (unsigned i = 0; i < styleSheet->length(); ++i) {
260
    for (unsigned i = 0; i < styleSheet->length(); ++i) {
Lines 269-275 void PageSerializer::serializeCSSStyleSheet(CSSStyleSheet* styleSheet, const KUR a/Source/WebCore/page/PageSerializer.cpp_sec6
269
        // Some rules have resources associated with them that we need to retrieve.
269
        // Some rules have resources associated with them that we need to retrieve.
270
        if (rule->type() == CSSRule::IMPORT_RULE) {
270
        if (rule->type() == CSSRule::IMPORT_RULE) {
271
            CSSImportRule* importRule = static_cast<CSSImportRule*>(rule);
271
            CSSImportRule* importRule = static_cast<CSSImportRule*>(rule);
272
            KURL importURL = document->completeURL(importRule->href());
272
            URL importURL = document->completeURL(importRule->href());
273
            if (m_resourceURLs.contains(importURL))
273
            if (m_resourceURLs.contains(importURL))
274
                continue;
274
                continue;
275
            serializeCSSStyleSheet(importRule->styleSheet(), importURL);
275
            serializeCSSStyleSheet(importRule->styleSheet(), importURL);
Lines 291-297 void PageSerializer::serializeCSSStyleSheet(CSSStyleSheet* styleSheet, const KUR a/Source/WebCore/page/PageSerializer.cpp_sec7
291
    }
291
    }
292
}
292
}
293
293
294
void PageSerializer::addImageToResources(CachedImage* image, RenderObject* imageRenderer, const KURL& url)
294
void PageSerializer::addImageToResources(CachedImage* image, RenderObject* imageRenderer, const URL& url)
295
{
295
{
296
    if (!url.isValid() || m_resourceURLs.contains(url))
296
    if (!url.isValid() || m_resourceURLs.contains(url))
297
        return;
297
        return;
Lines 340-357 void PageSerializer::retrieveResourcesForProperties(const StylePropertySet* styl a/Source/WebCore/page/PageSerializer.cpp_sec8
340
340
341
        CachedImage* image = static_cast<StyleCachedImage*>(styleImage)->cachedImage();
341
        CachedImage* image = static_cast<StyleCachedImage*>(styleImage)->cachedImage();
342
342
343
        KURL url = document->completeURL(image->url());
343
        URL url = document->completeURL(image->url());
344
        addImageToResources(image, 0, url);
344
        addImageToResources(image, 0, url);
345
    }
345
    }
346
}
346
}
347
347
348
KURL PageSerializer::urlForBlankFrame(Frame* frame)
348
URL PageSerializer::urlForBlankFrame(Frame* frame)
349
{
349
{
350
    HashMap<Frame*, KURL>::iterator iter = m_blankFrameURLs.find(frame);
350
    HashMap<Frame*, URL>::iterator iter = m_blankFrameURLs.find(frame);
351
    if (iter != m_blankFrameURLs.end())
351
    if (iter != m_blankFrameURLs.end())
352
        return iter->value;
352
        return iter->value;
353
    String url = "wyciwyg://frame/" + String::number(m_blankFrameCounter++);
353
    String url = "wyciwyg://frame/" + String::number(m_blankFrameCounter++);
354
    KURL fakeURL(ParsedURLString, url);
354
    URL fakeURL(ParsedURLString, url);
355
    m_blankFrameURLs.add(frame, fakeURL);
355
    m_blankFrameURLs.add(frame, fakeURL);
356
356
357
    return fakeURL;
357
    return fakeURL;
- a/Source/WebCore/page/PageSerializer.h -9 / +9 lines
Lines 31-38 a/Source/WebCore/page/PageSerializer.h_sec1
31
#ifndef PageSerializer_h
31
#ifndef PageSerializer_h
32
#define PageSerializer_h
32
#define PageSerializer_h
33
33
34
#include "KURL.h"
34
#include "URL.h"
35
#include "KURLHash.h"
35
#include "URLHash.h"
36
#include "SharedBuffer.h"
36
#include "SharedBuffer.h"
37
#include <wtf/HashMap.h>
37
#include <wtf/HashMap.h>
38
#include <wtf/ListHashSet.h>
38
#include <wtf/ListHashSet.h>
Lines 54-64 class StyleRule; a/Source/WebCore/page/PageSerializer.h_sec2
54
class PageSerializer {
54
class PageSerializer {
55
public:
55
public:
56
    struct Resource {
56
    struct Resource {
57
        KURL url;
57
        URL url;
58
        String mimeType;
58
        String mimeType;
59
        RefPtr<SharedBuffer> data;
59
        RefPtr<SharedBuffer> data;
60
        Resource();
60
        Resource();
61
        Resource(const KURL&, const String& mimeType, PassRefPtr<SharedBuffer> data);
61
        Resource(const URL&, const String& mimeType, PassRefPtr<SharedBuffer> data);
62
    };
62
    };
63
63
64
    explicit PageSerializer(Vector<Resource>*);
64
    explicit PageSerializer(Vector<Resource>*);
Lines 68-89 public: a/Source/WebCore/page/PageSerializer.h_sec3
68
    // vector is the top frame serialized content.
68
    // vector is the top frame serialized content.
69
    void serialize(Page*);
69
    void serialize(Page*);
70
70
71
    KURL urlForBlankFrame(Frame*);
71
    URL urlForBlankFrame(Frame*);
72
72
73
private:
73
private:
74
    void serializeFrame(Frame*);
74
    void serializeFrame(Frame*);
75
75
76
    // Serializes the stylesheet back to text and adds it to the resources if URL is not-empty.
76
    // Serializes the stylesheet back to text and adds it to the resources if URL is not-empty.
77
    // It also adds any resources included in that stylesheet (including any imported stylesheets and their own resources).
77
    // It also adds any resources included in that stylesheet (including any imported stylesheets and their own resources).
78
    void serializeCSSStyleSheet(CSSStyleSheet*, const KURL&);
78
    void serializeCSSStyleSheet(CSSStyleSheet*, const URL&);
79
79
80
    void addImageToResources(CachedImage*, RenderObject*, const KURL&);
80
    void addImageToResources(CachedImage*, RenderObject*, const URL&);
81
    void retrieveResourcesForProperties(const StylePropertySet*, Document*);
81
    void retrieveResourcesForProperties(const StylePropertySet*, Document*);
82
    void retrieveResourcesForRule(StyleRule*, Document*);
82
    void retrieveResourcesForRule(StyleRule*, Document*);
83
83
84
    Vector<Resource>* m_resources;
84
    Vector<Resource>* m_resources;
85
    ListHashSet<KURL> m_resourceURLs;
85
    ListHashSet<URL> m_resourceURLs;
86
    HashMap<Frame*, KURL> m_blankFrameURLs;
86
    HashMap<Frame*, URL> m_blankFrameURLs;
87
    unsigned m_blankFrameCounter;
87
    unsigned m_blankFrameCounter;
88
};
88
};
89
89
- a/Source/WebCore/page/PerformanceResourceTiming.cpp -1 / +1 lines
Lines 37-43 a/Source/WebCore/page/PerformanceResourceTiming.cpp_sec1
37
#include "Document.h"
37
#include "Document.h"
38
#include "DocumentLoadTiming.h"
38
#include "DocumentLoadTiming.h"
39
#include "DocumentLoader.h"
39
#include "DocumentLoader.h"
40
#include "KURL.h"
40
#include "URL.h"
41
#include "ResourceRequest.h"
41
#include "ResourceRequest.h"
42
#include "ResourceResponse.h"
42
#include "ResourceResponse.h"
43
#include "SecurityOrigin.h"
43
#include "SecurityOrigin.h"
- a/Source/WebCore/page/PerformanceResourceTiming.h -1 / +1 lines
Lines 42-48 a/Source/WebCore/page/PerformanceResourceTiming.h_sec1
42
namespace WebCore {
42
namespace WebCore {
43
43
44
class Document;
44
class Document;
45
class KURL;
45
class URL;
46
class ResourceLoadTiming;
46
class ResourceLoadTiming;
47
class ResourceRequest;
47
class ResourceRequest;
48
class ResourceResponse;
48
class ResourceResponse;
- a/Source/WebCore/page/SecurityOrigin.cpp -24 / +24 lines
Lines 31-37 a/Source/WebCore/page/SecurityOrigin.cpp_sec1
31
31
32
#include "BlobURL.h"
32
#include "BlobURL.h"
33
#include "FileSystem.h"
33
#include "FileSystem.h"
34
#include "KURL.h"
34
#include "URL.h"
35
#include "SchemeRegistry.h"
35
#include "SchemeRegistry.h"
36
#include "SecurityPolicy.h"
36
#include "SecurityPolicy.h"
37
#include "ThreadableBlobRegistry.h"
37
#include "ThreadableBlobRegistry.h"
Lines 44-50 namespace WebCore { a/Source/WebCore/page/SecurityOrigin.cpp_sec2
44
const int InvalidPort = 0;
44
const int InvalidPort = 0;
45
const int MaxAllowedPort = 65535;
45
const int MaxAllowedPort = 65535;
46
46
47
static bool schemeRequiresHost(const KURL& url)
47
static bool schemeRequiresHost(const URL& url)
48
{
48
{
49
    // We expect URLs with these schemes to have authority components. If the
49
    // We expect URLs with these schemes to have authority components. If the
50
    // URL lacks an authority component, we get concerned and mark the origin
50
    // URL lacks an authority component, we get concerned and mark the origin
Lines 52-58 static bool schemeRequiresHost(const KURL& url) a/Source/WebCore/page/SecurityOrigin.cpp_sec3
52
    return url.protocolIsInHTTPFamily() || url.protocolIs("ftp");
52
    return url.protocolIsInHTTPFamily() || url.protocolIs("ftp");
53
}
53
}
54
54
55
bool SecurityOrigin::shouldUseInnerURL(const KURL& url)
55
bool SecurityOrigin::shouldUseInnerURL(const URL& url)
56
{
56
{
57
#if ENABLE(BLOB)
57
#if ENABLE(BLOB)
58
    // FIXME: Blob URLs don't have inner URLs. Their form is "blob:<inner-origin>/<UUID>", so treating the part after "blob:" as a URL is incorrect.
58
    // FIXME: Blob URLs don't have inner URLs. Their form is "blob:<inner-origin>/<UUID>", so treating the part after "blob:" as a URL is incorrect.
Lines 70-85 bool SecurityOrigin::shouldUseInnerURL(const KURL& url) a/Source/WebCore/page/SecurityOrigin.cpp_sec4
70
// In general, extracting the inner URL varies by scheme. It just so happens
70
// In general, extracting the inner URL varies by scheme. It just so happens
71
// that all the URL schemes we currently support that use inner URLs for their
71
// that all the URL schemes we currently support that use inner URLs for their
72
// security origin can be parsed using this algorithm.
72
// security origin can be parsed using this algorithm.
73
KURL SecurityOrigin::extractInnerURL(const KURL& url)
73
URL SecurityOrigin::extractInnerURL(const URL& url)
74
{
74
{
75
    if (url.innerURL())
75
    if (url.innerURL())
76
        return *url.innerURL();
76
        return *url.innerURL();
77
    // FIXME: Update this callsite to use the innerURL member function when
77
    // FIXME: Update this callsite to use the innerURL member function when
78
    // we finish implementing it.
78
    // we finish implementing it.
79
    return KURL(ParsedURLString, decodeURLEscapeSequences(url.path()));
79
    return URL(ParsedURLString, decodeURLEscapeSequences(url.path()));
80
}
80
}
81
81
82
static PassRefPtr<SecurityOrigin> getCachedOrigin(const KURL& url)
82
static PassRefPtr<SecurityOrigin> getCachedOrigin(const URL& url)
83
{
83
{
84
#if ENABLE(BLOB)
84
#if ENABLE(BLOB)
85
    if (url.protocolIs("blob"))
85
    if (url.protocolIs("blob"))
Lines 90-107 static PassRefPtr<SecurityOrigin> getCachedOrigin(const KURL& url) a/Source/WebCore/page/SecurityOrigin.cpp_sec5
90
    return 0;
90
    return 0;
91
}
91
}
92
92
93
static bool shouldTreatAsUniqueOrigin(const KURL& url)
93
static bool shouldTreatAsUniqueOrigin(const URL& url)
94
{
94
{
95
    if (!url.isValid())
95
    if (!url.isValid())
96
        return true;
96
        return true;
97
97
98
    // FIXME: Do we need to unwrap the URL further?
98
    // FIXME: Do we need to unwrap the URL further?
99
    KURL innerURL = SecurityOrigin::shouldUseInnerURL(url) ? SecurityOrigin::extractInnerURL(url) : url;
99
    URL innerURL = SecurityOrigin::shouldUseInnerURL(url) ? SecurityOrigin::extractInnerURL(url) : url;
100
100
101
    // FIXME: Check whether innerURL is valid.
101
    // FIXME: Check whether innerURL is valid.
102
102
103
    // For edge case URLs that were probably misparsed, make sure that the origin is unique.
103
    // For edge case URLs that were probably misparsed, make sure that the origin is unique.
104
    // This is an additional safety net against bugs in KURL parsing, and for network back-ends that parse URLs differently,
104
    // This is an additional safety net against bugs in URL parsing, and for network back-ends that parse URLs differently,
105
    // and could misinterpret another component for hostname.
105
    // and could misinterpret another component for hostname.
106
    if (schemeRequiresHost(innerURL) && innerURL.host().isEmpty())
106
    if (schemeRequiresHost(innerURL) && innerURL.host().isEmpty())
107
        return true;
107
        return true;
Lines 117-123 static bool shouldTreatAsUniqueOrigin(const KURL& url) a/Source/WebCore/page/SecurityOrigin.cpp_sec6
117
    return false;
117
    return false;
118
}
118
}
119
119
120
SecurityOrigin::SecurityOrigin(const KURL& url)
120
SecurityOrigin::SecurityOrigin(const URL& url)
121
    : m_protocol(url.protocol().isNull() ? "" : url.protocol().lower())
121
    : m_protocol(url.protocol().isNull() ? "" : url.protocol().lower())
122
    , m_host(url.host().isNull() ? "" : url.host().lower())
122
    , m_host(url.host().isNull() ? "" : url.host().lower())
123
    , m_port(url.port())
123
    , m_port(url.port())
Lines 172-178 SecurityOrigin::SecurityOrigin(const SecurityOrigin* other) a/Source/WebCore/page/SecurityOrigin.cpp_sec7
172
{
172
{
173
}
173
}
174
174
175
PassRefPtr<SecurityOrigin> SecurityOrigin::create(const KURL& url)
175
PassRefPtr<SecurityOrigin> SecurityOrigin::create(const URL& url)
176
{
176
{
177
    RefPtr<SecurityOrigin> cachedOrigin = getCachedOrigin(url);
177
    RefPtr<SecurityOrigin> cachedOrigin = getCachedOrigin(url);
178
    if (cachedOrigin.get())
178
    if (cachedOrigin.get())
Lines 216-222 void SecurityOrigin::setDomainFromDOM(const String& newDomain) a/Source/WebCore/page/SecurityOrigin.cpp_sec8
216
    m_domain = newDomain.lower();
216
    m_domain = newDomain.lower();
217
}
217
}
218
218
219
bool SecurityOrigin::isSecure(const KURL& url)
219
bool SecurityOrigin::isSecure(const URL& url)
220
{
220
{
221
    // Invalid URLs are secure, as are URLs which have a secure protocol.
221
    // Invalid URLs are secure, as are URLs which have a secure protocol.
222
    if (!url.isValid() || SchemeRegistry::shouldTreatURLSchemeAsSecure(url.protocol()))
222
    if (!url.isValid() || SchemeRegistry::shouldTreatURLSchemeAsSecure(url.protocol()))
Lines 287-293 bool SecurityOrigin::passesFileCheck(const SecurityOrigin* other) const a/Source/WebCore/page/SecurityOrigin.cpp_sec9
287
    return (m_filePath == other->m_filePath);
287
    return (m_filePath == other->m_filePath);
288
}
288
}
289
289
290
bool SecurityOrigin::canRequest(const KURL& url) const
290
bool SecurityOrigin::canRequest(const URL& url) const
291
{
291
{
292
    if (m_universalAccess)
292
    if (m_universalAccess)
293
        return true;
293
        return true;
Lines 314-320 bool SecurityOrigin::canRequest(const KURL& url) const a/Source/WebCore/page/SecurityOrigin.cpp_sec10
314
    return false;
314
    return false;
315
}
315
}
316
316
317
bool SecurityOrigin::taintsCanvas(const KURL& url) const
317
bool SecurityOrigin::taintsCanvas(const URL& url) const
318
{
318
{
319
    if (canRequest(url))
319
    if (canRequest(url))
320
        return false;
320
        return false;
Lines 347-353 bool SecurityOrigin::canReceiveDragData(const SecurityOrigin* dragInitiator) con a/Source/WebCore/page/SecurityOrigin.cpp_sec11
347
// http or https, otherwise we ignore the nesting for the purpose of a security check. We need
347
// http or https, otherwise we ignore the nesting for the purpose of a security check. We need
348
// a facility for registering nesting schemes, and some generalized logic for them.
348
// a facility for registering nesting schemes, and some generalized logic for them.
349
// This function should be removed as an outcome of https://bugs.webkit.org/show_bug.cgi?id=69196
349
// This function should be removed as an outcome of https://bugs.webkit.org/show_bug.cgi?id=69196
350
static bool isFeedWithNestedProtocolInHTTPFamily(const KURL& url)
350
static bool isFeedWithNestedProtocolInHTTPFamily(const URL& url)
351
{
351
{
352
    const String& urlString = url.string();
352
    const String& urlString = url.string();
353
    if (!urlString.startsWith("feed", false))
353
    if (!urlString.startsWith("feed", false))
Lines 359-365 static bool isFeedWithNestedProtocolInHTTPFamily(const KURL& url) a/Source/WebCore/page/SecurityOrigin.cpp_sec12
359
        || urlString.startsWith("feedsearch:http:", false) || urlString.startsWith("feedsearch:https:", false);
359
        || urlString.startsWith("feedsearch:http:", false) || urlString.startsWith("feedsearch:https:", false);
360
}
360
}
361
361
362
bool SecurityOrigin::canDisplay(const KURL& url) const
362
bool SecurityOrigin::canDisplay(const URL& url) const
363
{
363
{
364
    if (m_universalAccess)
364
    if (m_universalAccess)
365
        return true;
365
        return true;
Lines 496-502 String SecurityOrigin::toRawString() const a/Source/WebCore/page/SecurityOrigin.cpp_sec13
496
496
497
PassRefPtr<SecurityOrigin> SecurityOrigin::createFromString(const String& originString)
497
PassRefPtr<SecurityOrigin> SecurityOrigin::createFromString(const String& originString)
498
{
498
{
499
    return SecurityOrigin::create(KURL(KURL(), originString));
499
    return SecurityOrigin::create(URL(URL(), originString));
500
}
500
}
501
501
502
static const char separatorCharacter = '_';
502
static const char separatorCharacter = '_';
Lines 506-539 PassRefPtr<SecurityOrigin> SecurityOrigin::createFromDatabaseIdentifier(const St a/Source/WebCore/page/SecurityOrigin.cpp_sec14
506
    // Make sure there's a first separator
506
    // Make sure there's a first separator
507
    size_t separator1 = databaseIdentifier.find(separatorCharacter);
507
    size_t separator1 = databaseIdentifier.find(separatorCharacter);
508
    if (separator1 == notFound)
508
    if (separator1 == notFound)
509
        return create(KURL());
509
        return create(URL());
510
        
510
        
511
    // Make sure there's a second separator
511
    // Make sure there's a second separator
512
    size_t separator2 = databaseIdentifier.reverseFind(separatorCharacter);
512
    size_t separator2 = databaseIdentifier.reverseFind(separatorCharacter);
513
    if (separator2 == notFound)
513
    if (separator2 == notFound)
514
        return create(KURL());
514
        return create(URL());
515
        
515
        
516
    // Ensure there were at least 2 separator characters. Some hostnames on intranets have
516
    // Ensure there were at least 2 separator characters. Some hostnames on intranets have
517
    // underscores in them, so we'll assume that any additional underscores are part of the host.
517
    // underscores in them, so we'll assume that any additional underscores are part of the host.
518
    if (separator1 == separator2)
518
    if (separator1 == separator2)
519
        return create(KURL());
519
        return create(URL());
520
        
520
        
521
    // Make sure the port section is a valid port number or doesn't exist
521
    // Make sure the port section is a valid port number or doesn't exist
522
    bool portOkay;
522
    bool portOkay;
523
    int port = databaseIdentifier.right(databaseIdentifier.length() - separator2 - 1).toInt(&portOkay);
523
    int port = databaseIdentifier.right(databaseIdentifier.length() - separator2 - 1).toInt(&portOkay);
524
    bool portAbsent = (separator2 == databaseIdentifier.length() - 1);
524
    bool portAbsent = (separator2 == databaseIdentifier.length() - 1);
525
    if (!(portOkay || portAbsent))
525
    if (!(portOkay || portAbsent))
526
        return create(KURL());
526
        return create(URL());
527
    
527
    
528
    if (port < 0 || port > MaxAllowedPort)
528
    if (port < 0 || port > MaxAllowedPort)
529
        return create(KURL());
529
        return create(URL());
530
        
530
        
531
    // Split out the 3 sections of data
531
    // Split out the 3 sections of data
532
    String protocol = databaseIdentifier.substring(0, separator1);
532
    String protocol = databaseIdentifier.substring(0, separator1);
533
    String host = databaseIdentifier.substring(separator1 + 1, separator2 - separator1 - 1);
533
    String host = databaseIdentifier.substring(separator1 + 1, separator2 - separator1 - 1);
534
    
534
    
535
    host = decodeURLEscapeSequences(host);
535
    host = decodeURLEscapeSequences(host);
536
    return create(KURL(KURL(), protocol + "://" + host + ":" + String::number(port) + "/"));
536
    return create(URL(URL(), protocol + "://" + host + ":" + String::number(port) + "/"));
537
}
537
}
538
538
539
PassRefPtr<SecurityOrigin> SecurityOrigin::create(const String& protocol, const String& host, int port)
539
PassRefPtr<SecurityOrigin> SecurityOrigin::create(const String& protocol, const String& host, int port)
Lines 541-547 PassRefPtr<SecurityOrigin> SecurityOrigin::create(const String& protocol, const a/Source/WebCore/page/SecurityOrigin.cpp_sec15
541
    if (port < 0 || port > MaxAllowedPort)
541
    if (port < 0 || port > MaxAllowedPort)
542
        return createUnique();
542
        return createUnique();
543
    String decodedHost = decodeURLEscapeSequences(host);
543
    String decodedHost = decodeURLEscapeSequences(host);
544
    return create(KURL(KURL(), protocol + "://" + host + ":" + String::number(port) + "/"));
544
    return create(URL(URL(), protocol + "://" + host + ":" + String::number(port) + "/"));
545
}
545
}
546
546
547
String SecurityOrigin::databaseIdentifier() const 
547
String SecurityOrigin::databaseIdentifier() const 
- a/Source/WebCore/page/SecurityOrigin.h -9 / +9 lines
Lines 34-40 a/Source/WebCore/page/SecurityOrigin.h_sec1
34
34
35
namespace WebCore {
35
namespace WebCore {
36
36
37
class KURL;
37
class URL;
38
38
39
class SecurityOrigin : public ThreadSafeRefCounted<SecurityOrigin> {
39
class SecurityOrigin : public ThreadSafeRefCounted<SecurityOrigin> {
40
public:
40
public:
Lines 50-56 public: a/Source/WebCore/page/SecurityOrigin.h_sec2
50
        BlockAllStorage
50
        BlockAllStorage
51
    };
51
    };
52
52
53
    static PassRefPtr<SecurityOrigin> create(const KURL&);
53
    static PassRefPtr<SecurityOrigin> create(const URL&);
54
    static PassRefPtr<SecurityOrigin> createUnique();
54
    static PassRefPtr<SecurityOrigin> createUnique();
55
55
56
    static PassRefPtr<SecurityOrigin> createFromDatabaseIdentifier(const String&);
56
    static PassRefPtr<SecurityOrigin> createFromDatabaseIdentifier(const String&);
Lines 67-74 public: a/Source/WebCore/page/SecurityOrigin.h_sec3
67
    // Generally, we add URL schemes to this list when WebKit support them. For
67
    // Generally, we add URL schemes to this list when WebKit support them. For
68
    // example, we don't include the "jar" scheme, even though Firefox
68
    // example, we don't include the "jar" scheme, even though Firefox
69
    // understands that "jar" uses an inner URL for it's security origin.
69
    // understands that "jar" uses an inner URL for it's security origin.
70
    static bool shouldUseInnerURL(const KURL&);
70
    static bool shouldUseInnerURL(const URL&);
71
    static KURL extractInnerURL(const KURL&);
71
    static URL extractInnerURL(const URL&);
72
72
73
    // Create a deep copy of this SecurityOrigin. This method is useful
73
    // Create a deep copy of this SecurityOrigin. This method is useful
74
    // when marshalling a SecurityOrigin to another thread.
74
    // when marshalling a SecurityOrigin to another thread.
Lines 88-94 public: a/Source/WebCore/page/SecurityOrigin.h_sec4
88
    // Returns true if a given URL is secure, based either directly on its
88
    // Returns true if a given URL is secure, based either directly on its
89
    // own protocol, or, when relevant, on the protocol of its "inner URL"
89
    // own protocol, or, when relevant, on the protocol of its "inner URL"
90
    // Protocols like blob: and filesystem: fall into this latter category.
90
    // Protocols like blob: and filesystem: fall into this latter category.
91
    static bool isSecure(const KURL&);
91
    static bool isSecure(const URL&);
92
92
93
    // Returns true if this SecurityOrigin can script objects in the given
93
    // Returns true if this SecurityOrigin can script objects in the given
94
    // SecurityOrigin. For example, call this function before allowing
94
    // SecurityOrigin. For example, call this function before allowing
Lines 99-110 public: a/Source/WebCore/page/SecurityOrigin.h_sec5
99
    // Returns true if this SecurityOrigin can read content retrieved from
99
    // Returns true if this SecurityOrigin can read content retrieved from
100
    // the given URL. For example, call this function before issuing
100
    // the given URL. For example, call this function before issuing
101
    // XMLHttpRequests.
101
    // XMLHttpRequests.
102
    bool canRequest(const KURL&) const;
102
    bool canRequest(const URL&) const;
103
103
104
    // Returns true if drawing an image from this URL taints a canvas from
104
    // Returns true if drawing an image from this URL taints a canvas from
105
    // this security origin. For example, call this function before
105
    // this security origin. For example, call this function before
106
    // drawing an image onto an HTML canvas element with the drawImage API.
106
    // drawing an image onto an HTML canvas element with the drawImage API.
107
    bool taintsCanvas(const KURL&) const;
107
    bool taintsCanvas(const URL&) const;
108
108
109
    // Returns true if this SecurityOrigin can receive drag content from the
109
    // Returns true if this SecurityOrigin can receive drag content from the
110
    // initiator. For example, call this function before allowing content to be
110
    // initiator. For example, call this function before allowing content to be
Lines 114-120 public: a/Source/WebCore/page/SecurityOrigin.h_sec6
114
    // Returns true if |document| can display content from the given URL (e.g.,
114
    // Returns true if |document| can display content from the given URL (e.g.,
115
    // in an iframe or as an image). For example, web sites generally cannot
115
    // in an iframe or as an image). For example, web sites generally cannot
116
    // display content from the user's files system.
116
    // display content from the user's files system.
117
    bool canDisplay(const KURL&) const;
117
    bool canDisplay(const URL&) const;
118
118
119
    // Returns true if this SecurityOrigin can load local resources, such
119
    // Returns true if this SecurityOrigin can load local resources, such
120
    // as images, iframes, and style sheets, and can link to local URLs.
120
    // as images, iframes, and style sheets, and can link to local URLs.
Lines 209-215 public: a/Source/WebCore/page/SecurityOrigin.h_sec7
209
209
210
private:
210
private:
211
    SecurityOrigin();
211
    SecurityOrigin();
212
    explicit SecurityOrigin(const KURL&);
212
    explicit SecurityOrigin(const URL&);
213
    explicit SecurityOrigin(const SecurityOrigin*);
213
    explicit SecurityOrigin(const SecurityOrigin*);
214
214
215
    // FIXME: Rename this function to something more semantic.
215
    // FIXME: Rename this function to something more semantic.
- a/Source/WebCore/page/SecurityOriginHash.h -1 / +1 lines
Lines 29-35 a/Source/WebCore/page/SecurityOriginHash.h_sec1
29
#ifndef SecurityOriginHash_h
29
#ifndef SecurityOriginHash_h
30
#define SecurityOriginHash_h
30
#define SecurityOriginHash_h
31
31
32
#include "KURL.h"
32
#include "URL.h"
33
#include "SecurityOrigin.h"
33
#include "SecurityOrigin.h"
34
#include <wtf/RefPtr.h>
34
#include <wtf/RefPtr.h>
35
35
- a/Source/WebCore/page/SecurityPolicy.cpp -4 / +4 lines
Lines 29-35 a/Source/WebCore/page/SecurityPolicy.cpp_sec1
29
#include "config.h"
29
#include "config.h"
30
#include "SecurityPolicy.h"
30
#include "SecurityPolicy.h"
31
31
32
#include "KURL.h"
32
#include "URL.h"
33
#include <wtf/MainThread.h>
33
#include <wtf/MainThread.h>
34
#include "OriginAccessEntry.h"
34
#include "OriginAccessEntry.h"
35
#include "SecurityOrigin.h"
35
#include "SecurityOrigin.h"
Lines 50-56 static OriginAccessMap& originAccessMap() a/Source/WebCore/page/SecurityPolicy.cpp_sec2
50
    return originAccessMap;
50
    return originAccessMap;
51
}
51
}
52
52
53
bool SecurityPolicy::shouldHideReferrer(const KURL& url, const String& referrer)
53
bool SecurityPolicy::shouldHideReferrer(const URL& url, const String& referrer)
54
{
54
{
55
    bool referrerIsSecureURL = protocolIs(referrer, "https");
55
    bool referrerIsSecureURL = protocolIs(referrer, "https");
56
    bool referrerIsWebURL = referrerIsSecureURL || protocolIs(referrer, "http");
56
    bool referrerIsWebURL = referrerIsSecureURL || protocolIs(referrer, "http");
Lines 66-72 bool SecurityPolicy::shouldHideReferrer(const KURL& url, const String& referrer) a/Source/WebCore/page/SecurityPolicy.cpp_sec3
66
    return !URLIsSecureURL;
66
    return !URLIsSecureURL;
67
}
67
}
68
68
69
String SecurityPolicy::generateReferrerHeader(ReferrerPolicy referrerPolicy, const KURL& url, const String& referrer)
69
String SecurityPolicy::generateReferrerHeader(ReferrerPolicy referrerPolicy, const URL& url, const String& referrer)
70
{
70
{
71
    if (referrer.isEmpty())
71
    if (referrer.isEmpty())
72
        return String();
72
        return String();
Lines 117-123 bool SecurityPolicy::isAccessWhiteListed(const SecurityOrigin* activeOrigin, con a/Source/WebCore/page/SecurityPolicy.cpp_sec4
117
    return false;
117
    return false;
118
}
118
}
119
119
120
bool SecurityPolicy::isAccessToURLWhiteListed(const SecurityOrigin* activeOrigin, const KURL& url)
120
bool SecurityPolicy::isAccessToURLWhiteListed(const SecurityOrigin* activeOrigin, const URL& url)
121
{
121
{
122
    RefPtr<SecurityOrigin> targetOrigin = SecurityOrigin::create(url);
122
    RefPtr<SecurityOrigin> targetOrigin = SecurityOrigin::create(url);
123
    return isAccessWhiteListed(activeOrigin, targetOrigin.get());
123
    return isAccessWhiteListed(activeOrigin, targetOrigin.get());
- a/Source/WebCore/page/SecurityPolicy.h -4 / +4 lines
Lines 34-40 a/Source/WebCore/page/SecurityPolicy.h_sec1
34
34
35
namespace WebCore {
35
namespace WebCore {
36
36
37
class KURL;
37
class URL;
38
class SecurityOrigin;
38
class SecurityOrigin;
39
39
40
class SecurityPolicy {
40
class SecurityPolicy {
Lines 42-53 public: a/Source/WebCore/page/SecurityPolicy.h_sec2
42
    // True if the referrer should be omitted according to the
42
    // True if the referrer should be omitted according to the
43
    // ReferrerPolicyDefault. If you intend to send a referrer header, you
43
    // ReferrerPolicyDefault. If you intend to send a referrer header, you
44
    // should use generateReferrerHeader instead.
44
    // should use generateReferrerHeader instead.
45
    static bool shouldHideReferrer(const KURL&, const String& referrer);
45
    static bool shouldHideReferrer(const URL&, const String& referrer);
46
46
47
    // Returns the referrer modified according to the referrer policy for a
47
    // Returns the referrer modified according to the referrer policy for a
48
    // navigation to a given URL. If the referrer returned is empty, the
48
    // navigation to a given URL. If the referrer returned is empty, the
49
    // referrer header should be omitted.
49
    // referrer header should be omitted.
50
    static String generateReferrerHeader(ReferrerPolicy, const KURL&, const String& referrer);
50
    static String generateReferrerHeader(ReferrerPolicy, const URL&, const String& referrer);
51
51
52
    enum LocalLoadPolicy {
52
    enum LocalLoadPolicy {
53
        AllowLocalLoadsForAll, // No restriction on local loads.
53
        AllowLocalLoadsForAll, // No restriction on local loads.
Lines 64-70 public: a/Source/WebCore/page/SecurityPolicy.h_sec3
64
    static void resetOriginAccessWhitelists();
64
    static void resetOriginAccessWhitelists();
65
65
66
    static bool isAccessWhiteListed(const SecurityOrigin* activeOrigin, const SecurityOrigin* targetOrigin);
66
    static bool isAccessWhiteListed(const SecurityOrigin* activeOrigin, const SecurityOrigin* targetOrigin);
67
    static bool isAccessToURLWhiteListed(const SecurityOrigin* activeOrigin, const KURL&);
67
    static bool isAccessToURLWhiteListed(const SecurityOrigin* activeOrigin, const URL&);
68
};
68
};
69
69
70
} // namespace WebCore
70
} // namespace WebCore
- a/Source/WebCore/page/Settings.cpp -1 / +1 lines
Lines 414-420 void Settings::setPrivateBrowsingEnabled(bool privateBrowsingEnabled) a/Source/WebCore/page/Settings.cpp_sec1
414
    m_page->privateBrowsingStateChanged();
414
    m_page->privateBrowsingStateChanged();
415
}
415
}
416
416
417
void Settings::setUserStyleSheetLocation(const KURL& userStyleSheetLocation)
417
void Settings::setUserStyleSheetLocation(const URL& userStyleSheetLocation)
418
{
418
{
419
    if (m_userStyleSheetLocation == userStyleSheetLocation)
419
    if (m_userStyleSheetLocation == userStyleSheetLocation)
420
        return;
420
        return;
- a/Source/WebCore/page/Settings.h -4 / +4 lines
Lines 30-36 a/Source/WebCore/page/Settings.h_sec1
30
#include "EditingBehaviorTypes.h"
30
#include "EditingBehaviorTypes.h"
31
#include "FontRenderingMode.h"
31
#include "FontRenderingMode.h"
32
#include "IntSize.h"
32
#include "IntSize.h"
33
#include "KURL.h"
33
#include "URL.h"
34
#include "SecurityOrigin.h"
34
#include "SecurityOrigin.h"
35
#include "SettingsMacros.h"
35
#include "SettingsMacros.h"
36
#include "Timer.h"
36
#include "Timer.h"
Lines 150-157 namespace WebCore { a/Source/WebCore/page/Settings.h_sec2
150
        void setDNSPrefetchingEnabled(bool);
150
        void setDNSPrefetchingEnabled(bool);
151
        bool dnsPrefetchingEnabled() const { return m_dnsPrefetchingEnabled; }
151
        bool dnsPrefetchingEnabled() const { return m_dnsPrefetchingEnabled; }
152
152
153
        void setUserStyleSheetLocation(const KURL&);
153
        void setUserStyleSheetLocation(const URL&);
154
        const KURL& userStyleSheetLocation() const { return m_userStyleSheetLocation; }
154
        const URL& userStyleSheetLocation() const { return m_userStyleSheetLocation; }
155
155
156
        void setNeedsAdobeFrameReloadingQuirk(bool);
156
        void setNeedsAdobeFrameReloadingQuirk(bool);
157
        bool needsAcrobatFrameReloadingQuirk() const { return m_needsAdobeFrameReloadingQuirk; }
157
        bool needsAcrobatFrameReloadingQuirk() const { return m_needsAdobeFrameReloadingQuirk; }
Lines 273-279 namespace WebCore { a/Source/WebCore/page/Settings.h_sec3
273
        Page* m_page;
273
        Page* m_page;
274
274
275
        String m_mediaTypeOverride;
275
        String m_mediaTypeOverride;
276
        KURL m_userStyleSheetLocation;
276
        URL m_userStyleSheetLocation;
277
        RefPtr<FontGenericFamilies> m_fontGenericFamilies;
277
        RefPtr<FontGenericFamilies> m_fontGenericFamilies;
278
        SecurityOrigin::StorageBlockingPolicy m_storageBlockingPolicy;
278
        SecurityOrigin::StorageBlockingPolicy m_storageBlockingPolicy;
279
#if ENABLE(TEXT_AUTOSIZING)
279
#if ENABLE(TEXT_AUTOSIZING)
- a/Source/WebCore/page/UserContentURLPattern.cpp -5 / +5 lines
Lines 26-37 a/Source/WebCore/page/UserContentURLPattern.cpp_sec1
26
#include "config.h"
26
#include "config.h"
27
#include "UserContentURLPattern.h"
27
#include "UserContentURLPattern.h"
28
28
29
#include "KURL.h"
29
#include "URL.h"
30
#include <wtf/StdLibExtras.h>
30
#include <wtf/StdLibExtras.h>
31
31
32
namespace WebCore {
32
namespace WebCore {
33
33
34
bool UserContentURLPattern::matchesPatterns(const KURL& url, const Vector<String>& whitelist, const Vector<String>& blacklist)
34
bool UserContentURLPattern::matchesPatterns(const URL& url, const Vector<String>& whitelist, const Vector<String>& blacklist)
35
{
35
{
36
    // In order for a URL to be a match it has to be present in the whitelist and not present in the blacklist.
36
    // In order for a URL to be a match it has to be present in the whitelist and not present in the blacklist.
37
    // If there is no whitelist at all, then all URLs are assumed to be in the whitelist.
37
    // If there is no whitelist at all, then all URLs are assumed to be in the whitelist.
Lines 110-116 bool UserContentURLPattern::parse(const String& pattern) a/Source/WebCore/page/UserContentURLPattern.cpp_sec2
110
    return true;
110
    return true;
111
}
111
}
112
112
113
bool UserContentURLPattern::matches(const KURL& test) const
113
bool UserContentURLPattern::matches(const URL& test) const
114
{
114
{
115
    if (m_invalid)
115
    if (m_invalid)
116
        return false;
116
        return false;
Lines 124-130 bool UserContentURLPattern::matches(const KURL& test) const a/Source/WebCore/page/UserContentURLPattern.cpp_sec3
124
    return matchesPath(test);
124
    return matchesPath(test);
125
}
125
}
126
126
127
bool UserContentURLPattern::matchesHost(const KURL& test) const
127
bool UserContentURLPattern::matchesHost(const URL& test) const
128
{
128
{
129
    const String& host = test.host();
129
    const String& host = test.host();
130
    if (equalIgnoringCase(host, m_host))
130
    if (equalIgnoringCase(host, m_host))
Lines 225-231 struct MatchTester a/Source/WebCore/page/UserContentURLPattern.cpp_sec4
225
    }
225
    }
226
};
226
};
227
227
228
bool UserContentURLPattern::matchesPath(const KURL& test) const
228
bool UserContentURLPattern::matchesPath(const URL& test) const
229
{
229
{
230
    MatchTester match(m_path, test.path());
230
    MatchTester match(m_path, test.path());
231
    return match.test();
231
    return match.test();
- a/Source/WebCore/page/UserContentURLPattern.h -5 / +5 lines
Lines 31-37 a/Source/WebCore/page/UserContentURLPattern.h_sec1
31
31
32
namespace WebCore {
32
namespace WebCore {
33
33
34
class KURL;
34
class URL;
35
35
36
class UserContentURLPattern {
36
class UserContentURLPattern {
37
public:
37
public:
Lines 45-51 public: a/Source/WebCore/page/UserContentURLPattern.h_sec2
45
45
46
    bool isValid() const { return !m_invalid; }
46
    bool isValid() const { return !m_invalid; }
47
47
48
    bool matches(const KURL&) const;
48
    bool matches(const URL&) const;
49
49
50
    const String& scheme() const { return m_scheme; }
50
    const String& scheme() const { return m_scheme; }
51
    const String& host() const { return m_host; }
51
    const String& host() const { return m_host; }
Lines 53-65 public: a/Source/WebCore/page/UserContentURLPattern.h_sec3
53
53
54
    bool matchSubdomains() const { return m_matchSubdomains; }
54
    bool matchSubdomains() const { return m_matchSubdomains; }
55
    
55
    
56
    static bool matchesPatterns(const KURL&, const Vector<String>& whitelist, const Vector<String>& blacklist);
56
    static bool matchesPatterns(const URL&, const Vector<String>& whitelist, const Vector<String>& blacklist);
57
57
58
private:
58
private:
59
    bool parse(const String& pattern);
59
    bool parse(const String& pattern);
60
60
61
    bool matchesHost(const KURL&) const;
61
    bool matchesHost(const URL&) const;
62
    bool matchesPath(const KURL&) const;
62
    bool matchesPath(const URL&) const;
63
63
64
    bool m_invalid;
64
    bool m_invalid;
65
65
- a/Source/WebCore/page/UserScript.h -4 / +4 lines
Lines 26-32 a/Source/WebCore/page/UserScript.h_sec1
26
#ifndef UserScript_h
26
#ifndef UserScript_h
27
#define UserScript_h
27
#define UserScript_h
28
28
29
#include "KURL.h"
29
#include "URL.h"
30
#include "UserContentTypes.h"
30
#include "UserContentTypes.h"
31
#include "UserScriptTypes.h"
31
#include "UserScriptTypes.h"
32
#include <wtf/Vector.h>
32
#include <wtf/Vector.h>
Lines 42-48 public: a/Source/WebCore/page/UserScript.h_sec2
42
    {
42
    {
43
    }
43
    }
44
44
45
    UserScript(const String& source, const KURL& url, const Vector<String>& whitelist, const Vector<String>& blacklist, UserScriptInjectionTime injectionTime, UserContentInjectedFrames injectedFrames)
45
    UserScript(const String& source, const URL& url, const Vector<String>& whitelist, const Vector<String>& blacklist, UserScriptInjectionTime injectionTime, UserContentInjectedFrames injectedFrames)
46
        : m_source(source)
46
        : m_source(source)
47
        , m_url(url)
47
        , m_url(url)
48
        , m_whitelist(whitelist)
48
        , m_whitelist(whitelist)
Lines 53-59 public: a/Source/WebCore/page/UserScript.h_sec3
53
    }
53
    }
54
54
55
    const String& source() const { return m_source; }
55
    const String& source() const { return m_source; }
56
    const KURL& url() const { return m_url; }
56
    const URL& url() const { return m_url; }
57
    const Vector<String>& whitelist() const { return m_whitelist; }
57
    const Vector<String>& whitelist() const { return m_whitelist; }
58
    const Vector<String>& blacklist() const { return m_blacklist; }
58
    const Vector<String>& blacklist() const { return m_blacklist; }
59
    UserScriptInjectionTime injectionTime() const { return m_injectionTime; }
59
    UserScriptInjectionTime injectionTime() const { return m_injectionTime; }
Lines 61-67 public: a/Source/WebCore/page/UserScript.h_sec4
61
61
62
private:
62
private:
63
    String m_source;
63
    String m_source;
64
    KURL m_url;
64
    URL m_url;
65
    Vector<String> m_whitelist;
65
    Vector<String> m_whitelist;
66
    Vector<String> m_blacklist;
66
    Vector<String> m_blacklist;
67
    UserScriptInjectionTime m_injectionTime;
67
    UserScriptInjectionTime m_injectionTime;
- a/Source/WebCore/page/UserStyleSheet.h -4 / +4 lines
Lines 26-32 a/Source/WebCore/page/UserStyleSheet.h_sec1
26
#ifndef UserStyleSheet_h
26
#ifndef UserStyleSheet_h
27
#define UserStyleSheet_h
27
#define UserStyleSheet_h
28
28
29
#include "KURL.h"
29
#include "URL.h"
30
#include "UserContentTypes.h"
30
#include "UserContentTypes.h"
31
#include "UserStyleSheetTypes.h"
31
#include "UserStyleSheetTypes.h"
32
#include <wtf/Vector.h>
32
#include <wtf/Vector.h>
Lines 42-48 public: a/Source/WebCore/page/UserStyleSheet.h_sec2
42
    {
42
    {
43
    }
43
    }
44
44
45
    UserStyleSheet(const String& source, const KURL& url, const Vector<String>& whitelist, const Vector<String>& blacklist, UserContentInjectedFrames injectedFrames, UserStyleLevel level)
45
    UserStyleSheet(const String& source, const URL& url, const Vector<String>& whitelist, const Vector<String>& blacklist, UserContentInjectedFrames injectedFrames, UserStyleLevel level)
46
        : m_source(source)
46
        : m_source(source)
47
        , m_url(url)
47
        , m_url(url)
48
        , m_whitelist(whitelist)
48
        , m_whitelist(whitelist)
Lines 53-59 public: a/Source/WebCore/page/UserStyleSheet.h_sec3
53
    }
53
    }
54
54
55
    const String& source() const { return m_source; }
55
    const String& source() const { return m_source; }
56
    const KURL& url() const { return m_url; }
56
    const URL& url() const { return m_url; }
57
    const Vector<String>& whitelist() const { return m_whitelist; }
57
    const Vector<String>& whitelist() const { return m_whitelist; }
58
    const Vector<String>& blacklist() const { return m_blacklist; }
58
    const Vector<String>& blacklist() const { return m_blacklist; }
59
    UserContentInjectedFrames injectedFrames() const { return m_injectedFrames; }
59
    UserContentInjectedFrames injectedFrames() const { return m_injectedFrames; }
Lines 61-67 public: a/Source/WebCore/page/UserStyleSheet.h_sec4
61
61
62
private:
62
private:
63
    String m_source;
63
    String m_source;
64
    KURL m_url;
64
    URL m_url;
65
    Vector<String> m_whitelist;
65
    Vector<String> m_whitelist;
66
    Vector<String> m_blacklist;
66
    Vector<String> m_blacklist;
67
    UserContentInjectedFrames m_injectedFrames;
67
    UserContentInjectedFrames m_injectedFrames;
- a/Source/WebCore/page/efl/DragControllerEfl.cpp -1 / +1 lines
Lines 67-73 void DragController::cleanupAfterSystemDrag() a/Source/WebCore/page/efl/DragControllerEfl.cpp_sec1
67
{
67
{
68
}
68
}
69
69
70
void DragController::declareAndWriteDragImage(Clipboard*, Element*, const KURL&, const String&)
70
void DragController::declareAndWriteDragImage(Clipboard*, Element*, const URL&, const String&)
71
{
71
{
72
}
72
}
73
73
- a/Source/WebCore/page/gtk/DragControllerGtk.cpp -1 / +1 lines
Lines 69-75 void DragController::cleanupAfterSystemDrag() a/Source/WebCore/page/gtk/DragControllerGtk.cpp_sec1
69
{
69
{
70
}
70
}
71
71
72
void DragController::declareAndWriteDragImage(Clipboard* clipboard, Element* element, const KURL& url, const String& label)
72
void DragController::declareAndWriteDragImage(Clipboard* clipboard, Element* element, const URL& url, const String& label)
73
{
73
{
74
    clipboard->pasteboard().writeImage(element, url, label);
74
    clipboard->pasteboard().writeImage(element, url, label);
75
}
75
}
- a/Source/WebCore/page/mac/DragControllerMac.mm -1 / +1 lines
Lines 84-90 void DragController::cleanupAfterSystemDrag() a/Source/WebCore/page/mac/DragControllerMac.mm_sec1
84
        dragEnded();
84
        dragEnded();
85
}
85
}
86
86
87
void DragController::declareAndWriteDragImage(Clipboard* clipboard, Element* element, const KURL& url, const String& label)
87
void DragController::declareAndWriteDragImage(Clipboard* clipboard, Element* element, const URL& url, const String& label)
88
{
88
{
89
    m_client.declareAndWriteDragImage(clipboard->pasteboard().name(), kit(element), url, label, element->document().frame());
89
    m_client.declareAndWriteDragImage(clipboard->pasteboard().name(), kit(element), url, label, element->document().frame());
90
}
90
}
- a/Source/WebCore/page/qt/DragControllerQt.cpp -1 / +1 lines
Lines 71-77 void DragController::cleanupAfterSystemDrag() a/Source/WebCore/page/qt/DragControllerQt.cpp_sec1
71
{
71
{
72
}
72
}
73
73
74
void DragController::declareAndWriteDragImage(Clipboard* clipboard, Element* element, const KURL& url, const String& label)
74
void DragController::declareAndWriteDragImage(Clipboard* clipboard, Element* element, const URL& url, const String& label)
75
{
75
{
76
    clipboard->pasteboard().writeImage(element, url, label);
76
    clipboard->pasteboard().writeImage(element, url, label);
77
}
77
}
- a/Source/WebCore/page/win/DragControllerWin.cpp -1 / +1 lines
Lines 70-76 void DragController::cleanupAfterSystemDrag() a/Source/WebCore/page/win/DragControllerWin.cpp_sec1
70
{
70
{
71
}
71
}
72
72
73
void DragController::declareAndWriteDragImage(Clipboard* clipboard, Element* element, const KURL& url, const String& label)
73
void DragController::declareAndWriteDragImage(Clipboard* clipboard, Element* element, const URL& url, const String& label)
74
{
74
{
75
    Pasteboard& pasteboard = clipboard->pasteboard();
75
    Pasteboard& pasteboard = clipboard->pasteboard();
76
76
- a/Source/WebCore/platform/AsyncFileSystem.h -13 / +13 lines
Lines 34-40 a/Source/WebCore/platform/AsyncFileSystem.h_sec1
34
#if ENABLE(FILE_SYSTEM)
34
#if ENABLE(FILE_SYSTEM)
35
35
36
#include "FileSystemType.h"
36
#include "FileSystemType.h"
37
#include "KURL.h"
37
#include "URL.h"
38
#include "Timer.h"
38
#include "Timer.h"
39
#include <wtf/PassOwnPtr.h>
39
#include <wtf/PassOwnPtr.h>
40
#include <wtf/text/WTFString.h>
40
#include <wtf/text/WTFString.h>
Lines 72-129 public: a/Source/WebCore/platform/AsyncFileSystem.h_sec2
72
    // Moves a file or directory from srcPath to destPath.
72
    // Moves a file or directory from srcPath to destPath.
73
    // AsyncFileSystemCallbacks::didSucceed() is called when the operation is completed successfully.
73
    // AsyncFileSystemCallbacks::didSucceed() is called when the operation is completed successfully.
74
    // AsyncFileSystemCallbacks::didFail() is called otherwise.
74
    // AsyncFileSystemCallbacks::didFail() is called otherwise.
75
    virtual void move(const KURL& srcPath, const KURL& destPath, PassOwnPtr<AsyncFileSystemCallbacks>) = 0;
75
    virtual void move(const URL& srcPath, const URL& destPath, PassOwnPtr<AsyncFileSystemCallbacks>) = 0;
76
76
77
    // Copies a file or directory from srcPath to destPath.
77
    // Copies a file or directory from srcPath to destPath.
78
    // AsyncFileSystemCallbacks::didSucceed() is called when the operation is completed successfully.
78
    // AsyncFileSystemCallbacks::didSucceed() is called when the operation is completed successfully.
79
    // AsyncFileSystemCallbacks::didFail() is called otherwise.
79
    // AsyncFileSystemCallbacks::didFail() is called otherwise.
80
    virtual void copy(const KURL& srcPath, const KURL& destPath, PassOwnPtr<AsyncFileSystemCallbacks>) = 0;
80
    virtual void copy(const URL& srcPath, const URL& destPath, PassOwnPtr<AsyncFileSystemCallbacks>) = 0;
81
81
82
    // Deletes a file or directory at a given path.
82
    // Deletes a file or directory at a given path.
83
    // It is an error to try to remove a directory that is not empty.
83
    // It is an error to try to remove a directory that is not empty.
84
    // AsyncFileSystemCallbacks::didSucceed() is called when the operation is completed successfully.
84
    // AsyncFileSystemCallbacks::didSucceed() is called when the operation is completed successfully.
85
    // AsyncFileSystemCallbacks::didFail() is called otherwise.
85
    // AsyncFileSystemCallbacks::didFail() is called otherwise.
86
    virtual void remove(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks>) = 0;
86
    virtual void remove(const URL& path, PassOwnPtr<AsyncFileSystemCallbacks>) = 0;
87
87
88
    // Recursively deletes a directory at a given path.
88
    // Recursively deletes a directory at a given path.
89
    // AsyncFileSystemCallbacks::didSucceed() is called when the operation is completed successfully.
89
    // AsyncFileSystemCallbacks::didSucceed() is called when the operation is completed successfully.
90
    // AsyncFileSystemCallbacks::didFail() is called otherwise.
90
    // AsyncFileSystemCallbacks::didFail() is called otherwise.
91
    virtual void removeRecursively(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks>) = 0;
91
    virtual void removeRecursively(const URL& path, PassOwnPtr<AsyncFileSystemCallbacks>) = 0;
92
92
93
    // Retrieves the metadata information of the file or directory at a given path.
93
    // Retrieves the metadata information of the file or directory at a given path.
94
    // AsyncFileSystemCallbacks::didReadMetadata() is called when the operation is completed successfully.
94
    // AsyncFileSystemCallbacks::didReadMetadata() is called when the operation is completed successfully.
95
    // AsyncFileSystemCallbacks::didFail() is called otherwise.
95
    // AsyncFileSystemCallbacks::didFail() is called otherwise.
96
    virtual void readMetadata(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks>) = 0;
96
    virtual void readMetadata(const URL& path, PassOwnPtr<AsyncFileSystemCallbacks>) = 0;
97
97
98
    // Creates a file at a given path.  If exclusive flag is true, it fails if the path already exists.
98
    // Creates a file at a given path.  If exclusive flag is true, it fails if the path already exists.
99
    // AsyncFileSystemCallbacks::didSucceed() is called when the operation is completed successfully.
99
    // AsyncFileSystemCallbacks::didSucceed() is called when the operation is completed successfully.
100
    // AsyncFileSystemCallbacks::didFail() is called otherwise.
100
    // AsyncFileSystemCallbacks::didFail() is called otherwise.
101
    virtual void createFile(const KURL& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks>) = 0;
101
    virtual void createFile(const URL& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks>) = 0;
102
102
103
    // Creates a directory at a given path.  If exclusive flag is true, it fails if the path already exists.
103
    // Creates a directory at a given path.  If exclusive flag is true, it fails if the path already exists.
104
    // AsyncFileSystemCallbacks::didSucceed() is called when the operation is completed successfully.
104
    // AsyncFileSystemCallbacks::didSucceed() is called when the operation is completed successfully.
105
    // AsyncFileSystemCallbacks::didFail() is called otherwise.
105
    // AsyncFileSystemCallbacks::didFail() is called otherwise.
106
    virtual void createDirectory(const KURL& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks>) = 0;
106
    virtual void createDirectory(const URL& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks>) = 0;
107
107
108
    // Checks if a file exists at a given path.
108
    // Checks if a file exists at a given path.
109
    // AsyncFileSystemCallbacks::didSucceed() is called if the file exists.
109
    // AsyncFileSystemCallbacks::didSucceed() is called if the file exists.
110
    // AsyncFileSystemCallbacks::didFail() is called otherwise.
110
    // AsyncFileSystemCallbacks::didFail() is called otherwise.
111
    virtual void fileExists(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks>) = 0;
111
    virtual void fileExists(const URL& path, PassOwnPtr<AsyncFileSystemCallbacks>) = 0;
112
112
113
    // Checks if a directory exists at a given path.
113
    // Checks if a directory exists at a given path.
114
    // AsyncFileSystemCallbacks::didSucceed() is called if the directory exists.
114
    // AsyncFileSystemCallbacks::didSucceed() is called if the directory exists.
115
    // AsyncFileSystemCallbacks::didFail() is called otherwise.
115
    // AsyncFileSystemCallbacks::didFail() is called otherwise.
116
    virtual void directoryExists(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks>) = 0;
116
    virtual void directoryExists(const URL& path, PassOwnPtr<AsyncFileSystemCallbacks>) = 0;
117
117
118
    // Reads directory entries of a given directory at path.
118
    // Reads directory entries of a given directory at path.
119
    // AsyncFileSystemCallbacks::didReadDirectoryEntry() is called when each directory entry is called. AsyncFileSystemCallbacks::didReadDirectoryEntries() is called after a chunk of directory entries have been read.
119
    // AsyncFileSystemCallbacks::didReadDirectoryEntry() is called when each directory entry is called. AsyncFileSystemCallbacks::didReadDirectoryEntries() is called after a chunk of directory entries have been read.
120
    // AsyncFileSystemCallbacks::didFail() is when there is an error.
120
    // AsyncFileSystemCallbacks::didFail() is when there is an error.
121
    virtual void readDirectory(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks>) = 0;
121
    virtual void readDirectory(const URL& path, PassOwnPtr<AsyncFileSystemCallbacks>) = 0;
122
122
123
    // Creates an AsyncFileWriter for a given file path.
123
    // Creates an AsyncFileWriter for a given file path.
124
    // AsyncFileSystemCallbacks::didCreateFileWriter() is called when an AsyncFileWriter is created successfully.
124
    // AsyncFileSystemCallbacks::didCreateFileWriter() is called when an AsyncFileWriter is created successfully.
125
    // AsyncFileSystemCallbacks::didFail() is called otherwise.
125
    // AsyncFileSystemCallbacks::didFail() is called otherwise.
126
    virtual void createWriter(AsyncFileWriterClient*, const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks>) = 0;
126
    virtual void createWriter(AsyncFileWriterClient*, const URL& path, PassOwnPtr<AsyncFileSystemCallbacks>) = 0;
127
127
128
    // Creates a snapshot file and read its metadata for a new File object.
128
    // Creates a snapshot file and read its metadata for a new File object.
129
    // In local filesystem cases the backend may simply return the metadata of the file itself (as well as readMetadata does),
129
    // In local filesystem cases the backend may simply return the metadata of the file itself (as well as readMetadata does),
Lines 132-138 public: a/Source/WebCore/platform/AsyncFileSystem.h_sec3
132
    // AsyncFileSystemCallbacks::didFail() is called otherwise.
132
    // AsyncFileSystemCallbacks::didFail() is called otherwise.
133
    //
133
    //
134
    // Note: the returned metadata info is cached in the File object for non-regular filesystem types (neither Temporary nor Persistent). The port could return valid metadata if it wants File object to cache metadata (e.g. if the file body is on a remote server), but otherwise should NOT return valid metadata.
134
    // Note: the returned metadata info is cached in the File object for non-regular filesystem types (neither Temporary nor Persistent). The port could return valid metadata if it wants File object to cache metadata (e.g. if the file body is on a remote server), but otherwise should NOT return valid metadata.
135
    virtual void createSnapshotFileAndReadMetadata(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks>) = 0;
135
    virtual void createSnapshotFileAndReadMetadata(const URL& path, PassOwnPtr<AsyncFileSystemCallbacks>) = 0;
136
136
137
protected:
137
protected:
138
    AsyncFileSystem() { }
138
    AsyncFileSystem() { }
- a/Source/WebCore/platform/AsyncFileSystemCallbacks.h -1 / +1 lines
Lines 50-56 public: a/Source/WebCore/platform/AsyncFileSystemCallbacks.h_sec1
50
    virtual void didSucceed() { ASSERT_NOT_REACHED(); }
50
    virtual void didSucceed() { ASSERT_NOT_REACHED(); }
51
51
52
    // Called when a requested file system is opened.
52
    // Called when a requested file system is opened.
53
    virtual void didOpenFileSystem(const String& /* name */, const KURL& /* rootURL */, PassOwnPtr<AsyncFileSystem>) { ASSERT_NOT_REACHED(); }
53
    virtual void didOpenFileSystem(const String& /* name */, const URL& /* rootURL */, PassOwnPtr<AsyncFileSystem>) { ASSERT_NOT_REACHED(); }
54
54
55
    // Called when a file metadata is read successfully.
55
    // Called when a file metadata is read successfully.
56
    virtual void didReadMetadata(const FileMetadata&) { ASSERT_NOT_REACHED(); }
56
    virtual void didReadMetadata(const FileMetadata&) { ASSERT_NOT_REACHED(); }
- a/Source/WebCore/platform/CookiesStrategy.h -7 / +7 lines
Lines 33-50 a/Source/WebCore/platform/CookiesStrategy.h_sec1
33
33
34
namespace WebCore {
34
namespace WebCore {
35
35
36
class KURL;
36
class URL;
37
class NetworkStorageSession;
37
class NetworkStorageSession;
38
struct Cookie;
38
struct Cookie;
39
39
40
class CookiesStrategy {
40
class CookiesStrategy {
41
public:
41
public:
42
    virtual String cookiesForDOM(const NetworkStorageSession&, const KURL& firstParty, const KURL&) = 0;
42
    virtual String cookiesForDOM(const NetworkStorageSession&, const URL& firstParty, const URL&) = 0;
43
    virtual void setCookiesFromDOM(const NetworkStorageSession&, const KURL& firstParty, const KURL&, const String& cookieString) = 0;
43
    virtual void setCookiesFromDOM(const NetworkStorageSession&, const URL& firstParty, const URL&, const String& cookieString) = 0;
44
    virtual bool cookiesEnabled(const NetworkStorageSession&, const KURL& firstParty, const KURL&) = 0;
44
    virtual bool cookiesEnabled(const NetworkStorageSession&, const URL& firstParty, const URL&) = 0;
45
    virtual String cookieRequestHeaderFieldValue(const NetworkStorageSession&, const KURL& firstParty, const KURL&) = 0;
45
    virtual String cookieRequestHeaderFieldValue(const NetworkStorageSession&, const URL& firstParty, const URL&) = 0;
46
    virtual bool getRawCookies(const NetworkStorageSession&, const KURL& firstParty, const KURL&, Vector<Cookie>&) = 0;
46
    virtual bool getRawCookies(const NetworkStorageSession&, const URL& firstParty, const URL&, Vector<Cookie>&) = 0;
47
    virtual void deleteCookie(const NetworkStorageSession&, const KURL&, const String& cookieName) = 0;
47
    virtual void deleteCookie(const NetworkStorageSession&, const URL&, const String& cookieName) = 0;
48
48
49
protected:
49
protected:
50
    virtual ~CookiesStrategy() { }
50
    virtual ~CookiesStrategy() { }
- a/Source/WebCore/platform/CrossThreadCopier.cpp -2 / +2 lines
Lines 32-38 a/Source/WebCore/platform/CrossThreadCopier.cpp_sec1
32
32
33
#include "CrossThreadCopier.h"
33
#include "CrossThreadCopier.h"
34
34
35
#include "KURL.h"
35
#include "URL.h"
36
#include "ResourceError.h"
36
#include "ResourceError.h"
37
#include "ResourceRequest.h"
37
#include "ResourceRequest.h"
38
#include "ResourceResponse.h"
38
#include "ResourceResponse.h"
Lines 42-48 a/Source/WebCore/platform/CrossThreadCopier.cpp_sec2
42
42
43
namespace WebCore {
43
namespace WebCore {
44
44
45
CrossThreadCopierBase<false, false, KURL>::Type CrossThreadCopierBase<false, false, KURL>::copy(const KURL& url)
45
CrossThreadCopierBase<false, false, URL>::Type CrossThreadCopierBase<false, false, URL>::copy(const URL& url)
46
{
46
{
47
    return url.copy();
47
    return url.copy();
48
}
48
}
- a/Source/WebCore/platform/CrossThreadCopier.h -4 / +4 lines
Lines 42-48 namespace WebCore { a/Source/WebCore/platform/CrossThreadCopier.h_sec1
42
42
43
    class IntRect;
43
    class IntRect;
44
    class IntSize;
44
    class IntSize;
45
    class KURL;
45
    class URL;
46
    class ResourceError;
46
    class ResourceError;
47
    class ResourceRequest;
47
    class ResourceRequest;
48
    class ResourceResponse;
48
    class ResourceResponse;
Lines 120-128 namespace WebCore { a/Source/WebCore/platform/CrossThreadCopier.h_sec2
120
        }
120
        }
121
    };
121
    };
122
122
123
    template<> struct CrossThreadCopierBase<false, false, KURL> {
123
    template<> struct CrossThreadCopierBase<false, false, URL> {
124
        typedef KURL Type;
124
        typedef URL Type;
125
        static Type copy(const KURL&);
125
        static Type copy(const URL&);
126
    };
126
    };
127
127
128
    template<> struct CrossThreadCopierBase<false, false, String> {
128
    template<> struct CrossThreadCopierBase<false, false, String> {
- a/Source/WebCore/platform/DragData.h -1 / +1 lines
Lines 69-75 namespace WebCore { a/Source/WebCore/platform/DragData.h_sec1
69
69
70
class Frame;
70
class Frame;
71
class DocumentFragment;
71
class DocumentFragment;
72
class KURL;
72
class URL;
73
class Range;
73
class Range;
74
74
75
enum DragApplicationFlags {
75
enum DragApplicationFlags {
- a/Source/WebCore/platform/DragImage.cpp -1 / +1 lines
Lines 63-69 DragImageRef fitDragImageToMaxSize(DragImageRef image, const IntSize& srcSize, c a/Source/WebCore/platform/DragImage.cpp_sec1
63
}
63
}
64
64
65
#if !PLATFORM(MAC) && (!PLATFORM(WIN) || OS(WINCE))
65
#if !PLATFORM(MAC) && (!PLATFORM(WIN) || OS(WINCE))
66
DragImageRef createDragImageForLink(KURL&, const String&, FontRenderingMode)
66
DragImageRef createDragImageForLink(URL&, const String&, FontRenderingMode)
67
{
67
{
68
    return 0;
68
    return 0;
69
}
69
}
- a/Source/WebCore/platform/DragImage.h -2 / +2 lines
Lines 51-57 typedef struct _cairo_surface cairo_surface_t; a/Source/WebCore/platform/DragImage.h_sec1
51
namespace WebCore {
51
namespace WebCore {
52
52
53
    class Image;
53
    class Image;
54
    class KURL;
54
    class URL;
55
55
56
#if PLATFORM(MAC)
56
#if PLATFORM(MAC)
57
    typedef RetainPtr<NSImage> DragImageRef;
57
    typedef RetainPtr<NSImage> DragImageRef;
Lines 76-82 namespace WebCore { a/Source/WebCore/platform/DragImage.h_sec2
76
    
76
    
77
    DragImageRef createDragImageFromImage(Image*, ImageOrientationDescription);
77
    DragImageRef createDragImageFromImage(Image*, ImageOrientationDescription);
78
    DragImageRef createDragImageIconForCachedImageFilename(const String&);
78
    DragImageRef createDragImageIconForCachedImageFilename(const String&);
79
    DragImageRef createDragImageForLink(KURL&, const String& label, FontRenderingMode);
79
    DragImageRef createDragImageForLink(URL&, const String& label, FontRenderingMode);
80
    void deleteDragImage(DragImageRef);
80
    void deleteDragImage(DragImageRef);
81
}
81
}
82
82
- a/Source/WebCore/platform/FileStream.cpp -1 / +1 lines
Lines 134-140 int FileStream::read(char* buffer, int bufferSize) a/Source/WebCore/platform/FileStream.cpp_sec1
134
    return bytesRead;
134
    return bytesRead;
135
}
135
}
136
136
137
int FileStream::write(const KURL&, long long, int)
137
int FileStream::write(const URL&, long long, int)
138
{
138
{
139
    // FIXME: to be implemented.
139
    // FIXME: to be implemented.
140
    return -1;
140
    return -1;
- a/Source/WebCore/platform/FileStream.h -2 / +2 lines
Lines 40-46 a/Source/WebCore/platform/FileStream.h_sec1
40
40
41
namespace WebCore {
41
namespace WebCore {
42
42
43
class KURL;
43
class URL;
44
44
45
// All methods are synchronous.
45
// All methods are synchronous.
46
class FileStream : public RefCounted<FileStream> {
46
class FileStream : public RefCounted<FileStream> {
Lines 79-85 public: a/Source/WebCore/platform/FileStream.h_sec2
79
79
80
    // Writes a blob to the file.
80
    // Writes a blob to the file.
81
    // Returns number of bytes being written on success. -1 otherwise.
81
    // Returns number of bytes being written on success. -1 otherwise.
82
    int write(const KURL& blobURL, long long position, int length);
82
    int write(const URL& blobURL, long long position, int length);
83
83
84
    // Truncates the file to the specified position.
84
    // Truncates the file to the specified position.
85
    // Returns true on success. False otherwise.
85
    // Returns true on success. False otherwise.
- a/Source/WebCore/platform/KURL.cpp -1935 lines
Lines 1-1935 a/Source/WebCore/platform/KURL.cpp_sec1
1
/*
2
 * Copyright (C) 2004, 2007, 2008, 2011, 2012, 2013 Apple Inc. All rights reserved.
3
 * Copyright (C) 2012 Research In Motion Limited. All rights reserved.
4
 *
5
 * Redistribution and use in source and binary forms, with or without
6
 * modification, are permitted provided that the following conditions
7
 * are met:
8
 * 1. Redistributions of source code must retain the above copyright
9
 *    notice, this list of conditions and the following disclaimer.
10
 * 2. Redistributions in binary form must reproduce the above copyright
11
 *    notice, this list of conditions and the following disclaimer in the
12
 *    documentation and/or other materials provided with the distribution.
13
 *
14
 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
15
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
18
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
20
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
21
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
22
 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
24
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
25
 */
26
27
#include "config.h"
28
#include "KURL.h"
29
30
#include "DecodeEscapeSequences.h"
31
#include "MIMETypeRegistry.h"
32
#include "TextEncoding.h"
33
#include <stdio.h>
34
#include <wtf/HashMap.h>
35
#include <wtf/HexNumber.h>
36
#include <wtf/StdLibExtras.h>
37
#include <wtf/text/CString.h>
38
#include <wtf/text/StringBuilder.h>
39
#include <wtf/text/StringHash.h>
40
41
#if USE(ICU_UNICODE)
42
#include <unicode/uidna.h>
43
#endif
44
45
// FIXME: This file makes too much use of the + operator on String.
46
// We either have to optimize that operator so it doesn't involve
47
// so many allocations, or change this to use StringBuffer instead.
48
49
using namespace std;
50
using namespace WTF;
51
52
namespace WebCore {
53
54
typedef Vector<char, 512> CharBuffer;
55
typedef Vector<UChar, 512> UCharBuffer;
56
57
static const unsigned maximumValidPortNumber = 0xFFFE;
58
static const unsigned invalidPortNumber = 0xFFFF;
59
60
static inline bool isLetterMatchIgnoringCase(UChar character, char lowercaseLetter)
61
{
62
    ASSERT(isASCIILower(lowercaseLetter));
63
    return (character | 0x20) == lowercaseLetter;
64
}
65
66
static const char wsScheme[] = {'w', 's'};
67
static const char ftpScheme[] = {'f', 't', 'p'};
68
static const char ftpPort[] = {'2', '1'};
69
static const char wssScheme[] = {'w', 's', 's'};
70
static const char fileScheme[] = {'f', 'i', 'l', 'e'};
71
static const char httpScheme[] = {'h', 't', 't', 'p'};
72
static const char httpPort[] = {'8', '0'};
73
static const char httpsScheme[] = {'h', 't', 't', 'p', 's'};
74
static const char httpsPort[] = {'4', '4', '3'};
75
static const char gopherScheme[] = {'g', 'o', 'p', 'h', 'e', 'r'};
76
static const char gopherPort[] = {'7', '0'};
77
78
static inline bool isLetterMatchIgnoringCase(char character, char lowercaseLetter)
79
{
80
    ASSERT(isASCIILower(lowercaseLetter));
81
    return (character | 0x20) == lowercaseLetter;
82
}
83
84
enum URLCharacterClasses {
85
    // alpha 
86
    SchemeFirstChar = 1 << 0,
87
88
    // ( alpha | digit | "+" | "-" | "." )
89
    SchemeChar = 1 << 1,
90
91
    // mark        = "-" | "_" | "." | "!" | "~" | "*" | "'" | "(" | ")"
92
    // unreserved  = alphanum | mark
93
    // ( unreserved | escaped | ";" | ":" | "&" | "=" | "+" | "$" | "," )
94
    UserInfoChar = 1 << 2,
95
96
    // alnum | "." | "-" | "%"
97
    // The above is what the specification says, but we are lenient to
98
    // match existing practice and also allow:
99
    // "_"
100
    HostnameChar = 1 << 3,
101
102
    // hexdigit | ":" | "%"
103
    IPv6Char = 1 << 4,
104
105
    // "#" | "?" | "/" | nul
106
    PathSegmentEndChar = 1 << 5,
107
108
    // not allowed in path
109
    BadChar = 1 << 6
110
};
111
112
static const unsigned char characterClassTable[256] = {
113
    /* 0 nul */ PathSegmentEndChar,    /* 1 soh */ BadChar,
114
    /* 2 stx */ BadChar,    /* 3 etx */ BadChar,
115
    /* 4 eot */ BadChar,    /* 5 enq */ BadChar,    /* 6 ack */ BadChar,    /* 7 bel */ BadChar,
116
    /* 8 bs */ BadChar,     /* 9 ht */ BadChar,     /* 10 nl */ BadChar,    /* 11 vt */ BadChar,
117
    /* 12 np */ BadChar,    /* 13 cr */ BadChar,    /* 14 so */ BadChar,    /* 15 si */ BadChar,
118
    /* 16 dle */ BadChar,   /* 17 dc1 */ BadChar,   /* 18 dc2 */ BadChar,   /* 19 dc3 */ BadChar,
119
    /* 20 dc4 */ BadChar,   /* 21 nak */ BadChar,   /* 22 syn */ BadChar,   /* 23 etb */ BadChar,
120
    /* 24 can */ BadChar,   /* 25 em */ BadChar,    /* 26 sub */ BadChar,   /* 27 esc */ BadChar,
121
    /* 28 fs */ BadChar,    /* 29 gs */ BadChar,    /* 30 rs */ BadChar,    /* 31 us */ BadChar,
122
    /* 32 sp */ BadChar,    /* 33  ! */ UserInfoChar,
123
    /* 34  " */ BadChar,    /* 35  # */ PathSegmentEndChar | BadChar,
124
    /* 36  $ */ UserInfoChar,    /* 37  % */ UserInfoChar | HostnameChar | IPv6Char | BadChar,
125
    /* 38  & */ UserInfoChar,    /* 39  ' */ UserInfoChar,
126
    /* 40  ( */ UserInfoChar,    /* 41  ) */ UserInfoChar,
127
    /* 42  * */ UserInfoChar,    /* 43  + */ SchemeChar | UserInfoChar,
128
    /* 44  , */ UserInfoChar,
129
    /* 45  - */ SchemeChar | UserInfoChar | HostnameChar,
130
    /* 46  . */ SchemeChar | UserInfoChar | HostnameChar | IPv6Char,
131
    /* 47  / */ PathSegmentEndChar,
132
    /* 48  0 */ SchemeChar | UserInfoChar | HostnameChar | IPv6Char, 
133
    /* 49  1 */ SchemeChar | UserInfoChar | HostnameChar | IPv6Char,    
134
    /* 50  2 */ SchemeChar | UserInfoChar | HostnameChar | IPv6Char, 
135
    /* 51  3 */ SchemeChar | UserInfoChar | HostnameChar | IPv6Char,
136
    /* 52  4 */ SchemeChar | UserInfoChar | HostnameChar | IPv6Char, 
137
    /* 53  5 */ SchemeChar | UserInfoChar | HostnameChar | IPv6Char,
138
    /* 54  6 */ SchemeChar | UserInfoChar | HostnameChar | IPv6Char, 
139
    /* 55  7 */ SchemeChar | UserInfoChar | HostnameChar | IPv6Char,
140
    /* 56  8 */ SchemeChar | UserInfoChar | HostnameChar | IPv6Char, 
141
    /* 57  9 */ SchemeChar | UserInfoChar | HostnameChar | IPv6Char,
142
    /* 58  : */ UserInfoChar | IPv6Char,    /* 59  ; */ UserInfoChar,
143
    /* 60  < */ BadChar,    /* 61  = */ UserInfoChar,
144
    /* 62  > */ BadChar,    /* 63  ? */ PathSegmentEndChar | BadChar,
145
    /* 64  @ */ 0,
146
    /* 65  A */ SchemeFirstChar | SchemeChar | UserInfoChar | HostnameChar | IPv6Char,    
147
    /* 66  B */ SchemeFirstChar | SchemeChar | UserInfoChar | HostnameChar | IPv6Char,
148
    /* 67  C */ SchemeFirstChar | SchemeChar | UserInfoChar | HostnameChar | IPv6Char,
149
    /* 68  D */ SchemeFirstChar | SchemeChar | UserInfoChar | HostnameChar | IPv6Char,
150
    /* 69  E */ SchemeFirstChar | SchemeChar | UserInfoChar | HostnameChar | IPv6Char,
151
    /* 70  F */ SchemeFirstChar | SchemeChar | UserInfoChar | HostnameChar | IPv6Char,
152
    /* 71  G */ SchemeFirstChar | SchemeChar | UserInfoChar | HostnameChar,
153
    /* 72  H */ SchemeFirstChar | SchemeChar | UserInfoChar | HostnameChar,
154
    /* 73  I */ SchemeFirstChar | SchemeChar | UserInfoChar | HostnameChar,
155
    /* 74  J */ SchemeFirstChar | SchemeChar | UserInfoChar | HostnameChar,
156
    /* 75  K */ SchemeFirstChar | SchemeChar | UserInfoChar | HostnameChar,
157
    /* 76  L */ SchemeFirstChar | SchemeChar | UserInfoChar | HostnameChar,
158
    /* 77  M */ SchemeFirstChar | SchemeChar | UserInfoChar | HostnameChar,
159
    /* 78  N */ SchemeFirstChar | SchemeChar | UserInfoChar | HostnameChar,
160
    /* 79  O */ SchemeFirstChar | SchemeChar | UserInfoChar | HostnameChar,
161
    /* 80  P */ SchemeFirstChar | SchemeChar | UserInfoChar | HostnameChar,
162
    /* 81  Q */ SchemeFirstChar | SchemeChar | UserInfoChar | HostnameChar,
163
    /* 82  R */ SchemeFirstChar | SchemeChar | UserInfoChar | HostnameChar,
164
    /* 83  S */ SchemeFirstChar | SchemeChar | UserInfoChar | HostnameChar,
165
    /* 84  T */ SchemeFirstChar | SchemeChar | UserInfoChar | HostnameChar,
166
    /* 85  U */ SchemeFirstChar | SchemeChar | UserInfoChar | HostnameChar,
167
    /* 86  V */ SchemeFirstChar | SchemeChar | UserInfoChar | HostnameChar,
168
    /* 87  W */ SchemeFirstChar | SchemeChar | UserInfoChar | HostnameChar,
169
    /* 88  X */ SchemeFirstChar | SchemeChar | UserInfoChar | HostnameChar, 
170
    /* 89  Y */ SchemeFirstChar | SchemeChar | UserInfoChar | HostnameChar,
171
    /* 90  Z */ SchemeFirstChar | SchemeChar | UserInfoChar | HostnameChar,
172
    /* 91  [ */ 0,
173
    /* 92  \ */ 0,    /* 93  ] */ 0,
174
    /* 94  ^ */ 0,
175
    /* 95  _ */ UserInfoChar | HostnameChar,
176
    /* 96  ` */ 0,
177
    /* 97  a */ SchemeFirstChar | SchemeChar | UserInfoChar | HostnameChar | IPv6Char,
178
    /* 98  b */ SchemeFirstChar | SchemeChar | UserInfoChar | HostnameChar | IPv6Char, 
179
    /* 99  c */ SchemeFirstChar | SchemeChar | UserInfoChar | HostnameChar | IPv6Char,
180
    /* 100  d */ SchemeFirstChar | SchemeChar | UserInfoChar | HostnameChar | IPv6Char, 
181
    /* 101  e */ SchemeFirstChar | SchemeChar | UserInfoChar | HostnameChar | IPv6Char,
182
    /* 102  f */ SchemeFirstChar | SchemeChar | UserInfoChar | HostnameChar | IPv6Char, 
183
    /* 103  g */ SchemeFirstChar | SchemeChar | UserInfoChar | HostnameChar,
184
    /* 104  h */ SchemeFirstChar | SchemeChar | UserInfoChar | HostnameChar, 
185
    /* 105  i */ SchemeFirstChar | SchemeChar | UserInfoChar | HostnameChar,
186
    /* 106  j */ SchemeFirstChar | SchemeChar | UserInfoChar | HostnameChar, 
187
    /* 107  k */ SchemeFirstChar | SchemeChar | UserInfoChar | HostnameChar,
188
    /* 108  l */ SchemeFirstChar | SchemeChar | UserInfoChar | HostnameChar, 
189
    /* 109  m */ SchemeFirstChar | SchemeChar | UserInfoChar | HostnameChar,
190
    /* 110  n */ SchemeFirstChar | SchemeChar | UserInfoChar | HostnameChar, 
191
    /* 111  o */ SchemeFirstChar | SchemeChar | UserInfoChar | HostnameChar,
192
    /* 112  p */ SchemeFirstChar | SchemeChar | UserInfoChar | HostnameChar, 
193
    /* 113  q */ SchemeFirstChar | SchemeChar | UserInfoChar | HostnameChar,
194
    /* 114  r */ SchemeFirstChar | SchemeChar | UserInfoChar | HostnameChar, 
195
    /* 115  s */ SchemeFirstChar | SchemeChar | UserInfoChar | HostnameChar,
196
    /* 116  t */ SchemeFirstChar | SchemeChar | UserInfoChar | HostnameChar, 
197
    /* 117  u */ SchemeFirstChar | SchemeChar | UserInfoChar | HostnameChar,
198
    /* 118  v */ SchemeFirstChar | SchemeChar | UserInfoChar | HostnameChar, 
199
    /* 119  w */ SchemeFirstChar | SchemeChar | UserInfoChar | HostnameChar,
200
    /* 120  x */ SchemeFirstChar | SchemeChar | UserInfoChar | HostnameChar, 
201
    /* 121  y */ SchemeFirstChar | SchemeChar | UserInfoChar | HostnameChar,
202
    /* 122  z */ SchemeFirstChar | SchemeChar | UserInfoChar | HostnameChar, 
203
    /* 123  { */ 0,
204
    /* 124  | */ 0,   /* 125  } */ 0,   /* 126  ~ */ UserInfoChar,   /* 127 del */ BadChar,
205
    /* 128 */ BadChar, /* 129 */ BadChar, /* 130 */ BadChar, /* 131 */ BadChar,
206
    /* 132 */ BadChar, /* 133 */ BadChar, /* 134 */ BadChar, /* 135 */ BadChar,
207
    /* 136 */ BadChar, /* 137 */ BadChar, /* 138 */ BadChar, /* 139 */ BadChar,
208
    /* 140 */ BadChar, /* 141 */ BadChar, /* 142 */ BadChar, /* 143 */ BadChar,
209
    /* 144 */ BadChar, /* 145 */ BadChar, /* 146 */ BadChar, /* 147 */ BadChar,
210
    /* 148 */ BadChar, /* 149 */ BadChar, /* 150 */ BadChar, /* 151 */ BadChar,
211
    /* 152 */ BadChar, /* 153 */ BadChar, /* 154 */ BadChar, /* 155 */ BadChar,
212
    /* 156 */ BadChar, /* 157 */ BadChar, /* 158 */ BadChar, /* 159 */ BadChar,
213
    /* 160 */ BadChar, /* 161 */ BadChar, /* 162 */ BadChar, /* 163 */ BadChar,
214
    /* 164 */ BadChar, /* 165 */ BadChar, /* 166 */ BadChar, /* 167 */ BadChar,
215
    /* 168 */ BadChar, /* 169 */ BadChar, /* 170 */ BadChar, /* 171 */ BadChar,
216
    /* 172 */ BadChar, /* 173 */ BadChar, /* 174 */ BadChar, /* 175 */ BadChar,
217
    /* 176 */ BadChar, /* 177 */ BadChar, /* 178 */ BadChar, /* 179 */ BadChar,
218
    /* 180 */ BadChar, /* 181 */ BadChar, /* 182 */ BadChar, /* 183 */ BadChar,
219
    /* 184 */ BadChar, /* 185 */ BadChar, /* 186 */ BadChar, /* 187 */ BadChar,
220
    /* 188 */ BadChar, /* 189 */ BadChar, /* 190 */ BadChar, /* 191 */ BadChar,
221
    /* 192 */ BadChar, /* 193 */ BadChar, /* 194 */ BadChar, /* 195 */ BadChar,
222
    /* 196 */ BadChar, /* 197 */ BadChar, /* 198 */ BadChar, /* 199 */ BadChar,
223
    /* 200 */ BadChar, /* 201 */ BadChar, /* 202 */ BadChar, /* 203 */ BadChar,
224
    /* 204 */ BadChar, /* 205 */ BadChar, /* 206 */ BadChar, /* 207 */ BadChar,
225
    /* 208 */ BadChar, /* 209 */ BadChar, /* 210 */ BadChar, /* 211 */ BadChar,
226
    /* 212 */ BadChar, /* 213 */ BadChar, /* 214 */ BadChar, /* 215 */ BadChar,
227
    /* 216 */ BadChar, /* 217 */ BadChar, /* 218 */ BadChar, /* 219 */ BadChar,
228
    /* 220 */ BadChar, /* 221 */ BadChar, /* 222 */ BadChar, /* 223 */ BadChar,
229
    /* 224 */ BadChar, /* 225 */ BadChar, /* 226 */ BadChar, /* 227 */ BadChar,
230
    /* 228 */ BadChar, /* 229 */ BadChar, /* 230 */ BadChar, /* 231 */ BadChar,
231
    /* 232 */ BadChar, /* 233 */ BadChar, /* 234 */ BadChar, /* 235 */ BadChar,
232
    /* 236 */ BadChar, /* 237 */ BadChar, /* 238 */ BadChar, /* 239 */ BadChar,
233
    /* 240 */ BadChar, /* 241 */ BadChar, /* 242 */ BadChar, /* 243 */ BadChar,
234
    /* 244 */ BadChar, /* 245 */ BadChar, /* 246 */ BadChar, /* 247 */ BadChar,
235
    /* 248 */ BadChar, /* 249 */ BadChar, /* 250 */ BadChar, /* 251 */ BadChar,
236
    /* 252 */ BadChar, /* 253 */ BadChar, /* 254 */ BadChar, /* 255 */ BadChar
237
};
238
239
static int copyPathRemovingDots(char* dst, const char* src, int srcStart, int srcEnd);
240
static void encodeRelativeString(const String& rel, const TextEncoding&, CharBuffer& ouput);
241
static String substituteBackslashes(const String&);
242
243
static inline bool isSchemeFirstChar(char c) { return characterClassTable[static_cast<unsigned char>(c)] & SchemeFirstChar; }
244
static inline bool isSchemeFirstChar(UChar c) { return c <= 0xff && (characterClassTable[c] & SchemeFirstChar); }
245
static inline bool isSchemeChar(char c) { return characterClassTable[static_cast<unsigned char>(c)] & SchemeChar; }
246
static inline bool isSchemeChar(UChar c) { return c <= 0xff && (characterClassTable[c] & SchemeChar); }
247
static inline bool isUserInfoChar(unsigned char c) { return characterClassTable[c] & UserInfoChar; }
248
static inline bool isHostnameChar(unsigned char c) { return characterClassTable[c] & HostnameChar; }
249
static inline bool isIPv6Char(unsigned char c) { return characterClassTable[c] & IPv6Char; }
250
static inline bool isPathSegmentEndChar(char c) { return characterClassTable[static_cast<unsigned char>(c)] & PathSegmentEndChar; }
251
static inline bool isPathSegmentEndChar(UChar c) { return c <= 0xff && (characterClassTable[c] & PathSegmentEndChar); }
252
static inline bool isBadChar(unsigned char c) { return characterClassTable[c] & BadChar; }
253
    
254
static inline bool isSchemeCharacterMatchIgnoringCase(char character, char schemeCharacter)
255
{
256
    ASSERT(isSchemeChar(character));
257
    ASSERT(schemeCharacter & 0x20);
258
    ASSERT(isASCIILower(schemeCharacter) || (!isASCIIUpper(schemeCharacter) && isSchemeChar(schemeCharacter)));
259
    return (character | 0x20) == schemeCharacter;
260
}
261
262
// Copies the source to the destination, assuming all the source characters are
263
// ASCII. The destination buffer must be large enough. Null characters are allowed
264
// in the source string, and no attempt is made to null-terminate the result.
265
static void copyASCII(const String& string, char* dest)
266
{
267
    if (string.isEmpty())
268
        return;
269
270
    if (string.is8Bit())
271
        memcpy(dest, string.characters8(), string.length());
272
    else {
273
        const UChar* src = string.characters16();
274
        size_t length = string.length();
275
        for (size_t i = 0; i < length; i++)
276
            dest[i] = static_cast<char>(src[i]);
277
    }
278
}
279
280
static void appendASCII(const String& base, const char* rel, size_t len, CharBuffer& buffer)
281
{
282
    buffer.resize(base.length() + len + 1);
283
    copyASCII(base, buffer.data());
284
    memcpy(buffer.data() + base.length(), rel, len);
285
    buffer[buffer.size() - 1] = '\0';
286
}
287
288
// FIXME: Move to WTFString.h eventually.
289
// Returns the index of the first index in string |s| of any of the characters
290
// in |toFind|. |toFind| should be a null-terminated string, all characters up
291
// to the null will be searched. Returns int if not found.
292
static int findFirstOf(const UChar* s, int sLen, int startPos, const char* toFind)
293
{
294
    for (int i = startPos; i < sLen; i++) {
295
        const char* cur = toFind;
296
        while (*cur) {
297
            if (s[i] == *(cur++))
298
                return i;
299
        }
300
    }
301
    return -1;
302
}
303
304
static inline void checkEncodedString(const String& url)
305
{
306
    ASSERT_UNUSED(url, url.containsOnlyASCII());
307
    ASSERT_UNUSED(url, url.isEmpty() || isSchemeFirstChar(url[0]));
308
}
309
310
inline bool KURL::protocolIs(const String& string, const char* protocol)
311
{
312
    return WebCore::protocolIs(string, protocol);
313
}
314
315
void KURL::invalidate()
316
{
317
    m_isValid = false;
318
    m_protocolIsInHTTPFamily = false;
319
    m_schemeEnd = 0;
320
    m_userStart = 0;
321
    m_userEnd = 0;
322
    m_passwordEnd = 0;
323
    m_hostEnd = 0;
324
    m_portEnd = 0;
325
    m_pathEnd = 0;
326
    m_pathAfterLastSlash = 0;
327
    m_queryEnd = 0;
328
    m_fragmentEnd = 0;
329
}
330
331
KURL::KURL(ParsedURLStringTag, const String& url)
332
{
333
    parse(url);
334
    ASSERT(url == m_string);
335
}
336
337
KURL::KURL(const KURL& base, const String& relative)
338
{
339
    init(base, relative, UTF8Encoding());
340
}
341
342
KURL::KURL(const KURL& base, const String& relative, const TextEncoding& encoding)
343
{
344
    // For UTF-{7,16,32}, we want to use UTF-8 for the query part as 
345
    // we do when submitting a form. A form with GET method
346
    // has its contents added to a URL as query params and it makes sense
347
    // to be consistent.
348
    init(base, relative, encoding.encodingForFormSubmission());
349
}
350
351
static bool shouldTrimFromURL(unsigned char c)
352
{
353
    // Browsers ignore leading/trailing whitespace and control
354
    // characters from URLs.  Note that c is an *unsigned* char here
355
    // so this comparison should only catch control characters.
356
    return c <= ' ';
357
}
358
359
void KURL::init(const KURL& base, const String& relative, const TextEncoding& encoding)
360
{
361
    // Allow resolutions with a null or empty base URL, but not with any other invalid one.
362
    // FIXME: Is this a good rule?
363
    if (!base.m_isValid && !base.isEmpty()) {
364
        m_string = relative;
365
        invalidate();
366
        return;
367
    }
368
369
    // For compatibility with Win IE, treat backslashes as if they were slashes,
370
    // as long as we're not dealing with javascript: or data: URLs.
371
    String rel = relative;
372
    if (rel.contains('\\') && !(protocolIsJavaScript(rel) || protocolIs(rel, "data")))
373
        rel = substituteBackslashes(rel);
374
375
    bool allASCII = rel.containsOnlyASCII();
376
    CharBuffer strBuffer;
377
    char* str;
378
    size_t len;
379
    if (allASCII) {
380
        len = rel.length();
381
        strBuffer.resize(len + 1);
382
        copyASCII(rel, strBuffer.data());
383
        strBuffer[len] = 0;
384
        str = strBuffer.data();
385
    } else {
386
        encodeRelativeString(rel, encoding, strBuffer);
387
        str = strBuffer.data();
388
        len = strlen(str);
389
    }
390
391
    // Get rid of leading whitespace and control characters.
392
    while (len && shouldTrimFromURL(*str)) {
393
        str++;
394
        --len;
395
    }
396
397
    // Get rid of trailing whitespace and control characters.
398
    while (len && shouldTrimFromURL(str[len - 1]))
399
        str[--len] = '\0';
400
401
    // According to the RFC, the reference should be interpreted as an
402
    // absolute URI if possible, using the "leftmost, longest"
403
    // algorithm. If the URI reference is absolute it will have a
404
    // scheme, meaning that it will have a colon before the first
405
    // non-scheme element.
406
    bool absolute = false;
407
    char* p = str;
408
    if (isSchemeFirstChar(*p)) {
409
        ++p;
410
        while (isSchemeChar(*p)) {
411
            ++p;
412
        }
413
        if (*p == ':') {
414
            if (p[1] != '/' && equalIgnoringCase(base.protocol(), String(str, p - str)) && base.isHierarchical())
415
                str = p + 1;
416
            else
417
                absolute = true;
418
        }
419
    }
420
421
    CharBuffer parseBuffer;
422
423
    if (absolute) {
424
        parse(str, &relative);
425
    } else {
426
        // If the base is empty or opaque (e.g. data: or javascript:), then the URL is invalid
427
        // unless the relative URL is a single fragment.
428
        if (!base.isHierarchical()) {
429
            if (str[0] == '#') {
430
                appendASCII(base.m_string.left(base.m_queryEnd), str, len, parseBuffer);
431
                parse(parseBuffer.data(), &relative);
432
            } else {
433
                m_string = relative;
434
                invalidate();
435
            }
436
            return;
437
        }
438
439
        switch (str[0]) {
440
        case '\0':
441
            // The reference is empty, so this is a reference to the same document with any fragment identifier removed.
442
            *this = base;
443
            removeFragmentIdentifier();
444
            break;
445
        case '#': {
446
            // must be fragment-only reference
447
            appendASCII(base.m_string.left(base.m_queryEnd), str, len, parseBuffer);
448
            parse(parseBuffer.data(), &relative);
449
            break;
450
        }
451
        case '?': {
452
            // query-only reference, special case needed for non-URL results
453
            appendASCII(base.m_string.left(base.m_pathEnd), str, len, parseBuffer);
454
            parse(parseBuffer.data(), &relative);
455
            break;
456
        }
457
        case '/':
458
            // must be net-path or absolute-path reference
459
            if (str[1] == '/') {
460
                // net-path
461
                appendASCII(base.m_string.left(base.m_schemeEnd + 1), str, len, parseBuffer);
462
                parse(parseBuffer.data(), &relative);
463
            } else {
464
                // abs-path
465
                appendASCII(base.m_string.left(base.m_portEnd), str, len, parseBuffer);
466
                parse(parseBuffer.data(), &relative);
467
            }
468
            break;
469
        default:
470
            {
471
                // must be relative-path reference
472
473
                // Base part plus relative part plus one possible slash added in between plus terminating \0 byte.
474
                const size_t bufferSize = base.m_pathEnd + 1 + len + 1;
475
                parseBuffer.resize(bufferSize);
476
477
                char* bufferPos = parseBuffer.data();
478
                char* bufferStart = bufferPos;
479
480
                // first copy everything before the path from the base
481
                CharBuffer baseStringBuffer(base.m_string.length());
482
                copyASCII(base.m_string, baseStringBuffer.data());
483
                const char* baseString = baseStringBuffer.data();
484
                const char* baseStringStart = baseString;
485
                const char* pathStart = baseStringStart + base.m_portEnd;
486
                while (baseStringStart < pathStart)
487
                    *bufferPos++ = *baseStringStart++;
488
                char* bufferPathStart = bufferPos;
489
490
                // now copy the base path
491
                const char* baseStringEnd = baseString + base.m_pathEnd;
492
493
                // go back to the last slash
494
                while (baseStringEnd > baseStringStart && baseStringEnd[-1] != '/')
495
                    baseStringEnd--;
496
497
                if (baseStringEnd == baseStringStart) {
498
                    // no path in base, add a path separator if necessary
499
                    if (base.m_schemeEnd + 1 != base.m_pathEnd && *str && *str != '?' && *str != '#')
500
                        *bufferPos++ = '/';
501
                } else {
502
                    bufferPos += copyPathRemovingDots(bufferPos, baseStringStart, 0, baseStringEnd - baseStringStart);
503
                }
504
505
                const char* relStringStart = str;
506
                const char* relStringPos = relStringStart;
507
508
                while (*relStringPos && *relStringPos != '?' && *relStringPos != '#') {
509
                    if (relStringPos[0] == '.' && bufferPos[-1] == '/') {
510
                        if (isPathSegmentEndChar(relStringPos[1])) {
511
                            // skip over "." segment
512
                            relStringPos += 1;
513
                            if (relStringPos[0] == '/')
514
                                relStringPos++;
515
                            continue;
516
                        } else if (relStringPos[1] == '.' && isPathSegmentEndChar(relStringPos[2])) {
517
                            // skip over ".." segment and rewind the last segment
518
                            // the RFC leaves it up to the app to decide what to do with excess
519
                            // ".." segments - we choose to drop them since some web content
520
                            // relies on this.
521
                            relStringPos += 2;
522
                            if (relStringPos[0] == '/')
523
                                relStringPos++;
524
                            if (bufferPos > bufferPathStart + 1)
525
                                bufferPos--;
526
                            while (bufferPos > bufferPathStart + 1  && bufferPos[-1] != '/')
527
                                bufferPos--;
528
                            continue;
529
                        }
530
                    }
531
532
                    *bufferPos = *relStringPos;
533
                    relStringPos++;
534
                    bufferPos++;
535
                }
536
537
                // all done with the path work, now copy any remainder
538
                // of the relative reference; this will also add a null terminator
539
                strncpy(bufferPos, relStringPos, bufferSize - (bufferPos - bufferStart));
540
541
                parse(parseBuffer.data(), &relative);
542
543
                ASSERT(strlen(parseBuffer.data()) + 1 <= parseBuffer.size());
544
                break;
545
            }
546
        }
547
    }
548
}
549
550
KURL KURL::copy() const
551
{
552
    KURL result = *this;
553
    result.m_string = result.m_string.isolatedCopy();
554
    return result;
555
}
556
557
String KURL::lastPathComponent() const
558
{
559
    if (!hasPath())
560
        return String();
561
562
    unsigned end = m_pathEnd - 1;
563
    if (m_string[end] == '/')
564
        --end;
565
566
    size_t start = m_string.reverseFind('/', end);
567
    if (start < static_cast<unsigned>(m_portEnd))
568
        return String();
569
    ++start;
570
571
    return m_string.substring(start, end - start + 1);
572
}
573
574
String KURL::protocol() const
575
{
576
    return m_string.left(m_schemeEnd);
577
}
578
579
String KURL::host() const
580
{
581
    int start = hostStart();
582
    return decodeURLEscapeSequences(m_string.substring(start, m_hostEnd - start));
583
}
584
585
unsigned short KURL::port() const
586
{
587
    // We return a port of 0 if there is no port specified. This can happen in two situations:
588
    // 1) The URL contains no colon after the host name and before the path component of the URL.
589
    // 2) The URL contains a colon but there's no port number before the path component of the URL begins.
590
    if (m_hostEnd == m_portEnd || m_hostEnd == m_portEnd - 1)
591
        return 0;
592
593
    const UChar* stringData = m_string.characters();
594
    bool ok = false;
595
    unsigned number = charactersToUIntStrict(stringData + m_hostEnd + 1, m_portEnd - m_hostEnd - 1, &ok);
596
    if (!ok || number > maximumValidPortNumber)
597
        return invalidPortNumber;
598
    return number;
599
}
600
601
String KURL::pass() const
602
{
603
    if (m_passwordEnd == m_userEnd)
604
        return String();
605
606
    return decodeURLEscapeSequences(m_string.substring(m_userEnd + 1, m_passwordEnd - m_userEnd - 1)); 
607
}
608
609
String KURL::user() const
610
{
611
    return decodeURLEscapeSequences(m_string.substring(m_userStart, m_userEnd - m_userStart));
612
}
613
614
String KURL::fragmentIdentifier() const
615
{
616
    if (m_fragmentEnd == m_queryEnd)
617
        return String();
618
619
    return m_string.substring(m_queryEnd + 1, m_fragmentEnd - (m_queryEnd + 1));
620
}
621
622
bool KURL::hasFragmentIdentifier() const
623
{
624
    return m_fragmentEnd != m_queryEnd;
625
}
626
627
String KURL::baseAsString() const
628
{
629
    return m_string.left(m_pathAfterLastSlash);
630
}
631
632
#if !PLATFORM(QT) && !USE(CF)
633
String KURL::fileSystemPath() const
634
{
635
    if (!isValid() || !isLocalFile())
636
        return String();
637
638
    return decodeURLEscapeSequences(path());
639
}
640
#endif
641
642
#ifdef NDEBUG
643
644
static inline void assertProtocolIsGood(const char*)
645
{
646
}
647
648
#else
649
650
static void assertProtocolIsGood(const char* protocol)
651
{
652
    const char* p = protocol;
653
    while (*p) {
654
        ASSERT(*p > ' ' && *p < 0x7F && !(*p >= 'A' && *p <= 'Z'));
655
        ++p;
656
    }
657
}
658
659
#endif
660
661
bool KURL::protocolIs(const char* protocol) const
662
{
663
    assertProtocolIsGood(protocol);
664
665
    // JavaScript URLs are "valid" and should be executed even if KURL decides they are invalid.
666
    // The free function protocolIsJavaScript() should be used instead. 
667
    ASSERT(!equalIgnoringCase(protocol, String("javascript")));
668
669
    if (!m_isValid)
670
        return false;
671
672
    // Do the comparison without making a new string object.
673
    for (int i = 0; i < m_schemeEnd; ++i) {
674
        if (!protocol[i] || !isSchemeCharacterMatchIgnoringCase(m_string[i], protocol[i]))
675
            return false;
676
    }
677
    return !protocol[m_schemeEnd]; // We should have consumed all characters in the argument.
678
}
679
680
String KURL::query() const
681
{
682
    if (m_queryEnd == m_pathEnd)
683
        return String();
684
685
    return m_string.substring(m_pathEnd + 1, m_queryEnd - (m_pathEnd + 1)); 
686
}
687
688
String KURL::path() const
689
{
690
    return m_string.substring(m_portEnd, m_pathEnd - m_portEnd);
691
}
692
693
bool KURL::setProtocol(const String& s)
694
{
695
    // Firefox and IE remove everything after the first ':'.
696
    size_t separatorPosition = s.find(':');
697
    String newProtocol = s.substring(0, separatorPosition);
698
699
    if (!isValidProtocol(newProtocol))
700
        return false;
701
702
    if (!m_isValid) {
703
        parse(newProtocol + ':' + m_string);
704
        return true;
705
    }
706
707
    parse(newProtocol + m_string.substring(m_schemeEnd));
708
    return true;
709
}
710
711
void KURL::setHost(const String& s)
712
{
713
    if (!m_isValid)
714
        return;
715
716
    // FIXME: Non-ASCII characters must be encoded and escaped to match parse() expectations,
717
    // and to avoid changing more than just the host.
718
719
    bool slashSlashNeeded = m_userStart == m_schemeEnd + 1;
720
721
    parse(m_string.left(hostStart()) + (slashSlashNeeded ? "//" : "") + s + m_string.substring(m_hostEnd));
722
}
723
724
void KURL::removePort()
725
{
726
    if (m_hostEnd == m_portEnd)
727
        return;
728
    parse(m_string.left(m_hostEnd) + m_string.substring(m_portEnd));
729
}
730
731
void KURL::setPort(unsigned short i)
732
{
733
    if (!m_isValid)
734
        return;
735
736
    bool colonNeeded = m_portEnd == m_hostEnd;
737
    int portStart = (colonNeeded ? m_hostEnd : m_hostEnd + 1);
738
739
    parse(m_string.left(portStart) + (colonNeeded ? ":" : "") + String::number(i) + m_string.substring(m_portEnd));
740
}
741
742
void KURL::setHostAndPort(const String& hostAndPort)
743
{
744
    if (!m_isValid)
745
        return;
746
747
    // FIXME: Non-ASCII characters must be encoded and escaped to match parse() expectations,
748
    // and to avoid changing more than just host and port.
749
750
    bool slashSlashNeeded = m_userStart == m_schemeEnd + 1;
751
752
    parse(m_string.left(hostStart()) + (slashSlashNeeded ? "//" : "") + hostAndPort + m_string.substring(m_portEnd));
753
}
754
755
void KURL::setUser(const String& user)
756
{
757
    if (!m_isValid)
758
        return;
759
760
    // FIXME: Non-ASCII characters must be encoded and escaped to match parse() expectations,
761
    // and to avoid changing more than just the user login.
762
763
    int end = m_userEnd;
764
    if (!user.isEmpty()) {
765
        String u = user;
766
        if (m_userStart == m_schemeEnd + 1)
767
            u = "//" + u;
768
        // Add '@' if we didn't have one before.
769
        if (end == m_hostEnd || (end == m_passwordEnd && m_string[end] != '@'))
770
            u.append('@');
771
        parse(m_string.left(m_userStart) + u + m_string.substring(end));
772
    } else {
773
        // Remove '@' if we now have neither user nor password.
774
        if (m_userEnd == m_passwordEnd && end != m_hostEnd && m_string[end] == '@')
775
            end += 1;
776
        // We don't want to parse in the extremely common case where we are not going to make a change.
777
        if (m_userStart != end)
778
            parse(m_string.left(m_userStart) + m_string.substring(end));
779
    }
780
}
781
782
void KURL::setPass(const String& password)
783
{
784
    if (!m_isValid)
785
        return;
786
787
    // FIXME: Non-ASCII characters must be encoded and escaped to match parse() expectations,
788
    // and to avoid changing more than just the user password.
789
790
    int end = m_passwordEnd;
791
    if (!password.isEmpty()) {
792
        String p = ":" + password + "@";
793
        if (m_userEnd == m_schemeEnd + 1)
794
            p = "//" + p;
795
        // Eat the existing '@' since we are going to add our own.
796
        if (end != m_hostEnd && m_string[end] == '@')
797
            end += 1;
798
        parse(m_string.left(m_userEnd) + p + m_string.substring(end));
799
    } else {
800
        // Remove '@' if we now have neither user nor password.
801
        if (m_userStart == m_userEnd && end != m_hostEnd && m_string[end] == '@')
802
            end += 1;
803
        // We don't want to parse in the extremely common case where we are not going to make a change.
804
        if (m_userEnd != end)
805
            parse(m_string.left(m_userEnd) + m_string.substring(end));
806
    }
807
}
808
809
void KURL::setFragmentIdentifier(const String& s)
810
{
811
    if (!m_isValid)
812
        return;
813
814
    // FIXME: Non-ASCII characters must be encoded and escaped to match parse() expectations.
815
    parse(m_string.left(m_queryEnd) + "#" + s);
816
}
817
818
void KURL::removeFragmentIdentifier()
819
{
820
    if (!m_isValid)
821
        return;
822
    parse(m_string.left(m_queryEnd));
823
}
824
    
825
void KURL::setQuery(const String& query)
826
{
827
    if (!m_isValid)
828
        return;
829
830
    // FIXME: '#' and non-ASCII characters must be encoded and escaped.
831
    // Usually, the query is encoded using document encoding, not UTF-8, but we don't have
832
    // access to the document in this function.
833
    if ((query.isEmpty() || query[0] != '?') && !query.isNull())
834
        parse(m_string.left(m_pathEnd) + "?" + query + m_string.substring(m_queryEnd));
835
    else
836
        parse(m_string.left(m_pathEnd) + query + m_string.substring(m_queryEnd));
837
838
}
839
840
void KURL::setPath(const String& s)
841
{
842
    if (!m_isValid)
843
        return;
844
845
    // FIXME: encodeWithURLEscapeSequences does not correctly escape '#' and '?', so fragment and query parts
846
    // may be inadvertently affected.
847
    String path = s;
848
    if (path.isEmpty() || path[0] != '/')
849
        path = "/" + path;
850
851
    parse(m_string.left(m_portEnd) + encodeWithURLEscapeSequences(path) + m_string.substring(m_pathEnd));
852
}
853
854
String decodeURLEscapeSequences(const String& string)
855
{
856
    return decodeEscapeSequences<URLEscapeSequence>(string, UTF8Encoding());
857
}
858
859
String decodeURLEscapeSequences(const String& string, const TextEncoding& encoding)
860
{
861
    return decodeEscapeSequences<URLEscapeSequence>(string, encoding);
862
}
863
864
// Caution: This function does not bounds check.
865
static void appendEscapedChar(char*& buffer, unsigned char c)
866
{
867
    *buffer++ = '%';
868
    placeByteAsHex(c, buffer);
869
}
870
871
static void appendEscapingBadChars(char*& buffer, const char* strStart, size_t length)
872
{
873
    char* p = buffer;
874
875
    const char* str = strStart;
876
    const char* strEnd = strStart + length;
877
    while (str < strEnd) {
878
        unsigned char c = *str++;
879
        if (isBadChar(c)) {
880
            if (c == '%' || c == '?')
881
                *p++ = c;
882
            else if (c != 0x09 && c != 0x0a && c != 0x0d)
883
                appendEscapedChar(p, c);
884
        } else
885
            *p++ = c;
886
    }
887
888
    buffer = p;
889
}
890
891
static void escapeAndAppendNonHierarchicalPart(char*& buffer, const char* strStart, size_t length)
892
{
893
    char* p = buffer;
894
895
    const char* str = strStart;
896
    const char* strEnd = strStart + length;
897
    while (str < strEnd) {
898
        unsigned char c = *str++;
899
        // Strip CR, LF and Tab from fragments, per:
900
        // https://bugs.webkit.org/show_bug.cgi?id=8770
901
        if (c == 0x09 || c == 0x0a || c == 0x0d)
902
            continue;
903
904
        // Chrome and IE allow non-ascii characters in fragments, however doing
905
        // so would hit an ASSERT in checkEncodedString, so for now we don't.
906
        if (c < 0x20 || c >= 127) {
907
            appendEscapedChar(p, c);
908
            continue;
909
        }
910
        *p++ = c;
911
    }
912
913
    buffer = p;
914
}
915
916
// copy a path, accounting for "." and ".." segments
917
static int copyPathRemovingDots(char* dst, const char* src, int srcStart, int srcEnd)
918
{
919
    char* bufferPathStart = dst;
920
921
    // empty path is a special case, and need not have a leading slash
922
    if (srcStart != srcEnd) {
923
        const char* baseStringStart = src + srcStart;
924
        const char* baseStringEnd = src + srcEnd;
925
        const char* baseStringPos = baseStringStart;
926
927
        // this code is unprepared for paths that do not begin with a
928
        // slash and we should always have one in the source string
929
        ASSERT(baseStringPos[0] == '/');
930
931
        // copy the leading slash into the destination
932
        *dst = *baseStringPos;
933
        baseStringPos++;
934
        dst++;
935
936
        while (baseStringPos < baseStringEnd) {
937
            if (baseStringPos[0] == '.' && dst[-1] == '/') {
938
                if (baseStringPos[1] == '/' || baseStringPos + 1 == baseStringEnd) {
939
                    // skip over "." segment
940
                    baseStringPos += 2;
941
                    continue;
942
                } else if (baseStringPos[1] == '.' && (baseStringPos[2] == '/' ||
943
                                       baseStringPos + 2 == baseStringEnd)) {
944
                    // skip over ".." segment and rewind the last segment
945
                    // the RFC leaves it up to the app to decide what to do with excess
946
                    // ".." segments - we choose to drop them since some web content
947
                    // relies on this.
948
                    baseStringPos += 3;
949
                    if (dst > bufferPathStart + 1)
950
                        dst--;
951
                    while (dst > bufferPathStart && dst[-1] != '/')
952
                        dst--;
953
                    continue;
954
                }
955
            }
956
957
            *dst = *baseStringPos;
958
            baseStringPos++;
959
            dst++;
960
        }
961
    }
962
    *dst = '\0';
963
    return dst - bufferPathStart;
964
}
965
966
static inline bool hasSlashDotOrDotDot(const char* str)
967
{
968
    const unsigned char* p = reinterpret_cast<const unsigned char*>(str);
969
    if (!*p)
970
        return false;
971
    unsigned char pc = *p;
972
    while (unsigned char c = *++p) {
973
        if (c == '.' && (pc == '/' || pc == '.'))
974
            return true;
975
        pc = c;
976
    }
977
    return false;
978
}
979
980
void KURL::parse(const String& string)
981
{
982
    checkEncodedString(string);
983
984
    CharBuffer buffer(string.length() + 1);
985
    copyASCII(string, buffer.data());
986
    buffer[string.length()] = '\0';
987
    parse(buffer.data(), &string);
988
}
989
990
template<size_t length>
991
static inline bool equal(const char* a, const char (&b)[length])
992
{
993
    for (size_t i = 0; i < length; ++i) {
994
        if (a[i] != b[i])
995
            return false;
996
    }
997
    return true;
998
}
999
1000
template<size_t lengthB>
1001
static inline bool equal(const char* stringA, size_t lengthA, const char (&stringB)[lengthB])
1002
{
1003
    return lengthA == lengthB && equal(stringA, stringB);
1004
}
1005
1006
// List of default schemes is taken from google-url:
1007
// http://code.google.com/p/google-url/source/browse/trunk/src/url_canon_stdurl.cc#120
1008
static inline bool isDefaultPortForScheme(const char* port, size_t portLength, const char* scheme, size_t schemeLength)
1009
{
1010
    // This switch is theoretically a performance optimization.  It came over when
1011
    // the code was moved from google-url, but may be removed later.
1012
    switch (schemeLength) {
1013
    case 2:
1014
        return equal(scheme, wsScheme) && equal(port, portLength, httpPort);
1015
    case 3:
1016
        if (equal(scheme, ftpScheme))
1017
            return equal(port, portLength, ftpPort);
1018
        if (equal(scheme, wssScheme))
1019
            return equal(port, portLength, httpsPort);
1020
        break;
1021
    case 4:
1022
        return equal(scheme, httpScheme) && equal(port, portLength, httpPort);
1023
    case 5:
1024
        return equal(scheme, httpsScheme) && equal(port, portLength, httpsPort);
1025
    case 6:
1026
        return equal(scheme, gopherScheme) && equal(port, portLength, gopherPort);
1027
    }
1028
    return false;
1029
}
1030
1031
static inline bool hostPortIsEmptyButCredentialsArePresent(int hostStart, int portEnd, char userinfoEndChar)
1032
{
1033
    return userinfoEndChar == '@' && hostStart == portEnd;
1034
}
1035
1036
static bool isNonFileHierarchicalScheme(const char* scheme, size_t schemeLength)
1037
{
1038
    switch (schemeLength) {
1039
    case 2:
1040
        return equal(scheme, wsScheme);
1041
    case 3:
1042
        return equal(scheme, ftpScheme) || equal(scheme, wssScheme);
1043
    case 4:
1044
        return equal(scheme, httpScheme);
1045
    case 5:
1046
        return equal(scheme, httpsScheme);
1047
    case 6:
1048
        return equal(scheme, gopherScheme);
1049
    }
1050
    return false;
1051
}
1052
1053
static bool isCanonicalHostnameLowercaseForScheme(const char* scheme, size_t schemeLength)
1054
{
1055
    switch (schemeLength) {
1056
    case 2:
1057
        return equal(scheme, wsScheme);
1058
    case 3:
1059
        return equal(scheme, ftpScheme) || equal(scheme, wssScheme);
1060
    case 4:
1061
        return equal(scheme, httpScheme) || equal(scheme, fileScheme);
1062
    case 5:
1063
        return equal(scheme, httpsScheme);
1064
    case 6:
1065
        return equal(scheme, gopherScheme);
1066
    }
1067
    return false;
1068
}
1069
1070
void KURL::parse(const char* url, const String* originalString)
1071
{
1072
    if (!url || url[0] == '\0') {
1073
        // valid URL must be non-empty
1074
        m_string = originalString ? *originalString : url;
1075
        invalidate();
1076
        return;
1077
    }
1078
1079
    if (!isSchemeFirstChar(url[0])) {
1080
        // scheme must start with an alphabetic character
1081
        m_string = originalString ? *originalString : url;
1082
        invalidate();
1083
        return;
1084
    }
1085
1086
    int schemeEnd = 0;
1087
    while (isSchemeChar(url[schemeEnd]))
1088
        schemeEnd++;
1089
1090
    if (url[schemeEnd] != ':') {
1091
        m_string = originalString ? *originalString : url;
1092
        invalidate();
1093
        return;
1094
    }
1095
1096
    int userStart = schemeEnd + 1;
1097
    int userEnd;
1098
    int passwordStart;
1099
    int passwordEnd;
1100
    int hostStart;
1101
    int hostEnd;
1102
    int portStart;
1103
    int portEnd;
1104
1105
    bool hierarchical = url[schemeEnd + 1] == '/';
1106
    bool hasSecondSlash = hierarchical && url[schemeEnd + 2] == '/';
1107
1108
    bool isFile = schemeEnd == 4
1109
        && isLetterMatchIgnoringCase(url[0], 'f')
1110
        && isLetterMatchIgnoringCase(url[1], 'i')
1111
        && isLetterMatchIgnoringCase(url[2], 'l')
1112
        && isLetterMatchIgnoringCase(url[3], 'e');
1113
1114
#if PLATFORM(BLACKBERRY)
1115
    // Parse local: urls the same as file: urls.
1116
    if (!isFile)
1117
        isFile = schemeEnd == 5
1118
            && isLetterMatchIgnoringCase(url[0], 'l')
1119
            && isLetterMatchIgnoringCase(url[1], 'o')
1120
            && isLetterMatchIgnoringCase(url[2], 'c')
1121
            && isLetterMatchIgnoringCase(url[3], 'a')
1122
            && isLetterMatchIgnoringCase(url[4], 'l');
1123
#endif
1124
1125
    m_protocolIsInHTTPFamily = isLetterMatchIgnoringCase(url[0], 'h')
1126
        && isLetterMatchIgnoringCase(url[1], 't')
1127
        && isLetterMatchIgnoringCase(url[2], 't')
1128
        && isLetterMatchIgnoringCase(url[3], 'p')
1129
        && (url[4] == ':' || (isLetterMatchIgnoringCase(url[4], 's') && url[5] == ':'));
1130
1131
    if ((hierarchical && hasSecondSlash) || isNonFileHierarchicalScheme(url, schemeEnd)) {
1132
        // The part after the scheme is either a net_path or an abs_path whose first path segment is empty.
1133
        // Attempt to find an authority.
1134
        // FIXME: Authority characters may be scanned twice, and it would be nice to be faster.
1135
1136
        if (hierarchical)
1137
            userStart++;
1138
        if (hasSecondSlash)
1139
            userStart++;
1140
        userEnd = userStart;
1141
1142
        int colonPos = 0;
1143
        while (isUserInfoChar(url[userEnd])) {
1144
            if (url[userEnd] == ':' && colonPos == 0)
1145
                colonPos = userEnd;
1146
            userEnd++;
1147
        }
1148
1149
        if (url[userEnd] == '@') {
1150
            // actual end of the userinfo, start on the host
1151
            if (colonPos != 0) {
1152
                passwordEnd = userEnd;
1153
                userEnd = colonPos;
1154
                passwordStart = colonPos + 1;
1155
            } else
1156
                passwordStart = passwordEnd = userEnd;
1157
1158
            hostStart = passwordEnd + 1;
1159
        } else if (url[userEnd] == '[' || isPathSegmentEndChar(url[userEnd])) {
1160
            // hit the end of the authority, must have been no user
1161
            // or looks like an IPv6 hostname
1162
            // either way, try to parse it as a hostname
1163
            userEnd = userStart;
1164
            passwordStart = passwordEnd = userEnd;
1165
            hostStart = userStart;
1166
        } else {
1167
            // invalid character
1168
            m_string = originalString ? *originalString : url;
1169
            invalidate();
1170
            return;
1171
        }
1172
1173
        hostEnd = hostStart;
1174
1175
        // IPV6 IP address
1176
        if (url[hostEnd] == '[') {
1177
            hostEnd++;
1178
            while (isIPv6Char(url[hostEnd]))
1179
                hostEnd++;
1180
            if (url[hostEnd] == ']')
1181
                hostEnd++;
1182
            else {
1183
                // invalid character
1184
                m_string = originalString ? *originalString : url;
1185
                invalidate();
1186
                return;
1187
            }
1188
        } else {
1189
            while (isHostnameChar(url[hostEnd]))
1190
                hostEnd++;
1191
        }
1192
        
1193
        if (url[hostEnd] == ':') {
1194
            portStart = portEnd = hostEnd + 1;
1195
 
1196
            // possible start of port
1197
            portEnd = portStart;
1198
            while (isASCIIDigit(url[portEnd]))
1199
                portEnd++;
1200
        } else
1201
            portStart = portEnd = hostEnd;
1202
1203
        if (!isPathSegmentEndChar(url[portEnd])) {
1204
            // invalid character
1205
            m_string = originalString ? *originalString : url;
1206
            invalidate();
1207
            return;
1208
        }
1209
1210
        if (hostPortIsEmptyButCredentialsArePresent(hostStart, portEnd, url[passwordEnd])) {
1211
            m_string = originalString ? *originalString : url;
1212
            invalidate();
1213
            return;
1214
        }
1215
1216
        if (userStart == portEnd && !m_protocolIsInHTTPFamily && !isFile) {
1217
            // No authority found, which means that this is not a net_path, but rather an abs_path whose first two
1218
            // path segments are empty. For file, http and https only, an empty authority is allowed.
1219
            userStart -= 2;
1220
            userEnd = userStart;
1221
            passwordStart = userEnd;
1222
            passwordEnd = passwordStart;
1223
            hostStart = passwordEnd;
1224
            hostEnd = hostStart;
1225
            portStart = hostEnd;
1226
            portEnd = hostEnd;
1227
        }
1228
    } else {
1229
        // the part after the scheme must be an opaque_part or an abs_path
1230
        userEnd = userStart;
1231
        passwordStart = passwordEnd = userEnd;
1232
        hostStart = hostEnd = passwordEnd;
1233
        portStart = portEnd = hostEnd;
1234
    }
1235
1236
    int pathStart = portEnd;
1237
    int pathEnd = pathStart;
1238
    while (url[pathEnd] && url[pathEnd] != '?' && url[pathEnd] != '#')
1239
        pathEnd++;
1240
1241
    int queryStart = pathEnd;
1242
    int queryEnd = queryStart;
1243
    if (url[queryStart] == '?') {
1244
        while (url[queryEnd] && url[queryEnd] != '#')
1245
            queryEnd++;
1246
    }
1247
1248
    int fragmentStart = queryEnd;
1249
    int fragmentEnd = fragmentStart;
1250
    if (url[fragmentStart] == '#') {
1251
        fragmentStart++;
1252
        fragmentEnd = fragmentStart;
1253
        while (url[fragmentEnd])
1254
            fragmentEnd++;
1255
    }
1256
1257
    // assemble it all, remembering the real ranges
1258
1259
    Vector<char, 4096> buffer(fragmentEnd * 3 + 1);
1260
1261
    char *p = buffer.data();
1262
    const char *strPtr = url;
1263
1264
    // copy in the scheme
1265
    const char *schemeEndPtr = url + schemeEnd;
1266
    while (strPtr < schemeEndPtr)
1267
        *p++ = toASCIILower(*strPtr++);
1268
    m_schemeEnd = p - buffer.data();
1269
1270
    bool hostIsLocalHost = portEnd - userStart == 9
1271
        && isLetterMatchIgnoringCase(url[userStart], 'l')
1272
        && isLetterMatchIgnoringCase(url[userStart+1], 'o')
1273
        && isLetterMatchIgnoringCase(url[userStart+2], 'c')
1274
        && isLetterMatchIgnoringCase(url[userStart+3], 'a')
1275
        && isLetterMatchIgnoringCase(url[userStart+4], 'l')
1276
        && isLetterMatchIgnoringCase(url[userStart+5], 'h')
1277
        && isLetterMatchIgnoringCase(url[userStart+6], 'o')
1278
        && isLetterMatchIgnoringCase(url[userStart+7], 's')
1279
        && isLetterMatchIgnoringCase(url[userStart+8], 't');
1280
1281
    // File URLs need a host part unless it is just file:// or file://localhost
1282
    bool degenerateFilePath = pathStart == pathEnd && (hostStart == hostEnd || hostIsLocalHost);
1283
1284
    // We drop empty credentials, but keep a colon in an empty host/port pair.
1285
    // Removing hostname completely would change the structure of the URL on re-parsing.
1286
    bool haveNonHostAuthorityPart = userStart != userEnd || passwordStart != passwordEnd || hostEnd != portEnd;
1287
1288
    // add ":" after scheme
1289
    *p++ = ':';
1290
1291
    // if we have at least one authority part or a file URL - add "//" and authority
1292
    if (isFile ? !degenerateFilePath : (haveNonHostAuthorityPart || hostStart != hostEnd)) {
1293
        *p++ = '/';
1294
        *p++ = '/';
1295
1296
        m_userStart = p - buffer.data();
1297
1298
        // copy in the user
1299
        strPtr = url + userStart;
1300
        const char* userEndPtr = url + userEnd;
1301
        while (strPtr < userEndPtr) {
1302
            char c = *strPtr++;
1303
            ASSERT(isUserInfoChar(c));
1304
            *p++ = c;
1305
        }
1306
        m_userEnd = p - buffer.data();
1307
1308
        // copy in the password
1309
        if (passwordEnd != passwordStart) {
1310
            *p++ = ':';
1311
            strPtr = url + passwordStart;
1312
            const char* passwordEndPtr = url + passwordEnd;
1313
            while (strPtr < passwordEndPtr) {
1314
                char c = *strPtr++;
1315
                ASSERT(isUserInfoChar(c));
1316
                *p++ = c;
1317
            }
1318
        }
1319
        m_passwordEnd = p - buffer.data();
1320
1321
        // If we had any user info, add "@"
1322
        if (p - buffer.data() != m_userStart)
1323
            *p++ = '@';
1324
1325
        // copy in the host, except in the case of a file URL with authority="localhost"
1326
        if (!(isFile && hostIsLocalHost && !haveNonHostAuthorityPart)) {
1327
            strPtr = url + hostStart;
1328
            const char* hostEndPtr = url + hostEnd;
1329
            if (isCanonicalHostnameLowercaseForScheme(buffer.data(), m_schemeEnd)) {
1330
                while (strPtr < hostEndPtr) {
1331
                    char c = toASCIILower(*strPtr++);
1332
                    ASSERT(isHostnameChar(c) || c == '[' || c == ']' || c == ':');
1333
                    *p++ = c;
1334
                }
1335
            } else {
1336
                while (strPtr < hostEndPtr) {
1337
                    char c = *strPtr++;
1338
                    ASSERT(isHostnameChar(c) || c == '[' || c == ']' || c == ':');
1339
                    *p++ = c;
1340
                }
1341
            }
1342
        }
1343
        m_hostEnd = p - buffer.data();
1344
1345
        // Copy in the port if the URL has one (and it's not default). Also, copy it if there was no hostname, so that there is still something in authority component.
1346
        if (hostEnd != portStart) {
1347
            const char* portStr = url + portStart;
1348
            size_t portLength = portEnd - portStart;
1349
            if ((portLength && !isDefaultPortForScheme(portStr, portLength, buffer.data(), m_schemeEnd))
1350
                || (hostStart == hostEnd && hostEnd != portStart)) {
1351
                *p++ = ':';
1352
                const char* portEndPtr = url + portEnd;
1353
                while (portStr < portEndPtr)
1354
                    *p++ = *portStr++;
1355
            }
1356
        }
1357
        m_portEnd = p - buffer.data();
1358
    } else {
1359
        if (isFile) {
1360
            ASSERT(degenerateFilePath);
1361
            *p++ = '/';
1362
            *p++ = '/';
1363
        }
1364
        m_userStart = m_userEnd = m_passwordEnd = m_hostEnd = m_portEnd = p - buffer.data();
1365
    }
1366
1367
    // For canonicalization, ensure we have a '/' for no path.
1368
    // Do this only for URL with protocol file, http or https.
1369
    if ((m_protocolIsInHTTPFamily || isFile) && pathEnd == pathStart)
1370
        *p++ = '/';
1371
1372
    // add path, escaping bad characters
1373
    if (!hierarchical)
1374
        escapeAndAppendNonHierarchicalPart(p, url + pathStart, pathEnd - pathStart);
1375
    else if (!hasSlashDotOrDotDot(url))
1376
        appendEscapingBadChars(p, url + pathStart, pathEnd - pathStart);
1377
    else {
1378
        CharBuffer pathBuffer(pathEnd - pathStart + 1);
1379
        size_t length = copyPathRemovingDots(pathBuffer.data(), url, pathStart, pathEnd);
1380
        appendEscapingBadChars(p, pathBuffer.data(), length);
1381
    }
1382
1383
    m_pathEnd = p - buffer.data();
1384
1385
    // Find the position after the last slash in the path, or
1386
    // the position before the path if there are no slashes in it.
1387
    int i;
1388
    for (i = m_pathEnd; i > m_portEnd; --i) {
1389
        if (buffer[i - 1] == '/')
1390
            break;
1391
    }
1392
    m_pathAfterLastSlash = i;
1393
1394
    // add query, escaping bad characters
1395
    appendEscapingBadChars(p, url + queryStart, queryEnd - queryStart);
1396
    m_queryEnd = p - buffer.data();
1397
1398
    // add fragment, escaping bad characters
1399
    if (fragmentEnd != queryEnd) {
1400
        *p++ = '#';
1401
        escapeAndAppendNonHierarchicalPart(p, url + fragmentStart, fragmentEnd - fragmentStart);
1402
    }
1403
    m_fragmentEnd = p - buffer.data();
1404
1405
    ASSERT(p - buffer.data() <= static_cast<int>(buffer.size()));
1406
    ASSERT(buffer.size() > 0);
1407
1408
    // If we didn't end up actually changing the original string and
1409
    // it was already in a String, reuse it to avoid extra allocation.
1410
    if (originalString && equal(originalString->impl(), buffer.data(), m_fragmentEnd))
1411
        m_string = *originalString;
1412
    else
1413
        m_string = String(buffer.data(), m_fragmentEnd);
1414
1415
    m_isValid = true;
1416
}
1417
1418
bool equalIgnoringFragmentIdentifier(const KURL& a, const KURL& b)
1419
{
1420
    if (a.m_queryEnd != b.m_queryEnd)
1421
        return false;
1422
    unsigned queryLength = a.m_queryEnd;
1423
    for (unsigned i = 0; i < queryLength; ++i)
1424
        if (a.string()[i] != b.string()[i])
1425
            return false;
1426
    return true;
1427
}
1428
1429
bool protocolHostAndPortAreEqual(const KURL& a, const KURL& b)
1430
{
1431
    if (a.m_schemeEnd != b.m_schemeEnd)
1432
        return false;
1433
1434
    int hostStartA = a.hostStart();
1435
    int hostLengthA = a.hostEnd() - hostStartA;
1436
    int hostStartB = b.hostStart();
1437
    int hostLengthB = b.hostEnd() - b.hostStart();
1438
    if (hostLengthA != hostLengthB)
1439
        return false;
1440
1441
    // Check the scheme
1442
    for (int i = 0; i < a.m_schemeEnd; ++i)
1443
        if (a.string()[i] != b.string()[i])
1444
            return false;
1445
1446
    // And the host
1447
    for (int i = 0; i < hostLengthA; ++i)
1448
        if (a.string()[hostStartA + i] != b.string()[hostStartB + i])
1449
            return false;
1450
1451
    if (a.port() != b.port())
1452
        return false;
1453
1454
    return true;
1455
}
1456
1457
String encodeWithURLEscapeSequences(const String& notEncodedString)
1458
{
1459
    CString asUTF8 = notEncodedString.utf8();
1460
1461
    CharBuffer buffer(asUTF8.length() * 3 + 1);
1462
    char* p = buffer.data();
1463
1464
    const char* str = asUTF8.data();
1465
    const char* strEnd = str + asUTF8.length();
1466
    while (str < strEnd) {
1467
        unsigned char c = *str++;
1468
        if (isBadChar(c))
1469
            appendEscapedChar(p, c);
1470
        else
1471
            *p++ = c;
1472
    }
1473
1474
    ASSERT(p - buffer.data() <= static_cast<int>(buffer.size()));
1475
1476
    return String(buffer.data(), p - buffer.data());
1477
}
1478
1479
// Appends the punycoded hostname identified by the given string and length to
1480
// the output buffer. The result will not be null terminated.
1481
static void appendEncodedHostname(UCharBuffer& buffer, const UChar* str, unsigned strLen)
1482
{
1483
    // Needs to be big enough to hold an IDN-encoded name.
1484
    // For host names bigger than this, we won't do IDN encoding, which is almost certainly OK.
1485
    const unsigned hostnameBufferLength = 2048;
1486
1487
    if (strLen > hostnameBufferLength || charactersAreAllASCII(str, strLen)) {
1488
        buffer.append(str, strLen);
1489
        return;
1490
    }
1491
1492
#if USE(ICU_UNICODE)
1493
    UChar hostnameBuffer[hostnameBufferLength];
1494
    UErrorCode error = U_ZERO_ERROR;
1495
    int32_t numCharactersConverted = uidna_IDNToASCII(str, strLen, hostnameBuffer,
1496
        hostnameBufferLength, UIDNA_ALLOW_UNASSIGNED, 0, &error);
1497
    if (error == U_ZERO_ERROR)
1498
        buffer.append(hostnameBuffer, numCharactersConverted);
1499
#endif
1500
}
1501
1502
static void findHostnamesInMailToURL(const UChar* str, int strLen, Vector<pair<int, int> >& nameRanges)
1503
{
1504
    // In a mailto: URL, host names come after a '@' character and end with a '>' or ',' or '?' or end of string character.
1505
    // Skip quoted strings so that characters in them don't confuse us.
1506
    // When we find a '?' character, we are past the part of the URL that contains host names.
1507
1508
    nameRanges.clear();
1509
1510
    int p = 0;
1511
    while (1) {
1512
        // Find start of host name or of quoted string.
1513
        int hostnameOrStringStart = findFirstOf(str, strLen, p, "\"@?");
1514
        if (hostnameOrStringStart == -1)
1515
            return;
1516
        UChar c = str[hostnameOrStringStart];
1517
        p = hostnameOrStringStart + 1;
1518
1519
        if (c == '?')
1520
            return;
1521
1522
        if (c == '@') {
1523
            // Find end of host name.
1524
            int hostnameStart = p;
1525
            int hostnameEnd = findFirstOf(str, strLen, p, ">,?");
1526
            bool done;
1527
            if (hostnameEnd == -1) {
1528
                hostnameEnd = strLen;
1529
                done = true;
1530
            } else {
1531
                p = hostnameEnd;
1532
                done = false;
1533
            }
1534
1535
            nameRanges.append(make_pair(hostnameStart, hostnameEnd));
1536
1537
            if (done)
1538
                return;
1539
        } else {
1540
            // Skip quoted string.
1541
            ASSERT(c == '"');
1542
            while (1) {
1543
                int escapedCharacterOrStringEnd = findFirstOf(str, strLen, p, "\"\\");
1544
                if (escapedCharacterOrStringEnd == -1)
1545
                    return;
1546
1547
                c = str[escapedCharacterOrStringEnd];
1548
                p = escapedCharacterOrStringEnd + 1;
1549
1550
                // If we are the end of the string, then break from the string loop back to the host name loop.
1551
                if (c == '"')
1552
                    break;
1553
1554
                // Skip escaped character.
1555
                ASSERT(c == '\\');
1556
                if (p == strLen)
1557
                    return;
1558
1559
                ++p;
1560
            }
1561
        }
1562
    }
1563
}
1564
1565
static bool findHostnameInHierarchicalURL(const UChar* str, int strLen, int& startOffset, int& endOffset)
1566
{
1567
    // Find the host name in a hierarchical URL.
1568
    // It comes after a "://" sequence, with scheme characters preceding, and
1569
    // this should be the first colon in the string.
1570
    // It ends with the end of the string or a ":" or a path segment ending character.
1571
    // If there is a "@" character, the host part is just the part after the "@".
1572
    int separator = findFirstOf(str, strLen, 0, ":");
1573
    if (separator == -1 || separator + 2 >= strLen ||
1574
        str[separator + 1] != '/' || str[separator + 2] != '/')
1575
        return false;
1576
1577
    // Check that all characters before the :// are valid scheme characters.
1578
    if (!isSchemeFirstChar(str[0]))
1579
        return false;
1580
    for (int i = 1; i < separator; ++i) {
1581
        if (!isSchemeChar(str[i]))
1582
            return false;
1583
    }
1584
1585
    // Start after the separator.
1586
    int authorityStart = separator + 3;
1587
1588
    // Find terminating character.
1589
    int hostnameEnd = strLen;
1590
    for (int i = authorityStart; i < strLen; ++i) {
1591
        UChar c = str[i];
1592
        if (c == ':' || (isPathSegmentEndChar(c) && c != 0)) {
1593
            hostnameEnd = i;
1594
            break;
1595
        }
1596
    }
1597
1598
    // Find "@" for the start of the host name.
1599
    int userInfoTerminator = findFirstOf(str, strLen, authorityStart, "@");
1600
    int hostnameStart;
1601
    if (userInfoTerminator == -1 || userInfoTerminator > hostnameEnd)
1602
        hostnameStart = authorityStart;
1603
    else
1604
        hostnameStart = userInfoTerminator + 1;
1605
1606
    startOffset = hostnameStart;
1607
    endOffset = hostnameEnd;
1608
    return true;
1609
}
1610
1611
// Converts all hostnames found in the given input to punycode, preserving the
1612
// rest of the URL unchanged. The output will NOT be null-terminated.
1613
static void encodeHostnames(const String& str, UCharBuffer& output)
1614
{
1615
    output.clear();
1616
1617
    if (protocolIs(str, "mailto")) {
1618
        Vector<pair<int, int> > hostnameRanges;
1619
        findHostnamesInMailToURL(str.characters(), str.length(), hostnameRanges);
1620
        int n = hostnameRanges.size();
1621
        int p = 0;
1622
        for (int i = 0; i < n; ++i) {
1623
            const pair<int, int>& r = hostnameRanges[i];
1624
            output.append(&str.characters()[p], r.first - p);
1625
            appendEncodedHostname(output, &str.characters()[r.first], r.second - r.first);
1626
            p = r.second;
1627
        }
1628
        // This will copy either everything after the last hostname, or the
1629
        // whole thing if there is no hostname.
1630
        output.append(&str.characters()[p], str.length() - p);
1631
    } else {
1632
        int hostStart, hostEnd;
1633
        if (findHostnameInHierarchicalURL(str.characters(), str.length(), hostStart, hostEnd)) {
1634
            output.append(str.characters(), hostStart); // Before hostname.
1635
            appendEncodedHostname(output, &str.characters()[hostStart], hostEnd - hostStart);
1636
            output.append(&str.characters()[hostEnd], str.length() - hostEnd); // After hostname.
1637
        } else {
1638
            // No hostname to encode, return the input.
1639
            output.append(str.characters(), str.length());
1640
        }
1641
    }
1642
}
1643
1644
static void encodeRelativeString(const String& rel, const TextEncoding& encoding, CharBuffer& output)
1645
{
1646
    UCharBuffer s;
1647
    encodeHostnames(rel, s);
1648
1649
    TextEncoding pathEncoding(UTF8Encoding()); // Path is always encoded as UTF-8; other parts may depend on the scheme.
1650
1651
    int pathEnd = -1;
1652
    if (encoding != pathEncoding && encoding.isValid() && !protocolIs(rel, "mailto") && !protocolIs(rel, "data") && !protocolIsJavaScript(rel)) {
1653
        // Find the first instance of either # or ?, keep pathEnd at -1 otherwise.
1654
        pathEnd = findFirstOf(s.data(), s.size(), 0, "#?");
1655
    }
1656
1657
    if (pathEnd == -1) {
1658
        CString decoded = pathEncoding.encode(s.data(), s.size(), URLEncodedEntitiesForUnencodables);
1659
        output.resize(decoded.length());
1660
        memcpy(output.data(), decoded.data(), decoded.length());
1661
    } else {
1662
        CString pathDecoded = pathEncoding.encode(s.data(), pathEnd, URLEncodedEntitiesForUnencodables);
1663
        // Unencodable characters in URLs are represented by converting
1664
        // them to XML entities and escaping non-alphanumeric characters.
1665
        CString otherDecoded = encoding.encode(s.data() + pathEnd, s.size() - pathEnd, URLEncodedEntitiesForUnencodables);
1666
1667
        output.resize(pathDecoded.length() + otherDecoded.length());
1668
        memcpy(output.data(), pathDecoded.data(), pathDecoded.length());
1669
        memcpy(output.data() + pathDecoded.length(), otherDecoded.data(), otherDecoded.length());
1670
    }
1671
    output.append('\0'); // null-terminate the output.
1672
}
1673
1674
static String substituteBackslashes(const String& string)
1675
{
1676
    size_t questionPos = string.find('?');
1677
    size_t hashPos = string.find('#');
1678
    unsigned pathEnd;
1679
1680
    if (hashPos != notFound && (questionPos == notFound || questionPos > hashPos))
1681
        pathEnd = hashPos;
1682
    else if (questionPos != notFound)
1683
        pathEnd = questionPos;
1684
    else
1685
        pathEnd = string.length();
1686
1687
    return string.left(pathEnd).replace('\\','/') + string.substring(pathEnd);
1688
}
1689
1690
bool KURL::isHierarchical() const
1691
{
1692
    if (!m_isValid)
1693
        return false;
1694
    ASSERT(m_string[m_schemeEnd] == ':');
1695
    return m_string[m_schemeEnd + 1] == '/';
1696
}
1697
1698
void KURL::copyToBuffer(Vector<char, 512>& buffer) const
1699
{
1700
    // FIXME: This throws away the high bytes of all the characters in the string!
1701
    // That's fine for a valid URL, which is all ASCII, but not for invalid URLs.
1702
    buffer.resize(m_string.length());
1703
    copyASCII(m_string, buffer.data());
1704
}
1705
1706
bool protocolIs(const String& url, const char* protocol)
1707
{
1708
    // Do the comparison without making a new string object.
1709
    assertProtocolIsGood(protocol);
1710
    for (int i = 0; ; ++i) {
1711
        if (!protocol[i])
1712
            return url[i] == ':';
1713
        if (!isLetterMatchIgnoringCase(url[i], protocol[i]))
1714
            return false;
1715
    }
1716
}
1717
1718
bool isValidProtocol(const String& protocol)
1719
{
1720
    // RFC3986: ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
1721
    if (protocol.isEmpty())
1722
        return false;
1723
    if (!isSchemeFirstChar(protocol[0]))
1724
        return false;
1725
    unsigned protocolLength = protocol.length();
1726
    for (unsigned i = 1; i < protocolLength; i++) {
1727
        if (!isSchemeChar(protocol[i]))
1728
            return false;
1729
    }
1730
    return true;
1731
}
1732
1733
#ifndef NDEBUG
1734
void KURL::print() const
1735
{
1736
    printf("%s\n", m_string.utf8().data());
1737
}
1738
#endif
1739
1740
String KURL::strippedForUseAsReferrer() const
1741
{
1742
    KURL referrer(*this);
1743
    referrer.setUser(String());
1744
    referrer.setPass(String());
1745
    referrer.removeFragmentIdentifier();
1746
    return referrer.string();
1747
}
1748
1749
bool KURL::isLocalFile() const
1750
{
1751
    // Including feed here might be a bad idea since drag and drop uses this check
1752
    // and including feed would allow feeds to potentially let someone's blog
1753
    // read the contents of the clipboard on a drag, even without a drop.
1754
    // Likewise with using the FrameLoader::shouldTreatURLAsLocal() function.
1755
    return protocolIs("file");
1756
}
1757
1758
bool protocolIsJavaScript(const String& url)
1759
{
1760
    return protocolIs(url, "javascript");
1761
}
1762
1763
const KURL& blankURL()
1764
{
1765
    DEFINE_STATIC_LOCAL(KURL, staticBlankURL, (ParsedURLString, "about:blank"));
1766
    return staticBlankURL;
1767
}
1768
1769
bool KURL::isBlankURL() const
1770
{
1771
    return protocolIs("about");
1772
}
1773
1774
bool isDefaultPortForProtocol(unsigned short port, const String& protocol)
1775
{
1776
    if (protocol.isEmpty())
1777
        return false;
1778
1779
    typedef HashMap<String, unsigned, CaseFoldingHash> DefaultPortsMap;
1780
    DEFINE_STATIC_LOCAL(DefaultPortsMap, defaultPorts, ());
1781
    if (defaultPorts.isEmpty()) {
1782
        defaultPorts.set("http", 80);
1783
        defaultPorts.set("https", 443);
1784
        defaultPorts.set("ftp", 21);
1785
        defaultPorts.set("ftps", 990);
1786
    }
1787
    return defaultPorts.get(protocol) == port;
1788
}
1789
1790
bool portAllowed(const KURL& url)
1791
{
1792
    unsigned short port = url.port();
1793
1794
    // Since most URLs don't have a port, return early for the "no port" case.
1795
    if (!port)
1796
        return true;
1797
1798
    // This blocked port list matches the port blocking that Mozilla implements.
1799
    // See http://www.mozilla.org/projects/netlib/PortBanning.html for more information.
1800
    static const unsigned short blockedPortList[] = {
1801
        1,    // tcpmux
1802
        7,    // echo
1803
        9,    // discard
1804
        11,   // systat
1805
        13,   // daytime
1806
        15,   // netstat
1807
        17,   // qotd
1808
        19,   // chargen
1809
        20,   // FTP-data
1810
        21,   // FTP-control
1811
        22,   // SSH
1812
        23,   // telnet
1813
        25,   // SMTP
1814
        37,   // time
1815
        42,   // name
1816
        43,   // nicname
1817
        53,   // domain
1818
        77,   // priv-rjs
1819
        79,   // finger
1820
        87,   // ttylink
1821
        95,   // supdup
1822
        101,  // hostriame
1823
        102,  // iso-tsap
1824
        103,  // gppitnp
1825
        104,  // acr-nema
1826
        109,  // POP2
1827
        110,  // POP3
1828
        111,  // sunrpc
1829
        113,  // auth
1830
        115,  // SFTP
1831
        117,  // uucp-path
1832
        119,  // nntp
1833
        123,  // NTP
1834
        135,  // loc-srv / epmap
1835
        139,  // netbios
1836
        143,  // IMAP2
1837
        179,  // BGP
1838
        389,  // LDAP
1839
        465,  // SMTP+SSL
1840
        512,  // print / exec
1841
        513,  // login
1842
        514,  // shell
1843
        515,  // printer
1844
        526,  // tempo
1845
        530,  // courier
1846
        531,  // Chat
1847
        532,  // netnews
1848
        540,  // UUCP
1849
        556,  // remotefs
1850
        563,  // NNTP+SSL
1851
        587,  // ESMTP
1852
        601,  // syslog-conn
1853
        636,  // LDAP+SSL
1854
        993,  // IMAP+SSL
1855
        995,  // POP3+SSL
1856
        2049, // NFS
1857
        3659, // apple-sasl / PasswordServer [Apple addition]
1858
        4045, // lockd
1859
        6000, // X11
1860
        6665, // Alternate IRC [Apple addition]
1861
        6666, // Alternate IRC [Apple addition]
1862
        6667, // Standard IRC [Apple addition]
1863
        6668, // Alternate IRC [Apple addition]
1864
        6669, // Alternate IRC [Apple addition]
1865
        invalidPortNumber, // Used to block all invalid port numbers
1866
    };
1867
    const unsigned short* const blockedPortListEnd = blockedPortList + WTF_ARRAY_LENGTH(blockedPortList);
1868
1869
#ifndef NDEBUG
1870
    // The port list must be sorted for binary_search to work.
1871
    static bool checkedPortList = false;
1872
    if (!checkedPortList) {
1873
        for (const unsigned short* p = blockedPortList; p != blockedPortListEnd - 1; ++p)
1874
            ASSERT(*p < *(p + 1));
1875
        checkedPortList = true;
1876
    }
1877
#endif
1878
1879
    // If the port is not in the blocked port list, allow it.
1880
    if (!binary_search(blockedPortList, blockedPortListEnd, port))
1881
        return true;
1882
1883
    // Allow ports 21 and 22 for FTP URLs, as Mozilla does.
1884
    if ((port == 21 || port == 22) && url.protocolIs("ftp"))
1885
        return true;
1886
1887
    // Allow any port number in a file URL, since the port number is ignored.
1888
    if (url.protocolIs("file"))
1889
        return true;
1890
1891
#if PLATFORM(BLACKBERRY)
1892
    if (url.protocolIs("local"))
1893
        return true;
1894
#endif
1895
1896
    return false;
1897
}
1898
1899
String mimeTypeFromDataURL(const String& url)
1900
{
1901
    ASSERT(protocolIs(url, "data"));
1902
    size_t index = url.find(';');
1903
    if (index == notFound)
1904
        index = url.find(',');
1905
    if (index != notFound) {
1906
        if (index > 5)
1907
            return url.substring(5, index - 5).lower();
1908
        return "text/plain"; // Data URLs with no MIME type are considered text/plain.
1909
    }
1910
    return "";
1911
}
1912
1913
String mimeTypeFromURL(const KURL& url)
1914
{
1915
    String decodedPath = decodeURLEscapeSequences(url.path());
1916
    String extension = decodedPath.substring(decodedPath.reverseFind('.') + 1);
1917
1918
    // We don't use MIMETypeRegistry::getMIMETypeForPath() because it returns "application/octet-stream" upon failure
1919
    return MIMETypeRegistry::getMIMETypeForExtension(extension);
1920
}
1921
1922
bool KURL::isSafeToSendToAnotherThread() const
1923
{
1924
    return m_string.isSafeToSendToAnotherThread();
1925
}
1926
1927
String KURL::stringCenterEllipsizedToLength(unsigned length) const
1928
{
1929
    if (string().length() <= length)
1930
        return string();
1931
1932
    return string().left(length / 2 - 1) + "..." + string().right(length / 2 - 2);
1933
}
1934
1935
}
- a/Source/WebCore/platform/KURL.h -358 lines
Lines 1-358 a/Source/WebCore/platform/KURL.h_sec1
1
/*
2
 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2011, 2012, 2013 Apple Inc. All rights reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
6
 * are met:
7
 * 1. Redistributions of source code must retain the above copyright
8
 *    notice, this list of conditions and the following disclaimer.
9
 * 2. Redistributions in binary form must reproduce the above copyright
10
 *    notice, this list of conditions and the following disclaimer in the
11
 *    documentation and/or other materials provided with the distribution.
12
 *
13
 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
14
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
17
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21
 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
24
 */
25
26
#ifndef KURL_h
27
#define KURL_h
28
29
#include <wtf/Forward.h>
30
#include <wtf/HashMap.h>
31
#include <wtf/RetainPtr.h>
32
#include <wtf/text/WTFString.h>
33
34
#if USE(CF)
35
typedef const struct __CFURL* CFURLRef;
36
#endif
37
38
#if PLATFORM(MAC)
39
OBJC_CLASS NSURL;
40
#endif
41
42
#if PLATFORM(QT)
43
QT_BEGIN_NAMESPACE
44
class QUrl;
45
QT_END_NAMESPACE
46
#endif
47
48
namespace WebCore {
49
50
class TextEncoding;
51
struct KURLHash;
52
53
enum ParsedURLStringTag { ParsedURLString };
54
55
class KURL {
56
public:
57
    // Generates a URL which contains a null string.
58
    KURL() { invalidate(); }
59
60
    // The argument is an absolute URL string. The string is assumed to be output of KURL::string() called on a valid
61
    // KURL object, or indiscernible from such.
62
    // It is usually best to avoid repeatedly parsing a string, unless memory saving outweigh the possible slow-downs.
63
    KURL(ParsedURLStringTag, const String&);
64
    explicit KURL(WTF::HashTableDeletedValueType) : m_string(WTF::HashTableDeletedValue) { }
65
    bool isHashTableDeletedValue() const { return string().isHashTableDeletedValue(); }
66
67
    // Resolves the relative URL with the given base URL. If provided, the
68
    // TextEncoding is used to encode non-ASCII characers. The base URL can be
69
    // null or empty, in which case the relative URL will be interpreted as
70
    // absolute.
71
    // FIXME: If the base URL is invalid, this always creates an invalid
72
    // URL. Instead I think it would be better to treat all invalid base URLs
73
    // the same way we treate null and empty base URLs.
74
    KURL(const KURL& base, const String& relative);
75
    KURL(const KURL& base, const String& relative, const TextEncoding&);
76
77
    String strippedForUseAsReferrer() const;
78
79
    // FIXME: The above functions should be harmonized so that passing a
80
    // base of null or the empty string gives the same result as the
81
    // standard String constructor.
82
83
    // Makes a deep copy. Helpful only if you need to use a KURL on another
84
    // thread.  Since the underlying StringImpl objects are immutable, there's
85
    // no other reason to ever prefer copy() over plain old assignment.
86
    KURL copy() const;
87
88
    bool isNull() const;
89
    bool isEmpty() const;
90
    bool isValid() const;
91
92
    // Returns true if you can set the host and port for the URL.
93
    // Non-hierarchical URLs don't have a host and port.
94
    bool canSetHostOrPort() const { return isHierarchical(); }
95
96
    bool canSetPathname() const { return isHierarchical(); }
97
    bool isHierarchical() const;
98
99
    const String& string() const { return m_string; }
100
101
    String stringCenterEllipsizedToLength(unsigned length = 1024) const;
102
103
    String protocol() const;
104
    String host() const;
105
    unsigned short port() const;
106
    bool hasPort() const;
107
    String user() const;
108
    String pass() const;
109
    String path() const;
110
    String lastPathComponent() const;
111
    String query() const;
112
    String fragmentIdentifier() const;
113
    bool hasFragmentIdentifier() const;
114
115
    String baseAsString() const;
116
117
    String fileSystemPath() const;
118
119
    // Returns true if the current URL's protocol is the same as the null-
120
    // terminated ASCII argument. The argument must be lower-case.
121
    bool protocolIs(const char*) const;
122
    bool protocolIsData() const { return protocolIs("data"); }
123
    bool protocolIsInHTTPFamily() const;
124
    bool isLocalFile() const;
125
    bool isBlankURL() const;
126
127
    bool setProtocol(const String&);
128
    void setHost(const String&);
129
130
    void removePort();
131
    void setPort(unsigned short);
132
133
    // Input is like "foo.com" or "foo.com:8000".
134
    void setHostAndPort(const String&);
135
136
    void setUser(const String&);
137
    void setPass(const String&);
138
139
    // If you pass an empty path for HTTP or HTTPS URLs, the resulting path
140
    // will be "/".
141
    void setPath(const String&);
142
143
    // The query may begin with a question mark, or, if not, one will be added
144
    // for you. Setting the query to the empty string will leave a "?" in the
145
    // URL (with nothing after it). To clear the query, pass a null string.
146
    void setQuery(const String&);
147
148
    void setFragmentIdentifier(const String&);
149
    void removeFragmentIdentifier();
150
151
    friend bool equalIgnoringFragmentIdentifier(const KURL&, const KURL&);
152
153
    friend bool protocolHostAndPortAreEqual(const KURL&, const KURL&);
154
155
    unsigned hostStart() const;
156
    unsigned hostEnd() const;
157
158
    unsigned pathStart() const;
159
    unsigned pathEnd() const;
160
    unsigned pathAfterLastSlash() const;
161
162
    operator const String&() const { return string(); }
163
164
#if USE(CF)
165
    KURL(CFURLRef);
166
    RetainPtr<CFURLRef> createCFURL() const;
167
#endif
168
169
#if PLATFORM(MAC)
170
    KURL(NSURL*);
171
    operator NSURL*() const;
172
#endif
173
#ifdef __OBJC__
174
    operator NSString*() const { return string(); }
175
#endif
176
177
#if PLATFORM(QT)
178
    KURL(const QUrl&);
179
    operator QUrl() const;
180
#endif
181
182
    const KURL* innerURL() const { return 0; }
183
184
#ifndef NDEBUG
185
    void print() const;
186
#endif
187
188
    bool isSafeToSendToAnotherThread() const;
189
190
private:
191
    void invalidate();
192
    static bool protocolIs(const String&, const char*);
193
    void init(const KURL&, const String&, const TextEncoding&);
194
    void copyToBuffer(Vector<char, 512>& buffer) const;
195
196
    // Parses the given URL. The originalString parameter allows for an
197
    // optimization: When the source is the same as the fixed-up string,
198
    // it will use the passed-in string instead of allocating a new one.
199
    void parse(const String&);
200
    void parse(const char* url, const String* originalString = 0);
201
202
    bool hasPath() const;
203
204
    String m_string;
205
    bool m_isValid : 1;
206
    bool m_protocolIsInHTTPFamily : 1;
207
208
    int m_schemeEnd;
209
    int m_userStart;
210
    int m_userEnd;
211
    int m_passwordEnd;
212
    int m_hostEnd;
213
    int m_portEnd;
214
    int m_pathAfterLastSlash;
215
    int m_pathEnd;
216
    int m_queryEnd;
217
    int m_fragmentEnd;
218
};
219
220
bool operator==(const KURL&, const KURL&);
221
bool operator==(const KURL&, const String&);
222
bool operator==(const String&, const KURL&);
223
bool operator!=(const KURL&, const KURL&);
224
bool operator!=(const KURL&, const String&);
225
bool operator!=(const String&, const KURL&);
226
227
bool equalIgnoringFragmentIdentifier(const KURL&, const KURL&);
228
bool protocolHostAndPortAreEqual(const KURL&, const KURL&);
229
230
const KURL& blankURL();
231
232
// Functions to do URL operations on strings.
233
// These are operations that aren't faster on a parsed URL.
234
// These are also different from the KURL functions in that they don't require the string to be a valid and parsable URL.
235
// This is especially important because valid javascript URLs are not necessarily considered valid by KURL.
236
237
bool protocolIs(const String& url, const char* protocol);
238
bool protocolIsJavaScript(const String& url);
239
240
bool isDefaultPortForProtocol(unsigned short port, const String& protocol);
241
bool portAllowed(const KURL&); // Blacklist ports that should never be used for Web resources.
242
243
bool isValidProtocol(const String&);
244
245
String mimeTypeFromDataURL(const String& url);
246
String mimeTypeFromURL(const KURL&);
247
248
// Unescapes the given string using URL escaping rules, given an optional
249
// encoding (defaulting to UTF-8 otherwise). DANGER: If the URL has "%00"
250
// in it, the resulting string will have embedded null characters!
251
String decodeURLEscapeSequences(const String&);
252
String decodeURLEscapeSequences(const String&, const TextEncoding&);
253
254
String encodeWithURLEscapeSequences(const String&);
255
256
// Inlines.
257
258
inline bool operator==(const KURL& a, const KURL& b)
259
{
260
    return a.string() == b.string();
261
}
262
263
inline bool operator==(const KURL& a, const String& b)
264
{
265
    return a.string() == b;
266
}
267
268
inline bool operator==(const String& a, const KURL& b)
269
{
270
    return a == b.string();
271
}
272
273
inline bool operator!=(const KURL& a, const KURL& b)
274
{
275
    return a.string() != b.string();
276
}
277
278
inline bool operator!=(const KURL& a, const String& b)
279
{
280
    return a.string() != b;
281
}
282
283
inline bool operator!=(const String& a, const KURL& b)
284
{
285
    return a != b.string();
286
}
287
288
// Inline versions of some non-GoogleURL functions so we can get inlining
289
// without having to have a lot of ugly ifdefs in the class definition.
290
291
inline bool KURL::isNull() const
292
{
293
    return m_string.isNull();
294
}
295
296
inline bool KURL::isEmpty() const
297
{
298
    return m_string.isEmpty();
299
}
300
301
inline bool KURL::isValid() const
302
{
303
    return m_isValid;
304
}
305
306
inline bool KURL::hasPath() const
307
{
308
    return m_pathEnd != m_portEnd;
309
}
310
311
inline bool KURL::hasPort() const
312
{
313
    return m_hostEnd < m_portEnd;
314
}
315
316
inline bool KURL::protocolIsInHTTPFamily() const
317
{
318
    return m_protocolIsInHTTPFamily;
319
}
320
321
inline unsigned KURL::hostStart() const
322
{
323
    return (m_passwordEnd == m_userStart) ? m_passwordEnd : m_passwordEnd + 1;
324
}
325
326
inline unsigned KURL::hostEnd() const
327
{
328
    return m_hostEnd;
329
}
330
331
inline unsigned KURL::pathStart() const
332
{
333
    return m_portEnd;
334
}
335
336
inline unsigned KURL::pathEnd() const
337
{
338
    return m_pathEnd;
339
}
340
341
inline unsigned KURL::pathAfterLastSlash() const
342
{
343
    return m_pathAfterLastSlash;
344
}
345
346
} // namespace WebCore
347
348
namespace WTF {
349
350
    // KURLHash is the default hash for String
351
    template<typename T> struct DefaultHash;
352
    template<> struct DefaultHash<WebCore::KURL> {
353
        typedef WebCore::KURLHash Hash;
354
    };
355
356
} // namespace WTF
357
358
#endif // KURL_h
- a/Source/WebCore/platform/KURLHash.h -57 lines
Lines 1-57 a/Source/WebCore/platform/KURLHash.h_sec1
1
/*
2
 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
6
 * are met:
7
 * 1. Redistributions of source code must retain the above copyright
8
 *    notice, this list of conditions and the following disclaimer.
9
 * 2. Redistributions in binary form must reproduce the above copyright
10
 *    notice, this list of conditions and the following disclaimer in the
11
 *    documentation and/or other materials provided with the distribution.
12
 *
13
 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
14
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
17
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21
 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
24
 */
25
26
#ifndef KURLHash_h
27
#define KURLHash_h
28
29
#include "KURL.h"
30
#include <wtf/text/StringHash.h>
31
#include <wtf/text/WTFString.h>
32
33
namespace WebCore {
34
35
    struct KURLHash {
36
        static unsigned hash(const KURL& key)
37
        {
38
            return key.string().impl()->hash();
39
        }
40
41
        static bool equal(const KURL& a, const KURL& b)
42
        {
43
            return StringHash::equal(a.string(), b.string());
44
        }
45
46
        static const bool safeToCompareToEmptyOrDeleted = false;
47
    };
48
49
} // namespace WebCore
50
51
namespace WTF {
52
53
    template<> struct HashTraits<WebCore::KURL> : SimpleClassHashTraits<WebCore::KURL> { };
54
55
} // namespace WTF
56
57
#endif // KURLHash_h
- a/Source/WebCore/platform/LinkHash.cpp -5 / +5 lines
Lines 22-28 a/Source/WebCore/platform/LinkHash.cpp_sec1
22
 */
22
 */
23
23
24
#include "config.h"
24
#include "config.h"
25
#include "KURL.h"
25
#include "URL.h"
26
#include "LinkHash.h"
26
#include "LinkHash.h"
27
#include <wtf/text/AtomicString.h>
27
#include <wtf/text/AtomicString.h>
28
#include <wtf/text/StringHash.h>
28
#include <wtf/text/StringHash.h>
Lines 226-238 LinkHash visitedLinkHash(const UChar* url, unsigned length) a/Source/WebCore/platform/LinkHash.cpp_sec2
226
}
226
}
227
227
228
template <typename CharacterType>
228
template <typename CharacterType>
229
static ALWAYS_INLINE void visitedURLInline(const KURL& base, const CharacterType* characters, unsigned length, Vector<CharacterType, 512>& buffer)
229
static ALWAYS_INLINE void visitedURLInline(const URL& base, const CharacterType* characters, unsigned length, Vector<CharacterType, 512>& buffer)
230
{
230
{
231
    if (!length)
231
    if (!length)
232
        return;
232
        return;
233
233
234
    // This is a poor man's completeURL. Faster with less memory allocation.
234
    // This is a poor man's completeURL. Faster with less memory allocation.
235
    // FIXME: It's missing a lot of what completeURL does and a lot of what KURL does.
235
    // FIXME: It's missing a lot of what completeURL does and a lot of what URL does.
236
    // For example, it does not handle international domain names properly.
236
    // For example, it does not handle international domain names properly.
237
237
238
    // FIXME: It is wrong that we do not do further processing on strings that have "://" in them:
238
    // FIXME: It is wrong that we do not do further processing on strings that have "://" in them:
Lines 284-295 static ALWAYS_INLINE void visitedURLInline(const KURL& base, const CharacterType a/Source/WebCore/platform/LinkHash.cpp_sec3
284
    return;
284
    return;
285
}
285
}
286
286
287
void visitedURL(const KURL& base, const AtomicString& attributeURL, Vector<UChar, 512>& buffer)
287
void visitedURL(const URL& base, const AtomicString& attributeURL, Vector<UChar, 512>& buffer)
288
{
288
{
289
    return visitedURLInline(base, attributeURL.characters(), attributeURL.length(), buffer);
289
    return visitedURLInline(base, attributeURL.characters(), attributeURL.length(), buffer);
290
}
290
}
291
291
292
LinkHash visitedLinkHash(const KURL& base, const AtomicString& attributeURL)
292
LinkHash visitedLinkHash(const URL& base, const AtomicString& attributeURL)
293
{
293
{
294
    if (attributeURL.isEmpty())
294
    if (attributeURL.isEmpty())
295
        return 0;
295
        return 0;
- a/Source/WebCore/platform/LinkHash.h -3 / +3 lines
Lines 31-37 a/Source/WebCore/platform/LinkHash.h_sec1
31
31
32
namespace WebCore {
32
namespace WebCore {
33
33
34
class KURL;
34
class URL;
35
35
36
typedef uint64_t LinkHash;
36
typedef uint64_t LinkHash;
37
37
Lines 61-72 LinkHash visitedLinkHash(const UChar* url, unsigned length); a/Source/WebCore/platform/LinkHash.h_sec2
61
// base URL, and returns the hash of the string that will be used for visited
61
// base URL, and returns the hash of the string that will be used for visited
62
// link coloring. It will return the special value of 0 if attributeURL does not
62
// link coloring. It will return the special value of 0 if attributeURL does not
63
// look like a relative URL.
63
// look like a relative URL.
64
LinkHash visitedLinkHash(const KURL& base, const AtomicString& attributeURL);
64
LinkHash visitedLinkHash(const URL& base, const AtomicString& attributeURL);
65
65
66
// Resolves the potentially relative URL "attributeURL" relative to the given
66
// Resolves the potentially relative URL "attributeURL" relative to the given
67
// base URL, and returns the hash of the string that will be used for visited.
67
// base URL, and returns the hash of the string that will be used for visited.
68
// It will return an empty Vector in case of errors.
68
// It will return an empty Vector in case of errors.
69
void visitedURL(const KURL& base, const AtomicString& attributeURL, Vector<UChar, 512>&);
69
void visitedURL(const URL& base, const AtomicString& attributeURL, Vector<UChar, 512>&);
70
70
71
71
72
}  // namespace WebCore
72
}  // namespace WebCore
- a/Source/WebCore/platform/Pasteboard.h -7 / +7 lines
Lines 28-34 a/Source/WebCore/platform/Pasteboard.h_sec1
28
28
29
#include "DragImage.h"
29
#include "DragImage.h"
30
#include "Image.h"
30
#include "Image.h"
31
#include "KURL.h"
31
#include "URL.h"
32
#include "SharedBuffer.h"
32
#include "SharedBuffer.h"
33
#include <wtf/Noncopyable.h>
33
#include <wtf/Noncopyable.h>
34
#include <wtf/Vector.h>
34
#include <wtf/Vector.h>
Lines 86-92 struct PasteboardWebContent { a/Source/WebCore/platform/Pasteboard.h_sec2
86
};
86
};
87
87
88
struct PasteboardURL {
88
struct PasteboardURL {
89
    KURL url;
89
    URL url;
90
    String title;
90
    String title;
91
#if PLATFORM(MAC) && !PLATFORM(IOS)
91
#if PLATFORM(MAC) && !PLATFORM(IOS)
92
    String userVisibleForm;
92
    String userVisibleForm;
Lines 115-121 public: a/Source/WebCore/platform/Pasteboard.h_sec3
115
    virtual bool readRTFD(PassRefPtr<SharedBuffer>) = 0;
115
    virtual bool readRTFD(PassRefPtr<SharedBuffer>) = 0;
116
    virtual bool readRTF(PassRefPtr<SharedBuffer>) = 0;
116
    virtual bool readRTF(PassRefPtr<SharedBuffer>) = 0;
117
    virtual bool readImage(PassRefPtr<SharedBuffer>, const String& type) = 0;
117
    virtual bool readImage(PassRefPtr<SharedBuffer>, const String& type) = 0;
118
    virtual bool readURL(const KURL&, const String& title) = 0;
118
    virtual bool readURL(const URL&, const String& title) = 0;
119
#endif
119
#endif
120
    virtual bool readPlainText(const String&) = 0;
120
    virtual bool readPlainText(const String&) = 0;
121
};
121
};
Lines 170-176 public: a/Source/WebCore/platform/Pasteboard.h_sec4
170
#endif
170
#endif
171
171
172
#if PLATFORM(GTK) || PLATFORM(QT) || PLATFORM(WIN)
172
#if PLATFORM(GTK) || PLATFORM(QT) || PLATFORM(WIN)
173
    void writeImage(Node*, const KURL&, const String& title); // FIXME: Layering violation.
173
    void writeImage(Node*, const URL&, const String& title); // FIXME: Layering violation.
174
    void writeSelection(Range*, bool canSmartCopyOrDelete, Frame*, ShouldSerializeSelectedTextForClipboard = DefaultSelectedTextType); // FIXME: Layering violation.
174
    void writeSelection(Range*, bool canSmartCopyOrDelete, Frame*, ShouldSerializeSelectedTextForClipboard = DefaultSelectedTextType); // FIXME: Layering violation.
175
#endif
175
#endif
176
176
Lines 210-218 public: a/Source/WebCore/platform/Pasteboard.h_sec5
210
#if PLATFORM(WIN)
210
#if PLATFORM(WIN)
211
    COMPtr<IDataObject> dataObject() const { return m_dataObject; }
211
    COMPtr<IDataObject> dataObject() const { return m_dataObject; }
212
    void setExternalDataObject(IDataObject*);
212
    void setExternalDataObject(IDataObject*);
213
    void writeURLToWritableDataObject(const KURL&, const String&);
213
    void writeURLToWritableDataObject(const URL&, const String&);
214
    COMPtr<WCDataObject> writableDataObject() const { return m_writableDataObject; }
214
    COMPtr<WCDataObject> writableDataObject() const { return m_writableDataObject; }
215
    void writeImageToDataObject(Element*, const KURL&); // FIXME: Layering violation.
215
    void writeImageToDataObject(Element*, const URL&); // FIXME: Layering violation.
216
#endif
216
#endif
217
217
218
private:
218
private:
Lines 240-246 private: a/Source/WebCore/platform/Pasteboard.h_sec6
240
240
241
    void finishCreatingPasteboard();
241
    void finishCreatingPasteboard();
242
    void writeRangeToDataObject(Range*, Frame*); // FIXME: Layering violation.
242
    void writeRangeToDataObject(Range*, Frame*); // FIXME: Layering violation.
243
    void writeURLToDataObject(const KURL&, const String&);
243
    void writeURLToDataObject(const URL&, const String&);
244
    void writePlainTextToDataObject(const String&, SmartReplaceOption);
244
    void writePlainTextToDataObject(const String&, SmartReplaceOption);
245
#endif
245
#endif
246
246
- a/Source/WebCore/platform/PasteboardStrategy.h -2 / +2 lines
Lines 37-43 a/Source/WebCore/platform/PasteboardStrategy.h_sec1
37
namespace WebCore {
37
namespace WebCore {
38
38
39
class Color;
39
class Color;
40
class KURL;
40
class URL;
41
    
41
    
42
class PasteboardStrategy {
42
class PasteboardStrategy {
43
public:
43
public:
Lines 55-61 public: a/Source/WebCore/platform/PasteboardStrategy.h_sec2
55
    virtual long changeCount(const String& pasteboardName) = 0;
55
    virtual long changeCount(const String& pasteboardName) = 0;
56
    virtual String uniqueName() = 0;
56
    virtual String uniqueName() = 0;
57
    virtual Color color(const String& pasteboardName) = 0;
57
    virtual Color color(const String& pasteboardName) = 0;
58
    virtual KURL url(const String& pasteboardName) = 0;
58
    virtual URL url(const String& pasteboardName) = 0;
59
    
59
    
60
    virtual long addTypes(const Vector<String>& pasteboardTypes, const String& pasteboardName) = 0;
60
    virtual long addTypes(const Vector<String>& pasteboardTypes, const String& pasteboardName) = 0;
61
    virtual long setTypes(const Vector<String>& pasteboardTypes, const String& pasteboardName) = 0;
61
    virtual long setTypes(const Vector<String>& pasteboardTypes, const String& pasteboardName) = 0;
- a/Source/WebCore/platform/PlatformPasteboard.h -2 / +2 lines
Lines 43-49 OBJC_CLASS UIPasteboard; a/Source/WebCore/platform/PlatformPasteboard.h_sec1
43
namespace WebCore {
43
namespace WebCore {
44
44
45
class Color;
45
class Color;
46
class KURL;
46
class URL;
47
47
48
class PlatformPasteboard {
48
class PlatformPasteboard {
49
public:
49
public:
Lines 60-66 public: a/Source/WebCore/platform/PlatformPasteboard.h_sec2
60
    String stringForType(const String& pasteboardType);
60
    String stringForType(const String& pasteboardType);
61
    long changeCount() const;
61
    long changeCount() const;
62
    Color color();
62
    Color color();
63
    KURL url();
63
    URL url();
64
64
65
    // Take ownership of the pasteboard, and return new change count.
65
    // Take ownership of the pasteboard, and return new change count.
66
    long addTypes(const Vector<String>& pasteboardTypes);
66
    long addTypes(const Vector<String>& pasteboardTypes);
- a/Source/WebCore/platform/SSLKeyGenerator.h -2 / +2 lines
Lines 31-37 a/Source/WebCore/platform/SSLKeyGenerator.h_sec1
31
31
32
namespace WebCore {
32
namespace WebCore {
33
33
34
    class KURL;
34
    class URL;
35
35
36
    // Returns strings representing key sizes that may be used
36
    // Returns strings representing key sizes that may be used
37
    // for the <keygen> tag. The first string is displayed as the default
37
    // for the <keygen> tag. The first string is displayed as the default
Lines 41-47 namespace WebCore { a/Source/WebCore/platform/SSLKeyGenerator.h_sec2
41
    // This function handles the <keygen> tag in form elements.
41
    // This function handles the <keygen> tag in form elements.
42
    // Returns a signed copy of the combined challenge string and public
42
    // Returns a signed copy of the combined challenge string and public
43
    // key (from a newly generated key pair).
43
    // key (from a newly generated key pair).
44
    String signedPublicKeyAndChallengeString(unsigned keySizeIndex, const String& challengeString, const KURL&);
44
    String signedPublicKeyAndChallengeString(unsigned keySizeIndex, const String& challengeString, const URL&);
45
45
46
} // namespace WebCore
46
} // namespace WebCore
47
47
- a/Source/WebCore/platform/VisitedLinkStrategy.h -2 / +2 lines
Lines 30-40 namespace WebCore { a/Source/WebCore/platform/VisitedLinkStrategy.h_sec1
30
30
31
typedef uint64_t LinkHash;
31
typedef uint64_t LinkHash;
32
class Page;
32
class Page;
33
class KURL;
33
class URL;
34
34
35
class VisitedLinkStrategy {
35
class VisitedLinkStrategy {
36
public:
36
public:
37
    virtual bool isLinkVisited(Page*, LinkHash, const KURL& baseURL, const AtomicString& attributeURL) = 0;
37
    virtual bool isLinkVisited(Page*, LinkHash, const URL& baseURL, const AtomicString& attributeURL) = 0;
38
    virtual void addVisitedLink(Page*, LinkHash) = 0;
38
    virtual void addVisitedLink(Page*, LinkHash) = 0;
39
39
40
protected:
40
protected:
- a/Source/WebCore/platform/blackberry/AsyncFileSystemBlackBerry.cpp -15 / +15 lines
Lines 26-36 a/Source/WebCore/platform/blackberry/AsyncFileSystemBlackBerry.cpp_sec1
26
#include "AsyncFileWriterClient.h"
26
#include "AsyncFileWriterClient.h"
27
#include "DOMFileSystemBase.h"
27
#include "DOMFileSystemBase.h"
28
#include "ExceptionCode.h"
28
#include "ExceptionCode.h"
29
#include "KURL.h"
30
#include "NotImplemented.h"
29
#include "NotImplemented.h"
31
#include "PlatformAsyncFileSystemCallbacks.h"
30
#include "PlatformAsyncFileSystemCallbacks.h"
32
#include "ScriptExecutionContext.h"
31
#include "ScriptExecutionContext.h"
33
#include "SecurityOrigin.h"
32
#include "SecurityOrigin.h"
33
#include "URL.h"
34
34
35
#include <wtf/text/CString.h>
35
#include <wtf/text/CString.h>
36
#include <wtf/text/StringBuilder.h>
36
#include <wtf/text/StringBuilder.h>
Lines 58-64 void AsyncFileSystem::openFileSystem(const String& basePath, const String& stora a/Source/WebCore/platform/blackberry/AsyncFileSystemBlackBerry.cpp_sec2
58
    ASSERT_NOT_REACHED();
58
    ASSERT_NOT_REACHED();
59
}
59
}
60
60
61
void AsyncFileSystemBlackBerry::openFileSystem(const KURL& rootURL, const String& basePath, const String& storageIdentifier, FileSystemType type, long long size, bool create, int playerId, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
61
void AsyncFileSystemBlackBerry::openFileSystem(const URL& rootURL, const String& basePath, const String& storageIdentifier, FileSystemType type, long long size, bool create, int playerId, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
62
{
62
{
63
    BlackBerry::Platform::WebFileSystem::openFileSystem(BlackBerry::Platform::webKitThreadMessageClient(), basePath, storageIdentifier, static_cast<BlackBerry::Platform::WebFileSystem::Type>(type), size, create, new PlatformAsyncFileSystemCallbacks(callbacks, rootURL), playerId);
63
    BlackBerry::Platform::WebFileSystem::openFileSystem(BlackBerry::Platform::webKitThreadMessageClient(), basePath, storageIdentifier, static_cast<BlackBerry::Platform::WebFileSystem::Type>(type), size, create, new PlatformAsyncFileSystemCallbacks(callbacks, rootURL), playerId);
64
}
64
}
Lines 78-144 AsyncFileSystemBlackBerry::~AsyncFileSystemBlackBerry() a/Source/WebCore/platform/blackberry/AsyncFileSystemBlackBerry.cpp_sec3
78
{
78
{
79
}
79
}
80
80
81
void AsyncFileSystemBlackBerry::move(const KURL& sourcePath, const KURL& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
81
void AsyncFileSystemBlackBerry::move(const URL& sourcePath, const URL& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
82
{
82
{
83
    m_platformFileSystem->move(fileSystemURLToPath(sourcePath), fileSystemURLToPath(destinationPath), new PlatformAsyncFileSystemCallbacks(callbacks));
83
    m_platformFileSystem->move(fileSystemURLToPath(sourcePath), fileSystemURLToPath(destinationPath), new PlatformAsyncFileSystemCallbacks(callbacks));
84
}
84
}
85
85
86
void AsyncFileSystemBlackBerry::copy(const KURL& sourcePath, const KURL& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
86
void AsyncFileSystemBlackBerry::copy(const URL& sourcePath, const URL& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
87
{
87
{
88
    m_platformFileSystem->copy(fileSystemURLToPath(sourcePath), fileSystemURLToPath(destinationPath), new PlatformAsyncFileSystemCallbacks(callbacks));
88
    m_platformFileSystem->copy(fileSystemURLToPath(sourcePath), fileSystemURLToPath(destinationPath), new PlatformAsyncFileSystemCallbacks(callbacks));
89
}
89
}
90
90
91
void AsyncFileSystemBlackBerry::remove(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
91
void AsyncFileSystemBlackBerry::remove(const URL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
92
{
92
{
93
    m_platformFileSystem->remove(fileSystemURLToPath(path), new PlatformAsyncFileSystemCallbacks(callbacks));
93
    m_platformFileSystem->remove(fileSystemURLToPath(path), new PlatformAsyncFileSystemCallbacks(callbacks));
94
}
94
}
95
95
96
void AsyncFileSystemBlackBerry::removeRecursively(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
96
void AsyncFileSystemBlackBerry::removeRecursively(const URL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
97
{
97
{
98
    m_platformFileSystem->removeRecursively(fileSystemURLToPath(path), new PlatformAsyncFileSystemCallbacks(callbacks));
98
    m_platformFileSystem->removeRecursively(fileSystemURLToPath(path), new PlatformAsyncFileSystemCallbacks(callbacks));
99
}
99
}
100
100
101
void AsyncFileSystemBlackBerry::readMetadata(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
101
void AsyncFileSystemBlackBerry::readMetadata(const URL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
102
{
102
{
103
    m_platformFileSystem->readMetadata(fileSystemURLToPath(path), new PlatformAsyncFileSystemCallbacks(callbacks));
103
    m_platformFileSystem->readMetadata(fileSystemURLToPath(path), new PlatformAsyncFileSystemCallbacks(callbacks));
104
}
104
}
105
105
106
void AsyncFileSystemBlackBerry::createFile(const KURL& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
106
void AsyncFileSystemBlackBerry::createFile(const URL& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
107
{
107
{
108
    m_platformFileSystem->createFile(fileSystemURLToPath(path), exclusive, new PlatformAsyncFileSystemCallbacks(callbacks));
108
    m_platformFileSystem->createFile(fileSystemURLToPath(path), exclusive, new PlatformAsyncFileSystemCallbacks(callbacks));
109
}
109
}
110
110
111
void AsyncFileSystemBlackBerry::createDirectory(const KURL& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
111
void AsyncFileSystemBlackBerry::createDirectory(const URL& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
112
{
112
{
113
    m_platformFileSystem->createDirectory(fileSystemURLToPath(path), exclusive, new PlatformAsyncFileSystemCallbacks(callbacks));
113
    m_platformFileSystem->createDirectory(fileSystemURLToPath(path), exclusive, new PlatformAsyncFileSystemCallbacks(callbacks));
114
}
114
}
115
115
116
void AsyncFileSystemBlackBerry::fileExists(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
116
void AsyncFileSystemBlackBerry::fileExists(const URL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
117
{
117
{
118
    m_platformFileSystem->fileExists(fileSystemURLToPath(path), new PlatformAsyncFileSystemCallbacks(callbacks));
118
    m_platformFileSystem->fileExists(fileSystemURLToPath(path), new PlatformAsyncFileSystemCallbacks(callbacks));
119
}
119
}
120
120
121
void AsyncFileSystemBlackBerry::directoryExists(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
121
void AsyncFileSystemBlackBerry::directoryExists(const URL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
122
{
122
{
123
    m_platformFileSystem->directoryExists(fileSystemURLToPath(path), new PlatformAsyncFileSystemCallbacks(callbacks));
123
    m_platformFileSystem->directoryExists(fileSystemURLToPath(path), new PlatformAsyncFileSystemCallbacks(callbacks));
124
}
124
}
125
125
126
void AsyncFileSystemBlackBerry::readDirectory(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
126
void AsyncFileSystemBlackBerry::readDirectory(const URL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
127
{
127
{
128
    m_platformFileSystem->readDirectory(fileSystemURLToPath(path), new PlatformAsyncFileSystemCallbacks(callbacks));
128
    m_platformFileSystem->readDirectory(fileSystemURLToPath(path), new PlatformAsyncFileSystemCallbacks(callbacks));
129
}
129
}
130
130
131
void AsyncFileSystemBlackBerry::createWriter(AsyncFileWriterClient* client, const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
131
void AsyncFileSystemBlackBerry::createWriter(AsyncFileWriterClient* client, const URL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
132
{
132
{
133
    BlackBerry::Platform::WebFileWriter::createWriter(m_platformFileSystem.get(), fileSystemURLToPath(path), new PlatformAsyncFileSystemCallbacks(callbacks, client));
133
    BlackBerry::Platform::WebFileWriter::createWriter(m_platformFileSystem.get(), fileSystemURLToPath(path), new PlatformAsyncFileSystemCallbacks(callbacks, client));
134
}
134
}
135
135
136
void AsyncFileSystemBlackBerry::createSnapshotFileAndReadMetadata(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
136
void AsyncFileSystemBlackBerry::createSnapshotFileAndReadMetadata(const URL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
137
{
137
{
138
    m_platformFileSystem->createSnapshotFileAndReadMetadata(fileSystemURLToPath(path), new PlatformAsyncFileSystemCallbacks(callbacks));
138
    m_platformFileSystem->createSnapshotFileAndReadMetadata(fileSystemURLToPath(path), new PlatformAsyncFileSystemCallbacks(callbacks));
139
}
139
}
140
140
141
String AsyncFileSystemBlackBerry::fileSystemURLToPath(const KURL& url)
141
String AsyncFileSystemBlackBerry::fileSystemURLToPath(const URL& url)
142
{
142
{
143
    FileSystemType type;
143
    FileSystemType type;
144
    String fullPath;
144
    String fullPath;
- a/Source/WebCore/platform/blackberry/AsyncFileSystemBlackBerry.h -15 / +15 lines
Lines 23-29 a/Source/WebCore/platform/blackberry/AsyncFileSystemBlackBerry.h_sec1
23
#if ENABLE(FILE_SYSTEM)
23
#if ENABLE(FILE_SYSTEM)
24
#include "AsyncFileSystem.h"
24
#include "AsyncFileSystem.h"
25
#include "FileSystemType.h"
25
#include "FileSystemType.h"
26
#include "KURL.h"
26
#include "URL.h"
27
27
28
#include <BlackBerryPlatformWebFileSystem.h>
28
#include <BlackBerryPlatformWebFileSystem.h>
29
#include <wtf/OwnPtr.h>
29
#include <wtf/OwnPtr.h>
Lines 48-71 public: a/Source/WebCore/platform/blackberry/AsyncFileSystemBlackBerry.h_sec2
48
        return adoptPtr(new AsyncFileSystemBlackBerry(platformFileSystem));
48
        return adoptPtr(new AsyncFileSystemBlackBerry(platformFileSystem));
49
    }
49
    }
50
50
51
    static void openFileSystem(const KURL& rootURL, const String& basePath, const String& storageIdentifier, FileSystemType, long long size, bool create, int playerId, PassOwnPtr<AsyncFileSystemCallbacks>);
51
    static void openFileSystem(const URL& rootURL, const String& basePath, const String& storageIdentifier, FileSystemType, long long size, bool create, int playerId, PassOwnPtr<AsyncFileSystemCallbacks>);
52
    virtual ~AsyncFileSystemBlackBerry();
52
    virtual ~AsyncFileSystemBlackBerry();
53
    virtual void move(const KURL& sourcePath, const KURL& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks>);
53
    virtual void move(const URL& sourcePath, const URL& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks>);
54
    virtual void copy(const KURL& sourcePath, const KURL& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks>);
54
    virtual void copy(const URL& sourcePath, const URL& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks>);
55
    virtual void remove(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks>);
55
    virtual void remove(const URL& path, PassOwnPtr<AsyncFileSystemCallbacks>);
56
    virtual void removeRecursively(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks>);
56
    virtual void removeRecursively(const URL& path, PassOwnPtr<AsyncFileSystemCallbacks>);
57
    virtual void readMetadata(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks>);
57
    virtual void readMetadata(const URL& path, PassOwnPtr<AsyncFileSystemCallbacks>);
58
    virtual void createFile(const KURL& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks>);
58
    virtual void createFile(const URL& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks>);
59
    virtual void createDirectory(const KURL& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks>);
59
    virtual void createDirectory(const URL& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks>);
60
    virtual void fileExists(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks>);
60
    virtual void fileExists(const URL& path, PassOwnPtr<AsyncFileSystemCallbacks>);
61
    virtual void directoryExists(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks>);
61
    virtual void directoryExists(const URL& path, PassOwnPtr<AsyncFileSystemCallbacks>);
62
    virtual void readDirectory(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks>);
62
    virtual void readDirectory(const URL& path, PassOwnPtr<AsyncFileSystemCallbacks>);
63
    virtual void createWriter(AsyncFileWriterClient*, const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks>);
63
    virtual void createWriter(AsyncFileWriterClient*, const URL& path, PassOwnPtr<AsyncFileSystemCallbacks>);
64
    virtual void createSnapshotFileAndReadMetadata(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks>);
64
    virtual void createSnapshotFileAndReadMetadata(const URL& path, PassOwnPtr<AsyncFileSystemCallbacks>);
65
65
66
protected:
66
protected:
67
    AsyncFileSystemBlackBerry(PassOwnPtr<BlackBerry::Platform::WebFileSystem> platformFileSystem);
67
    AsyncFileSystemBlackBerry(PassOwnPtr<BlackBerry::Platform::WebFileSystem> platformFileSystem);
68
    static String fileSystemURLToPath(const KURL&);
68
    static String fileSystemURLToPath(const URL&);
69
69
70
    OwnPtr<BlackBerry::Platform::WebFileSystem> m_platformFileSystem;
70
    OwnPtr<BlackBerry::Platform::WebFileSystem> m_platformFileSystem;
71
};
71
};
- a/Source/WebCore/platform/blackberry/AuthenticationChallengeManager.cpp -6 / +6 lines
Lines 20-26 a/Source/WebCore/platform/blackberry/AuthenticationChallengeManager.cpp_sec1
20
#include "AuthenticationChallengeManager.h"
20
#include "AuthenticationChallengeManager.h"
21
21
22
#include "Credential.h"
22
#include "Credential.h"
23
#include "KURL.h"
23
#include "URL.h"
24
#include "PageClientBlackBerry.h"
24
#include "PageClientBlackBerry.h"
25
#include "ProtectionSpace.h"
25
#include "ProtectionSpace.h"
26
26
Lines 37-45 namespace WebCore { a/Source/WebCore/platform/blackberry/AuthenticationChallengeManager.cpp_sec2
37
typedef HashMap<PageClientBlackBerry*, bool> PageVisibilityMap;
37
typedef HashMap<PageClientBlackBerry*, bool> PageVisibilityMap;
38
38
39
struct ChallengeInfo {
39
struct ChallengeInfo {
40
    ChallengeInfo(const KURL&, const ProtectionSpace&, const Credential&, AuthenticationChallengeClient*, PageClientBlackBerry*);
40
    ChallengeInfo(const URL&, const ProtectionSpace&, const Credential&, AuthenticationChallengeClient*, PageClientBlackBerry*);
41
41
42
    KURL url;
42
    URL url;
43
    ProtectionSpace space;
43
    ProtectionSpace space;
44
    Credential credential;
44
    Credential credential;
45
    AuthenticationChallengeClient* authClient;
45
    AuthenticationChallengeClient* authClient;
Lines 47-53 struct ChallengeInfo { a/Source/WebCore/platform/blackberry/AuthenticationChallengeManager.cpp_sec3
47
    bool blocked;
47
    bool blocked;
48
};
48
};
49
49
50
ChallengeInfo::ChallengeInfo(const KURL& aUrl, const ProtectionSpace& aSpace, const Credential& aCredential,
50
ChallengeInfo::ChallengeInfo(const URL& aUrl, const ProtectionSpace& aSpace, const Credential& aCredential,
51
    AuthenticationChallengeClient* anAuthClient, PageClientBlackBerry* aPageClient)
51
    AuthenticationChallengeClient* anAuthClient, PageClientBlackBerry* aPageClient)
52
    : url(aUrl)
52
    : url(aUrl)
53
    , space(aSpace)
53
    , space(aSpace)
Lines 153-159 void AuthenticationChallengeManager::pageVisibilityChanged(PageClientBlackBerry* a/Source/WebCore/platform/blackberry/AuthenticationChallengeManager.cpp_sec4
153
    d->resumeAuthenticationChallenge(client);
153
    d->resumeAuthenticationChallenge(client);
154
}
154
}
155
155
156
void AuthenticationChallengeManager::authenticationChallenge(const KURL& url, const ProtectionSpace& space,
156
void AuthenticationChallengeManager::authenticationChallenge(const URL& url, const ProtectionSpace& space,
157
    const Credential& credential, AuthenticationChallengeClient* authClient, PageClientBlackBerry* pageClient)
157
    const Credential& credential, AuthenticationChallengeClient* authClient, PageClientBlackBerry* pageClient)
158
{
158
{
159
    BLACKBERRY_ASSERT(authClient);
159
    BLACKBERRY_ASSERT(authClient);
Lines 196-202 void AuthenticationChallengeManager::cancelAuthenticationChallenge(Authenticatio a/Source/WebCore/platform/blackberry/AuthenticationChallengeManager.cpp_sec5
196
        d->startAuthenticationChallenge(next);
196
        d->startAuthenticationChallenge(next);
197
}
197
}
198
198
199
void AuthenticationChallengeManager::notifyChallengeResult(const KURL&, const ProtectionSpace& space,
199
void AuthenticationChallengeManager::notifyChallengeResult(const URL&, const ProtectionSpace& space,
200
    AuthenticationChallengeResult result, const Credential& credential)
200
    AuthenticationChallengeResult result, const Credential& credential)
201
{
201
{
202
    d->m_activeChallenge = 0;
202
    d->m_activeChallenge = 0;
- a/Source/WebCore/platform/blackberry/AuthenticationChallengeManager.h -4 / +4 lines
Lines 28-34 namespace WebCore { a/Source/WebCore/platform/blackberry/AuthenticationChallengeManager.h_sec1
28
28
29
class AuthenticationChallengeManagerPrivate;
29
class AuthenticationChallengeManagerPrivate;
30
class Credential;
30
class Credential;
31
class KURL;
31
class URL;
32
class ProtectionSpace;
32
class ProtectionSpace;
33
33
34
enum AuthenticationChallengeResult {
34
enum AuthenticationChallengeResult {
Lines 38-44 enum AuthenticationChallengeResult { a/Source/WebCore/platform/blackberry/AuthenticationChallengeManager.h_sec2
38
38
39
class AuthenticationChallengeClient {
39
class AuthenticationChallengeClient {
40
public:
40
public:
41
    virtual void notifyChallengeResult(const KURL&, const ProtectionSpace&, AuthenticationChallengeResult, const Credential&) = 0;
41
    virtual void notifyChallengeResult(const URL&, const ProtectionSpace&, AuthenticationChallengeResult, const Credential&) = 0;
42
};
42
};
43
43
44
class AuthenticationChallengeManager : public BlackBerry::Platform::ThreadUnsafeSingleton<AuthenticationChallengeManager> {
44
class AuthenticationChallengeManager : public BlackBerry::Platform::ThreadUnsafeSingleton<AuthenticationChallengeManager> {
Lines 48-56 public: a/Source/WebCore/platform/blackberry/AuthenticationChallengeManager.h_sec3
48
    void pageDeleted(PageClientBlackBerry*);
48
    void pageDeleted(PageClientBlackBerry*);
49
    void pageVisibilityChanged(PageClientBlackBerry*, bool visible);
49
    void pageVisibilityChanged(PageClientBlackBerry*, bool visible);
50
50
51
    void authenticationChallenge(const KURL&, const ProtectionSpace&, const Credential&, AuthenticationChallengeClient*, PageClientBlackBerry*);
51
    void authenticationChallenge(const URL&, const ProtectionSpace&, const Credential&, AuthenticationChallengeClient*, PageClientBlackBerry*);
52
    void cancelAuthenticationChallenge(AuthenticationChallengeClient*);
52
    void cancelAuthenticationChallenge(AuthenticationChallengeClient*);
53
    void notifyChallengeResult(const KURL&, const ProtectionSpace&, AuthenticationChallengeResult, const Credential&);
53
    void notifyChallengeResult(const URL&, const ProtectionSpace&, AuthenticationChallengeResult, const Credential&);
54
54
55
private:
55
private:
56
    AuthenticationChallengeManager();
56
    AuthenticationChallengeManager();
- a/Source/WebCore/platform/blackberry/CookieManager.cpp -7 / +7 lines
Lines 124-130 static bool shouldIgnoreScheme(const String& protocol) a/Source/WebCore/platform/blackberry/CookieManager.cpp_sec1
124
    return protocol == "file" || protocol == "local";
124
    return protocol == "file" || protocol == "local";
125
}
125
}
126
126
127
void CookieManager::setCookies(const KURL& url, const String& value, CookieFilter filter)
127
void CookieManager::setCookies(const URL& url, const String& value, CookieFilter filter)
128
{
128
{
129
    // If the database hasn't been sync-ed at this point, force a sync load
129
    // If the database hasn't been sync-ed at this point, force a sync load
130
    if (!m_syncedWithDatabase && !m_privateMode)
130
    if (!m_syncedWithDatabase && !m_privateMode)
Lines 140-146 void CookieManager::setCookies(const KURL& url, const String& value, CookieFilte a/Source/WebCore/platform/blackberry/CookieManager.cpp_sec2
140
    }
140
    }
141
}
141
}
142
142
143
void CookieManager::setCookies(const KURL& url, const Vector<String>& cookies, CookieFilter filter)
143
void CookieManager::setCookies(const URL& url, const Vector<String>& cookies, CookieFilter filter)
144
{
144
{
145
    // If the database hasn't been sync-ed at this point, force a sync load
145
    // If the database hasn't been sync-ed at this point, force a sync load
146
    if (!m_syncedWithDatabase && !m_privateMode)
146
    if (!m_syncedWithDatabase && !m_privateMode)
Lines 155-161 void CookieManager::setCookies(const KURL& url, const Vector<String>& cookies, C a/Source/WebCore/platform/blackberry/CookieManager.cpp_sec3
155
    }
155
    }
156
}
156
}
157
157
158
String CookieManager::getCookie(const KURL& url, CookieFilter filter) const
158
String CookieManager::getCookie(const URL& url, CookieFilter filter) const
159
{
159
{
160
    // If the database hasn't been sync-ed at this point, force a sync load
160
    // If the database hasn't been sync-ed at this point, force a sync load
161
    if (!m_syncedWithDatabase && !m_privateMode)
161
    if (!m_syncedWithDatabase && !m_privateMode)
Lines 223-229 String CookieManager::generateHtmlFragmentForCookies() a/Source/WebCore/platform/blackberry/CookieManager.cpp_sec4
223
    return result;
223
    return result;
224
}
224
}
225
225
226
void CookieManager::getRawCookies(Vector<RefPtr<ParsedCookie> > &stackOfCookies, const KURL& requestURL, CookieFilter filter) const
226
void CookieManager::getRawCookies(Vector<RefPtr<ParsedCookie> > &stackOfCookies, const URL& requestURL, CookieFilter filter) const
227
{
227
{
228
    // Force a sync load of the database
228
    // Force a sync load of the database
229
    if (!m_syncedWithDatabase && !m_privateMode)
229
    if (!m_syncedWithDatabase && !m_privateMode)
Lines 589-601 CookieMap* CookieManager::findOrCreateCookieMap(CookieMap* protocolMap, const Pa a/Source/WebCore/platform/blackberry/CookieManager.cpp_sec5
589
    return curMap;
589
    return curMap;
590
}
590
}
591
591
592
void CookieManager::removeCookieWithName(const KURL& url, const String& cookieName)
592
void CookieManager::removeCookieWithName(const URL& url, const String& cookieName)
593
{
593
{
594
    // Dispatch the message because the database cookies are not loaded in memory yet.
594
    // Dispatch the message because the database cookies are not loaded in memory yet.
595
    if (!m_syncedWithDatabase && !m_privateMode) {
595
    if (!m_syncedWithDatabase && !m_privateMode) {
596
        typedef void (WebCore::CookieManager::*FunctionType)(const KURL&, const String&);
596
        typedef void (WebCore::CookieManager::*FunctionType)(const URL&, const String&);
597
        BlackBerry::Platform::webKitThreadMessageClient()->dispatchMessage(
597
        BlackBerry::Platform::webKitThreadMessageClient()->dispatchMessage(
598
            BlackBerry::Platform::createMethodCallMessage<FunctionType, CookieManager, const KURL, const String>(
598
            BlackBerry::Platform::createMethodCallMessage<FunctionType, CookieManager, const URL, const String>(
599
                &CookieManager::removeCookieWithName, this, url, cookieName));
599
                &CookieManager::removeCookieWithName, this, url, cookieName));
600
        return;
600
        return;
601
    }
601
    }
- a/Source/WebCore/platform/blackberry/CookieManager.h -6 / +6 lines
Lines 37-43 a/Source/WebCore/platform/blackberry/CookieManager.h_sec1
37
namespace WebCore {
37
namespace WebCore {
38
38
39
class CookieDatabaseBackingStore;
39
class CookieDatabaseBackingStore;
40
class KURL;
40
class URL;
41
41
42
enum BackingStoreRemovalPolicy {
42
enum BackingStoreRemovalPolicy {
43
    RemoveFromBackingStore,
43
    RemoveFromBackingStore,
Lines 70-80 public: a/Source/WebCore/platform/blackberry/CookieManager.h_sec2
70
    bool canLocalAccessAllCookies() const { return m_shouldDumpAllCookies; }
70
    bool canLocalAccessAllCookies() const { return m_shouldDumpAllCookies; }
71
    void setCanLocalAccessAllCookies(bool enabled) { m_shouldDumpAllCookies = enabled; }
71
    void setCanLocalAccessAllCookies(bool enabled) { m_shouldDumpAllCookies = enabled; }
72
72
73
    void setCookies(const KURL&, const String& value, CookieFilter = WithHttpOnlyCookies);
73
    void setCookies(const URL&, const String& value, CookieFilter = WithHttpOnlyCookies);
74
    void setCookies(const KURL&, const Vector<String>& cookies, CookieFilter);
74
    void setCookies(const URL&, const Vector<String>& cookies, CookieFilter);
75
75
76
    void removeAllCookies(BackingStoreRemovalPolicy);
76
    void removeAllCookies(BackingStoreRemovalPolicy);
77
    void removeCookieWithName(const KURL&, const String& cookieName);
77
    void removeCookieWithName(const URL&, const String& cookieName);
78
78
79
    unsigned short cookiesCount() const { return m_count; }
79
    unsigned short cookiesCount() const { return m_count; }
80
80
Lines 96-105 public: a/Source/WebCore/platform/blackberry/CookieManager.h_sec3
96
    void setPrivateMode(bool);
96
    void setPrivateMode(bool);
97
97
98
    String generateHtmlFragmentForCookies();
98
    String generateHtmlFragmentForCookies();
99
    String getCookie(const KURL& requestURL, CookieFilter) const;
99
    String getCookie(const URL& requestURL, CookieFilter) const;
100
100
101
    // Returns all cookies that are associated with the specified URL as raw cookies.
101
    // Returns all cookies that are associated with the specified URL as raw cookies.
102
    void getRawCookies(Vector<RefPtr<ParsedCookie> >& stackOfCookies, const KURL& requestURL, CookieFilter = WithHttpOnlyCookies) const;
102
    void getRawCookies(Vector<RefPtr<ParsedCookie> >& stackOfCookies, const URL& requestURL, CookieFilter = WithHttpOnlyCookies) const;
103
103
104
private:
104
private:
105
    friend CookieManager& cookieManager();
105
    friend CookieManager& cookieManager();
- a/Source/WebCore/platform/blackberry/CookieParser.cpp -2 / +2 lines
Lines 52-58 static inline bool isLightweightSpace(UChar c) a/Source/WebCore/platform/blackberry/CookieParser.cpp_sec1
52
    return (c == ' ' || c == '\t');
52
    return (c == ' ' || c == '\t');
53
}
53
}
54
54
55
CookieParser::CookieParser(const KURL& defaultCookieURL)
55
CookieParser::CookieParser(const URL& defaultCookieURL)
56
    : m_defaultCookieURL(defaultCookieURL)
56
    : m_defaultCookieURL(defaultCookieURL)
57
{
57
{
58
    m_defaultCookieHost = defaultCookieURL.host();
58
    m_defaultCookieHost = defaultCookieURL.host();
Lines 237-243 PassRefPtr<ParsedCookie> CookieParser::parseOneCookie(const String& cookie, unsi a/Source/WebCore/platform/blackberry/CookieParser.cpp_sec2
237
        case 'P':
237
        case 'P':
238
        case 'p' : {
238
        case 'p' : {
239
            if (length >= 4 && ((cookie.find("ath", tokenStartSvg + 1, false) - tokenStartSvg) == 1)) {
239
            if (length >= 4 && ((cookie.find("ath", tokenStartSvg + 1, false) - tokenStartSvg) == 1)) {
240
                // We need the path to be decoded to match those returned from KURL::path().
240
                // We need the path to be decoded to match those returned from URL::path().
241
                // The path attribute may or may not include percent-encoded characters. Fortunately
241
                // The path attribute may or may not include percent-encoded characters. Fortunately
242
                // if there are no percent-encoded characters, decoding the url is a no-op.
242
                // if there are no percent-encoded characters, decoding the url is a no-op.
243
                res->setPath(decodeURLEscapeSequences(parsedValue));
243
                res->setPath(decodeURLEscapeSequences(parsedValue));
- a/Source/WebCore/platform/blackberry/CookieParser.h -3 / +3 lines
Lines 27-33 a/Source/WebCore/platform/blackberry/CookieParser.h_sec1
27
#ifndef CookieParser_h
27
#ifndef CookieParser_h
28
#define CookieParser_h
28
#define CookieParser_h
29
29
30
#include "KURL.h"
30
#include "URL.h"
31
#include <wtf/Vector.h>
31
#include <wtf/Vector.h>
32
32
33
namespace WTF {
33
namespace WTF {
Lines 39-45 class ParsedCookie; a/Source/WebCore/platform/blackberry/CookieParser.h_sec2
39
39
40
class CookieParser {
40
class CookieParser {
41
public:
41
public:
42
    CookieParser(const KURL& defaultCookieURL);
42
    CookieParser(const URL& defaultCookieURL);
43
    ~CookieParser();
43
    ~CookieParser();
44
44
45
    // Parses a sequence of "Cookie:" header and return the parsed cookies.
45
    // Parses a sequence of "Cookie:" header and return the parsed cookies.
Lines 51-57 private: a/Source/WebCore/platform/blackberry/CookieParser.h_sec3
51
    // FIXME: curTime, start, end parameters should be removed. And this method can be public.
51
    // FIXME: curTime, start, end parameters should be removed. And this method can be public.
52
    PassRefPtr<ParsedCookie> parseOneCookie(const String& cookie, unsigned start, unsigned end, double curTime);
52
    PassRefPtr<ParsedCookie> parseOneCookie(const String& cookie, unsigned start, unsigned end, double curTime);
53
53
54
    KURL m_defaultCookieURL;
54
    URL m_defaultCookieURL;
55
    String m_defaultCookieHost;
55
    String m_defaultCookieHost;
56
    bool m_defaultDomainIsIPAddress;
56
    bool m_defaultDomainIsIPAddress;
57
};
57
};
- a/Source/WebCore/platform/blackberry/DOMFileSystemBlackBerry.cpp -3 / +3 lines
Lines 29-35 a/Source/WebCore/platform/blackberry/DOMFileSystemBlackBerry.cpp_sec1
29
29
30
namespace WebCore {
30
namespace WebCore {
31
31
32
KURL DOMFileSystemBase::createFileSystemURL(const String& fullPath) const
32
URL DOMFileSystemBase::createFileSystemURL(const String& fullPath) const
33
{
33
{
34
    ASSERT(DOMFilePath::isAbsolute(fullPath));
34
    ASSERT(DOMFilePath::isAbsolute(fullPath));
35
35
Lines 38-44 KURL DOMFileSystemBase::createFileSystemURL(const String& fullPath) const a/Source/WebCore/platform/blackberry/DOMFileSystemBlackBerry.cpp_sec2
38
    return m_context->completeURL(m_filesystemRootURL.string() + encodeWithURLEscapeSequences(fullPath));
38
    return m_context->completeURL(m_filesystemRootURL.string() + encodeWithURLEscapeSequences(fullPath));
39
}
39
}
40
40
41
bool DOMFileSystemBase::crackFileSystemURL(const KURL& url, FileSystemType& type, String& filePath)
41
bool DOMFileSystemBase::crackFileSystemURL(const URL& url, FileSystemType& type, String& filePath)
42
{
42
{
43
    if (!url.protocolIs("filesystem"))
43
    if (!url.protocolIs("filesystem"))
44
        return false;
44
        return false;
Lines 54-60 bool DOMFileSystemBase::crackFileSystemURL(const KURL& url, FileSystemType& type a/Source/WebCore/platform/blackberry/DOMFileSystemBlackBerry.cpp_sec3
54
54
55
        filePath = decodeURLEscapeSequences(url.path());
55
        filePath = decodeURLEscapeSequences(url.path());
56
    } else {
56
    } else {
57
        KURL originURL(ParsedURLString, url.path());
57
        URL originURL(ParsedURLString, url.path());
58
        String path = decodeURLEscapeSequences(originURL.path());
58
        String path = decodeURLEscapeSequences(originURL.path());
59
        if (path.isEmpty() || path[0] != '/')
59
        if (path.isEmpty() || path[0] != '/')
60
            return false;
60
            return false;
- a/Source/WebCore/platform/blackberry/LocalFileSystemBlackBerry.cpp -3 / +3 lines
Lines 34-40 a/Source/WebCore/platform/blackberry/LocalFileSystemBlackBerry.cpp_sec1
34
#include "FileSystemCallback.h"
34
#include "FileSystemCallback.h"
35
#include "FileSystemCallbacks.h"
35
#include "FileSystemCallbacks.h"
36
#include "FileSystemType.h"
36
#include "FileSystemType.h"
37
#include "KURL.h"
37
#include "URL.h"
38
#include "Page.h"
38
#include "Page.h"
39
#include "PageClientBlackBerry.h"
39
#include "PageClientBlackBerry.h"
40
#include "SecurityOrigin.h"
40
#include "SecurityOrigin.h"
Lines 76-82 static void openFileSystem(ScriptExecutionContext* context, const String& basePa a/Source/WebCore/platform/blackberry/LocalFileSystemBlackBerry.cpp_sec2
76
    if (type == FileSystemTypeIsolated)
76
    if (type == FileSystemTypeIsolated)
77
        return;
77
        return;
78
78
79
    KURL url = context->url();
79
    URL url = context->url();
80
    if (url.hasFragmentIdentifier())
80
    if (url.hasFragmentIdentifier())
81
        url.removeFragmentIdentifier();
81
        url.removeFragmentIdentifier();
82
    url.setQuery(String());
82
    url.setQuery(String());
Lines 85-91 static void openFileSystem(ScriptExecutionContext* context, const String& basePa a/Source/WebCore/platform/blackberry/LocalFileSystemBlackBerry.cpp_sec3
85
    builder.append("filesystem:");
85
    builder.append("filesystem:");
86
    builder.append(url.string());
86
    builder.append(url.string());
87
    builder.append(fileSystemTypeString(type));
87
    builder.append(fileSystemTypeString(type));
88
    KURL rootURL = context->completeURL(builder.toString());
88
    URL rootURL = context->completeURL(builder.toString());
89
    ASSERT(rootURL.isValid());
89
    ASSERT(rootURL.isValid());
90
90
91
    // TODO: Ask user for file system permission.
91
    // TODO: Ask user for file system permission.
- a/Source/WebCore/platform/blackberry/PageClientBlackBerry.h -2 / +2 lines
Lines 36-42 class AuthenticationChallengeClient; a/Source/WebCore/platform/blackberry/PageClientBlackBerry.h_sec1
36
class Credential;
36
class Credential;
37
class IntRect;
37
class IntRect;
38
class IntSize;
38
class IntSize;
39
class KURL;
39
class URL;
40
class PluginView;
40
class PluginView;
41
class ProtectionSpace;
41
class ProtectionSpace;
42
}
42
}
Lines 72-78 public: a/Source/WebCore/platform/blackberry/PageClientBlackBerry.h_sec2
72
    virtual int showAlertDialog(BlackBerry::WebKit::WebPageClient::AlertType) = 0;
72
    virtual int showAlertDialog(BlackBerry::WebKit::WebPageClient::AlertType) = 0;
73
    virtual bool isActive() const = 0;
73
    virtual bool isActive() const = 0;
74
    virtual bool isVisible() const = 0;
74
    virtual bool isVisible() const = 0;
75
    virtual void authenticationChallenge(const WebCore::KURL&, const WebCore::ProtectionSpace&, const WebCore::Credential&) = 0;
75
    virtual void authenticationChallenge(const WebCore::URL&, const WebCore::ProtectionSpace&, const WebCore::Credential&) = 0;
76
    virtual SaveCredentialType notifyShouldSaveCredential(bool) = 0;
76
    virtual SaveCredentialType notifyShouldSaveCredential(bool) = 0;
77
    virtual void syncProxyCredential(const WebCore::Credential&) = 0;
77
    virtual void syncProxyCredential(const WebCore::Credential&) = 0;
78
};
78
};
- a/Source/WebCore/platform/blackberry/ParsedCookie.cpp -1 / +1 lines
Lines 28-34 a/Source/WebCore/platform/blackberry/ParsedCookie.cpp_sec1
28
#include "ParsedCookie.h"
28
#include "ParsedCookie.h"
29
29
30
#include "CookieManager.h"
30
#include "CookieManager.h"
31
#include "KURL.h"
31
#include "URL.h"
32
#include "Logging.h"
32
#include "Logging.h"
33
#include <curl/curl.h>
33
#include <curl/curl.h>
34
#include <wtf/CurrentTime.h>
34
#include <wtf/CurrentTime.h>
- a/Source/WebCore/platform/blackberry/ParsedCookie.h -1 / +1 lines
Lines 37-43 class String; a/Source/WebCore/platform/blackberry/ParsedCookie.h_sec1
37
}
37
}
38
namespace WebCore {
38
namespace WebCore {
39
39
40
class KURL;
40
class URL;
41
41
42
// This class represents a cookie internally
42
// This class represents a cookie internally
43
// It can either be created by the CookieParser which will then fill it
43
// It can either be created by the CookieParser which will then fill it
- a/Source/WebCore/platform/blackberry/PasteboardBlackBerry.cpp -2 / +2 lines
Lines 21-27 a/Source/WebCore/platform/blackberry/PasteboardBlackBerry.cpp_sec1
21
21
22
#include "DocumentFragment.h"
22
#include "DocumentFragment.h"
23
#include "Frame.h"
23
#include "Frame.h"
24
#include "KURL.h"
24
#include "URL.h"
25
#include "NotImplemented.h"
25
#include "NotImplemented.h"
26
#include "Range.h"
26
#include "Range.h"
27
#include "markup.h"
27
#include "markup.h"
Lines 45-51 void Pasteboard::clear() a/Source/WebCore/platform/blackberry/PasteboardBlackBerry.cpp_sec2
45
    BlackBerry::Platform::Clipboard::clearClipboard();
45
    BlackBerry::Platform::Clipboard::clearClipboard();
46
}
46
}
47
47
48
void Pasteboard::writeImage(Node*, KURL const&, String const&)
48
void Pasteboard::writeImage(Node*, URL const&, String const&)
49
{
49
{
50
    notImplemented();
50
    notImplemented();
51
}
51
}
- a/Source/WebCore/platform/blackberry/PlatformAsyncFileSystemCallbacks.h -3 / +3 lines
Lines 22-28 a/Source/WebCore/platform/blackberry/PlatformAsyncFileSystemCallbacks.h_sec1
22
22
23
#if ENABLE(FILE_SYSTEM)
23
#if ENABLE(FILE_SYSTEM)
24
#include "AsyncFileSystemCallbacks.h"
24
#include "AsyncFileSystemCallbacks.h"
25
#include "KURL.h"
25
#include "URL.h"
26
26
27
#include <BlackBerryPlatformWebFileSystem.h>
27
#include <BlackBerryPlatformWebFileSystem.h>
28
#include <wtf/OwnPtr.h>
28
#include <wtf/OwnPtr.h>
Lines 39-45 class AsyncFileWriterClient; a/Source/WebCore/platform/blackberry/PlatformAsyncFileSystemCallbacks.h_sec2
39
39
40
class PlatformAsyncFileSystemCallbacks: public BlackBerry::Platform::WebFileSystemCallbacks {
40
class PlatformAsyncFileSystemCallbacks: public BlackBerry::Platform::WebFileSystemCallbacks {
41
public:
41
public:
42
    PlatformAsyncFileSystemCallbacks(PassOwnPtr<AsyncFileSystemCallbacks> callbacks, const KURL& rootURL = KURL())
42
    PlatformAsyncFileSystemCallbacks(PassOwnPtr<AsyncFileSystemCallbacks> callbacks, const URL& rootURL = URL())
43
        : m_callbacks(callbacks)
43
        : m_callbacks(callbacks)
44
        , m_writerClient(0)
44
        , m_writerClient(0)
45
        , m_rootURL(rootURL)
45
        , m_rootURL(rootURL)
Lines 70-76 protected: a/Source/WebCore/platform/blackberry/PlatformAsyncFileSystemCallbacks.h_sec3
70
    AsyncFileWriterClient* m_writerClient;
70
    AsyncFileWriterClient* m_writerClient;
71
71
72
private:
72
private:
73
    KURL m_rootURL;
73
    URL m_rootURL;
74
};
74
};
75
75
76
} // namespace WebCore
76
} // namespace WebCore
- a/Source/WebCore/platform/blackberry/SSLKeyGeneratorBlackBerry.cpp -2 / +2 lines
Lines 19-25 a/Source/WebCore/platform/blackberry/SSLKeyGeneratorBlackBerry.cpp_sec1
19
#include "config.h"
19
#include "config.h"
20
#include "SSLKeyGenerator.h"
20
#include "SSLKeyGenerator.h"
21
21
22
#include "KURL.h"
22
#include "URL.h"
23
#include "NotImplemented.h"
23
#include "NotImplemented.h"
24
#include <wtf/Vector.h>
24
#include <wtf/Vector.h>
25
#include <wtf/text/WTFString.h>
25
#include <wtf/text/WTFString.h>
Lines 31-37 void getSupportedKeySizes(Vector<String>&) a/Source/WebCore/platform/blackberry/SSLKeyGeneratorBlackBerry.cpp_sec2
31
    notImplemented();
31
    notImplemented();
32
}
32
}
33
33
34
String signedPublicKeyAndChallengeString(unsigned, String const&, KURL const&)
34
String signedPublicKeyAndChallengeString(unsigned, String const&, URL const&)
35
{
35
{
36
    notImplemented();
36
    notImplemented();
37
    return String();
37
    return String();
- a/Source/WebCore/platform/blackberry/WorkerAsyncFileSystemBlackBerry.cpp -25 / +25 lines
Lines 69-135 void WorkerAsyncFileSystemBlackBerry::deleteFileSystemOnMainThread(ScriptExecuti a/Source/WebCore/platform/blackberry/WorkerAsyncFileSystemBlackBerry.cpp_sec1
69
    WebFileSystem::deleteFileSystem(webKitThreadMessageClient(), basePath, storageIdentifier, static_cast<WebFileSystem::Type>(type), callbacks);
69
    WebFileSystem::deleteFileSystem(webKitThreadMessageClient(), basePath, storageIdentifier, static_cast<WebFileSystem::Type>(type), callbacks);
70
}
70
}
71
71
72
void WorkerAsyncFileSystemBlackBerry::moveOnMainThread(ScriptExecutionContext*, WebFileSystem* platformFileSystem, const KURL& sourcePath, const KURL& destinationPath, WorkerPlatformAsyncFileSystemCallbacks* callbacks)
72
void WorkerAsyncFileSystemBlackBerry::moveOnMainThread(ScriptExecutionContext*, WebFileSystem* platformFileSystem, const URL& sourcePath, const URL& destinationPath, WorkerPlatformAsyncFileSystemCallbacks* callbacks)
73
{
73
{
74
    platformFileSystem->move(fileSystemURLToPath(sourcePath), fileSystemURLToPath(destinationPath), callbacks);
74
    platformFileSystem->move(fileSystemURLToPath(sourcePath), fileSystemURLToPath(destinationPath), callbacks);
75
}
75
}
76
76
77
void WorkerAsyncFileSystemBlackBerry::copyOnMainThread(ScriptExecutionContext*, WebFileSystem* platformFileSystem, const KURL& sourcePath, const KURL& destinationPath, WorkerPlatformAsyncFileSystemCallbacks* callbacks)
77
void WorkerAsyncFileSystemBlackBerry::copyOnMainThread(ScriptExecutionContext*, WebFileSystem* platformFileSystem, const URL& sourcePath, const URL& destinationPath, WorkerPlatformAsyncFileSystemCallbacks* callbacks)
78
{
78
{
79
    platformFileSystem->copy(fileSystemURLToPath(sourcePath), fileSystemURLToPath(destinationPath), callbacks);
79
    platformFileSystem->copy(fileSystemURLToPath(sourcePath), fileSystemURLToPath(destinationPath), callbacks);
80
}
80
}
81
81
82
void WorkerAsyncFileSystemBlackBerry::removeOnMainThread(ScriptExecutionContext*, WebFileSystem* platformFileSystem, const KURL& path, WorkerPlatformAsyncFileSystemCallbacks* callbacks)
82
void WorkerAsyncFileSystemBlackBerry::removeOnMainThread(ScriptExecutionContext*, WebFileSystem* platformFileSystem, const URL& path, WorkerPlatformAsyncFileSystemCallbacks* callbacks)
83
{
83
{
84
    platformFileSystem->remove(fileSystemURLToPath(path), callbacks);
84
    platformFileSystem->remove(fileSystemURLToPath(path), callbacks);
85
}
85
}
86
86
87
void WorkerAsyncFileSystemBlackBerry::removeRecursivelyOnMainThread(ScriptExecutionContext*, WebFileSystem* platformFileSystem, const KURL& path, WorkerPlatformAsyncFileSystemCallbacks* callbacks)
87
void WorkerAsyncFileSystemBlackBerry::removeRecursivelyOnMainThread(ScriptExecutionContext*, WebFileSystem* platformFileSystem, const URL& path, WorkerPlatformAsyncFileSystemCallbacks* callbacks)
88
{
88
{
89
    platformFileSystem->removeRecursively(fileSystemURLToPath(path), callbacks);
89
    platformFileSystem->removeRecursively(fileSystemURLToPath(path), callbacks);
90
}
90
}
91
91
92
void WorkerAsyncFileSystemBlackBerry::readMetadataOnMainThread(ScriptExecutionContext*, WebFileSystem* platformFileSystem, const KURL& path, WorkerPlatformAsyncFileSystemCallbacks* callbacks)
92
void WorkerAsyncFileSystemBlackBerry::readMetadataOnMainThread(ScriptExecutionContext*, WebFileSystem* platformFileSystem, const URL& path, WorkerPlatformAsyncFileSystemCallbacks* callbacks)
93
{
93
{
94
    platformFileSystem->readMetadata(fileSystemURLToPath(path), callbacks);
94
    platformFileSystem->readMetadata(fileSystemURLToPath(path), callbacks);
95
}
95
}
96
96
97
void WorkerAsyncFileSystemBlackBerry::createFileOnMainThread(ScriptExecutionContext*, WebFileSystem* platformFileSystem, const KURL& path, bool exclusive, WorkerPlatformAsyncFileSystemCallbacks* callbacks)
97
void WorkerAsyncFileSystemBlackBerry::createFileOnMainThread(ScriptExecutionContext*, WebFileSystem* platformFileSystem, const URL& path, bool exclusive, WorkerPlatformAsyncFileSystemCallbacks* callbacks)
98
{
98
{
99
    platformFileSystem->createFile(fileSystemURLToPath(path), exclusive, callbacks);
99
    platformFileSystem->createFile(fileSystemURLToPath(path), exclusive, callbacks);
100
}
100
}
101
101
102
void WorkerAsyncFileSystemBlackBerry::createDirectoryOnMainThread(ScriptExecutionContext*, WebFileSystem* platformFileSystem, const KURL& path, bool exclusive, WorkerPlatformAsyncFileSystemCallbacks* callbacks)
102
void WorkerAsyncFileSystemBlackBerry::createDirectoryOnMainThread(ScriptExecutionContext*, WebFileSystem* platformFileSystem, const URL& path, bool exclusive, WorkerPlatformAsyncFileSystemCallbacks* callbacks)
103
{
103
{
104
    platformFileSystem->createDirectory(fileSystemURLToPath(path), exclusive, callbacks);
104
    platformFileSystem->createDirectory(fileSystemURLToPath(path), exclusive, callbacks);
105
}
105
}
106
106
107
void WorkerAsyncFileSystemBlackBerry::fileExistsOnMainThread(ScriptExecutionContext*, WebFileSystem* platformFileSystem, const KURL& path, WorkerPlatformAsyncFileSystemCallbacks* callbacks)
107
void WorkerAsyncFileSystemBlackBerry::fileExistsOnMainThread(ScriptExecutionContext*, WebFileSystem* platformFileSystem, const URL& path, WorkerPlatformAsyncFileSystemCallbacks* callbacks)
108
{
108
{
109
    platformFileSystem->fileExists(fileSystemURLToPath(path), callbacks);
109
    platformFileSystem->fileExists(fileSystemURLToPath(path), callbacks);
110
}
110
}
111
111
112
void WorkerAsyncFileSystemBlackBerry::directoryExistsOnMainThread(ScriptExecutionContext*, WebFileSystem* platformFileSystem, const KURL& path, WorkerPlatformAsyncFileSystemCallbacks* callbacks)
112
void WorkerAsyncFileSystemBlackBerry::directoryExistsOnMainThread(ScriptExecutionContext*, WebFileSystem* platformFileSystem, const URL& path, WorkerPlatformAsyncFileSystemCallbacks* callbacks)
113
{
113
{
114
    platformFileSystem->directoryExists(fileSystemURLToPath(path), callbacks);
114
    platformFileSystem->directoryExists(fileSystemURLToPath(path), callbacks);
115
}
115
}
116
116
117
void WorkerAsyncFileSystemBlackBerry::readDirectoryOnMainThread(ScriptExecutionContext*, WebFileSystem* platformFileSystem, const KURL& path, WorkerPlatformAsyncFileSystemCallbacks* callbacks)
117
void WorkerAsyncFileSystemBlackBerry::readDirectoryOnMainThread(ScriptExecutionContext*, WebFileSystem* platformFileSystem, const URL& path, WorkerPlatformAsyncFileSystemCallbacks* callbacks)
118
{
118
{
119
    platformFileSystem->readDirectory(fileSystemURLToPath(path), callbacks);
119
    platformFileSystem->readDirectory(fileSystemURLToPath(path), callbacks);
120
}
120
}
121
121
122
void WorkerAsyncFileSystemBlackBerry::createWriterOnMainThread(ScriptExecutionContext*, WebFileSystem* platformFileSystem, AsyncFileWriterClient*, const KURL& path, WorkerPlatformAsyncFileSystemCallbacks* callbacks)
122
void WorkerAsyncFileSystemBlackBerry::createWriterOnMainThread(ScriptExecutionContext*, WebFileSystem* platformFileSystem, AsyncFileWriterClient*, const URL& path, WorkerPlatformAsyncFileSystemCallbacks* callbacks)
123
{
123
{
124
    WebFileWriter::createWriter(platformFileSystem, fileSystemURLToPath(path), callbacks);
124
    WebFileWriter::createWriter(platformFileSystem, fileSystemURLToPath(path), callbacks);
125
}
125
}
126
126
127
void WorkerAsyncFileSystemBlackBerry::createSnapshotFileAndReadMetadataOnMainThread(ScriptExecutionContext*, WebFileSystem* platformFileSystem, const KURL& path, WorkerPlatformAsyncFileSystemCallbacks* callbacks)
127
void WorkerAsyncFileSystemBlackBerry::createSnapshotFileAndReadMetadataOnMainThread(ScriptExecutionContext*, WebFileSystem* platformFileSystem, const URL& path, WorkerPlatformAsyncFileSystemCallbacks* callbacks)
128
{
128
{
129
    platformFileSystem->createSnapshotFileAndReadMetadata(fileSystemURLToPath(path), callbacks);
129
    platformFileSystem->createSnapshotFileAndReadMetadata(fileSystemURLToPath(path), callbacks);
130
}
130
}
131
131
132
void WorkerAsyncFileSystemBlackBerry::openFileSystem(WorkerGlobalScope* context, const KURL& rootURL, const String& mode, const String& basePath, const String& storageIdentifier, FileSystemType type, long long size, bool create, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
132
void WorkerAsyncFileSystemBlackBerry::openFileSystem(WorkerGlobalScope* context, const URL& rootURL, const String& mode, const String& basePath, const String& storageIdentifier, FileSystemType type, long long size, bool create, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
133
{
133
{
134
    ASSERT(context);
134
    ASSERT(context);
135
    postTaskToMainThread(createCallbackTask(&WorkerAsyncFileSystemBlackBerry::openFileSystemOnMainThread, basePath, storageIdentifier, type, size, create, new WorkerPlatformAsyncFileSystemCallbacks(callbacks, context, mode, rootURL)));
135
    postTaskToMainThread(createCallbackTask(&WorkerAsyncFileSystemBlackBerry::openFileSystemOnMainThread, basePath, storageIdentifier, type, size, create, new WorkerPlatformAsyncFileSystemCallbacks(callbacks, context, mode, rootURL)));
Lines 141-202 void WorkerAsyncFileSystemBlackBerry::deleteFileSystem(WorkerGlobalScope* contex a/Source/WebCore/platform/blackberry/WorkerAsyncFileSystemBlackBerry.cpp_sec2
141
    postTaskToMainThread(createCallbackTask(&WorkerAsyncFileSystemBlackBerry::deleteFileSystemOnMainThread, basePath, storageIdentifier, type, new WorkerPlatformAsyncFileSystemCallbacks(callbacks, context, mode)));
141
    postTaskToMainThread(createCallbackTask(&WorkerAsyncFileSystemBlackBerry::deleteFileSystemOnMainThread, basePath, storageIdentifier, type, new WorkerPlatformAsyncFileSystemCallbacks(callbacks, context, mode)));
142
}
142
}
143
143
144
void WorkerAsyncFileSystemBlackBerry::move(const KURL& sourcePath, const KURL& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
144
void WorkerAsyncFileSystemBlackBerry::move(const URL& sourcePath, const URL& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
145
{
145
{
146
    postTaskToMainThread(createCallbackTask(&WorkerAsyncFileSystemBlackBerry::moveOnMainThread, m_platformFileSystem.get(), sourcePath, destinationPath, new WorkerPlatformAsyncFileSystemCallbacks(callbacks, m_context, m_mode)));
146
    postTaskToMainThread(createCallbackTask(&WorkerAsyncFileSystemBlackBerry::moveOnMainThread, m_platformFileSystem.get(), sourcePath, destinationPath, new WorkerPlatformAsyncFileSystemCallbacks(callbacks, m_context, m_mode)));
147
}
147
}
148
148
149
void WorkerAsyncFileSystemBlackBerry::copy(const KURL& sourcePath, const KURL& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
149
void WorkerAsyncFileSystemBlackBerry::copy(const URL& sourcePath, const URL& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
150
{
150
{
151
    postTaskToMainThread(createCallbackTask(&WorkerAsyncFileSystemBlackBerry::copyOnMainThread, m_platformFileSystem.get(), sourcePath, destinationPath, new WorkerPlatformAsyncFileSystemCallbacks(callbacks, m_context, m_mode)));
151
    postTaskToMainThread(createCallbackTask(&WorkerAsyncFileSystemBlackBerry::copyOnMainThread, m_platformFileSystem.get(), sourcePath, destinationPath, new WorkerPlatformAsyncFileSystemCallbacks(callbacks, m_context, m_mode)));
152
}
152
}
153
153
154
void WorkerAsyncFileSystemBlackBerry::remove(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
154
void WorkerAsyncFileSystemBlackBerry::remove(const URL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
155
{
155
{
156
    postTaskToMainThread(createCallbackTask(&WorkerAsyncFileSystemBlackBerry::removeOnMainThread, m_platformFileSystem.get(), path, new WorkerPlatformAsyncFileSystemCallbacks(callbacks, m_context, m_mode)));
156
    postTaskToMainThread(createCallbackTask(&WorkerAsyncFileSystemBlackBerry::removeOnMainThread, m_platformFileSystem.get(), path, new WorkerPlatformAsyncFileSystemCallbacks(callbacks, m_context, m_mode)));
157
}
157
}
158
158
159
void WorkerAsyncFileSystemBlackBerry::removeRecursively(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
159
void WorkerAsyncFileSystemBlackBerry::removeRecursively(const URL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
160
{
160
{
161
    postTaskToMainThread(createCallbackTask(&WorkerAsyncFileSystemBlackBerry::removeRecursivelyOnMainThread, m_platformFileSystem.get(), path, new WorkerPlatformAsyncFileSystemCallbacks(callbacks, m_context, m_mode)));
161
    postTaskToMainThread(createCallbackTask(&WorkerAsyncFileSystemBlackBerry::removeRecursivelyOnMainThread, m_platformFileSystem.get(), path, new WorkerPlatformAsyncFileSystemCallbacks(callbacks, m_context, m_mode)));
162
}
162
}
163
163
164
void WorkerAsyncFileSystemBlackBerry::readMetadata(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
164
void WorkerAsyncFileSystemBlackBerry::readMetadata(const URL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
165
{
165
{
166
    postTaskToMainThread(createCallbackTask(&WorkerAsyncFileSystemBlackBerry::readMetadataOnMainThread, m_platformFileSystem.get(), path, new WorkerPlatformAsyncFileSystemCallbacks(callbacks, m_context, m_mode)));
166
    postTaskToMainThread(createCallbackTask(&WorkerAsyncFileSystemBlackBerry::readMetadataOnMainThread, m_platformFileSystem.get(), path, new WorkerPlatformAsyncFileSystemCallbacks(callbacks, m_context, m_mode)));
167
}
167
}
168
168
169
void WorkerAsyncFileSystemBlackBerry::createFile(const KURL& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
169
void WorkerAsyncFileSystemBlackBerry::createFile(const URL& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
170
{
170
{
171
    postTaskToMainThread(createCallbackTask(&WorkerAsyncFileSystemBlackBerry::createFileOnMainThread, m_platformFileSystem.get(), path, exclusive, new WorkerPlatformAsyncFileSystemCallbacks(callbacks, m_context, m_mode)));
171
    postTaskToMainThread(createCallbackTask(&WorkerAsyncFileSystemBlackBerry::createFileOnMainThread, m_platformFileSystem.get(), path, exclusive, new WorkerPlatformAsyncFileSystemCallbacks(callbacks, m_context, m_mode)));
172
}
172
}
173
173
174
void WorkerAsyncFileSystemBlackBerry::createDirectory(const KURL& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
174
void WorkerAsyncFileSystemBlackBerry::createDirectory(const URL& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
175
{
175
{
176
    postTaskToMainThread(createCallbackTask(&WorkerAsyncFileSystemBlackBerry::createDirectoryOnMainThread, m_platformFileSystem.get(), path, exclusive, new WorkerPlatformAsyncFileSystemCallbacks(callbacks, m_context, m_mode)));
176
    postTaskToMainThread(createCallbackTask(&WorkerAsyncFileSystemBlackBerry::createDirectoryOnMainThread, m_platformFileSystem.get(), path, exclusive, new WorkerPlatformAsyncFileSystemCallbacks(callbacks, m_context, m_mode)));
177
}
177
}
178
178
179
void WorkerAsyncFileSystemBlackBerry::fileExists(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
179
void WorkerAsyncFileSystemBlackBerry::fileExists(const URL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
180
{
180
{
181
    postTaskToMainThread(createCallbackTask(&WorkerAsyncFileSystemBlackBerry::fileExistsOnMainThread, m_platformFileSystem.get(), path, new WorkerPlatformAsyncFileSystemCallbacks(callbacks, m_context, m_mode)));
181
    postTaskToMainThread(createCallbackTask(&WorkerAsyncFileSystemBlackBerry::fileExistsOnMainThread, m_platformFileSystem.get(), path, new WorkerPlatformAsyncFileSystemCallbacks(callbacks, m_context, m_mode)));
182
}
182
}
183
183
184
void WorkerAsyncFileSystemBlackBerry::directoryExists(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
184
void WorkerAsyncFileSystemBlackBerry::directoryExists(const URL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
185
{
185
{
186
    postTaskToMainThread(createCallbackTask(&WorkerAsyncFileSystemBlackBerry::directoryExistsOnMainThread, m_platformFileSystem.get(), path, new WorkerPlatformAsyncFileSystemCallbacks(callbacks, m_context, m_mode)));
186
    postTaskToMainThread(createCallbackTask(&WorkerAsyncFileSystemBlackBerry::directoryExistsOnMainThread, m_platformFileSystem.get(), path, new WorkerPlatformAsyncFileSystemCallbacks(callbacks, m_context, m_mode)));
187
}
187
}
188
188
189
void WorkerAsyncFileSystemBlackBerry::readDirectory(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
189
void WorkerAsyncFileSystemBlackBerry::readDirectory(const URL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
190
{
190
{
191
    postTaskToMainThread(createCallbackTask(&WorkerAsyncFileSystemBlackBerry::readDirectoryOnMainThread, m_platformFileSystem.get(), path, new WorkerPlatformAsyncFileSystemCallbacks(callbacks, m_context, m_mode)));
191
    postTaskToMainThread(createCallbackTask(&WorkerAsyncFileSystemBlackBerry::readDirectoryOnMainThread, m_platformFileSystem.get(), path, new WorkerPlatformAsyncFileSystemCallbacks(callbacks, m_context, m_mode)));
192
}
192
}
193
193
194
void WorkerAsyncFileSystemBlackBerry::createWriter(AsyncFileWriterClient* client, const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
194
void WorkerAsyncFileSystemBlackBerry::createWriter(AsyncFileWriterClient* client, const URL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
195
{
195
{
196
    postTaskToMainThread(createCallbackTask(&WorkerAsyncFileSystemBlackBerry::createWriterOnMainThread, m_platformFileSystem.get(), client, path, new WorkerPlatformAsyncFileSystemCallbacks(callbacks, client, m_context, m_mode)));
196
    postTaskToMainThread(createCallbackTask(&WorkerAsyncFileSystemBlackBerry::createWriterOnMainThread, m_platformFileSystem.get(), client, path, new WorkerPlatformAsyncFileSystemCallbacks(callbacks, client, m_context, m_mode)));
197
}
197
}
198
198
199
void WorkerAsyncFileSystemBlackBerry::createSnapshotFileAndReadMetadata(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
199
void WorkerAsyncFileSystemBlackBerry::createSnapshotFileAndReadMetadata(const URL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
200
{
200
{
201
    postTaskToMainThread(createCallbackTask(&WorkerAsyncFileSystemBlackBerry::createSnapshotFileAndReadMetadataOnMainThread, m_platformFileSystem.get(), path, new WorkerPlatformAsyncFileSystemCallbacks(callbacks, m_context, m_mode)));
201
    postTaskToMainThread(createCallbackTask(&WorkerAsyncFileSystemBlackBerry::createSnapshotFileAndReadMetadataOnMainThread, m_platformFileSystem.get(), path, new WorkerPlatformAsyncFileSystemCallbacks(callbacks, m_context, m_mode)));
202
}
202
}
- a/Source/WebCore/platform/blackberry/WorkerAsyncFileSystemBlackBerry.h -25 / +25 lines
Lines 41-79 public: a/Source/WebCore/platform/blackberry/WorkerAsyncFileSystemBlackBerry.h_sec1
41
        return adoptPtr(new WorkerAsyncFileSystemBlackBerry(context, mode, platformFileSystem));
41
        return adoptPtr(new WorkerAsyncFileSystemBlackBerry(context, mode, platformFileSystem));
42
    }
42
    }
43
43
44
    static void openFileSystem(WorkerGlobalScope*, const KURL& rootURL, const String& mode, const String& basePath, const String& storageIdentifier, FileSystemType, long long size, bool create, PassOwnPtr<AsyncFileSystemCallbacks>);
44
    static void openFileSystem(WorkerGlobalScope*, const URL& rootURL, const String& mode, const String& basePath, const String& storageIdentifier, FileSystemType, long long size, bool create, PassOwnPtr<AsyncFileSystemCallbacks>);
45
    static void deleteFileSystem(WorkerGlobalScope*, const String& mode, const String& basePath, const String& storageIdentifier, FileSystemType, PassOwnPtr<AsyncFileSystemCallbacks>);
45
    static void deleteFileSystem(WorkerGlobalScope*, const String& mode, const String& basePath, const String& storageIdentifier, FileSystemType, PassOwnPtr<AsyncFileSystemCallbacks>);
46
    virtual ~WorkerAsyncFileSystemBlackBerry();
46
    virtual ~WorkerAsyncFileSystemBlackBerry();
47
    virtual bool waitForOperationToComplete();
47
    virtual bool waitForOperationToComplete();
48
    virtual void move(const KURL& sourcePath, const KURL& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks>);
48
    virtual void move(const URL& sourcePath, const URL& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks>);
49
    virtual void copy(const KURL& sourcePath, const KURL& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks>);
49
    virtual void copy(const URL& sourcePath, const URL& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks>);
50
    virtual void remove(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks>);
50
    virtual void remove(const URL& path, PassOwnPtr<AsyncFileSystemCallbacks>);
51
    virtual void removeRecursively(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks>);
51
    virtual void removeRecursively(const URL& path, PassOwnPtr<AsyncFileSystemCallbacks>);
52
    virtual void readMetadata(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks>);
52
    virtual void readMetadata(const URL& path, PassOwnPtr<AsyncFileSystemCallbacks>);
53
    virtual void createFile(const KURL& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks>);
53
    virtual void createFile(const URL& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks>);
54
    virtual void createDirectory(const KURL& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks>);
54
    virtual void createDirectory(const URL& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks>);
55
    virtual void fileExists(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks>);
55
    virtual void fileExists(const URL& path, PassOwnPtr<AsyncFileSystemCallbacks>);
56
    virtual void directoryExists(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks>);
56
    virtual void directoryExists(const URL& path, PassOwnPtr<AsyncFileSystemCallbacks>);
57
    virtual void readDirectory(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks>);
57
    virtual void readDirectory(const URL& path, PassOwnPtr<AsyncFileSystemCallbacks>);
58
    virtual void createWriter(AsyncFileWriterClient*, const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks>);
58
    virtual void createWriter(AsyncFileWriterClient*, const URL& path, PassOwnPtr<AsyncFileSystemCallbacks>);
59
    virtual void createSnapshotFileAndReadMetadata(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks>);
59
    virtual void createSnapshotFileAndReadMetadata(const URL& path, PassOwnPtr<AsyncFileSystemCallbacks>);
60
60
61
private:
61
private:
62
    WorkerAsyncFileSystemBlackBerry(WorkerGlobalScope*, const String& mode, PassOwnPtr<BlackBerry::Platform::WebFileSystem> platformFileSystem);
62
    WorkerAsyncFileSystemBlackBerry(WorkerGlobalScope*, const String& mode, PassOwnPtr<BlackBerry::Platform::WebFileSystem> platformFileSystem);
63
    static void openFileSystemOnMainThread(ScriptExecutionContext*, const String& basePath, const String& storageIdentifier, FileSystemType, long long size, bool create, WorkerPlatformAsyncFileSystemCallbacks*);
63
    static void openFileSystemOnMainThread(ScriptExecutionContext*, const String& basePath, const String& storageIdentifier, FileSystemType, long long size, bool create, WorkerPlatformAsyncFileSystemCallbacks*);
64
    static void deleteFileSystemOnMainThread(ScriptExecutionContext*, const String& basePath, const String& storageIdentifier, FileSystemType, WorkerPlatformAsyncFileSystemCallbacks*);
64
    static void deleteFileSystemOnMainThread(ScriptExecutionContext*, const String& basePath, const String& storageIdentifier, FileSystemType, WorkerPlatformAsyncFileSystemCallbacks*);
65
    static void moveOnMainThread(ScriptExecutionContext*, BlackBerry::Platform::WebFileSystem*, const KURL& sourcePath, const KURL& destinationPath, WorkerPlatformAsyncFileSystemCallbacks*);
65
    static void moveOnMainThread(ScriptExecutionContext*, BlackBerry::Platform::WebFileSystem*, const URL& sourcePath, const URL& destinationPath, WorkerPlatformAsyncFileSystemCallbacks*);
66
    static void copyOnMainThread(ScriptExecutionContext*, BlackBerry::Platform::WebFileSystem*, const KURL& sourcePath, const KURL& destinationPath, WorkerPlatformAsyncFileSystemCallbacks*);
66
    static void copyOnMainThread(ScriptExecutionContext*, BlackBerry::Platform::WebFileSystem*, const URL& sourcePath, const URL& destinationPath, WorkerPlatformAsyncFileSystemCallbacks*);
67
    static void removeOnMainThread(ScriptExecutionContext*, BlackBerry::Platform::WebFileSystem*, const KURL& path, WorkerPlatformAsyncFileSystemCallbacks*);
67
    static void removeOnMainThread(ScriptExecutionContext*, BlackBerry::Platform::WebFileSystem*, const URL& path, WorkerPlatformAsyncFileSystemCallbacks*);
68
    static void removeRecursivelyOnMainThread(ScriptExecutionContext*, BlackBerry::Platform::WebFileSystem*, const KURL& path, WorkerPlatformAsyncFileSystemCallbacks*);
68
    static void removeRecursivelyOnMainThread(ScriptExecutionContext*, BlackBerry::Platform::WebFileSystem*, const URL& path, WorkerPlatformAsyncFileSystemCallbacks*);
69
    static void readMetadataOnMainThread(ScriptExecutionContext*, BlackBerry::Platform::WebFileSystem*, const KURL& path, WorkerPlatformAsyncFileSystemCallbacks*);
69
    static void readMetadataOnMainThread(ScriptExecutionContext*, BlackBerry::Platform::WebFileSystem*, const URL& path, WorkerPlatformAsyncFileSystemCallbacks*);
70
    static void createFileOnMainThread(ScriptExecutionContext*, BlackBerry::Platform::WebFileSystem*, const KURL& path, bool exclusive, WorkerPlatformAsyncFileSystemCallbacks*);
70
    static void createFileOnMainThread(ScriptExecutionContext*, BlackBerry::Platform::WebFileSystem*, const URL& path, bool exclusive, WorkerPlatformAsyncFileSystemCallbacks*);
71
    static void createDirectoryOnMainThread(ScriptExecutionContext*, BlackBerry::Platform::WebFileSystem*, const KURL& path, bool exclusive, WorkerPlatformAsyncFileSystemCallbacks*);
71
    static void createDirectoryOnMainThread(ScriptExecutionContext*, BlackBerry::Platform::WebFileSystem*, const URL& path, bool exclusive, WorkerPlatformAsyncFileSystemCallbacks*);
72
    static void fileExistsOnMainThread(ScriptExecutionContext*, BlackBerry::Platform::WebFileSystem*, const KURL& path, WorkerPlatformAsyncFileSystemCallbacks*);
72
    static void fileExistsOnMainThread(ScriptExecutionContext*, BlackBerry::Platform::WebFileSystem*, const URL& path, WorkerPlatformAsyncFileSystemCallbacks*);
73
    static void directoryExistsOnMainThread(ScriptExecutionContext*, BlackBerry::Platform::WebFileSystem*, const KURL& path, WorkerPlatformAsyncFileSystemCallbacks*);
73
    static void directoryExistsOnMainThread(ScriptExecutionContext*, BlackBerry::Platform::WebFileSystem*, const URL& path, WorkerPlatformAsyncFileSystemCallbacks*);
74
    static void readDirectoryOnMainThread(ScriptExecutionContext*, BlackBerry::Platform::WebFileSystem*, const KURL& path, WorkerPlatformAsyncFileSystemCallbacks*);
74
    static void readDirectoryOnMainThread(ScriptExecutionContext*, BlackBerry::Platform::WebFileSystem*, const URL& path, WorkerPlatformAsyncFileSystemCallbacks*);
75
    static void createWriterOnMainThread(ScriptExecutionContext*, BlackBerry::Platform::WebFileSystem*, AsyncFileWriterClient*, const KURL& path, WorkerPlatformAsyncFileSystemCallbacks*);
75
    static void createWriterOnMainThread(ScriptExecutionContext*, BlackBerry::Platform::WebFileSystem*, AsyncFileWriterClient*, const URL& path, WorkerPlatformAsyncFileSystemCallbacks*);
76
    static void createSnapshotFileAndReadMetadataOnMainThread(ScriptExecutionContext*, BlackBerry::Platform::WebFileSystem*, const KURL& path, WorkerPlatformAsyncFileSystemCallbacks*);
76
    static void createSnapshotFileAndReadMetadataOnMainThread(ScriptExecutionContext*, BlackBerry::Platform::WebFileSystem*, const URL& path, WorkerPlatformAsyncFileSystemCallbacks*);
77
77
78
    WorkerGlobalScope* m_context;
78
    WorkerGlobalScope* m_context;
79
    String m_mode;
79
    String m_mode;
- a/Source/WebCore/platform/blackberry/WorkerPlatformAsyncFileSystemCallbacks.h -2 / +2 lines
Lines 54-64 template<> struct CrossThreadCopierBase<false, false, AsyncFileWriterClient*> : a/Source/WebCore/platform/blackberry/WorkerPlatformAsyncFileSystemCallbacks.h_sec1
54
54
55
void postTaskToMainThread(PassOwnPtr<ScriptExecutionContext::Task>);
55
void postTaskToMainThread(PassOwnPtr<ScriptExecutionContext::Task>);
56
56
57
class KURL;
57
class URL;
58
58
59
class WorkerPlatformAsyncFileSystemCallbacks: public PlatformAsyncFileSystemCallbacks, public WorkerGlobalScope::Observer {
59
class WorkerPlatformAsyncFileSystemCallbacks: public PlatformAsyncFileSystemCallbacks, public WorkerGlobalScope::Observer {
60
public:
60
public:
61
    WorkerPlatformAsyncFileSystemCallbacks(PassOwnPtr<AsyncFileSystemCallbacks> callbacks, WorkerGlobalScope* context, const String& mode, const KURL& rootURL = KURL())
61
    WorkerPlatformAsyncFileSystemCallbacks(PassOwnPtr<AsyncFileSystemCallbacks> callbacks, WorkerGlobalScope* context, const String& mode, const URL& rootURL = URL())
62
        : PlatformAsyncFileSystemCallbacks(callbacks, rootURL)
62
        : PlatformAsyncFileSystemCallbacks(callbacks, rootURL)
63
        , WorkerGlobalScope::Observer(context)
63
        , WorkerGlobalScope::Observer(context)
64
        , m_context(context)
64
        , m_context(context)
- a/Source/WebCore/platform/cf/KURLCFNet.cpp -76 lines
Lines 1-76 a/Source/WebCore/platform/cf/KURLCFNet.cpp_sec1
1
/*
2
 * Copyright (C) 2004, 2008, 2013 Apple Inc. All rights reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
6
 * are met:
7
 * 1. Redistributions of source code must retain the above copyright
8
 *    notice, this list of conditions and the following disclaimer.
9
 * 2. Redistributions in binary form must reproduce the above copyright
10
 *    notice, this list of conditions and the following disclaimer in the
11
 *    documentation and/or other materials provided with the distribution.
12
 *
13
 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
14
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
17
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21
 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
24
 */
25
26
#include "config.h"
27
#include "KURL.h"
28
29
#include "CFURLExtras.h"
30
#include <CoreFoundation/CFURL.h>
31
#include <wtf/text/CString.h>
32
33
using namespace std;
34
35
namespace WebCore {
36
37
KURL::KURL(CFURLRef url)
38
{
39
    if (!url) {
40
        invalidate();
41
        return;
42
    }
43
44
    // FIXME: Why is it OK to ignore base URL here?
45
    CString urlBytes;
46
    getURLBytes(url, urlBytes);
47
    parse(urlBytes.data());
48
}
49
50
#if !PLATFORM(MAC)
51
RetainPtr<CFURLRef> KURL::createCFURL() const
52
{
53
    // FIXME: What should this return for invalid URLs?
54
    // Currently it throws away the high bytes of the characters in the string in that case,
55
    // which is clearly wrong.
56
    URLCharBuffer buffer;
57
    copyToBuffer(buffer);
58
    return createCFURLFromBuffer(buffer.data(), buffer.size());
59
}
60
#endif
61
62
String KURL::fileSystemPath() const
63
{
64
    RetainPtr<CFURLRef> cfURL = createCFURL();
65
    if (!cfURL)
66
        return String();
67
68
#if PLATFORM(WIN)
69
    CFURLPathStyle pathStyle = kCFURLWindowsPathStyle;
70
#else
71
    CFURLPathStyle pathStyle = kCFURLPOSIXPathStyle;
72
#endif
73
    return adoptCF(CFURLCopyFileSystemPath(cfURL.get(), pathStyle)).get();
74
}
75
76
}
- a/Source/WebCore/platform/efl/AsyncFileSystemEfl.cpp -12 / +12 lines
Lines 63-124 AsyncFileSystemEfl::~AsyncFileSystemEfl() a/Source/WebCore/platform/efl/AsyncFileSystemEfl.cpp_sec1
63
{
63
{
64
}
64
}
65
65
66
void AsyncFileSystemEfl::move(const KURL&, const KURL&, PassOwnPtr<AsyncFileSystemCallbacks>)
66
void AsyncFileSystemEfl::move(const URL&, const URL&, PassOwnPtr<AsyncFileSystemCallbacks>)
67
{
67
{
68
    notImplemented();
68
    notImplemented();
69
}
69
}
70
70
71
void AsyncFileSystemEfl::copy(const KURL&, const KURL&, PassOwnPtr<AsyncFileSystemCallbacks>)
71
void AsyncFileSystemEfl::copy(const URL&, const URL&, PassOwnPtr<AsyncFileSystemCallbacks>)
72
{
72
{
73
    notImplemented();
73
    notImplemented();
74
}
74
}
75
75
76
void AsyncFileSystemEfl::remove(const KURL&, PassOwnPtr<AsyncFileSystemCallbacks>)
76
void AsyncFileSystemEfl::remove(const URL&, PassOwnPtr<AsyncFileSystemCallbacks>)
77
{
77
{
78
    notImplemented();
78
    notImplemented();
79
}
79
}
80
80
81
void AsyncFileSystemEfl::removeRecursively(const KURL&, PassOwnPtr<AsyncFileSystemCallbacks>)
81
void AsyncFileSystemEfl::removeRecursively(const URL&, PassOwnPtr<AsyncFileSystemCallbacks>)
82
{
82
{
83
    notImplemented();
83
    notImplemented();
84
}
84
}
85
85
86
void AsyncFileSystemEfl::readMetadata(const KURL&, PassOwnPtr<AsyncFileSystemCallbacks>)
86
void AsyncFileSystemEfl::readMetadata(const URL&, PassOwnPtr<AsyncFileSystemCallbacks>)
87
{
87
{
88
    notImplemented();
88
    notImplemented();
89
}
89
}
90
90
91
void AsyncFileSystemEfl::createFile(const KURL&, bool, PassOwnPtr<AsyncFileSystemCallbacks>)
91
void AsyncFileSystemEfl::createFile(const URL&, bool, PassOwnPtr<AsyncFileSystemCallbacks>)
92
{
92
{
93
    notImplemented();
93
    notImplemented();
94
}
94
}
95
95
96
void AsyncFileSystemEfl::createDirectory(const KURL&, bool, PassOwnPtr<AsyncFileSystemCallbacks>)
96
void AsyncFileSystemEfl::createDirectory(const URL&, bool, PassOwnPtr<AsyncFileSystemCallbacks>)
97
{
97
{
98
    notImplemented();
98
    notImplemented();
99
}
99
}
100
100
101
void AsyncFileSystemEfl::fileExists(const KURL&, PassOwnPtr<AsyncFileSystemCallbacks>)
101
void AsyncFileSystemEfl::fileExists(const URL&, PassOwnPtr<AsyncFileSystemCallbacks>)
102
{
102
{
103
    notImplemented();
103
    notImplemented();
104
}
104
}
105
105
106
void AsyncFileSystemEfl::directoryExists(const KURL&, PassOwnPtr<AsyncFileSystemCallbacks>)
106
void AsyncFileSystemEfl::directoryExists(const URL&, PassOwnPtr<AsyncFileSystemCallbacks>)
107
{
107
{
108
    notImplemented();
108
    notImplemented();
109
}
109
}
110
110
111
void AsyncFileSystemEfl::readDirectory(const KURL&, PassOwnPtr<AsyncFileSystemCallbacks>)
111
void AsyncFileSystemEfl::readDirectory(const URL&, PassOwnPtr<AsyncFileSystemCallbacks>)
112
{
112
{
113
    notImplemented();
113
    notImplemented();
114
}
114
}
115
115
116
void AsyncFileSystemEfl::createWriter(AsyncFileWriterClient*, const KURL&, PassOwnPtr<AsyncFileSystemCallbacks>)
116
void AsyncFileSystemEfl::createWriter(AsyncFileWriterClient*, const URL&, PassOwnPtr<AsyncFileSystemCallbacks>)
117
{
117
{
118
    notImplemented();
118
    notImplemented();
119
}
119
}
120
120
121
void AsyncFileSystemEfl::createSnapshotFileAndReadMetadata(const KURL&, PassOwnPtr<AsyncFileSystemCallbacks>)
121
void AsyncFileSystemEfl::createSnapshotFileAndReadMetadata(const URL&, PassOwnPtr<AsyncFileSystemCallbacks>)
122
{
122
{
123
    notImplemented();
123
    notImplemented();
124
}
124
}
- a/Source/WebCore/platform/efl/AsyncFileSystemEfl.h -12 / +12 lines
Lines 40-57 public: a/Source/WebCore/platform/efl/AsyncFileSystemEfl.h_sec1
40
    AsyncFileSystemEfl();
40
    AsyncFileSystemEfl();
41
    virtual ~AsyncFileSystemEfl();
41
    virtual ~AsyncFileSystemEfl();
42
42
43
    virtual void move(const KURL&, const KURL&, PassOwnPtr<AsyncFileSystemCallbacks>);
43
    virtual void move(const URL&, const URL&, PassOwnPtr<AsyncFileSystemCallbacks>);
44
    virtual void copy(const KURL&, const KURL&, PassOwnPtr<AsyncFileSystemCallbacks>);
44
    virtual void copy(const URL&, const URL&, PassOwnPtr<AsyncFileSystemCallbacks>);
45
    virtual void remove(const KURL&, PassOwnPtr<AsyncFileSystemCallbacks>);
45
    virtual void remove(const URL&, PassOwnPtr<AsyncFileSystemCallbacks>);
46
    virtual void removeRecursively(const KURL&, PassOwnPtr<AsyncFileSystemCallbacks>);
46
    virtual void removeRecursively(const URL&, PassOwnPtr<AsyncFileSystemCallbacks>);
47
    virtual void readMetadata(const KURL&, PassOwnPtr<AsyncFileSystemCallbacks>);
47
    virtual void readMetadata(const URL&, PassOwnPtr<AsyncFileSystemCallbacks>);
48
    virtual void createFile(const KURL&, bool, PassOwnPtr<AsyncFileSystemCallbacks>);
48
    virtual void createFile(const URL&, bool, PassOwnPtr<AsyncFileSystemCallbacks>);
49
    virtual void createDirectory(const KURL&, bool, PassOwnPtr<AsyncFileSystemCallbacks>);
49
    virtual void createDirectory(const URL&, bool, PassOwnPtr<AsyncFileSystemCallbacks>);
50
    virtual void fileExists(const KURL&, PassOwnPtr<AsyncFileSystemCallbacks>);
50
    virtual void fileExists(const URL&, PassOwnPtr<AsyncFileSystemCallbacks>);
51
    virtual void directoryExists(const KURL&, PassOwnPtr<AsyncFileSystemCallbacks>);
51
    virtual void directoryExists(const URL&, PassOwnPtr<AsyncFileSystemCallbacks>);
52
    virtual void readDirectory(const KURL&, PassOwnPtr<AsyncFileSystemCallbacks>);
52
    virtual void readDirectory(const URL&, PassOwnPtr<AsyncFileSystemCallbacks>);
53
    virtual void createWriter(AsyncFileWriterClient*, const KURL&, PassOwnPtr<AsyncFileSystemCallbacks>);
53
    virtual void createWriter(AsyncFileWriterClient*, const URL&, PassOwnPtr<AsyncFileSystemCallbacks>);
54
    virtual void createSnapshotFileAndReadMetadata(const KURL&, PassOwnPtr<AsyncFileSystemCallbacks>);
54
    virtual void createSnapshotFileAndReadMetadata(const URL&, PassOwnPtr<AsyncFileSystemCallbacks>);
55
};
55
};
56
56
57
} // namespace WebCore
57
} // namespace WebCore
- a/Source/WebCore/platform/efl/ErrorsEfl.cpp -3 / +3 lines
Lines 90-110 ResourceError printError(const PrintContext* printContext, const String& errorMe a/Source/WebCore/platform/efl/ErrorsEfl.cpp_sec1
90
{
90
{
91
    DocumentLoader* documentLoader = printContext->frame()->loader().documentLoader();
91
    DocumentLoader* documentLoader = printContext->frame()->loader().documentLoader();
92
92
93
    return ResourceError(errorDomainPrint, PrintErrorGeneral, documentLoader ? documentLoader->url() : KURL(), errorMessage);
93
    return ResourceError(errorDomainPrint, PrintErrorGeneral, documentLoader ? documentLoader->url() : URL(), errorMessage);
94
}
94
}
95
95
96
ResourceError printerNotFoundError(const PrintContext* printContext)
96
ResourceError printerNotFoundError(const PrintContext* printContext)
97
{
97
{
98
    DocumentLoader* documentLoader = printContext->frame()->loader().documentLoader();
98
    DocumentLoader* documentLoader = printContext->frame()->loader().documentLoader();
99
99
100
    return ResourceError(errorDomainPrint, PrintErrorPrinterNotFound, documentLoader ? documentLoader->url() : KURL(), ASCIILiteral("Printer not found"));
100
    return ResourceError(errorDomainPrint, PrintErrorPrinterNotFound, documentLoader ? documentLoader->url() : URL(), ASCIILiteral("Printer not found"));
101
}
101
}
102
102
103
ResourceError invalidPageRangeToPrint(const PrintContext* printContext)
103
ResourceError invalidPageRangeToPrint(const PrintContext* printContext)
104
{
104
{
105
    DocumentLoader* documentLoader = printContext->frame()->loader().documentLoader();
105
    DocumentLoader* documentLoader = printContext->frame()->loader().documentLoader();
106
106
107
    return ResourceError(errorDomainPrint, PrintErrorInvalidPageRange, documentLoader ? documentLoader->url() : KURL(), ASCIILiteral("Invalid page range"));
107
    return ResourceError(errorDomainPrint, PrintErrorInvalidPageRange, documentLoader ? documentLoader->url() : URL(), ASCIILiteral("Invalid page range"));
108
}
108
}
109
109
110
} // namespace WebCore
110
} // namespace WebCore
- a/Source/WebCore/platform/efl/TemporaryLinkStubs.cpp -2 / +2 lines
Lines 34-40 a/Source/WebCore/platform/efl/TemporaryLinkStubs.cpp_sec1
34
#include "Editor.h"
34
#include "Editor.h"
35
#include "FTPDirectoryDocument.h"
35
#include "FTPDirectoryDocument.h"
36
#include "FrameView.h"
36
#include "FrameView.h"
37
#include "KURL.h"
37
#include "URL.h"
38
#include "NotImplemented.h"
38
#include "NotImplemented.h"
39
#include "PluginView.h"
39
#include "PluginView.h"
40
#include "ScrollbarTheme.h"
40
#include "ScrollbarTheme.h"
Lines 51-57 void getSupportedKeySizes(Vector<String>&) a/Source/WebCore/platform/efl/TemporaryLinkStubs.cpp_sec2
51
    notImplemented();
51
    notImplemented();
52
}
52
}
53
53
54
String signedPublicKeyAndChallengeString(unsigned, const String&, const KURL&)
54
String signedPublicKeyAndChallengeString(unsigned, const String&, const URL&)
55
{
55
{
56
    return String();
56
    return String();
57
}
57
}
- a/Source/WebCore/platform/graphics/GraphicsContext.h -2 / +2 lines
Lines 96-102 namespace WebCore { a/Source/WebCore/platform/graphics/GraphicsContext.h_sec1
96
    class ImageBuffer;
96
    class ImageBuffer;
97
    class IntRect;
97
    class IntRect;
98
    class RoundedRect;
98
    class RoundedRect;
99
    class KURL;
99
    class URL;
100
    class GraphicsContext3D;
100
    class GraphicsContext3D;
101
    class TextRun;
101
    class TextRun;
102
    class TransformationMatrix;
102
    class TransformationMatrix;
Lines 400-406 namespace WebCore { a/Source/WebCore/platform/graphics/GraphicsContext.h_sec2
400
        void translate(const FloatSize& size) { translate(size.width(), size.height()); }
400
        void translate(const FloatSize& size) { translate(size.width(), size.height()); }
401
        void translate(float x, float y);
401
        void translate(float x, float y);
402
402
403
        void setURLForRect(const KURL&, const IntRect&);
403
        void setURLForRect(const URL&, const IntRect&);
404
404
405
        void concatCTM(const AffineTransform&);
405
        void concatCTM(const AffineTransform&);
406
        void setCTM(const AffineTransform&);
406
        void setCTM(const AffineTransform&);
- a/Source/WebCore/platform/graphics/MediaPlayer.cpp -6 / +6 lines
Lines 195-201 public: a/Source/WebCore/platform/graphics/MediaPlayer.cpp_sec1
195
195
196
static void addMediaEngine(CreateMediaEnginePlayer, MediaEngineSupportedTypes, MediaEngineSupportsType, MediaEngineGetSitesInMediaCache, MediaEngineClearMediaCache, MediaEngineClearMediaCacheForSite);
196
static void addMediaEngine(CreateMediaEnginePlayer, MediaEngineSupportedTypes, MediaEngineSupportsType, MediaEngineGetSitesInMediaCache, MediaEngineClearMediaCache, MediaEngineClearMediaCacheForSite);
197
197
198
static MediaPlayerFactory* bestMediaEngineForTypeAndCodecs(const String& type, const String& codecs, const String& keySystem, const KURL&, MediaPlayerFactory* current = 0);
198
static MediaPlayerFactory* bestMediaEngineForTypeAndCodecs(const String& type, const String& codecs, const String& keySystem, const URL&, MediaPlayerFactory* current = 0);
199
static MediaPlayerFactory* nextMediaEngine(MediaPlayerFactory* current);
199
static MediaPlayerFactory* nextMediaEngine(MediaPlayerFactory* current);
200
200
201
enum RequeryEngineOptions { DoNotResetEngines, ResetEngines };
201
enum RequeryEngineOptions { DoNotResetEngines, ResetEngines };
Lines 264-270 static const AtomicString& codecs() a/Source/WebCore/platform/graphics/MediaPlayer.cpp_sec2
264
    return codecs;
264
    return codecs;
265
}
265
}
266
266
267
static MediaPlayerFactory* bestMediaEngineForTypeAndCodecs(const String& type, const String& codecs, const String& keySystem, const KURL& url, MediaPlayerFactory* current)
267
static MediaPlayerFactory* bestMediaEngineForTypeAndCodecs(const String& type, const String& codecs, const String& keySystem, const URL& url, MediaPlayerFactory* current)
268
{
268
{
269
    if (type.isEmpty())
269
    if (type.isEmpty())
270
        return 0;
270
        return 0;
Lines 359-365 MediaPlayer::~MediaPlayer() a/Source/WebCore/platform/graphics/MediaPlayer.cpp_sec3
359
    m_mediaPlayerClient = 0;
359
    m_mediaPlayerClient = 0;
360
}
360
}
361
361
362
bool MediaPlayer::load(const KURL& url, const ContentType& contentType, const String& keySystem)
362
bool MediaPlayer::load(const URL& url, const ContentType& contentType, const String& keySystem)
363
{
363
{
364
    m_contentMIMEType = contentType.type().lower();
364
    m_contentMIMEType = contentType.type().lower();
365
    m_contentTypeCodecs = contentType.parameter(codecs());
365
    m_contentTypeCodecs = contentType.parameter(codecs());
Lines 394-400 bool MediaPlayer::load(const KURL& url, const ContentType& contentType, const St a/Source/WebCore/platform/graphics/MediaPlayer.cpp_sec4
394
}
394
}
395
395
396
#if ENABLE(MEDIA_SOURCE)
396
#if ENABLE(MEDIA_SOURCE)
397
bool MediaPlayer::load(const KURL& url, PassRefPtr<HTMLMediaSource> mediaSource)
397
bool MediaPlayer::load(const URL& url, PassRefPtr<HTMLMediaSource> mediaSource)
398
{
398
{
399
    m_mediaSource = mediaSource;
399
    m_mediaSource = mediaSource;
400
    m_contentMIMEType = "";
400
    m_contentMIMEType = "";
Lines 740-746 bool MediaPlayer::copyVideoTextureToPlatformTexture(GraphicsContext3D* context, a/Source/WebCore/platform/graphics/MediaPlayer.cpp_sec5
740
    return m_private->copyVideoTextureToPlatformTexture(context, texture, level, type, internalFormat, premultiplyAlpha, flipY);
740
    return m_private->copyVideoTextureToPlatformTexture(context, texture, level, type, internalFormat, premultiplyAlpha, flipY);
741
}
741
}
742
742
743
MediaPlayer::SupportsType MediaPlayer::supportsType(const ContentType& contentType, const String& keySystem, const KURL& url, const MediaPlayerSupportsTypeClient* client)
743
MediaPlayer::SupportsType MediaPlayer::supportsType(const ContentType& contentType, const String& keySystem, const URL& url, const MediaPlayerSupportsTypeClient* client)
744
{
744
{
745
    String type = contentType.type().lower();
745
    String type = contentType.type().lower();
746
    // The codecs string is not lower-cased because MP4 values are case sensitive
746
    // The codecs string is not lower-cased because MP4 values are case sensitive
Lines 1052-1058 void MediaPlayer::keyError(const String& keySystem, const String& sessionId, Med a/Source/WebCore/platform/graphics/MediaPlayer.cpp_sec6
1052
        m_mediaPlayerClient->mediaPlayerKeyError(this, keySystem, sessionId, errorCode, systemCode);
1052
        m_mediaPlayerClient->mediaPlayerKeyError(this, keySystem, sessionId, errorCode, systemCode);
1053
}
1053
}
1054
1054
1055
void MediaPlayer::keyMessage(const String& keySystem, const String& sessionId, const unsigned char* message, unsigned messageLength, const KURL& defaultURL)
1055
void MediaPlayer::keyMessage(const String& keySystem, const String& sessionId, const unsigned char* message, unsigned messageLength, const URL& defaultURL)
1056
{
1056
{
1057
    if (m_mediaPlayerClient)
1057
    if (m_mediaPlayerClient)
1058
        m_mediaPlayerClient->mediaPlayerKeyMessage(this, keySystem, sessionId, message, messageLength, defaultURL);
1058
        m_mediaPlayerClient->mediaPlayerKeyMessage(this, keySystem, sessionId, message, messageLength, defaultURL);
- a/Source/WebCore/platform/graphics/MediaPlayer.h -9 / +9 lines
Lines 35-41 a/Source/WebCore/platform/graphics/MediaPlayer.h_sec1
35
#include "AudioTrackPrivate.h"
35
#include "AudioTrackPrivate.h"
36
#include "InbandTextTrackPrivate.h"
36
#include "InbandTextTrackPrivate.h"
37
#include "IntRect.h"
37
#include "IntRect.h"
38
#include "KURL.h"
38
#include "URL.h"
39
#include "LayoutRect.h"
39
#include "LayoutRect.h"
40
#include "Timer.h"
40
#include "Timer.h"
41
#include "VideoTrackPrivate.h"
41
#include "VideoTrackPrivate.h"
Lines 194-200 public: a/Source/WebCore/platform/graphics/MediaPlayer.h_sec2
194
    enum MediaKeyErrorCode { UnknownError = 1, ClientError, ServiceError, OutputError, HardwareChangeError, DomainError };
194
    enum MediaKeyErrorCode { UnknownError = 1, ClientError, ServiceError, OutputError, HardwareChangeError, DomainError };
195
    virtual void mediaPlayerKeyAdded(MediaPlayer*, const String& /* keySystem */, const String& /* sessionId */) { }
195
    virtual void mediaPlayerKeyAdded(MediaPlayer*, const String& /* keySystem */, const String& /* sessionId */) { }
196
    virtual void mediaPlayerKeyError(MediaPlayer*, const String& /* keySystem */, const String& /* sessionId */, MediaKeyErrorCode, unsigned short /* systemCode */) { }
196
    virtual void mediaPlayerKeyError(MediaPlayer*, const String& /* keySystem */, const String& /* sessionId */, MediaKeyErrorCode, unsigned short /* systemCode */) { }
197
    virtual void mediaPlayerKeyMessage(MediaPlayer*, const String& /* keySystem */, const String& /* sessionId */, const unsigned char* /* message */, unsigned /* messageLength */, const KURL& /* defaultURL */) { }
197
    virtual void mediaPlayerKeyMessage(MediaPlayer*, const String& /* keySystem */, const String& /* sessionId */, const unsigned char* /* message */, unsigned /* messageLength */, const URL& /* defaultURL */) { }
198
    virtual bool mediaPlayerKeyNeeded(MediaPlayer*, const String& /* keySystem */, const String& /* sessionId */, const unsigned char* /* initData */, unsigned /* initDataLength */) { return false; }
198
    virtual bool mediaPlayerKeyNeeded(MediaPlayer*, const String& /* keySystem */, const String& /* sessionId */, const unsigned char* /* initData */, unsigned /* initDataLength */) { return false; }
199
#endif
199
#endif
200
200
Lines 253-259 public: a/Source/WebCore/platform/graphics/MediaPlayer.h_sec3
253
253
254
    // Media engine support.
254
    // Media engine support.
255
    enum SupportsType { IsNotSupported, IsSupported, MayBeSupported };
255
    enum SupportsType { IsNotSupported, IsSupported, MayBeSupported };
256
    static MediaPlayer::SupportsType supportsType(const ContentType&, const String& keySystem, const KURL&, const MediaPlayerSupportsTypeClient*);
256
    static MediaPlayer::SupportsType supportsType(const ContentType&, const String& keySystem, const URL&, const MediaPlayerSupportsTypeClient*);
257
    static void getSupportedTypes(HashSet<String>&);
257
    static void getSupportedTypes(HashSet<String>&);
258
    static bool isAvailable();
258
    static bool isAvailable();
259
    static void getSitesInMediaCache(Vector<String>&);
259
    static void getSitesInMediaCache(Vector<String>&);
Lines 280-288 public: a/Source/WebCore/platform/graphics/MediaPlayer.h_sec4
280
    IntSize size() const { return m_size; }
280
    IntSize size() const { return m_size; }
281
    void setSize(const IntSize& size);
281
    void setSize(const IntSize& size);
282
282
283
    bool load(const KURL&, const ContentType&, const String& keySystem);
283
    bool load(const URL&, const ContentType&, const String& keySystem);
284
#if ENABLE(MEDIA_SOURCE)
284
#if ENABLE(MEDIA_SOURCE)
285
    bool load(const KURL&, PassRefPtr<HTMLMediaSource>);
285
    bool load(const URL&, PassRefPtr<HTMLMediaSource>);
286
#endif
286
#endif
287
    void cancelLoad();
287
    void cancelLoad();
288
288
Lines 446-452 public: a/Source/WebCore/platform/graphics/MediaPlayer.h_sec5
446
#if ENABLE(ENCRYPTED_MEDIA)
446
#if ENABLE(ENCRYPTED_MEDIA)
447
    void keyAdded(const String& keySystem, const String& sessionId);
447
    void keyAdded(const String& keySystem, const String& sessionId);
448
    void keyError(const String& keySystem, const String& sessionId, MediaPlayerClient::MediaKeyErrorCode, unsigned short systemCode);
448
    void keyError(const String& keySystem, const String& sessionId, MediaPlayerClient::MediaKeyErrorCode, unsigned short systemCode);
449
    void keyMessage(const String& keySystem, const String& sessionId, const unsigned char* message, unsigned messageLength, const KURL& defaultURL);
449
    void keyMessage(const String& keySystem, const String& sessionId, const unsigned char* message, unsigned messageLength, const URL& defaultURL);
450
    bool keyNeeded(const String& keySystem, const String& sessionId, const unsigned char* initData, unsigned initDataLength);
450
    bool keyNeeded(const String& keySystem, const String& sessionId, const unsigned char* initData, unsigned initDataLength);
451
#endif
451
#endif
452
452
Lines 499-505 private: a/Source/WebCore/platform/graphics/MediaPlayer.h_sec6
499
    Timer<MediaPlayer> m_reloadTimer;
499
    Timer<MediaPlayer> m_reloadTimer;
500
    OwnPtr<MediaPlayerPrivateInterface> m_private;
500
    OwnPtr<MediaPlayerPrivateInterface> m_private;
501
    MediaPlayerFactory* m_currentMediaEngine;
501
    MediaPlayerFactory* m_currentMediaEngine;
502
    KURL m_url;
502
    URL m_url;
503
    String m_contentMIMEType;
503
    String m_contentMIMEType;
504
    String m_contentTypeCodecs;
504
    String m_contentTypeCodecs;
505
    String m_keySystem;
505
    String m_keySystem;
Lines 526-534 private: a/Source/WebCore/platform/graphics/MediaPlayer.h_sec7
526
typedef PassOwnPtr<MediaPlayerPrivateInterface> (*CreateMediaEnginePlayer)(MediaPlayer*);
526
typedef PassOwnPtr<MediaPlayerPrivateInterface> (*CreateMediaEnginePlayer)(MediaPlayer*);
527
typedef void (*MediaEngineSupportedTypes)(HashSet<String>& types);
527
typedef void (*MediaEngineSupportedTypes)(HashSet<String>& types);
528
#if ENABLE(ENCRYPTED_MEDIA) || ENABLE(ENCRYPTED_MEDIA_V2)
528
#if ENABLE(ENCRYPTED_MEDIA) || ENABLE(ENCRYPTED_MEDIA_V2)
529
typedef MediaPlayer::SupportsType (*MediaEngineSupportsType)(const String& type, const String& codecs, const String& keySystem, const KURL& url);
529
typedef MediaPlayer::SupportsType (*MediaEngineSupportsType)(const String& type, const String& codecs, const String& keySystem, const URL& url);
530
#else
530
#else
531
typedef MediaPlayer::SupportsType (*MediaEngineSupportsType)(const String& type, const String& codecs, const KURL& url);
531
typedef MediaPlayer::SupportsType (*MediaEngineSupportsType)(const String& type, const String& codecs, const URL& url);
532
#endif
532
#endif
533
typedef void (*MediaEngineGetSitesInMediaCache)(Vector<String>&);
533
typedef void (*MediaEngineGetSitesInMediaCache)(Vector<String>&);
534
typedef void (*MediaEngineClearMediaCache)();
534
typedef void (*MediaEngineClearMediaCache)();
- a/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp -1 / +1 lines
Lines 35-41 a/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp_sec1
35
#include "GraphicsContext.h"
35
#include "GraphicsContext.h"
36
#include "InbandTextTrackPrivateAVF.h"
36
#include "InbandTextTrackPrivateAVF.h"
37
#include "InbandTextTrackPrivateClient.h"
37
#include "InbandTextTrackPrivateClient.h"
38
#include "KURL.h"
38
#include "URL.h"
39
#include "Logging.h"
39
#include "Logging.h"
40
#include "PlatformLayer.h"
40
#include "PlatformLayer.h"
41
#include "SoftLinking.h"
41
#include "SoftLinking.h"
- a/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp -3 / +3 lines
Lines 41-47 a/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp_sec1
41
#else
41
#else
42
#include "InbandTextTrackPrivateLegacyAVCF.h"
42
#include "InbandTextTrackPrivateLegacyAVCF.h"
43
#endif
43
#endif
44
#include "KURL.h"
44
#include "URL.h"
45
#include "Logging.h"
45
#include "Logging.h"
46
#include "PlatformCALayer.h"
46
#include "PlatformCALayer.h"
47
#include "SoftLinking.h"
47
#include "SoftLinking.h"
Lines 828-834 void MediaPlayerPrivateAVFoundationCF::getSupportedTypes(HashSet<String>& suppor a/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp_sec2
828
    supportedTypes = mimeTypeCache();
828
    supportedTypes = mimeTypeCache();
829
} 
829
} 
830
830
831
MediaPlayer::SupportsType MediaPlayerPrivateAVFoundationCF::supportsType(const String& type, const String& codecs, const KURL&)
831
MediaPlayer::SupportsType MediaPlayerPrivateAVFoundationCF::supportsType(const String& type, const String& codecs, const URL&)
832
{
832
{
833
    // Only return "IsSupported" if there is no codecs parameter for now as there is no way to ask if it supports an
833
    // Only return "IsSupported" if there is no codecs parameter for now as there is no way to ask if it supports an
834
    // extended MIME type until rdar://8721715 is fixed.
834
    // extended MIME type until rdar://8721715 is fixed.
Lines 1298-1304 void AVFWrapper::createAssetForURL(const String& url) a/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp_sec3
1298
{
1298
{
1299
    ASSERT(!avAsset());
1299
    ASSERT(!avAsset());
1300
1300
1301
    RetainPtr<CFURLRef> urlRef = KURL(ParsedURLString, url).createCFURL();
1301
    RetainPtr<CFURLRef> urlRef = URL(ParsedURLString, url).createCFURL();
1302
1302
1303
    AVCFURLAssetRef assetRef = AVCFURLAssetCreateWithURLAndOptions(kCFAllocatorDefault, urlRef.get(), 0, m_notificationQueue);
1303
    AVCFURLAssetRef assetRef = AVCFURLAssetCreateWithURLAndOptions(kCFAllocatorDefault, urlRef.get(), 0, m_notificationQueue);
1304
    m_avAsset = adoptCF(assetRef);
1304
    m_avAsset = adoptCF(assetRef);
- a/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h -1 / +1 lines
Lines 48-54 private: a/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h_sec1
48
    // Engine support
48
    // Engine support
49
    static PassOwnPtr<MediaPlayerPrivateInterface> create(MediaPlayer*);
49
    static PassOwnPtr<MediaPlayerPrivateInterface> create(MediaPlayer*);
50
    static void getSupportedTypes(HashSet<String>& types);
50
    static void getSupportedTypes(HashSet<String>& types);
51
    static MediaPlayer::SupportsType supportsType(const String& type, const String& codecs, const KURL&);
51
    static MediaPlayer::SupportsType supportsType(const String& type, const String& codecs, const URL&);
52
    static bool isAvailable();
52
    static bool isAvailable();
53
53
54
    virtual void cancelLoad();
54
    virtual void cancelLoad();
- a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h -2 / +2 lines
Lines 95-103 private: a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h_sec1
95
    // engine support
95
    // engine support
96
    static PassOwnPtr<MediaPlayerPrivateInterface> create(MediaPlayer*);
96
    static PassOwnPtr<MediaPlayerPrivateInterface> create(MediaPlayer*);
97
    static void getSupportedTypes(HashSet<String>& types);
97
    static void getSupportedTypes(HashSet<String>& types);
98
    static MediaPlayer::SupportsType supportsType(const String& type, const String& codecs, const KURL&);
98
    static MediaPlayer::SupportsType supportsType(const String& type, const String& codecs, const URL&);
99
#if ENABLE(ENCRYPTED_MEDIA) || ENABLE(ENCRYPTED_MEDIA_V2)
99
#if ENABLE(ENCRYPTED_MEDIA) || ENABLE(ENCRYPTED_MEDIA_V2)
100
    static MediaPlayer::SupportsType extendedSupportsType(const String& type, const String& codecs, const String& keySystem, const KURL&);
100
    static MediaPlayer::SupportsType extendedSupportsType(const String& type, const String& codecs, const String& keySystem, const URL&);
101
#endif
101
#endif
102
102
103
    static bool isAvailable();
103
    static bool isAvailable();
- a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm -6 / +6 lines
Lines 37-43 a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm_sec1
37
#import "GraphicsContext.h"
37
#import "GraphicsContext.h"
38
#import "InbandTextTrackPrivateAVFObjC.h"
38
#import "InbandTextTrackPrivateAVFObjC.h"
39
#import "InbandTextTrackPrivateLegacyAVFObjC.h"
39
#import "InbandTextTrackPrivateLegacyAVFObjC.h"
40
#import "KURL.h"
40
#import "URL.h"
41
#import "Logging.h"
41
#import "Logging.h"
42
#import "SecurityOrigin.h"
42
#import "SecurityOrigin.h"
43
#import "SoftLinking.h"
43
#import "SoftLinking.h"
Lines 429-435 void MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL(const String& url) a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm_sec2
429
        [options.get() setObject:headerFields.get() forKey:@"AVURLAssetHTTPHeaderFieldsKey"];
429
        [options.get() setObject:headerFields.get() forKey:@"AVURLAssetHTTPHeaderFieldsKey"];
430
#endif
430
#endif
431
431
432
    NSURL *cocoaURL = KURL(ParsedURLString, url);
432
    NSURL *cocoaURL = URL(ParsedURLString, url);
433
    m_avAsset = adoptNS([[AVURLAsset alloc] initWithURL:cocoaURL options:options.get()]);
433
    m_avAsset = adoptNS([[AVURLAsset alloc] initWithURL:cocoaURL options:options.get()]);
434
434
435
#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
435
#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
Lines 882-888 void MediaPlayerPrivateAVFoundationObjC::getSupportedTypes(HashSet<String>& supp a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm_sec3
882
    supportedTypes = mimeTypeCache();
882
    supportedTypes = mimeTypeCache();
883
} 
883
} 
884
884
885
MediaPlayer::SupportsType MediaPlayerPrivateAVFoundationObjC::supportsType(const String& type, const String& codecs, const KURL&)
885
MediaPlayer::SupportsType MediaPlayerPrivateAVFoundationObjC::supportsType(const String& type, const String& codecs, const URL&)
886
{
886
{
887
    if (!mimeTypeCache().contains(type))
887
    if (!mimeTypeCache().contains(type))
888
        return MediaPlayer::IsNotSupported;
888
        return MediaPlayer::IsNotSupported;
Lines 905-911 static bool keySystemIsSupported(const String& keySystem) a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm_sec4
905
    return false;
905
    return false;
906
}
906
}
907
907
908
MediaPlayer::SupportsType MediaPlayerPrivateAVFoundationObjC::extendedSupportsType(const String& type, const String& codecs, const String& keySystem, const KURL& url)
908
MediaPlayer::SupportsType MediaPlayerPrivateAVFoundationObjC::extendedSupportsType(const String& type, const String& codecs, const String& keySystem, const URL& url)
909
{
909
{
910
    // From: <http://dvcs.w3.org/hg/html-media/raw-file/eme-v0.1b/encrypted-media/encrypted-media.html#dom-canplaytype>
910
    // From: <http://dvcs.w3.org/hg/html-media/raw-file/eme-v0.1b/encrypted-media/encrypted-media.html#dom-canplaytype>
911
    // In addition to the steps in the current specification, this method must run the following steps:
911
    // In addition to the steps in the current specification, this method must run the following steps:
Lines 1117-1123 bool MediaPlayerPrivateAVFoundationObjC::hasSingleSecurityOrigin() const a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm_sec5
1117
    if (!m_avAsset)
1117
    if (!m_avAsset)
1118
        return false;
1118
        return false;
1119
    
1119
    
1120
    RefPtr<SecurityOrigin> resolvedOrigin = SecurityOrigin::create(KURL(wkAVAssetResolvedURL(m_avAsset.get())));
1120
    RefPtr<SecurityOrigin> resolvedOrigin = SecurityOrigin::create(URL(wkAVAssetResolvedURL(m_avAsset.get())));
1121
    RefPtr<SecurityOrigin> requestedOrigin = SecurityOrigin::createFromString(assetURL());
1121
    RefPtr<SecurityOrigin> requestedOrigin = SecurityOrigin::createFromString(assetURL());
1122
    return resolvedOrigin->isSameSchemeHostPort(requestedOrigin.get());
1122
    return resolvedOrigin->isSameSchemeHostPort(requestedOrigin.get());
1123
}
1123
}
Lines 1309-1315 MediaPlayer::MediaKeyException MediaPlayerPrivateAVFoundationObjC::generateKeyRe a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm_sec6
1309
1309
1310
    RefPtr<ArrayBuffer> keyRequestBuffer = ArrayBuffer::create([keyRequest.get() bytes], [keyRequest.get() length]);
1310
    RefPtr<ArrayBuffer> keyRequestBuffer = ArrayBuffer::create([keyRequest.get() bytes], [keyRequest.get() length]);
1311
    RefPtr<Uint8Array> keyRequestArray = Uint8Array::create(keyRequestBuffer, 0, keyRequestBuffer->byteLength());
1311
    RefPtr<Uint8Array> keyRequestArray = Uint8Array::create(keyRequestBuffer, 0, keyRequestBuffer->byteLength());
1312
    player()->keyMessage(keySystem, sessionID, keyRequestArray->data(), keyRequestArray->byteLength(), KURL());
1312
    player()->keyMessage(keySystem, sessionID, keyRequestArray->data(), keyRequestArray->byteLength(), URL());
1313
1313
1314
    // Move ownership of the AVAssetResourceLoadingRequestfrom the keyIDToRequestMap to the sessionIDToRequestMap:
1314
    // Move ownership of the AVAssetResourceLoadingRequestfrom the keyIDToRequestMap to the sessionIDToRequestMap:
1315
    m_sessionIDToRequestMap.set(sessionID, avRequest);
1315
    m_sessionIDToRequestMap.set(sessionID, avRequest);
- a/Source/WebCore/platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm -1 / +1 lines
Lines 66-72 void WebCoreAVFResourceLoader::startLoading() a/Source/WebCore/platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm_sec1
66
    if (m_resource)
66
    if (m_resource)
67
        return;
67
        return;
68
68
69
    KURL requestURL = [[m_avRequest.get() request] URL];
69
    URL requestURL = [[m_avRequest.get() request] URL];
70
70
71
    CachedResourceRequest request(ResourceRequest(requestURL), ResourceLoaderOptions(SendCallbacks, DoNotSniffContent, BufferData, DoNotAllowStoredCredentials, DoNotAskClientForCrossOriginCredentials, DoSecurityCheck, UseDefaultOriginRestrictionsForType));
71
    CachedResourceRequest request(ResourceRequest(requestURL), ResourceLoaderOptions(SendCallbacks, DoNotSniffContent, BufferData, DoNotAllowStoredCredentials, DoNotAskClientForCrossOriginCredentials, DoSecurityCheck, UseDefaultOriginRestrictionsForType));
72
72
- a/Source/WebCore/platform/graphics/blackberry/GradientBlackBerry.cpp -1 / +1 lines
Lines 21-27 a/Source/WebCore/platform/graphics/blackberry/GradientBlackBerry.cpp_sec1
21
#include "AffineTransform.h"
21
#include "AffineTransform.h"
22
#include "GraphicsContext.h"
22
#include "GraphicsContext.h"
23
#include "GraphicsContext3D.h"
23
#include "GraphicsContext3D.h"
24
#include "KURL.h"
24
#include "URL.h"
25
#include "NotImplemented.h"
25
#include "NotImplemented.h"
26
#include "TransformationMatrix.h"
26
#include "TransformationMatrix.h"
27
27
- a/Source/WebCore/platform/graphics/blackberry/GraphicsContextBlackBerry.cpp -2 / +2 lines
Lines 21-30 a/Source/WebCore/platform/graphics/blackberry/GraphicsContextBlackBerry.cpp_sec1
21
#include "AffineTransform.h"
21
#include "AffineTransform.h"
22
#include "Gradient.h"
22
#include "Gradient.h"
23
#include "GraphicsContext3D.h"
23
#include "GraphicsContext3D.h"
24
#include "KURL.h"
25
#include "NotImplemented.h"
24
#include "NotImplemented.h"
26
#include "RoundedRect.h"
25
#include "RoundedRect.h"
27
#include "TransformationMatrix.h"
26
#include "TransformationMatrix.h"
27
#include "URL.h"
28
28
29
#include <BlackBerryPlatformGraphicsContext.h>
29
#include <BlackBerryPlatformGraphicsContext.h>
30
#include <stdio.h>
30
#include <stdio.h>
Lines 387-393 IntRect GraphicsContext::clipBounds() const a/Source/WebCore/platform/graphics/blackberry/GraphicsContextBlackBerry.cpp_sec2
387
    return IntRect(IntPoint(INT_MIN / 2, INT_MIN / 2), IntSize(INT_MAX, INT_MAX));
387
    return IntRect(IntPoint(INT_MIN / 2, INT_MIN / 2), IntSize(INT_MAX, INT_MAX));
388
}
388
}
389
389
390
void GraphicsContext::setURLForRect(const KURL&, const IntRect&)
390
void GraphicsContext::setURLForRect(const URL&, const IntRect&)
391
{
391
{
392
}
392
}
393
393
- a/Source/WebCore/platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp -9 / +9 lines
Lines 67-73 void MediaPlayerPrivate::getSupportedTypes(HashSet<WTF::String>& types) a/Source/WebCore/platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp_sec1
67
        types.add(*i);
67
        types.add(*i);
68
}
68
}
69
69
70
MediaPlayer::SupportsType MediaPlayerPrivate::supportsType(const WTF::String& type, const WTF::String& codecs, const KURL& url)
70
MediaPlayer::SupportsType MediaPlayerPrivate::supportsType(const WTF::String& type, const WTF::String& codecs, const URL& url)
71
{
71
{
72
    bool isRTSP = url.protocolIs("rtsp");
72
    bool isRTSP = url.protocolIs("rtsp");
73
73
Lines 142-148 void MediaPlayerPrivate::load(const WTF::String& url) a/Source/WebCore/platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp_sec2
142
    WTF::String modifiedUrl(url);
142
    WTF::String modifiedUrl(url);
143
143
144
    if (modifiedUrl.startsWith("local://")) {
144
    if (modifiedUrl.startsWith("local://")) {
145
        KURL kurl = KURL(KURL(), modifiedUrl);
145
        URL kurl = URL(URL(), modifiedUrl);
146
        kurl.setProtocol("file");
146
        kurl.setProtocol("file");
147
        WTF::String tempPath(BlackBerry::Platform::Settings::instance()->applicationLocalDirectory().c_str());
147
        WTF::String tempPath(BlackBerry::Platform::Settings::instance()->applicationLocalDirectory().c_str());
148
        tempPath.append(kurl.path());
148
        tempPath.append(kurl.path());
Lines 157-164 void MediaPlayerPrivate::load(const WTF::String& url) a/Source/WebCore/platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp_sec3
157
    // already done a security check on the filesystem: URL as part of the
157
    // already done a security check on the filesystem: URL as part of the
158
    // media resource selection algorithm, we should be OK here.
158
    // media resource selection algorithm, we should be OK here.
159
    if (modifiedUrl.startsWith("filesystem:")) {
159
    if (modifiedUrl.startsWith("filesystem:")) {
160
        KURL kurl = KURL(KURL(), modifiedUrl);
160
        URL kurl = URL(URL(), modifiedUrl);
161
        KURL mediaURL;
161
        URL mediaURL;
162
        WTF::String fsPath;
162
        WTF::String fsPath;
163
        FileSystemType fsType;
163
        FileSystemType fsType;
164
        WebFileSystem::Type type;
164
        WebFileSystem::Type type;
Lines 201-207 void MediaPlayerPrivate::load(const WTF::String& url) a/Source/WebCore/platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp_sec4
201
201
202
    WTF::String cookiePairs;
202
    WTF::String cookiePairs;
203
    if (!url.isEmpty())
203
    if (!url.isEmpty())
204
        cookiePairs = cookieManager().getCookie(KURL(ParsedURLString, url), WithHttpOnlyCookies);
204
        cookiePairs = cookieManager().getCookie(URL(ParsedURLString, url), WithHttpOnlyCookies);
205
    m_platformPlayer->load(playerID, modifiedUrl, m_webCorePlayer->userAgent(), cookiePairs);
205
    m_platformPlayer->load(playerID, modifiedUrl, m_webCorePlayer->userAgent(), cookiePairs);
206
}
206
}
207
207
Lines 728-734 void MediaPlayerPrivate::onBuffering(bool flag) a/Source/WebCore/platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp_sec5
728
728
729
static ProtectionSpace generateProtectionSpaceFromMMRAuthChallenge(const MMRAuthChallenge& authChallenge)
729
static ProtectionSpace generateProtectionSpaceFromMMRAuthChallenge(const MMRAuthChallenge& authChallenge)
730
{
730
{
731
    KURL url(ParsedURLString, WTF::String(authChallenge.url().c_str()));
731
    URL url(ParsedURLString, WTF::String(authChallenge.url().c_str()));
732
    ASSERT(url.isValid());
732
    ASSERT(url.isValid());
733
733
734
    return ProtectionSpace(url.host(), url.port(),
734
    return ProtectionSpace(url.host(), url.port(),
Lines 739-745 static ProtectionSpace generateProtectionSpaceFromMMRAuthChallenge(const MMRAuth a/Source/WebCore/platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp_sec6
739
739
740
void MediaPlayerPrivate::onAuthenticationNeeded(MMRAuthChallenge& authChallenge)
740
void MediaPlayerPrivate::onAuthenticationNeeded(MMRAuthChallenge& authChallenge)
741
{
741
{
742
    KURL url(ParsedURLString, WTF::String(authChallenge.url().c_str()));
742
    URL url(ParsedURLString, WTF::String(authChallenge.url().c_str()));
743
    if (!url.isValid())
743
    if (!url.isValid())
744
        return;
744
        return;
745
745
Lines 755-761 void MediaPlayerPrivate::onAuthenticationNeeded(MMRAuthChallenge& authChallenge) a/Source/WebCore/platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp_sec7
755
        this, m_webCorePlayer->mediaPlayerClient()->mediaPlayerHostWindow()->platformPageClient());
755
        this, m_webCorePlayer->mediaPlayerClient()->mediaPlayerHostWindow()->platformPageClient());
756
}
756
}
757
757
758
void MediaPlayerPrivate::notifyChallengeResult(const KURL& url, const ProtectionSpace&, AuthenticationChallengeResult result, const Credential& credential)
758
void MediaPlayerPrivate::notifyChallengeResult(const URL& url, const ProtectionSpace&, AuthenticationChallengeResult result, const Credential& credential)
759
{
759
{
760
    m_isAuthenticationChallenging = false;
760
    m_isAuthenticationChallenging = false;
761
761
Lines 767-773 void MediaPlayerPrivate::notifyChallengeResult(const KURL& url, const Protection a/Source/WebCore/platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp_sec8
767
767
768
void MediaPlayerPrivate::onAuthenticationAccepted(const MMRAuthChallenge& authChallenge) const
768
void MediaPlayerPrivate::onAuthenticationAccepted(const MMRAuthChallenge& authChallenge) const
769
{
769
{
770
    KURL url(ParsedURLString, WTF::String(authChallenge.url().c_str()));
770
    URL url(ParsedURLString, WTF::String(authChallenge.url().c_str()));
771
    if (!url.isValid())
771
    if (!url.isValid())
772
        return;
772
        return;
773
773
- a/Source/WebCore/platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h -2 / +2 lines
Lines 49-55 public: a/Source/WebCore/platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h_sec1
49
    static PassOwnPtr<MediaPlayerPrivateInterface> create(MediaPlayer*);
49
    static PassOwnPtr<MediaPlayerPrivateInterface> create(MediaPlayer*);
50
    static void registerMediaEngine(MediaEngineRegistrar);
50
    static void registerMediaEngine(MediaEngineRegistrar);
51
    static void getSupportedTypes(HashSet<WTF::String>&);
51
    static void getSupportedTypes(HashSet<WTF::String>&);
52
    static MediaPlayer::SupportsType supportsType(const WTF::String&, const WTF::String&, const KURL&);
52
    static MediaPlayer::SupportsType supportsType(const WTF::String&, const WTF::String&, const URL&);
53
    static void notifyAppActivatedEvent(bool);
53
    static void notifyAppActivatedEvent(bool);
54
    static void setCertificatePath(const WTF::String&);
54
    static void setCertificatePath(const WTF::String&);
55
55
Lines 154-160 public: a/Source/WebCore/platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h_sec2
154
    virtual void onCreateHolePunchRect();
154
    virtual void onCreateHolePunchRect();
155
    virtual void onDestroyHolePunchRect();
155
    virtual void onDestroyHolePunchRect();
156
156
157
    virtual void notifyChallengeResult(const KURL&, const ProtectionSpace&, AuthenticationChallengeResult, const Credential&);
157
    virtual void notifyChallengeResult(const URL&, const ProtectionSpace&, AuthenticationChallengeResult, const Credential&);
158
158
159
    virtual bool isProcessingUserGesture() const;
159
    virtual bool isProcessingUserGesture() const;
160
    virtual bool isFullscreen() const;
160
    virtual bool isFullscreen() const;
- a/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp -1 / +1 lines
Lines 757-763 void GraphicsContext::setPlatformStrokeStyle(StrokeStyle strokeStyle) a/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp_sec1
757
    }
757
    }
758
}
758
}
759
759
760
void GraphicsContext::setURLForRect(const KURL&, const IntRect&)
760
void GraphicsContext::setURLForRect(const URL&, const IntRect&)
761
{
761
{
762
    notImplemented();
762
    notImplemented();
763
}
763
}
- a/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp -2 / +2 lines
Lines 33-39 a/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp_sec1
33
#include "GraphicsContextPlatformPrivateCG.h"
33
#include "GraphicsContextPlatformPrivateCG.h"
34
#include "ImageBuffer.h"
34
#include "ImageBuffer.h"
35
#include "ImageOrientation.h"
35
#include "ImageOrientation.h"
36
#include "KURL.h"
36
#include "URL.h"
37
#include "Path.h"
37
#include "Path.h"
38
#include "Pattern.h"
38
#include "Pattern.h"
39
#include "ShadowBlur.h"
39
#include "ShadowBlur.h"
Lines 1284-1290 void GraphicsContext::drawLineForText(const FloatPoint& point, float width, bool a/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp_sec2
1284
        CGContextSetShouldAntialias(platformContext(), true);
1284
        CGContextSetShouldAntialias(platformContext(), true);
1285
}
1285
}
1286
1286
1287
void GraphicsContext::setURLForRect(const KURL& link, const IntRect& destRect)
1287
void GraphicsContext::setURLForRect(const URL& link, const IntRect& destRect)
1288
{
1288
{
1289
    if (paintingDisabled())
1289
    if (paintingDisabled())
1290
        return;
1290
        return;
- a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp -6 / +6 lines
Lines 28-34 a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp_sec1
28
28
29
#include "GStreamerUtilities.h"
29
#include "GStreamerUtilities.h"
30
#include "GStreamerVersioning.h"
30
#include "GStreamerVersioning.h"
31
#include "KURL.h"
31
#include "URL.h"
32
#include "Logging.h"
32
#include "Logging.h"
33
#include "MIMETypeRegistry.h"
33
#include "MIMETypeRegistry.h"
34
#include "MediaPlayer.h"
34
#include "MediaPlayer.h"
Lines 334-340 void MediaPlayerPrivateGStreamer::load(const String& url) a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp_sec2
334
    if (!initializeGStreamerAndRegisterWebKitElements())
334
    if (!initializeGStreamerAndRegisterWebKitElements())
335
        return;
335
        return;
336
336
337
    KURL kurl(KURL(), url);
337
    URL kurl(URL(), url);
338
    String cleanUrl(url);
338
    String cleanUrl(url);
339
339
340
    // Clean out everything after file:// url path.
340
    // Clean out everything after file:// url path.
Lines 346-352 void MediaPlayerPrivateGStreamer::load(const String& url) a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp_sec3
346
346
347
    ASSERT(m_playBin);
347
    ASSERT(m_playBin);
348
348
349
    m_url = KURL(KURL(), cleanUrl);
349
    m_url = URL(URL(), cleanUrl);
350
    g_object_set(m_playBin.get(), "uri", cleanUrl.utf8().data(), NULL);
350
    g_object_set(m_playBin.get(), "uri", cleanUrl.utf8().data(), NULL);
351
351
352
    INFO_MEDIA_MESSAGE("Load %s", cleanUrl.utf8().data());
352
    INFO_MEDIA_MESSAGE("Load %s", cleanUrl.utf8().data());
Lines 1428-1435 bool MediaPlayerPrivateGStreamer::loadNextLocation() a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp_sec4
1428
        // Found a candidate. new-location is not always an absolute url
1428
        // Found a candidate. new-location is not always an absolute url
1429
        // though. We need to take the base of the current url and
1429
        // though. We need to take the base of the current url and
1430
        // append the value of new-location to it.
1430
        // append the value of new-location to it.
1431
        KURL baseUrl = gst_uri_is_valid(newLocation) ? KURL() : m_url;
1431
        URL baseUrl = gst_uri_is_valid(newLocation) ? URL() : m_url;
1432
        KURL newUrl = KURL(baseUrl, newLocation);
1432
        URL newUrl = URL(baseUrl, newLocation);
1433
1433
1434
        RefPtr<SecurityOrigin> securityOrigin = SecurityOrigin::create(m_url);
1434
        RefPtr<SecurityOrigin> securityOrigin = SecurityOrigin::create(m_url);
1435
        if (securityOrigin->canRequest(newUrl)) {
1435
        if (securityOrigin->canRequest(newUrl)) {
Lines 1653-1659 void MediaPlayerPrivateGStreamer::getSupportedTypes(HashSet<String>& types) a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp_sec5
1653
    types = mimeTypeCache();
1653
    types = mimeTypeCache();
1654
}
1654
}
1655
1655
1656
MediaPlayer::SupportsType MediaPlayerPrivateGStreamer::supportsType(const String& type, const String& codecs, const KURL&)
1656
MediaPlayer::SupportsType MediaPlayerPrivateGStreamer::supportsType(const String& type, const String& codecs, const URL&)
1657
{
1657
{
1658
    if (type.isNull() || type.isEmpty())
1658
    if (type.isNull() || type.isEmpty())
1659
        return MediaPlayer::IsNotSupported;
1659
        return MediaPlayer::IsNotSupported;
- a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h -2 / +2 lines
Lines 115-121 private: a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h_sec1
115
    static PassOwnPtr<MediaPlayerPrivateInterface> create(MediaPlayer*);
115
    static PassOwnPtr<MediaPlayerPrivateInterface> create(MediaPlayer*);
116
116
117
    static void getSupportedTypes(HashSet<String>&);
117
    static void getSupportedTypes(HashSet<String>&);
118
    static MediaPlayer::SupportsType supportsType(const String& type, const String& codecs, const KURL&);
118
    static MediaPlayer::SupportsType supportsType(const String& type, const String& codecs, const URL&);
119
119
120
    static bool isAvailable();
120
    static bool isAvailable();
121
121
Lines 180-186 private: a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h_sec2
180
    guint m_readyTimerHandler;
180
    guint m_readyTimerHandler;
181
    GRefPtr<GstElement> m_webkitAudioSink;
181
    GRefPtr<GstElement> m_webkitAudioSink;
182
    mutable long m_totalBytes;
182
    mutable long m_totalBytes;
183
    KURL m_url;
183
    URL m_url;
184
    bool m_preservesPitch;
184
    bool m_preservesPitch;
185
    GstState m_requestedState;
185
    GstState m_requestedState;
186
    GRefPtr<GstElement> m_autoAudioSink;
186
    GRefPtr<GstElement> m_autoAudioSink;
- a/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp -3 / +3 lines
Lines 497-503 static gboolean webKitWebSrcStart(WebKitWebSrc* src) a/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp_sec1
497
497
498
    ASSERT(!priv->client);
498
    ASSERT(!priv->client);
499
499
500
    KURL url = KURL(KURL(), priv->uri);
500
    URL url = URL(URL(), priv->uri);
501
501
502
    ResourceRequest request(url);
502
    ResourceRequest request(url);
503
    request.setAllowCookies(true);
503
    request.setAllowCookies(true);
Lines 688-694 static gboolean webKitWebSrcSetUri(GstURIHandler* handler, const gchar* uri, GEr a/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp_sec2
688
    if (!uri)
688
    if (!uri)
689
        return TRUE;
689
        return TRUE;
690
690
691
    KURL url(KURL(), uri);
691
    URL url(URL(), uri);
692
692
693
    if (!url.isValid() || !url.protocolIsInHTTPFamily()) {
693
    if (!url.isValid() || !url.protocolIsInHTTPFamily()) {
694
        g_set_error(error, GST_URI_ERROR, GST_URI_ERROR_BAD_URI, "Invalid URI '%s'", uri);
694
        g_set_error(error, GST_URI_ERROR, GST_URI_ERROR_BAD_URI, "Invalid URI '%s'", uri);
Lines 739-745 static gboolean webKitWebSrcSetUri(GstURIHandler* handler, const gchar* uri) a/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp_sec3
739
    if (!uri)
739
    if (!uri)
740
        return TRUE;
740
        return TRUE;
741
741
742
    KURL url(KURL(), uri);
742
    URL url(URL(), uri);
743
743
744
    if (!url.isValid() || !url.protocolIsInHTTPFamily()) {
744
    if (!url.isValid() || !url.protocolIsInHTTPFamily()) {
745
        GST_ERROR_OBJECT(src, "Invalid URI '%s'", uri);
745
        GST_ERROR_OBJECT(src, "Invalid URI '%s'", uri);
- a/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h -2 / +2 lines
Lines 75-83 private: a/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h_sec1
75
    // engine support
75
    // engine support
76
    static PassOwnPtr<MediaPlayerPrivateInterface> create(MediaPlayer*);
76
    static PassOwnPtr<MediaPlayerPrivateInterface> create(MediaPlayer*);
77
    static void getSupportedTypes(HashSet<String>& types);
77
    static void getSupportedTypes(HashSet<String>& types);
78
    static MediaPlayer::SupportsType supportsType(const String& type, const String& codecs, const KURL&);
78
    static MediaPlayer::SupportsType supportsType(const String& type, const String& codecs, const URL&);
79
#if ENABLE(ENCRYPTED_MEDIA) || ENABLE(ENCRYPTED_MEDIA_V2)
79
#if ENABLE(ENCRYPTED_MEDIA) || ENABLE(ENCRYPTED_MEDIA_V2)
80
    static MediaPlayer::SupportsType extendedSupportsType(const String& type, const String& codecs, const String& keySystem, const KURL&);
80
    static MediaPlayer::SupportsType extendedSupportsType(const String& type, const String& codecs, const String& keySystem, const URL&);
81
#endif
81
#endif
82
82
83
    static void getSitesInMediaCache(Vector<String>&);
83
    static void getSitesInMediaCache(Vector<String>&);
- a/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm -5 / +5 lines
Lines 35-41 a/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm_sec1
35
#import "FrameView.h"
35
#import "FrameView.h"
36
#import "HostWindow.h"
36
#import "HostWindow.h"
37
#import "GraphicsContext.h"
37
#import "GraphicsContext.h"
38
#import "KURL.h"
38
#import "URL.h"
39
#import "Logging.h"
39
#import "Logging.h"
40
#import "MIMETypeRegistry.h"
40
#import "MIMETypeRegistry.h"
41
#import "SecurityOrigin.h"
41
#import "SecurityOrigin.h"
Lines 265-271 NSMutableDictionary *MediaPlayerPrivateQTKit::commonMovieAttributes() a/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm_sec2
265
265
266
void MediaPlayerPrivateQTKit::createQTMovie(const String& url)
266
void MediaPlayerPrivateQTKit::createQTMovie(const String& url)
267
{
267
{
268
    KURL kURL(ParsedURLString, url);
268
    URL kURL(ParsedURLString, url);
269
    NSURL *cocoaURL = kURL;
269
    NSURL *cocoaURL = kURL;
270
    NSMutableDictionary *movieAttributes = commonMovieAttributes();    
270
    NSMutableDictionary *movieAttributes = commonMovieAttributes();    
271
    [movieAttributes setValue:cocoaURL forKey:QTMovieURLAttribute];
271
    [movieAttributes setValue:cocoaURL forKey:QTMovieURLAttribute];
Lines 1462-1468 void MediaPlayerPrivateQTKit::getSupportedTypes(HashSet<String>& supportedTypes) a/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm_sec3
1462
    concatenateHashSets(supportedTypes, mimeCommonTypesCache());
1462
    concatenateHashSets(supportedTypes, mimeCommonTypesCache());
1463
}
1463
}
1464
1464
1465
MediaPlayer::SupportsType MediaPlayerPrivateQTKit::supportsType(const String& type, const String& codecs, const KURL&)
1465
MediaPlayer::SupportsType MediaPlayerPrivateQTKit::supportsType(const String& type, const String& codecs, const URL&)
1466
{
1466
{
1467
    // Only return "IsSupported" if there is no codecs parameter for now as there is no way to ask QT if it supports an
1467
    // Only return "IsSupported" if there is no codecs parameter for now as there is no way to ask QT if it supports an
1468
    // extended MIME type yet.
1468
    // extended MIME type yet.
Lines 1480-1486 MediaPlayer::SupportsType MediaPlayerPrivateQTKit::supportsType(const String& ty a/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm_sec4
1480
}
1480
}
1481
1481
1482
#if ENABLE(ENCRYPTED_MEDIA) || ENABLE(ENCRYPTED_MEDIA_V2)
1482
#if ENABLE(ENCRYPTED_MEDIA) || ENABLE(ENCRYPTED_MEDIA_V2)
1483
MediaPlayer::SupportsType MediaPlayerPrivateQTKit::extendedSupportsType(const String& type, const String& codecs, const String& keySystem, const KURL& url)
1483
MediaPlayer::SupportsType MediaPlayerPrivateQTKit::extendedSupportsType(const String& type, const String& codecs, const String& keySystem, const URL& url)
1484
{
1484
{
1485
    // QTKit does not support any encrytped media, so return IsNotSupported if the keySystem is non-NULL:
1485
    // QTKit does not support any encrytped media, so return IsNotSupported if the keySystem is non-NULL:
1486
    if (!keySystem.isNull() || !keySystem.isEmpty())
1486
    if (!keySystem.isNull() || !keySystem.isEmpty())
Lines 1631-1637 bool MediaPlayerPrivateQTKit::hasSingleSecurityOrigin() const a/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm_sec5
1631
    if (!m_qtMovie)
1631
    if (!m_qtMovie)
1632
        return false;
1632
        return false;
1633
1633
1634
    RefPtr<SecurityOrigin> resolvedOrigin = SecurityOrigin::create(KURL(wkQTMovieResolvedURL(m_qtMovie.get())));
1634
    RefPtr<SecurityOrigin> resolvedOrigin = SecurityOrigin::create(URL(wkQTMovieResolvedURL(m_qtMovie.get())));
1635
    RefPtr<SecurityOrigin> requestedOrigin = SecurityOrigin::createFromString(m_movieURL);
1635
    RefPtr<SecurityOrigin> requestedOrigin = SecurityOrigin::createFromString(m_movieURL);
1636
    return resolvedOrigin->isSameSchemeHostPort(requestedOrigin.get());
1636
    return resolvedOrigin->isSameSchemeHostPort(requestedOrigin.get());
1637
}
1637
}
- a/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp -1 / +1 lines
Lines 1521-1527 void GraphicsContext::set3DTransform(const TransformationMatrix& transform) a/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp_sec1
1521
}
1521
}
1522
#endif
1522
#endif
1523
1523
1524
void GraphicsContext::setURLForRect(const KURL&, const IntRect&)
1524
void GraphicsContext::setURLForRect(const URL&, const IntRect&)
1525
{
1525
{
1526
    notImplemented();
1526
    notImplemented();
1527
}
1527
}
- a/Source/WebCore/platform/graphics/qt/MediaPlayerPrivateQt.cpp -2 / +2 lines
Lines 80-86 void MediaPlayerPrivateQt::getSupportedTypes(HashSet<String> &supported) a/Source/WebCore/platform/graphics/qt/MediaPlayerPrivateQt.cpp_sec1
80
    }
80
    }
81
}
81
}
82
82
83
MediaPlayer::SupportsType MediaPlayerPrivateQt::supportsType(const String& mime, const String& codec, const KURL&)
83
MediaPlayer::SupportsType MediaPlayerPrivateQt::supportsType(const String& mime, const String& codec, const URL&)
84
{
84
{
85
    if (!mime.startsWith("audio/") && !mime.startsWith("video/"))
85
    if (!mime.startsWith("audio/") && !mime.startsWith("video/"))
86
        return MediaPlayer::IsNotSupported;
86
        return MediaPlayer::IsNotSupported;
Lines 191-197 void MediaPlayerPrivateQt::commitLoad(const String& url) a/Source/WebCore/platform/graphics/qt/MediaPlayerPrivateQt.cpp_sec2
191
        m_webCorePlayer->readyStateChanged();
191
        m_webCorePlayer->readyStateChanged();
192
    }
192
    }
193
193
194
    KURL kUrl(ParsedURLString, url);
194
    URL kUrl(ParsedURLString, url);
195
    const QUrl rUrl = kUrl;
195
    const QUrl rUrl = kUrl;
196
    const QString scheme = rUrl.scheme().toLower();
196
    const QString scheme = rUrl.scheme().toLower();
197
197
- a/Source/WebCore/platform/graphics/qt/MediaPlayerPrivateQt.h -1 / +1 lines
Lines 53-59 public: a/Source/WebCore/platform/graphics/qt/MediaPlayerPrivateQt.h_sec1
53
53
54
    static void registerMediaEngine(MediaEngineRegistrar);
54
    static void registerMediaEngine(MediaEngineRegistrar);
55
    static void getSupportedTypes(HashSet<String>&);
55
    static void getSupportedTypes(HashSet<String>&);
56
    static MediaPlayer::SupportsType supportsType(const String&, const String&, const KURL&);
56
    static MediaPlayer::SupportsType supportsType(const String&, const String&, const URL&);
57
    static bool isAvailable() { return true; }
57
    static bool isAvailable() { return true; }
58
58
59
    bool hasVideo() const;
59
    bool hasVideo() const;
- a/Source/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp -3 / +3 lines
Lines 35-41 a/Source/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp_sec1
35
#include "Frame.h"
35
#include "Frame.h"
36
#include "FrameView.h"
36
#include "FrameView.h"
37
#include "GraphicsContext.h"
37
#include "GraphicsContext.h"
38
#include "KURL.h"
39
#include "MediaPlayerPrivateTaskTimer.h"
38
#include "MediaPlayerPrivateTaskTimer.h"
40
#include "Page.h"
39
#include "Page.h"
41
#include "QTCFDictionary.h"
40
#include "QTCFDictionary.h"
Lines 48-53 a/Source/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp_sec2
48
#include "SoftLinking.h"
47
#include "SoftLinking.h"
49
#include "TimeRanges.h"
48
#include "TimeRanges.h"
50
#include "Timer.h"
49
#include "Timer.h"
50
#include "URL.h"
51
#include <AssertMacros.h>
51
#include <AssertMacros.h>
52
#include <CoreGraphics/CGAffineTransform.h>
52
#include <CoreGraphics/CGAffineTransform.h>
53
#include <CoreGraphics/CGContext.h>
53
#include <CoreGraphics/CGContext.h>
Lines 266-272 void MediaPlayerPrivateQuickTimeVisualContext::setUpCookiesForQuickTime(const St a/Source/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp_sec3
266
    if (!frame || !frame->page() || !frame->page()->settings().cookieEnabled())
266
    if (!frame || !frame->page() || !frame->page()->settings().cookieEnabled())
267
        return;
267
        return;
268
268
269
    KURL movieURL = KURL(KURL(), url);
269
    URL movieURL = URL(URL(), url);
270
    Vector<Cookie> documentCookies;
270
    Vector<Cookie> documentCookies;
271
    if (!getRawCookies(frame->document(), movieURL, documentCookies))
271
    if (!getRawCookies(frame->document(), movieURL, documentCookies))
272
        return;
272
        return;
Lines 1015-1021 bool MediaPlayerPrivateQuickTimeVisualContext::isAvailable() a/Source/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp_sec4
1015
#endif
1015
#endif
1016
}
1016
}
1017
1017
1018
MediaPlayer::SupportsType MediaPlayerPrivateQuickTimeVisualContext::supportsType(const String& type, const String& codecs, const KURL&)
1018
MediaPlayer::SupportsType MediaPlayerPrivateQuickTimeVisualContext::supportsType(const String& type, const String& codecs, const URL&)
1019
{
1019
{
1020
    // only return "IsSupported" if there is no codecs parameter for now as there is no way to ask QT if it supports an
1020
    // only return "IsSupported" if there is no codecs parameter for now as there is no way to ask QT if it supports an
1021
    //  extended MIME type
1021
    //  extended MIME type
- a/Source/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.h -1 / +1 lines
Lines 128-134 private: a/Source/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.h_sec1
128
    // engine support
128
    // engine support
129
    static PassOwnPtr<MediaPlayerPrivateInterface> create(MediaPlayer*);
129
    static PassOwnPtr<MediaPlayerPrivateInterface> create(MediaPlayer*);
130
    static void getSupportedTypes(HashSet<String>& types);
130
    static void getSupportedTypes(HashSet<String>& types);
131
    static MediaPlayer::SupportsType supportsType(const String& type, const String& codecs, const KURL&);
131
    static MediaPlayer::SupportsType supportsType(const String& type, const String& codecs, const URL&);
132
    static bool isAvailable();
132
    static bool isAvailable();
133
133
134
#if USE(ACCELERATED_COMPOSITING)
134
#if USE(ACCELERATED_COMPOSITING)
- a/Source/WebCore/platform/graphics/wince/GraphicsContextWinCE.cpp -1 / +1 lines
Lines 981-987 void GraphicsContext::setPlatformStrokeThickness(float strokeThickness) a/Source/WebCore/platform/graphics/wince/GraphicsContextWinCE.cpp_sec1
981
    notImplemented();
981
    notImplemented();
982
}
982
}
983
983
984
void GraphicsContext::setURLForRect(const KURL& link, const IntRect& destRect)
984
void GraphicsContext::setURLForRect(const URL& link, const IntRect& destRect)
985
{
985
{
986
    notImplemented();
986
    notImplemented();
987
}
987
}
- a/Source/WebCore/platform/graphics/wince/MediaPlayerPrivateWinCE.h -1 / +1 lines
Lines 100-106 namespace WebCore { a/Source/WebCore/platform/graphics/wince/MediaPlayerPrivateWinCE.h_sec1
100
        // engine support
100
        // engine support
101
        static PassOwnPtr<MediaPlayerPrivateInterface> create(MediaPlayer*);
101
        static PassOwnPtr<MediaPlayerPrivateInterface> create(MediaPlayer*);
102
        static void getSupportedTypes(HashSet<String>& types);
102
        static void getSupportedTypes(HashSet<String>& types);
103
        static MediaPlayer::SupportsType supportsType(const String& type, const String& codecs, const KURL&);
103
        static MediaPlayer::SupportsType supportsType(const String& type, const String& codecs, const URL&);
104
        static bool isAvailable();
104
        static bool isAvailable();
105
105
106
        virtual String engineDescription() const { return "WinCE"; }
106
        virtual String engineDescription() const { return "WinCE"; }
- a/Source/WebCore/platform/gtk/AsyncFileSystemGtk.cpp -12 / +12 lines
Lines 62-124 AsyncFileSystemGtk::~AsyncFileSystemGtk() a/Source/WebCore/platform/gtk/AsyncFileSystemGtk.cpp_sec1
62
    notImplemented();
62
    notImplemented();
63
}
63
}
64
64
65
void AsyncFileSystemGtk::move(const KURL& sourcePath, const KURL& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
65
void AsyncFileSystemGtk::move(const URL& sourcePath, const URL& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
66
{
66
{
67
    notImplemented();
67
    notImplemented();
68
}
68
}
69
69
70
void AsyncFileSystemGtk::copy(const KURL& sourcePath, const KURL& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
70
void AsyncFileSystemGtk::copy(const URL& sourcePath, const URL& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
71
{
71
{
72
    notImplemented();
72
    notImplemented();
73
}
73
}
74
74
75
void AsyncFileSystemGtk::remove(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
75
void AsyncFileSystemGtk::remove(const URL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
76
{
76
{
77
    notImplemented();
77
    notImplemented();
78
}
78
}
79
79
80
void AsyncFileSystemGtk::removeRecursively(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
80
void AsyncFileSystemGtk::removeRecursively(const URL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
81
{
81
{
82
    notImplemented();
82
    notImplemented();
83
}
83
}
84
84
85
void AsyncFileSystemGtk::readMetadata(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
85
void AsyncFileSystemGtk::readMetadata(const URL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
86
{
86
{
87
    notImplemented();
87
    notImplemented();
88
}
88
}
89
89
90
void AsyncFileSystemGtk::createFile(const KURL& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
90
void AsyncFileSystemGtk::createFile(const URL& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
91
{
91
{
92
    notImplemented();
92
    notImplemented();
93
}
93
}
94
94
95
void AsyncFileSystemGtk::createDirectory(const KURL& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
95
void AsyncFileSystemGtk::createDirectory(const URL& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
96
{
96
{
97
    notImplemented();
97
    notImplemented();
98
}
98
}
99
99
100
void AsyncFileSystemGtk::fileExists(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
100
void AsyncFileSystemGtk::fileExists(const URL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
101
{
101
{
102
    notImplemented();
102
    notImplemented();
103
}
103
}
104
104
105
void AsyncFileSystemGtk::directoryExists(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
105
void AsyncFileSystemGtk::directoryExists(const URL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
106
{
106
{
107
    notImplemented();
107
    notImplemented();
108
}
108
}
109
109
110
void AsyncFileSystemGtk::readDirectory(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
110
void AsyncFileSystemGtk::readDirectory(const URL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
111
{
111
{
112
    notImplemented();
112
    notImplemented();
113
}
113
}
114
114
115
115
116
void AsyncFileSystemGtk::createWriter(AsyncFileWriterClient* client, const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
116
void AsyncFileSystemGtk::createWriter(AsyncFileWriterClient* client, const URL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
117
{
117
{
118
    notImplemented();
118
    notImplemented();
119
}
119
}
120
120
121
void AsyncFileSystemGtk::createSnapshotFileAndReadMetadata(const KURL&, PassOwnPtr<AsyncFileSystemCallbacks>)
121
void AsyncFileSystemGtk::createSnapshotFileAndReadMetadata(const URL&, PassOwnPtr<AsyncFileSystemCallbacks>)
122
{
122
{
123
    notImplemented();
123
    notImplemented();
124
}
124
}
- a/Source/WebCore/platform/gtk/AsyncFileSystemGtk.h -11 / +11 lines
Lines 34-50 public: a/Source/WebCore/platform/gtk/AsyncFileSystemGtk.h_sec1
34
    AsyncFileSystemGtk();
34
    AsyncFileSystemGtk();
35
    virtual ~AsyncFileSystemGtk();
35
    virtual ~AsyncFileSystemGtk();
36
36
37
    virtual void move(const KURL& sourcePath, const KURL& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks>);
37
    virtual void move(const URL& sourcePath, const URL& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks>);
38
    virtual void copy(const KURL& sourcePath, const KURL& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks>);
38
    virtual void copy(const URL& sourcePath, const URL& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks>);
39
    virtual void remove(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks>);
39
    virtual void remove(const URL& path, PassOwnPtr<AsyncFileSystemCallbacks>);
40
    virtual void removeRecursively(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks>);
40
    virtual void removeRecursively(const URL& path, PassOwnPtr<AsyncFileSystemCallbacks>);
41
    virtual void readMetadata(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks>);
41
    virtual void readMetadata(const URL& path, PassOwnPtr<AsyncFileSystemCallbacks>);
42
    virtual void createFile(const KURL& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks>);
42
    virtual void createFile(const URL& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks>);
43
    virtual void createDirectory(const KURL& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks>);
43
    virtual void createDirectory(const URL& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks>);
44
    virtual void fileExists(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks>);
44
    virtual void fileExists(const URL& path, PassOwnPtr<AsyncFileSystemCallbacks>);
45
    virtual void directoryExists(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks>);
45
    virtual void directoryExists(const URL& path, PassOwnPtr<AsyncFileSystemCallbacks>);
46
    virtual void readDirectory(const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks>);
46
    virtual void readDirectory(const URL& path, PassOwnPtr<AsyncFileSystemCallbacks>);
47
    virtual void createWriter(AsyncFileWriterClient*, const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks>);
47
    virtual void createWriter(AsyncFileWriterClient*, const URL& path, PassOwnPtr<AsyncFileSystemCallbacks>);
48
};
48
};
49
49
50
} // namespace WebCore
50
} // namespace WebCore
- a/Source/WebCore/platform/gtk/DataObjectGtk.cpp -3 / +3 lines
Lines 89-95 void DataObjectGtk::setURIList(const String& uriListString) a/Source/WebCore/platform/gtk/DataObjectGtk.cpp_sec1
89
        if (line[0] == '#')
89
        if (line[0] == '#')
90
            continue;
90
            continue;
91
91
92
        KURL url = KURL(KURL(), line);
92
        URL url = URL(URL(), line);
93
        if (url.isValid()) {
93
        if (url.isValid()) {
94
            if (!setURL) {
94
            if (!setURL) {
95
                m_url = url;
95
                m_url = url;
Lines 104-110 void DataObjectGtk::setURIList(const String& uriListString) a/Source/WebCore/platform/gtk/DataObjectGtk.cpp_sec2
104
    }
104
    }
105
}
105
}
106
106
107
void DataObjectGtk::setURL(const KURL& url, const String& label)
107
void DataObjectGtk::setURL(const URL& url, const String& label)
108
{
108
{
109
    m_url = url;
109
    m_url = url;
110
    m_uriList = url;
110
    m_uriList = url;
Lines 152-158 void DataObjectGtk::clearAllExceptFilenames() a/Source/WebCore/platform/gtk/DataObjectGtk.cpp_sec3
152
    m_text = "";
152
    m_text = "";
153
    m_markup = "";
153
    m_markup = "";
154
    m_uriList = "";
154
    m_uriList = "";
155
    m_url = KURL();
155
    m_url = URL();
156
    m_image = 0;
156
    m_image = 0;
157
    m_range = 0;
157
    m_range = 0;
158
}
158
}
- a/Source/WebCore/platform/gtk/DataObjectGtk.h -5 / +5 lines
Lines 20-26 a/Source/WebCore/platform/gtk/DataObjectGtk.h_sec1
20
#define DataObjectGtk_h
20
#define DataObjectGtk_h
21
21
22
#include "FileList.h"
22
#include "FileList.h"
23
#include "KURL.h"
23
#include "URL.h"
24
#include "Range.h"
24
#include "Range.h"
25
#include <wtf/RefCounted.h>
25
#include <wtf/RefCounted.h>
26
#include <wtf/gobject/GRefPtr.h>
26
#include <wtf/gobject/GRefPtr.h>
Lines 36-48 public: a/Source/WebCore/platform/gtk/DataObjectGtk.h_sec2
36
        return adoptRef(new DataObjectGtk());
36
        return adoptRef(new DataObjectGtk());
37
    }
37
    }
38
38
39
    const KURL& url() const { return m_url; }
39
    const URL& url() const { return m_url; }
40
    const String& uriList() const { return m_uriList; }
40
    const String& uriList() const { return m_uriList; }
41
    const Vector<String>& filenames() const { return m_filenames; }
41
    const Vector<String>& filenames() const { return m_filenames; }
42
    GdkPixbuf* image() const { return m_image.get(); }
42
    GdkPixbuf* image() const { return m_image.get(); }
43
    void setRange(PassRefPtr<Range> newRange) { m_range = newRange; }
43
    void setRange(PassRefPtr<Range> newRange) { m_range = newRange; }
44
    void setImage(GdkPixbuf* newImage) { m_image = newImage; }
44
    void setImage(GdkPixbuf* newImage) { m_image = newImage; }
45
    void setURL(const KURL&, const String&);
45
    void setURL(const URL&, const String&);
46
    bool hasText() const { return m_range || !m_text.isEmpty(); }
46
    bool hasText() const { return m_range || !m_text.isEmpty(); }
47
    bool hasMarkup() const { return m_range || !m_markup.isEmpty(); }
47
    bool hasMarkup() const { return m_range || !m_markup.isEmpty(); }
48
    bool hasURIList() const { return !m_uriList.isEmpty(); }
48
    bool hasURIList() const { return !m_uriList.isEmpty(); }
Lines 50-56 public: a/Source/WebCore/platform/gtk/DataObjectGtk.h_sec3
50
    bool hasFilenames() const { return !m_filenames.isEmpty(); }
50
    bool hasFilenames() const { return !m_filenames.isEmpty(); }
51
    bool hasImage() const { return m_image; }
51
    bool hasImage() const { return m_image; }
52
    void clearURIList() { m_uriList = ""; }
52
    void clearURIList() { m_uriList = ""; }
53
    void clearURL() { m_url = KURL(); }
53
    void clearURL() { m_url = URL(); }
54
    void clearImage() { m_image = 0; }
54
    void clearImage() { m_image = 0; }
55
55
56
    String text() const;
56
    String text() const;
Lines 70-76 public: a/Source/WebCore/platform/gtk/DataObjectGtk.h_sec4
70
private:
70
private:
71
    String m_text;
71
    String m_text;
72
    String m_markup;
72
    String m_markup;
73
    KURL m_url;
73
    URL m_url;
74
    String m_uriList;
74
    String m_uriList;
75
    Vector<String> m_filenames;
75
    Vector<String> m_filenames;
76
    GRefPtr<GdkPixbuf> m_image;
76
    GRefPtr<GdkPixbuf> m_image;
- a/Source/WebCore/platform/gtk/DragDataGtk.cpp -1 / +1 lines
Lines 80-86 String DragData::asURL(Frame*, FilenameConversionPolicy filenamePolicy, String* a/Source/WebCore/platform/gtk/DragDataGtk.cpp_sec1
80
    if (!m_platformDragData->hasURL())
80
    if (!m_platformDragData->hasURL())
81
        return String();
81
        return String();
82
    if (filenamePolicy != ConvertFilenames) {
82
    if (filenamePolicy != ConvertFilenames) {
83
        KURL url(KURL(), m_platformDragData->url());
83
        URL url(URL(), m_platformDragData->url());
84
        if (url.isLocalFile())
84
        if (url.isLocalFile())
85
            return String();
85
            return String();
86
    }
86
    }
- a/Source/WebCore/platform/gtk/ErrorsGtk.cpp -3 / +3 lines
Lines 95-115 ResourceError printError(const PrintContext* printContext, const String& errorMe a/Source/WebCore/platform/gtk/ErrorsGtk.cpp_sec1
95
{
95
{
96
    DocumentLoader* documentLoader = printContext->frame()->loader().documentLoader();
96
    DocumentLoader* documentLoader = printContext->frame()->loader().documentLoader();
97
    return ResourceError(errorDomainPrint, PrintErrorGeneral,
97
    return ResourceError(errorDomainPrint, PrintErrorGeneral,
98
                         documentLoader ? documentLoader->url() : KURL(), errorMessage);
98
                         documentLoader ? documentLoader->url() : URL(), errorMessage);
99
}
99
}
100
100
101
ResourceError printerNotFoundError(const PrintContext* printContext)
101
ResourceError printerNotFoundError(const PrintContext* printContext)
102
{
102
{
103
    DocumentLoader* documentLoader = printContext->frame()->loader().documentLoader();
103
    DocumentLoader* documentLoader = printContext->frame()->loader().documentLoader();
104
    return ResourceError(errorDomainPrint, PrintErrorPrinterNotFound,
104
    return ResourceError(errorDomainPrint, PrintErrorPrinterNotFound,
105
                         documentLoader ? documentLoader->url() : KURL(), _("Printer not found"));
105
                         documentLoader ? documentLoader->url() : URL(), _("Printer not found"));
106
}
106
}
107
107
108
ResourceError invalidPageRangeToPrint(const PrintContext* printContext)
108
ResourceError invalidPageRangeToPrint(const PrintContext* printContext)
109
{
109
{
110
    DocumentLoader* documentLoader = printContext->frame()->loader().documentLoader();
110
    DocumentLoader* documentLoader = printContext->frame()->loader().documentLoader();
111
    return ResourceError(errorDomainPrint, PrintErrorInvalidPageRange,
111
    return ResourceError(errorDomainPrint, PrintErrorInvalidPageRange,
112
                         documentLoader ? documentLoader->url() : KURL(), _("Invalid page range"));
112
                         documentLoader ? documentLoader->url() : URL(), _("Invalid page range"));
113
}
113
}
114
114
115
} // namespace WebCore
115
} // namespace WebCore
- a/Source/WebCore/platform/gtk/PasteboardGtk.cpp -5 / +5 lines
Lines 31-39 a/Source/WebCore/platform/gtk/PasteboardGtk.cpp_sec1
31
#include "HTMLNames.h"
31
#include "HTMLNames.h"
32
#include "HTMLParserIdioms.h"
32
#include "HTMLParserIdioms.h"
33
#include "Image.h"
33
#include "Image.h"
34
#include "KURL.h"
35
#include "PasteboardHelper.h"
34
#include "PasteboardHelper.h"
36
#include "RenderImage.h"
35
#include "RenderImage.h"
36
#include "URL.h"
37
#include "markup.h"
37
#include "markup.h"
38
#include <gtk/gtk.h>
38
#include <gtk/gtk.h>
39
39
Lines 187-193 void Pasteboard::write(const PasteboardURL& pasteboardURL) a/Source/WebCore/platform/gtk/PasteboardGtk.cpp_sec2
187
        PasteboardHelper::defaultPasteboardHelper()->writeClipboardContents(m_gtkClipboard);
187
        PasteboardHelper::defaultPasteboardHelper()->writeClipboardContents(m_gtkClipboard);
188
}
188
}
189
189
190
static KURL getURLForImageNode(Node* node)
190
static URL getURLForImageNode(Node* node)
191
{
191
{
192
    // FIXME: Later this code should be shared with Chromium somehow. Chances are all platforms want it.
192
    // FIXME: Later this code should be shared with Chromium somehow. Chances are all platforms want it.
193
    AtomicString urlString;
193
    AtomicString urlString;
Lines 201-210 static KURL getURLForImageNode(Node* node) a/Source/WebCore/platform/gtk/PasteboardGtk.cpp_sec3
201
        Element* element = toElement(node);
201
        Element* element = toElement(node);
202
        urlString = element->imageSourceURL();
202
        urlString = element->imageSourceURL();
203
    }
203
    }
204
    return urlString.isEmpty() ? KURL() : node->document().completeURL(stripLeadingAndTrailingHTMLSpaces(urlString));
204
    return urlString.isEmpty() ? URL() : node->document().completeURL(stripLeadingAndTrailingHTMLSpaces(urlString));
205
}
205
}
206
206
207
void Pasteboard::writeImage(Node* node, const KURL&, const String& title)
207
void Pasteboard::writeImage(Node* node, const URL&, const String& title)
208
{
208
{
209
    ASSERT(node);
209
    ASSERT(node);
210
210
Lines 220-226 void Pasteboard::writeImage(Node* node, const KURL&, const String& title) a/Source/WebCore/platform/gtk/PasteboardGtk.cpp_sec4
220
220
221
    m_dataObject->clearAll();
221
    m_dataObject->clearAll();
222
222
223
    KURL url = getURLForImageNode(node);
223
    URL url = getURLForImageNode(node);
224
    if (!url.isEmpty()) {
224
    if (!url.isEmpty()) {
225
        m_dataObject->setURL(url, title);
225
        m_dataObject->setURL(url, title);
226
226
- a/Source/WebCore/platform/gtk/TemporaryLinkStubs.cpp -2 / +2 lines
Lines 27-33 a/Source/WebCore/platform/gtk/TemporaryLinkStubs.cpp_sec1
27
27
28
#include "config.h"
28
#include "config.h"
29
29
30
#include "KURL.h"
30
#include "URL.h"
31
#include "NotImplemented.h"
31
#include "NotImplemented.h"
32
#include <float.h>
32
#include <float.h>
33
#include <wtf/text/WTFString.h>
33
#include <wtf/text/WTFString.h>
Lines 43-49 void getSupportedKeySizes(Vector<String>&) a/Source/WebCore/platform/gtk/TemporaryLinkStubs.cpp_sec2
43
    notImplemented();
43
    notImplemented();
44
}
44
}
45
45
46
String signedPublicKeyAndChallengeString(unsigned, const String&, const KURL&)
46
String signedPublicKeyAndChallengeString(unsigned, const String&, const URL&)
47
{
47
{
48
    return String();
48
    return String();
49
}
49
}
- a/Source/WebCore/platform/ios/PasteboardIOS.mm -1 / +1 lines
Lines 38-44 a/Source/WebCore/platform/ios/PasteboardIOS.mm_sec1
38
#import "HTMLElement.h"
38
#import "HTMLElement.h"
39
#import "HTMLNames.h"
39
#import "HTMLNames.h"
40
#import "HTMLParserIdioms.h"
40
#import "HTMLParserIdioms.h"
41
#import "KURL.h"
41
#import "URL.h"
42
#import "LegacyWebArchive.h"
42
#import "LegacyWebArchive.h"
43
#import "Page.h"
43
#import "Page.h"
44
#import "PasteboardStrategy.h"
44
#import "PasteboardStrategy.h"
- a/Source/WebCore/platform/ios/PlatformPasteboardIOS.mm -3 / +3 lines
Lines 25-31 a/Source/WebCore/platform/ios/PlatformPasteboardIOS.mm_sec1
25
25
26
#import "config.h"
26
#import "config.h"
27
#import "Color.h"
27
#import "Color.h"
28
#import "KURL.h"
28
#import "URL.h"
29
#import "Image.h"
29
#import "Image.h"
30
#import "PlatformPasteboard.h"
30
#import "PlatformPasteboard.h"
31
#import "SoftLinking.h"
31
#import "SoftLinking.h"
Lines 99-107 Color PlatformPasteboard::color() a/Source/WebCore/platform/ios/PlatformPasteboardIOS.mm_sec2
99
    return Color();
99
    return Color();
100
}
100
}
101
101
102
KURL PlatformPasteboard::url()
102
URL PlatformPasteboard::url()
103
{
103
{
104
    return KURL();
104
    return URL();
105
}
105
}
106
106
107
long PlatformPasteboard::copy(const String&)
107
long PlatformPasteboard::copy(const String&)
- a/Source/WebCore/platform/mac/DragImageMac.mm -2 / +2 lines
Lines 34-40 a/Source/WebCore/platform/mac/DragImageMac.mm_sec1
34
#import "FontSelector.h"
34
#import "FontSelector.h"
35
#import "GraphicsContext.h"
35
#import "GraphicsContext.h"
36
#import "Image.h"
36
#import "Image.h"
37
#import "KURL.h"
37
#import "URL.h"
38
#import "ResourceResponse.h"
38
#import "ResourceResponse.h"
39
#import "StringTruncator.h"
39
#import "StringTruncator.h"
40
#import "TextRun.h"
40
#import "TextRun.h"
Lines 267-273 static void drawDoubledAtPoint(NSString *string, NSPoint textPoint, NSColor *top a/Source/WebCore/platform/mac/DragImageMac.mm_sec2
267
        drawAtPoint(string, textPoint, font, topColor);
267
        drawAtPoint(string, textPoint, font, topColor);
268
}
268
}
269
269
270
DragImageRef createDragImageForLink(KURL& url, const String& title, FontRenderingMode)
270
DragImageRef createDragImageForLink(URL& url, const String& title, FontRenderingMode)
271
{
271
{
272
    NSString *label = nsStringNilIfEmpty(title);
272
    NSString *label = nsStringNilIfEmpty(title);
273
    NSURL *cocoaURL = url;
273
    NSURL *cocoaURL = url;
- a/Source/WebCore/platform/mac/KURLMac.mm -72 lines
Lines 1-72 a/Source/WebCore/platform/mac/KURLMac.mm_sec1
1
/*
2
 * Copyright (C) 2004, 2008 Apple Inc. All rights reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
6
 * are met:
7
 * 1. Redistributions of source code must retain the above copyright
8
 *    notice, this list of conditions and the following disclaimer.
9
 * 2. Redistributions in binary form must reproduce the above copyright
10
 *    notice, this list of conditions and the following disclaimer in the
11
 *    documentation and/or other materials provided with the distribution.
12
 *
13
 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
14
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
17
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21
 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
24
 */
25
26
#import "config.h"
27
#import "KURL.h"
28
29
#import "CFURLExtras.h"
30
#import <wtf/ObjcRuntimeExtras.h>
31
#import <wtf/text/CString.h>
32
33
namespace WebCore {
34
35
KURL::KURL(NSURL *url)
36
{
37
    if (!url) {
38
        invalidate();
39
        return;
40
    }
41
42
    // FIXME: Why is it OK to ignore base URL here?
43
    CString urlBytes;
44
    getURLBytes(reinterpret_cast<CFURLRef>(url), urlBytes);
45
    parse(urlBytes.data());
46
}
47
48
KURL::operator NSURL *() const
49
{
50
    // Creating a toll-free bridged CFURL, because a real NSURL would not preserve the original string.
51
    // We'll need fidelity when round-tripping via CFURLGetBytes().
52
    return CFBridgingRelease(createCFURL().leakRef());
53
}
54
55
RetainPtr<CFURLRef> KURL::createCFURL() const
56
{
57
    if (isNull())
58
        return 0;
59
60
    if (isEmpty()) {
61
        // We use the toll-free bridge between NSURL and CFURL to create a CFURLRef supporting both empty and null values.
62
        return reinterpret_cast<CFURLRef>(adoptNS([[NSURL alloc] initWithString:@""]).get());
63
    }
64
65
    URLCharBuffer buffer;
66
    copyToBuffer(buffer);
67
    return createCFURLFromBuffer(buffer.data(), buffer.size());
68
}
69
70
71
72
}
- a/Source/WebCore/platform/mac/PasteboardMac.mm -2 / +2 lines
Lines 45-51 a/Source/WebCore/platform/mac/PasteboardMac.mm_sec1
45
#import "htmlediting.h"
45
#import "htmlediting.h"
46
#import "HTMLNames.h"
46
#import "HTMLNames.h"
47
#import "Image.h"
47
#import "Image.h"
48
#import "KURL.h"
48
#import "URL.h"
49
#import "LegacyWebArchive.h"
49
#import "LegacyWebArchive.h"
50
#import "LoaderNSURLExtras.h"
50
#import "LoaderNSURLExtras.h"
51
#import "MIMETypeRegistry.h"
51
#import "MIMETypeRegistry.h"
Lines 383-389 void Pasteboard::read(PasteboardWebContentReader& reader) a/Source/WebCore/platform/mac/PasteboardMac.mm_sec2
383
    }
383
    }
384
384
385
    if (types.contains(String(NSURLPboardType))) {
385
    if (types.contains(String(NSURLPboardType))) {
386
        KURL url = strategy.url(m_pasteboardName);
386
        URL url = strategy.url(m_pasteboardName);
387
        String title = strategy.stringForType(WebURLNamePboardType, m_pasteboardName);
387
        String title = strategy.stringForType(WebURLNamePboardType, m_pasteboardName);
388
        if (!url.isNull() && reader.readURL(url, title))
388
        if (!url.isNull() && reader.readURL(url, title))
389
            return;
389
            return;
- a/Source/WebCore/platform/mac/PlatformPasteboardMac.mm -2 / +2 lines
Lines 25-31 a/Source/WebCore/platform/mac/PlatformPasteboardMac.mm_sec1
25
25
26
#import "config.h"
26
#import "config.h"
27
#import "Color.h"
27
#import "Color.h"
28
#import "KURL.h"
28
#import "URL.h"
29
#import "PlatformPasteboard.h"
29
#import "PlatformPasteboard.h"
30
30
31
namespace WebCore {
31
namespace WebCore {
Lines 94-100 Color PlatformPasteboard::color() a/Source/WebCore/platform/mac/PlatformPasteboardMac.mm_sec2
94
                    (int)([color blueComponent] * 255.0 + 0.5), (int)([color alphaComponent] * 255.0 + 0.5));    
94
                    (int)([color blueComponent] * 255.0 + 0.5), (int)([color alphaComponent] * 255.0 + 0.5));    
95
}
95
}
96
96
97
KURL PlatformPasteboard::url()
97
URL PlatformPasteboard::url()
98
{
98
{
99
    return [NSURL URLFromPasteboard:m_pasteboard.get()];
99
    return [NSURL URLFromPasteboard:m_pasteboard.get()];
100
}
100
}
- a/Source/WebCore/platform/mac/SSLKeyGeneratorMac.cpp -2 / +2 lines
Lines 26-32 a/Source/WebCore/platform/mac/SSLKeyGeneratorMac.cpp_sec1
26
#include "config.h"
26
#include "config.h"
27
#include "SSLKeyGenerator.h"
27
#include "SSLKeyGenerator.h"
28
28
29
#include "KURL.h"
29
#include "URL.h"
30
#include "LocalizedStrings.h"
30
#include "LocalizedStrings.h"
31
#include "WebCoreSystemInterface.h"
31
#include "WebCoreSystemInterface.h"
32
#include <wtf/RetainPtr.h>
32
#include <wtf/RetainPtr.h>
Lines 41-47 void getSupportedKeySizes(Vector<String>& supportedKeySizes) a/Source/WebCore/platform/mac/SSLKeyGeneratorMac.cpp_sec2
41
    supportedKeySizes.append(keygenMenuItem512());
41
    supportedKeySizes.append(keygenMenuItem512());
42
}
42
}
43
43
44
String signedPublicKeyAndChallengeString(unsigned keySizeIndex, const String& challengeString, const KURL& url)
44
String signedPublicKeyAndChallengeString(unsigned keySizeIndex, const String& challengeString, const URL& url)
45
{   
45
{   
46
    // This switch statement must always be synced with the UI strings returned by getSupportedKeySizes.
46
    // This switch statement must always be synced with the UI strings returned by getSupportedKeySizes.
47
    UInt32 keySize;
47
    UInt32 keySize;
- a/Source/WebCore/platform/mediastream/RTCConfiguration.h -5 / +5 lines
Lines 33-39 a/Source/WebCore/platform/mediastream/RTCConfiguration.h_sec1
33
33
34
#if ENABLE(MEDIA_STREAM)
34
#if ENABLE(MEDIA_STREAM)
35
35
36
#include "KURL.h"
36
#include "URL.h"
37
#include <wtf/PassRefPtr.h>
37
#include <wtf/PassRefPtr.h>
38
#include <wtf/RefCounted.h>
38
#include <wtf/RefCounted.h>
39
#include <wtf/Vector.h>
39
#include <wtf/Vector.h>
Lines 43-67 namespace WebCore { a/Source/WebCore/platform/mediastream/RTCConfiguration.h_sec2
43
43
44
class RTCIceServer : public RefCounted<RTCIceServer> {
44
class RTCIceServer : public RefCounted<RTCIceServer> {
45
public:
45
public:
46
    static PassRefPtr<RTCIceServer> create(const KURL& uri, const String& credential, const String& username)
46
    static PassRefPtr<RTCIceServer> create(const URL& uri, const String& credential, const String& username)
47
    {
47
    {
48
        return adoptRef(new RTCIceServer(uri, credential, username));
48
        return adoptRef(new RTCIceServer(uri, credential, username));
49
    }
49
    }
50
    virtual ~RTCIceServer() { }
50
    virtual ~RTCIceServer() { }
51
51
52
    const KURL& uri() { return m_uri; }
52
    const URL& uri() { return m_uri; }
53
    const String& credential() { return m_credential; }
53
    const String& credential() { return m_credential; }
54
    const String& username() { return m_username; }
54
    const String& username() { return m_username; }
55
55
56
private:
56
private:
57
    RTCIceServer(const KURL& uri, const String& credential, const String& username)
57
    RTCIceServer(const URL& uri, const String& credential, const String& username)
58
        : m_uri(uri)
58
        : m_uri(uri)
59
        , m_credential(credential)
59
        , m_credential(credential)
60
        , m_username(username)
60
        , m_username(username)
61
    {
61
    {
62
    }
62
    }
63
63
64
    KURL m_uri;
64
    URL m_uri;
65
    String m_credential;
65
    String m_credential;
66
    String m_username;
66
    String m_username;
67
};
67
};
- a/Source/WebCore/platform/network/BlobData.cpp -2 / +2 lines
Lines 94-106 void BlobData::appendFile(const String& path, long long offset, long long length a/Source/WebCore/platform/network/BlobData.cpp_sec1
94
    m_items.append(BlobDataItem(path, offset, length, expectedModificationTime));
94
    m_items.append(BlobDataItem(path, offset, length, expectedModificationTime));
95
}
95
}
96
96
97
void BlobData::appendBlob(const KURL& url, long long offset, long long length)
97
void BlobData::appendBlob(const URL& url, long long offset, long long length)
98
{
98
{
99
    m_items.append(BlobDataItem(url, offset, length));
99
    m_items.append(BlobDataItem(url, offset, length));
100
}
100
}
101
101
102
#if ENABLE(FILE_SYSTEM)
102
#if ENABLE(FILE_SYSTEM)
103
void BlobData::appendURL(const KURL& url, long long offset, long long length, double expectedModificationTime)
103
void BlobData::appendURL(const URL& url, long long offset, long long length, double expectedModificationTime)
104
{
104
{
105
    m_items.append(BlobDataItem(url, offset, length, expectedModificationTime));
105
    m_items.append(BlobDataItem(url, offset, length, expectedModificationTime));
106
}
106
}
- a/Source/WebCore/platform/network/BlobData.h -7 / +7 lines
Lines 32-38 a/Source/WebCore/platform/network/BlobData.h_sec1
32
#define BlobData_h
32
#define BlobData_h
33
33
34
#include "FileSystem.h"
34
#include "FileSystem.h"
35
#include "KURL.h"
35
#include "URL.h"
36
#include <wtf/Forward.h>
36
#include <wtf/Forward.h>
37
#include <wtf/PassOwnPtr.h>
37
#include <wtf/PassOwnPtr.h>
38
#include <wtf/ThreadSafeRefCounted.h>
38
#include <wtf/ThreadSafeRefCounted.h>
Lines 102-108 struct BlobDataItem { a/Source/WebCore/platform/network/BlobData.h_sec2
102
    }
102
    }
103
103
104
    // Constructor for Blob type.
104
    // Constructor for Blob type.
105
    BlobDataItem(const KURL& url, long long offset, long long length)
105
    BlobDataItem(const URL& url, long long offset, long long length)
106
        : type(Blob)
106
        : type(Blob)
107
        , url(url)
107
        , url(url)
108
        , offset(offset)
108
        , offset(offset)
Lines 113-119 struct BlobDataItem { a/Source/WebCore/platform/network/BlobData.h_sec3
113
113
114
#if ENABLE(FILE_SYSTEM)
114
#if ENABLE(FILE_SYSTEM)
115
    // Constructor for URL type (e.g. FileSystem files).
115
    // Constructor for URL type (e.g. FileSystem files).
116
    BlobDataItem(const KURL& url, long long offset, long long length, double expectedModificationTime)
116
    BlobDataItem(const URL& url, long long offset, long long length, double expectedModificationTime)
117
        : type(URL)
117
        : type(URL)
118
        , url(url)
118
        , url(url)
119
        , offset(offset)
119
        , offset(offset)
Lines 142-148 struct BlobDataItem { a/Source/WebCore/platform/network/BlobData.h_sec4
142
    String path;
142
    String path;
143
143
144
    // For Blob or URL type.
144
    // For Blob or URL type.
145
    KURL url;
145
    URL url;
146
146
147
    long long offset;
147
    long long offset;
148
    long long length;
148
    long long length;
Lines 184-192 public: a/Source/WebCore/platform/network/BlobData.h_sec5
184
    void appendData(PassRefPtr<RawData>, long long offset, long long length);
184
    void appendData(PassRefPtr<RawData>, long long offset, long long length);
185
    void appendFile(const String& path);
185
    void appendFile(const String& path);
186
    void appendFile(const String& path, long long offset, long long length, double expectedModificationTime);
186
    void appendFile(const String& path, long long offset, long long length, double expectedModificationTime);
187
    void appendBlob(const KURL&, long long offset, long long length);
187
    void appendBlob(const URL&, long long offset, long long length);
188
#if ENABLE(FILE_SYSTEM)
188
#if ENABLE(FILE_SYSTEM)
189
    void appendURL(const KURL&, long long offset, long long length, double expectedModificationTime);
189
    void appendURL(const URL&, long long offset, long long length, double expectedModificationTime);
190
#endif
190
#endif
191
191
192
private:
192
private:
Lines 217-223 public: a/Source/WebCore/platform/network/BlobData.h_sec6
217
217
218
private:
218
private:
219
    BlobDataHandle(PassOwnPtr<BlobData>, long long size);
219
    BlobDataHandle(PassOwnPtr<BlobData>, long long size);
220
    KURL m_internalURL;
220
    URL m_internalURL;
221
};
221
};
222
222
223
} // namespace WebCore
223
} // namespace WebCore
- a/Source/WebCore/platform/network/BlobRegistry.h -4 / +4 lines
Lines 38-44 namespace WebCore { a/Source/WebCore/platform/network/BlobRegistry.h_sec1
38
class BlobData;
38
class BlobData;
39
class BlobStorageData;
39
class BlobStorageData;
40
class BlobRegistry;
40
class BlobRegistry;
41
class KURL;
41
class URL;
42
42
43
BlobRegistry& blobRegistry();
43
BlobRegistry& blobRegistry();
44
44
Lines 46-57 BlobRegistry& blobRegistry(); a/Source/WebCore/platform/network/BlobRegistry.h_sec2
46
class BlobRegistry {
46
class BlobRegistry {
47
public:
47
public:
48
    // Registers a blob URL referring to the specified blob data.
48
    // Registers a blob URL referring to the specified blob data.
49
    virtual void registerBlobURL(const KURL&, PassOwnPtr<BlobData>) = 0;
49
    virtual void registerBlobURL(const URL&, PassOwnPtr<BlobData>) = 0;
50
    
50
    
51
    // Registers a new blob URL referring to the blob data identified by the specified srcURL.
51
    // Registers a new blob URL referring to the blob data identified by the specified srcURL.
52
    virtual void registerBlobURL(const KURL&, const KURL& srcURL) = 0;
52
    virtual void registerBlobURL(const URL&, const URL& srcURL) = 0;
53
53
54
    virtual void unregisterBlobURL(const KURL&) = 0;
54
    virtual void unregisterBlobURL(const URL&) = 0;
55
55
56
    virtual bool isBlobRegistryImpl() const { return false; }
56
    virtual bool isBlobRegistryImpl() const { return false; }
57
57
- a/Source/WebCore/platform/network/BlobRegistryImpl.cpp -4 / +4 lines
Lines 128-134 void BlobRegistryImpl::appendStorageItems(BlobStorageData* blobStorageData, cons a/Source/WebCore/platform/network/BlobRegistryImpl.cpp_sec1
128
    }
128
    }
129
}
129
}
130
130
131
void BlobRegistryImpl::registerBlobURL(const KURL& url, PassOwnPtr<BlobData> blobData)
131
void BlobRegistryImpl::registerBlobURL(const URL& url, PassOwnPtr<BlobData> blobData)
132
{
132
{
133
    ASSERT(isMainThread());
133
    ASSERT(isMainThread());
134
    registerBlobResourceHandleConstructor();
134
    registerBlobResourceHandleConstructor();
Lines 164-170 void BlobRegistryImpl::registerBlobURL(const KURL& url, PassOwnPtr<BlobData> blo a/Source/WebCore/platform/network/BlobRegistryImpl.cpp_sec2
164
    m_blobs.set(url.string(), blobStorageData);
164
    m_blobs.set(url.string(), blobStorageData);
165
}
165
}
166
166
167
void BlobRegistryImpl::registerBlobURL(const KURL& url, const KURL& srcURL)
167
void BlobRegistryImpl::registerBlobURL(const URL& url, const URL& srcURL)
168
{
168
{
169
    ASSERT(isMainThread());
169
    ASSERT(isMainThread());
170
    registerBlobResourceHandleConstructor();
170
    registerBlobResourceHandleConstructor();
Lines 177-189 void BlobRegistryImpl::registerBlobURL(const KURL& url, const KURL& srcURL) a/Source/WebCore/platform/network/BlobRegistryImpl.cpp_sec3
177
    m_blobs.set(url.string(), src);
177
    m_blobs.set(url.string(), src);
178
}
178
}
179
179
180
void BlobRegistryImpl::unregisterBlobURL(const KURL& url)
180
void BlobRegistryImpl::unregisterBlobURL(const URL& url)
181
{
181
{
182
    ASSERT(isMainThread());
182
    ASSERT(isMainThread());
183
    m_blobs.remove(url.string());
183
    m_blobs.remove(url.string());
184
}
184
}
185
185
186
BlobStorageData* BlobRegistryImpl::getBlobDataFromURL(const KURL& url) const
186
BlobStorageData* BlobRegistryImpl::getBlobDataFromURL(const URL& url) const
187
{
187
{
188
    ASSERT(isMainThread());
188
    ASSERT(isMainThread());
189
    return m_blobs.get(url.string());
189
    return m_blobs.get(url.string());
- a/Source/WebCore/platform/network/BlobRegistryImpl.h -5 / +5 lines
Lines 39-45 a/Source/WebCore/platform/network/BlobRegistryImpl.h_sec1
39
39
40
namespace WebCore {
40
namespace WebCore {
41
41
42
class KURL;
42
class URL;
43
class ResourceHandle;
43
class ResourceHandle;
44
class ResourceHandleClient;
44
class ResourceHandleClient;
45
class ResourceRequest;
45
class ResourceRequest;
Lines 50-56 class BlobRegistryImpl : public BlobRegistry { a/Source/WebCore/platform/network/BlobRegistryImpl.h_sec2
50
public:
50
public:
51
    virtual ~BlobRegistryImpl();
51
    virtual ~BlobRegistryImpl();
52
52
53
    BlobStorageData* getBlobDataFromURL(const KURL&) const;
53
    BlobStorageData* getBlobDataFromURL(const URL&) const;
54
54
55
    PassRefPtr<ResourceHandle> createResourceHandle(const ResourceRequest&, ResourceHandleClient*);
55
    PassRefPtr<ResourceHandle> createResourceHandle(const ResourceRequest&, ResourceHandleClient*);
56
56
Lines 58-66 private: a/Source/WebCore/platform/network/BlobRegistryImpl.h_sec3
58
    void appendStorageItems(BlobStorageData*, const BlobDataItemList&);
58
    void appendStorageItems(BlobStorageData*, const BlobDataItemList&);
59
    void appendStorageItems(BlobStorageData*, const BlobDataItemList&, long long offset, long long length);
59
    void appendStorageItems(BlobStorageData*, const BlobDataItemList&, long long offset, long long length);
60
60
61
    virtual void registerBlobURL(const KURL&, PassOwnPtr<BlobData>) OVERRIDE;
61
    virtual void registerBlobURL(const URL&, PassOwnPtr<BlobData>) OVERRIDE;
62
    virtual void registerBlobURL(const KURL&, const KURL& srcURL) OVERRIDE;
62
    virtual void registerBlobURL(const URL&, const URL& srcURL) OVERRIDE;
63
    virtual void unregisterBlobURL(const KURL&) OVERRIDE;
63
    virtual void unregisterBlobURL(const URL&) OVERRIDE;
64
    virtual bool isBlobRegistryImpl() const OVERRIDE { return true; }
64
    virtual bool isBlobRegistryImpl() const OVERRIDE { return true; }
65
65
66
    HashMap<String, RefPtr<BlobStorageData> > m_blobs;
66
    HashMap<String, RefPtr<BlobStorageData> > m_blobs;
- a/Source/WebCore/platform/network/BlobResourceHandle.cpp -1 / +1 lines
Lines 39-45 a/Source/WebCore/platform/network/BlobResourceHandle.cpp_sec1
39
#include "FileStream.h"
39
#include "FileStream.h"
40
#include "FileSystem.h"
40
#include "FileSystem.h"
41
#include "HTTPParsers.h"
41
#include "HTTPParsers.h"
42
#include "KURL.h"
42
#include "URL.h"
43
#include "ResourceError.h"
43
#include "ResourceError.h"
44
#include "ResourceHandleClient.h"
44
#include "ResourceHandleClient.h"
45
#include "ResourceRequest.h"
45
#include "ResourceRequest.h"
- a/Source/WebCore/platform/network/CredentialStorage.cpp -7 / +7 lines
Lines 27-33 a/Source/WebCore/platform/network/CredentialStorage.cpp_sec1
27
#include "CredentialStorage.h"
27
#include "CredentialStorage.h"
28
28
29
#include "Credential.h"
29
#include "Credential.h"
30
#include "KURL.h"
30
#include "URL.h"
31
#include "ProtectionSpaceHash.h"
31
#include "ProtectionSpaceHash.h"
32
#include <wtf/text/WTFString.h>
32
#include <wtf/text/WTFString.h>
33
#include <wtf/text/StringHash.h>
33
#include <wtf/text/StringHash.h>
Lines 61-67 static PathToDefaultProtectionSpaceMap& pathToDefaultProtectionSpaceMap() a/Source/WebCore/platform/network/CredentialStorage.cpp_sec2
61
    return map;
61
    return map;
62
}
62
}
63
63
64
static String originStringFromURL(const KURL& url)
64
static String originStringFromURL(const URL& url)
65
{
65
{
66
    if (url.port())
66
    if (url.port())
67
        return url.protocol() + "://" + url.host() + ':' + String::number(url.port()) + '/';
67
        return url.protocol() + "://" + url.host() + ':' + String::number(url.port()) + '/';
Lines 69-75 static String originStringFromURL(const KURL& url) a/Source/WebCore/platform/network/CredentialStorage.cpp_sec3
69
    return url.protocol() + "://" + url.host() + '/';
69
    return url.protocol() + "://" + url.host() + '/';
70
}
70
}
71
71
72
static String protectionSpaceMapKeyFromURL(const KURL& url)
72
static String protectionSpaceMapKeyFromURL(const URL& url)
73
{
73
{
74
    ASSERT(url.isValid());
74
    ASSERT(url.isValid());
75
75
Lines 87-93 static String protectionSpaceMapKeyFromURL(const KURL& url) a/Source/WebCore/platform/network/CredentialStorage.cpp_sec4
87
    return directoryURL;
87
    return directoryURL;
88
}
88
}
89
89
90
void CredentialStorage::set(const Credential& credential, const ProtectionSpace& protectionSpace, const KURL& url)
90
void CredentialStorage::set(const Credential& credential, const ProtectionSpace& protectionSpace, const URL& url)
91
{
91
{
92
    ASSERT(protectionSpace.isProxy() || url.protocolIsInHTTPFamily());
92
    ASSERT(protectionSpace.isProxy() || url.protocolIsInHTTPFamily());
93
    ASSERT(protectionSpace.isProxy() || url.isValid());
93
    ASSERT(protectionSpace.isProxy() || url.isValid());
Lines 114-120 void CredentialStorage::remove(const ProtectionSpace& protectionSpace) a/Source/WebCore/platform/network/CredentialStorage.cpp_sec5
114
    protectionSpaceToCredentialMap().remove(protectionSpace);
114
    protectionSpaceToCredentialMap().remove(protectionSpace);
115
}
115
}
116
116
117
static PathToDefaultProtectionSpaceMap::iterator findDefaultProtectionSpaceForURL(const KURL& url)
117
static PathToDefaultProtectionSpaceMap::iterator findDefaultProtectionSpaceForURL(const URL& url)
118
{
118
{
119
    ASSERT(url.protocolIsInHTTPFamily());
119
    ASSERT(url.protocolIsInHTTPFamily());
120
    ASSERT(url.isValid());
120
    ASSERT(url.isValid());
Lines 143-149 static PathToDefaultProtectionSpaceMap::iterator findDefaultProtectionSpaceForUR a/Source/WebCore/platform/network/CredentialStorage.cpp_sec6
143
    }
143
    }
144
}
144
}
145
145
146
bool CredentialStorage::set(const Credential& credential, const KURL& url)
146
bool CredentialStorage::set(const Credential& credential, const URL& url)
147
{
147
{
148
    ASSERT(url.protocolIsInHTTPFamily());
148
    ASSERT(url.protocolIsInHTTPFamily());
149
    ASSERT(url.isValid());
149
    ASSERT(url.isValid());
Lines 155-161 bool CredentialStorage::set(const Credential& credential, const KURL& url) a/Source/WebCore/platform/network/CredentialStorage.cpp_sec7
155
    return true;
155
    return true;
156
}
156
}
157
157
158
Credential CredentialStorage::get(const KURL& url)
158
Credential CredentialStorage::get(const URL& url)
159
{
159
{
160
    PathToDefaultProtectionSpaceMap::iterator iter = findDefaultProtectionSpaceForURL(url);
160
    PathToDefaultProtectionSpaceMap::iterator iter = findDefaultProtectionSpaceForURL(url);
161
    if (iter == pathToDefaultProtectionSpaceMap().end())
161
    if (iter == pathToDefaultProtectionSpaceMap().end())
- a/Source/WebCore/platform/network/CredentialStorage.h -4 / +4 lines
Lines 29-41 a/Source/WebCore/platform/network/CredentialStorage.h_sec1
29
namespace WebCore {
29
namespace WebCore {
30
30
31
class Credential;
31
class Credential;
32
class KURL;
32
class URL;
33
class ProtectionSpace;
33
class ProtectionSpace;
34
34
35
class CredentialStorage {
35
class CredentialStorage {
36
public:
36
public:
37
    // WebCore session credential storage.
37
    // WebCore session credential storage.
38
    static void set(const Credential&, const ProtectionSpace&, const KURL&);
38
    static void set(const Credential&, const ProtectionSpace&, const URL&);
39
    static Credential get(const ProtectionSpace&);
39
    static Credential get(const ProtectionSpace&);
40
    static void remove(const ProtectionSpace&);
40
    static void remove(const ProtectionSpace&);
41
41
Lines 44-51 public: a/Source/WebCore/platform/network/CredentialStorage.h_sec2
44
44
45
    // These methods work for authentication schemes that support sending credentials without waiting for a request. E.g., for HTTP Basic authentication scheme
45
    // These methods work for authentication schemes that support sending credentials without waiting for a request. E.g., for HTTP Basic authentication scheme
46
    // a client should assume that all paths at or deeper than the depth of a known protected resource share are within the same protection space.
46
    // a client should assume that all paths at or deeper than the depth of a known protected resource share are within the same protection space.
47
    static bool set(const Credential&, const KURL&); // Returns true if the URL corresponds to a known protection space, so credentials could be updated.
47
    static bool set(const Credential&, const URL&); // Returns true if the URL corresponds to a known protection space, so credentials could be updated.
48
    static Credential get(const KURL&);
48
    static Credential get(const URL&);
49
49
50
    static void setPrivateMode(bool);
50
    static void setPrivateMode(bool);
51
};
51
};
- a/Source/WebCore/platform/network/FormData.cpp -7 / +7 lines
Lines 178-195 void FormData::appendFileRange(const String& filename, long long start, long lon a/Source/WebCore/platform/network/FormData.cpp_sec1
178
    m_elements.append(FormDataElement(filename, start, length, expectedModificationTime, shouldGenerateFile));
178
    m_elements.append(FormDataElement(filename, start, length, expectedModificationTime, shouldGenerateFile));
179
}
179
}
180
180
181
void FormData::appendBlob(const KURL& blobURL)
181
void FormData::appendBlob(const URL& blobURL)
182
{
182
{
183
    m_elements.append(FormDataElement(blobURL));
183
    m_elements.append(FormDataElement(blobURL));
184
}
184
}
185
#endif
185
#endif
186
#if ENABLE(FILE_SYSTEM)
186
#if ENABLE(FILE_SYSTEM)
187
void FormData::appendURL(const KURL& url)
187
void FormData::appendURL(const URL& url)
188
{
188
{
189
    m_elements.append(FormDataElement(url, 0, BlobDataItem::toEndOfFile, invalidFileTime()));
189
    m_elements.append(FormDataElement(url, 0, BlobDataItem::toEndOfFile, invalidFileTime()));
190
}
190
}
191
191
192
void FormData::appendURLRange(const KURL& url, long long start, long long length, double expectedModificationTime)
192
void FormData::appendURLRange(const URL& url, long long start, long long length, double expectedModificationTime)
193
{
193
{
194
    m_elements.append(FormDataElement(url, start, length, expectedModificationTime));
194
    m_elements.append(FormDataElement(url, start, length, expectedModificationTime));
195
}
195
}
Lines 326-338 String FormData::flattenToString() const a/Source/WebCore/platform/network/FormData.cpp_sec2
326
}
326
}
327
327
328
#if ENABLE(BLOB)
328
#if ENABLE(BLOB)
329
static void appendBlobResolved(FormData* formData, const KURL& url)
329
static void appendBlobResolved(FormData* formData, const URL& url)
330
{
330
{
331
    if (!blobRegistry().isBlobRegistryImpl()) {
331
    if (!blobRegistry().isBlobRegistryImpl()) {
332
        LOG_ERROR("Tried to resolve a blob without a usable registry");
332
        LOG_ERROR("Tried to resolve a blob without a usable registry");
333
        return;
333
        return;
334
    }
334
    }
335
    BlobStorageData* blobData = static_cast<BlobRegistryImpl&>(blobRegistry()).getBlobDataFromURL(KURL(ParsedURLString, url));
335
    BlobStorageData* blobData = static_cast<BlobRegistryImpl&>(blobRegistry()).getBlobDataFromURL(URL(ParsedURLString, url));
336
    if (!blobData) {
336
    if (!blobData) {
337
        LOG_ERROR("Could not get blob data from a registry");
337
        LOG_ERROR("Could not get blob data from a registry");
338
        return;
338
        return;
Lines 521-527 static bool decodeElement(Decoder& decoder, FormDataElement& element) a/Source/WebCore/platform/network/FormData.cpp_sec3
521
521
522
#if ENABLE(FILE_SYSTEM)
522
#if ENABLE(FILE_SYSTEM)
523
        if (type == FormDataElement::encodedURL)
523
        if (type == FormDataElement::encodedURL)
524
            element.m_url = KURL(KURL(), filenameOrURL);
524
            element.m_url = URL(URL(), filenameOrURL);
525
        else
525
        else
526
#endif
526
#endif
527
        element.m_filename = filenameOrURL;
527
        element.m_filename = filenameOrURL;
Lines 540-546 static bool decodeElement(Decoder& decoder, FormDataElement& element) a/Source/WebCore/platform/network/FormData.cpp_sec4
540
        String blobURLString;
540
        String blobURLString;
541
        if (!decoder.decodeString(blobURLString))
541
        if (!decoder.decodeString(blobURLString))
542
            return false;
542
            return false;
543
        element.m_url = KURL(KURL(), blobURLString);
543
        element.m_url = URL(URL(), blobURLString);
544
        return true;
544
        return true;
545
#endif
545
#endif
546
546
- a/Source/WebCore/platform/network/FormData.h -7 / +7 lines
Lines 20-26 a/Source/WebCore/platform/network/FormData.h_sec1
20
#ifndef FormData_h
20
#ifndef FormData_h
21
#define FormData_h
21
#define FormData_h
22
22
23
#include "KURL.h"
23
#include "URL.h"
24
#include <wtf/Forward.h>
24
#include <wtf/Forward.h>
25
#include <wtf/RefCounted.h>
25
#include <wtf/RefCounted.h>
26
#include <wtf/Vector.h>
26
#include <wtf/Vector.h>
Lines 39-50 public: a/Source/WebCore/platform/network/FormData.h_sec2
39
39
40
#if ENABLE(BLOB)
40
#if ENABLE(BLOB)
41
    FormDataElement(const String& filename, long long fileStart, long long fileLength, double expectedFileModificationTime, bool shouldGenerateFile) : m_type(encodedFile), m_filename(filename), m_fileStart(fileStart), m_fileLength(fileLength), m_expectedFileModificationTime(expectedFileModificationTime), m_shouldGenerateFile(shouldGenerateFile) { }
41
    FormDataElement(const String& filename, long long fileStart, long long fileLength, double expectedFileModificationTime, bool shouldGenerateFile) : m_type(encodedFile), m_filename(filename), m_fileStart(fileStart), m_fileLength(fileLength), m_expectedFileModificationTime(expectedFileModificationTime), m_shouldGenerateFile(shouldGenerateFile) { }
42
    explicit FormDataElement(const KURL& blobURL) : m_type(encodedBlob), m_url(blobURL) { }
42
    explicit FormDataElement(const URL& blobURL) : m_type(encodedBlob), m_url(blobURL) { }
43
#else
43
#else
44
    FormDataElement(const String& filename, bool shouldGenerateFile) : m_type(encodedFile), m_filename(filename), m_shouldGenerateFile(shouldGenerateFile) { }
44
    FormDataElement(const String& filename, bool shouldGenerateFile) : m_type(encodedFile), m_filename(filename), m_shouldGenerateFile(shouldGenerateFile) { }
45
#endif
45
#endif
46
#if ENABLE(FILE_SYSTEM)
46
#if ENABLE(FILE_SYSTEM)
47
    FormDataElement(const KURL& url, long long start, long long length, double expectedFileModificationTime) : m_type(encodedURL), m_url(url), m_fileStart(start), m_fileLength(length), m_expectedFileModificationTime(expectedFileModificationTime), m_shouldGenerateFile(false) { }
47
    FormDataElement(const URL& url, long long start, long long length, double expectedFileModificationTime) : m_type(encodedURL), m_url(url), m_fileStart(start), m_fileLength(length), m_expectedFileModificationTime(expectedFileModificationTime), m_shouldGenerateFile(false) { }
48
#endif
48
#endif
49
49
50
    enum Type {
50
    enum Type {
Lines 60-66 public: a/Source/WebCore/platform/network/FormData.h_sec3
60
    Vector<char> m_data;
60
    Vector<char> m_data;
61
    String m_filename;
61
    String m_filename;
62
#if ENABLE(BLOB)
62
#if ENABLE(BLOB)
63
    KURL m_url; // For Blob or URL.
63
    URL m_url; // For Blob or URL.
64
    long long m_fileStart;
64
    long long m_fileStart;
65
    long long m_fileLength;
65
    long long m_fileLength;
66
    double m_expectedFileModificationTime;
66
    double m_expectedFileModificationTime;
Lines 124-134 public: a/Source/WebCore/platform/network/FormData.h_sec4
124
    void appendFile(const String& filePath, bool shouldGenerateFile = false);
124
    void appendFile(const String& filePath, bool shouldGenerateFile = false);
125
#if ENABLE(BLOB)
125
#if ENABLE(BLOB)
126
    void appendFileRange(const String& filename, long long start, long long length, double expectedModificationTime, bool shouldGenerateFile = false);
126
    void appendFileRange(const String& filename, long long start, long long length, double expectedModificationTime, bool shouldGenerateFile = false);
127
    void appendBlob(const KURL& blobURL);
127
    void appendBlob(const URL& blobURL);
128
#endif
128
#endif
129
#if ENABLE(FILE_SYSTEM)
129
#if ENABLE(FILE_SYSTEM)
130
    void appendURL(const KURL&);
130
    void appendURL(const URL&);
131
    void appendURLRange(const KURL&, long long start, long long length, double expectedModificationTime);
131
    void appendURLRange(const URL&, long long start, long long length, double expectedModificationTime);
132
#endif
132
#endif
133
    char* expandDataStore(size_t);
133
    char* expandDataStore(size_t);
134
134
- a/Source/WebCore/platform/network/PlatformCookieJar.h -7 / +7 lines
Lines 33-50 a/Source/WebCore/platform/network/PlatformCookieJar.h_sec1
33
33
34
namespace WebCore {
34
namespace WebCore {
35
35
36
class KURL;
36
class URL;
37
class NetworkStorageSession;
37
class NetworkStorageSession;
38
struct Cookie;
38
struct Cookie;
39
39
40
// FIXME: These should probably be NetworkStorageSession member functions.
40
// FIXME: These should probably be NetworkStorageSession member functions.
41
41
42
String cookiesForDOM(const NetworkStorageSession&, const KURL& firstParty, const KURL&);
42
String cookiesForDOM(const NetworkStorageSession&, const URL& firstParty, const URL&);
43
void setCookiesFromDOM(const NetworkStorageSession&, const KURL& firstParty, const KURL&, const String&);
43
void setCookiesFromDOM(const NetworkStorageSession&, const URL& firstParty, const URL&, const String&);
44
bool cookiesEnabled(const NetworkStorageSession&, const KURL& firstParty, const KURL&);
44
bool cookiesEnabled(const NetworkStorageSession&, const URL& firstParty, const URL&);
45
String cookieRequestHeaderFieldValue(const NetworkStorageSession&, const KURL& firstParty, const KURL&);
45
String cookieRequestHeaderFieldValue(const NetworkStorageSession&, const URL& firstParty, const URL&);
46
bool getRawCookies(const NetworkStorageSession&, const KURL& firstParty, const KURL&, Vector<Cookie>&);
46
bool getRawCookies(const NetworkStorageSession&, const URL& firstParty, const URL&, Vector<Cookie>&);
47
void deleteCookie(const NetworkStorageSession&, const KURL&, const String&);
47
void deleteCookie(const NetworkStorageSession&, const URL&, const String&);
48
void getHostnamesWithCookies(const NetworkStorageSession&, HashSet<String>& hostnames);
48
void getHostnamesWithCookies(const NetworkStorageSession&, HashSet<String>& hostnames);
49
void deleteCookiesForHostname(const NetworkStorageSession&, const String& hostname);
49
void deleteCookiesForHostname(const NetworkStorageSession&, const String& hostname);
50
void deleteAllCookies(const NetworkStorageSession&);
50
void deleteAllCookies(const NetworkStorageSession&);
- a/Source/WebCore/platform/network/ProxyServer.h -2 / +2 lines
Lines 31-37 a/Source/WebCore/platform/network/ProxyServer.h_sec1
31
31
32
namespace WebCore {
32
namespace WebCore {
33
33
34
class KURL;
34
class URL;
35
class NetworkingContext;
35
class NetworkingContext;
36
36
37
// Represents a single proxy server.
37
// Represents a single proxy server.
Lines 68-74 private: a/Source/WebCore/platform/network/ProxyServer.h_sec2
68
};
68
};
69
69
70
// Return a vector of proxy servers for the given URL.
70
// Return a vector of proxy servers for the given URL.
71
Vector<ProxyServer> proxyServersForURL(const KURL&, const NetworkingContext*);
71
Vector<ProxyServer> proxyServersForURL(const URL&, const NetworkingContext*);
72
72
73
// Converts the given vector of proxy servers to a PAC string, as described in
73
// Converts the given vector of proxy servers to a PAC string, as described in
74
// http://web.archive.org/web/20060424005037/wp.netscape.com/eng/mozilla/2.0/relnotes/demo/proxy-live.html
74
// http://web.archive.org/web/20060424005037/wp.netscape.com/eng/mozilla/2.0/relnotes/demo/proxy-live.html
- a/Source/WebCore/platform/network/ResourceHandle.cpp -1 / +1 lines
Lines 205-211 bool ResourceHandle::shouldContentSniff() const a/Source/WebCore/platform/network/ResourceHandle.cpp_sec1
205
    return d->m_shouldContentSniff;
205
    return d->m_shouldContentSniff;
206
}
206
}
207
207
208
bool ResourceHandle::shouldContentSniffURL(const KURL& url)
208
bool ResourceHandle::shouldContentSniffURL(const URL& url)
209
{
209
{
210
#if PLATFORM(MAC)
210
#if PLATFORM(MAC)
211
    if (shouldForceContentSniffing)
211
    if (shouldForceContentSniffing)
- a/Source/WebCore/platform/network/ResourceHandle.h -2 / +2 lines
Lines 82-88 namespace WebCore { a/Source/WebCore/platform/network/ResourceHandle.h_sec1
82
class AuthenticationChallenge;
82
class AuthenticationChallenge;
83
class Credential;
83
class Credential;
84
class Frame;
84
class Frame;
85
class KURL;
85
class URL;
86
class NetworkingContext;
86
class NetworkingContext;
87
class ProtectionSpace;
87
class ProtectionSpace;
88
class ResourceError;
88
class ResourceError;
Lines 146-152 public: a/Source/WebCore/platform/network/ResourceHandle.h_sec2
146
#endif
146
#endif
147
147
148
    bool shouldContentSniff() const;
148
    bool shouldContentSniff() const;
149
    static bool shouldContentSniffURL(const KURL&);
149
    static bool shouldContentSniffURL(const URL&);
150
150
151
    static void forceContentSniffing();
151
    static void forceContentSniffing();
152
152
- a/Source/WebCore/platform/network/ResourceHandleClient.h -1 / +1 lines
Lines 41-47 OBJC_CLASS NSCachedURLResponse; a/Source/WebCore/platform/network/ResourceHandleClient.h_sec1
41
namespace WebCore {
41
namespace WebCore {
42
    class AuthenticationChallenge;
42
    class AuthenticationChallenge;
43
    class Credential;
43
    class Credential;
44
    class KURL;
44
    class URL;
45
    class ProtectionSpace;
45
    class ProtectionSpace;
46
    class ResourceHandle;
46
    class ResourceHandle;
47
    class ResourceError;
47
    class ResourceError;
- a/Source/WebCore/platform/network/ResourceHandleInternal.h -1 / +1 lines
Lines 130-136 namespace WebCore { a/Source/WebCore/platform/network/ResourceHandleInternal.h_sec1
130
            , m_scheduledFailureType(ResourceHandle::NoFailure)
130
            , m_scheduledFailureType(ResourceHandle::NoFailure)
131
            , m_failureTimer(loader, &ResourceHandle::fireFailure)
131
            , m_failureTimer(loader, &ResourceHandle::fireFailure)
132
        {
132
        {
133
            const KURL& url = m_firstRequest.url();
133
            const URL& url = m_firstRequest.url();
134
            m_user = url.user();
134
            m_user = url.user();
135
            m_pass = url.pass();
135
            m_pass = url.pass();
136
            m_firstRequest.removeCredentials();
136
            m_firstRequest.removeCredentials();
- a/Source/WebCore/platform/network/ResourceRequestBase.cpp -4 / +4 lines
Lines 113-126 bool ResourceRequestBase::isNull() const a/Source/WebCore/platform/network/ResourceRequestBase.cpp_sec1
113
    return m_url.isNull();
113
    return m_url.isNull();
114
}
114
}
115
115
116
const KURL& ResourceRequestBase::url() const 
116
const URL& ResourceRequestBase::url() const 
117
{
117
{
118
    updateResourceRequest(); 
118
    updateResourceRequest(); 
119
    
119
    
120
    return m_url;
120
    return m_url;
121
}
121
}
122
122
123
void ResourceRequestBase::setURL(const KURL& url)
123
void ResourceRequestBase::setURL(const URL& url)
124
{ 
124
{ 
125
    updateResourceRequest(); 
125
    updateResourceRequest(); 
126
126
Lines 182-195 void ResourceRequestBase::setTimeoutInterval(double timeoutInterval) a/Source/WebCore/platform/network/ResourceRequestBase.cpp_sec2
182
        m_platformRequestUpdated = false;
182
        m_platformRequestUpdated = false;
183
}
183
}
184
184
185
const KURL& ResourceRequestBase::firstPartyForCookies() const
185
const URL& ResourceRequestBase::firstPartyForCookies() const
186
{
186
{
187
    updateResourceRequest(); 
187
    updateResourceRequest(); 
188
    
188
    
189
    return m_firstPartyForCookies;
189
    return m_firstPartyForCookies;
190
}
190
}
191
191
192
void ResourceRequestBase::setFirstPartyForCookies(const KURL& firstPartyForCookies)
192
void ResourceRequestBase::setFirstPartyForCookies(const URL& firstPartyForCookies)
193
{ 
193
{ 
194
    updateResourceRequest(); 
194
    updateResourceRequest(); 
195
195
- a/Source/WebCore/platform/network/ResourceRequestBase.h -10 / +10 lines
Lines 30-36 a/Source/WebCore/platform/network/ResourceRequestBase.h_sec1
30
30
31
#include "FormData.h"
31
#include "FormData.h"
32
#include "HTTPHeaderMap.h"
32
#include "HTTPHeaderMap.h"
33
#include "KURL.h"
33
#include "URL.h"
34
#include "ResourceLoadPriority.h"
34
#include "ResourceLoadPriority.h"
35
35
36
#include <wtf/OwnPtr.h>
36
#include <wtf/OwnPtr.h>
Lines 64-71 namespace WebCore { a/Source/WebCore/platform/network/ResourceRequestBase.h_sec2
64
        bool isNull() const;
64
        bool isNull() const;
65
        bool isEmpty() const;
65
        bool isEmpty() const;
66
66
67
        const KURL& url() const;
67
        const URL& url() const;
68
        void setURL(const KURL& url);
68
        void setURL(const URL& url);
69
69
70
        void removeCredentials();
70
        void removeCredentials();
71
71
Lines 75-82 namespace WebCore { a/Source/WebCore/platform/network/ResourceRequestBase.h_sec3
75
        double timeoutInterval() const; // May return 0 when using platform default.
75
        double timeoutInterval() const; // May return 0 when using platform default.
76
        void setTimeoutInterval(double timeoutInterval);
76
        void setTimeoutInterval(double timeoutInterval);
77
        
77
        
78
        const KURL& firstPartyForCookies() const;
78
        const URL& firstPartyForCookies() const;
79
        void setFirstPartyForCookies(const KURL& firstPartyForCookies);
79
        void setFirstPartyForCookies(const URL& firstPartyForCookies);
80
        
80
        
81
        const String& httpMethod() const;
81
        const String& httpMethod() const;
82
        void setHTTPMethod(const String& httpMethod);
82
        void setHTTPMethod(const String& httpMethod);
Lines 158-164 namespace WebCore { a/Source/WebCore/platform/network/ResourceRequestBase.h_sec4
158
        {
158
        {
159
        }
159
        }
160
160
161
        ResourceRequestBase(const KURL& url, ResourceRequestCachePolicy policy)
161
        ResourceRequestBase(const URL& url, ResourceRequestCachePolicy policy)
162
            : m_url(url)
162
            : m_url(url)
163
            , m_cachePolicy(policy)
163
            , m_cachePolicy(policy)
164
            , m_timeoutInterval(s_defaultTimeoutInterval)
164
            , m_timeoutInterval(s_defaultTimeoutInterval)
Lines 181-191 namespace WebCore { a/Source/WebCore/platform/network/ResourceRequestBase.h_sec5
181
        // The ResourceRequest subclass may "shadow" this method to compare platform specific fields
181
        // The ResourceRequest subclass may "shadow" this method to compare platform specific fields
182
        static bool platformCompare(const ResourceRequest&, const ResourceRequest&) { return true; }
182
        static bool platformCompare(const ResourceRequest&, const ResourceRequest&) { return true; }
183
183
184
        KURL m_url;
184
        URL m_url;
185
185
186
        ResourceRequestCachePolicy m_cachePolicy;
186
        ResourceRequestCachePolicy m_cachePolicy;
187
        double m_timeoutInterval; // 0 is a magic value for platform default on platforms that have one.
187
        double m_timeoutInterval; // 0 is a magic value for platform default on platforms that have one.
188
        KURL m_firstPartyForCookies;
188
        URL m_firstPartyForCookies;
189
        String m_httpMethod;
189
        String m_httpMethod;
190
        HTTPHeaderMap m_httpHeaderFields;
190
        HTTPHeaderMap m_httpHeaderFields;
191
        Vector<String> m_responseContentDispositionEncodingFallbackArray;
191
        Vector<String> m_responseContentDispositionEncodingFallbackArray;
Lines 215-225 namespace WebCore { a/Source/WebCore/platform/network/ResourceRequestBase.h_sec6
215
        WTF_MAKE_NONCOPYABLE(CrossThreadResourceRequestDataBase); WTF_MAKE_FAST_ALLOCATED;
215
        WTF_MAKE_NONCOPYABLE(CrossThreadResourceRequestDataBase); WTF_MAKE_FAST_ALLOCATED;
216
    public:
216
    public:
217
        CrossThreadResourceRequestDataBase() { }
217
        CrossThreadResourceRequestDataBase() { }
218
        KURL m_url;
218
        URL m_url;
219
219
220
        ResourceRequestCachePolicy m_cachePolicy;
220
        ResourceRequestCachePolicy m_cachePolicy;
221
        double m_timeoutInterval;
221
        double m_timeoutInterval;
222
        KURL m_firstPartyForCookies;
222
        URL m_firstPartyForCookies;
223
223
224
        String m_httpMethod;
224
        String m_httpMethod;
225
        OwnPtr<CrossThreadHTTPHeaderMapData> m_httpHeaders;
225
        OwnPtr<CrossThreadHTTPHeaderMapData> m_httpHeaders;
- a/Source/WebCore/platform/network/ResourceResponseBase.cpp -3 / +3 lines
Lines 67-73 ResourceResponseBase::ResourceResponseBase() a/Source/WebCore/platform/network/ResourceResponseBase.cpp_sec1
67
{
67
{
68
}
68
}
69
69
70
ResourceResponseBase::ResourceResponseBase(const KURL& url, const String& mimeType, long long expectedLength, const String& textEncodingName, const String& filename)
70
ResourceResponseBase::ResourceResponseBase(const URL& url, const String& mimeType, long long expectedLength, const String& textEncodingName, const String& filename)
71
    : m_url(url)
71
    : m_url(url)
72
    , m_mimeType(mimeType)
72
    , m_mimeType(mimeType)
73
    , m_expectedContentLength(expectedLength)
73
    , m_expectedContentLength(expectedLength)
Lines 138-151 bool ResourceResponseBase::isHTTP() const a/Source/WebCore/platform/network/ResourceResponseBase.cpp_sec2
138
    return equalIgnoringCase(protocol, "http")  || equalIgnoringCase(protocol, "https");
138
    return equalIgnoringCase(protocol, "http")  || equalIgnoringCase(protocol, "https");
139
}
139
}
140
140
141
const KURL& ResourceResponseBase::url() const
141
const URL& ResourceResponseBase::url() const
142
{
142
{
143
    lazyInit(CommonFieldsOnly);
143
    lazyInit(CommonFieldsOnly);
144
144
145
    return m_url; 
145
    return m_url; 
146
}
146
}
147
147
148
void ResourceResponseBase::setURL(const KURL& url)
148
void ResourceResponseBase::setURL(const URL& url)
149
{
149
{
150
    lazyInit(CommonFieldsOnly);
150
    lazyInit(CommonFieldsOnly);
151
    m_isNull = false;
151
    m_isNull = false;
- a/Source/WebCore/platform/network/ResourceResponseBase.h -6 / +6 lines
Lines 28-34 a/Source/WebCore/platform/network/ResourceResponseBase.h_sec1
28
#define ResourceResponseBase_h
28
#define ResourceResponseBase_h
29
29
30
#include "HTTPHeaderMap.h"
30
#include "HTTPHeaderMap.h"
31
#include "KURL.h"
31
#include "URL.h"
32
#include "ResourceLoadTiming.h"
32
#include "ResourceLoadTiming.h"
33
33
34
#include <wtf/PassOwnPtr.h>
34
#include <wtf/PassOwnPtr.h>
Lines 55-62 public: a/Source/WebCore/platform/network/ResourceResponseBase.h_sec2
55
    bool isNull() const { return m_isNull; }
55
    bool isNull() const { return m_isNull; }
56
    bool isHTTP() const;
56
    bool isHTTP() const;
57
57
58
    const KURL& url() const;
58
    const URL& url() const;
59
    void setURL(const KURL& url);
59
    void setURL(const URL& url);
60
60
61
    const String& mimeType() const;
61
    const String& mimeType() const;
62
    void setMimeType(const String& mimeType);
62
    void setMimeType(const String& mimeType);
Lines 130-136 protected: a/Source/WebCore/platform/network/ResourceResponseBase.h_sec3
130
    };
130
    };
131
131
132
    ResourceResponseBase();
132
    ResourceResponseBase();
133
    ResourceResponseBase(const KURL& url, const String& mimeType, long long expectedLength, const String& textEncodingName, const String& filename);
133
    ResourceResponseBase(const URL& url, const String& mimeType, long long expectedLength, const String& textEncodingName, const String& filename);
134
134
135
    void lazyInit(InitLevel) const;
135
    void lazyInit(InitLevel) const;
136
136
Lines 140-146 protected: a/Source/WebCore/platform/network/ResourceResponseBase.h_sec4
140
    // The ResourceResponse subclass may "shadow" this method to compare platform specific fields
140
    // The ResourceResponse subclass may "shadow" this method to compare platform specific fields
141
    static bool platformCompare(const ResourceResponse&, const ResourceResponse&) { return true; }
141
    static bool platformCompare(const ResourceResponse&, const ResourceResponse&) { return true; }
142
142
143
    KURL m_url;
143
    URL m_url;
144
    String m_mimeType;
144
    String m_mimeType;
145
    long long m_expectedContentLength;
145
    long long m_expectedContentLength;
146
    String m_textEncodingName;
146
    String m_textEncodingName;
Lines 184-190 struct CrossThreadResourceResponseDataBase { a/Source/WebCore/platform/network/ResourceResponseBase.h_sec5
184
    WTF_MAKE_NONCOPYABLE(CrossThreadResourceResponseDataBase); WTF_MAKE_FAST_ALLOCATED;
184
    WTF_MAKE_NONCOPYABLE(CrossThreadResourceResponseDataBase); WTF_MAKE_FAST_ALLOCATED;
185
public:
185
public:
186
    CrossThreadResourceResponseDataBase() { }
186
    CrossThreadResourceResponseDataBase() { }
187
    KURL m_url;
187
    URL m_url;
188
    String m_mimeType;
188
    String m_mimeType;
189
    long long m_expectedContentLength;
189
    long long m_expectedContentLength;
190
    String m_textEncodingName;
190
    String m_textEncodingName;
- a/Source/WebCore/platform/network/SocketStreamHandleBase.cpp -1 / +1 lines
Lines 38-44 namespace WebCore { a/Source/WebCore/platform/network/SocketStreamHandleBase.cpp_sec1
38
38
39
const unsigned int bufferSize = 100 * 1024 * 1024;
39
const unsigned int bufferSize = 100 * 1024 * 1024;
40
40
41
SocketStreamHandleBase::SocketStreamHandleBase(const KURL& url, SocketStreamHandleClient* client)
41
SocketStreamHandleBase::SocketStreamHandleBase(const URL& url, SocketStreamHandleClient* client)
42
    : m_url(url)
42
    : m_url(url)
43
    , m_client(client)
43
    , m_client(client)
44
    , m_state(Connecting)
44
    , m_state(Connecting)
- a/Source/WebCore/platform/network/SocketStreamHandleBase.h -3 / +3 lines
Lines 32-38 a/Source/WebCore/platform/network/SocketStreamHandleBase.h_sec1
32
#ifndef SocketStreamHandleBase_h
32
#ifndef SocketStreamHandleBase_h
33
#define SocketStreamHandleBase_h
33
#define SocketStreamHandleBase_h
34
34
35
#include "KURL.h"
35
#include "URL.h"
36
36
37
#include <wtf/StreamBuffer.h>
37
#include <wtf/StreamBuffer.h>
38
38
Lines 56-68 namespace WebCore { a/Source/WebCore/platform/network/SocketStreamHandleBase.h_sec2
56
        void setClient(SocketStreamHandleClient*);
56
        void setClient(SocketStreamHandleClient*);
57
57
58
    protected:
58
    protected:
59
        SocketStreamHandleBase(const KURL&, SocketStreamHandleClient*);
59
        SocketStreamHandleBase(const URL&, SocketStreamHandleClient*);
60
60
61
        bool sendPendingData();
61
        bool sendPendingData();
62
        virtual int platformSend(const char* data, int length) = 0;
62
        virtual int platformSend(const char* data, int length) = 0;
63
        virtual void platformClose() = 0;
63
        virtual void platformClose() = 0;
64
64
65
        KURL m_url;
65
        URL m_url;
66
        SocketStreamHandleClient* m_client;
66
        SocketStreamHandleClient* m_client;
67
        StreamBuffer<char, 1024 * 1024> m_buffer;
67
        StreamBuffer<char, 1024 * 1024> m_buffer;
68
        SocketStreamState m_state;
68
        SocketStreamState m_state;
- a/Source/WebCore/platform/network/SocketStreamHandleClient.h -1 / +1 lines
Lines 35-41 a/Source/WebCore/platform/network/SocketStreamHandleClient.h_sec1
35
namespace WebCore {
35
namespace WebCore {
36
36
37
    class AuthenticationChallenge;
37
    class AuthenticationChallenge;
38
    class KURL;
38
    class URL;
39
    class SocketStreamError;
39
    class SocketStreamError;
40
    class SocketStreamHandle;
40
    class SocketStreamHandle;
41
41
- a/Source/WebCore/platform/network/blackberry/CookieJarBlackBerry.cpp -6 / +6 lines
Lines 24-51 a/Source/WebCore/platform/network/blackberry/CookieJarBlackBerry.cpp_sec1
24
24
25
namespace WebCore {
25
namespace WebCore {
26
26
27
void setCookiesFromDOM(const NetworkStorageSession&, const KURL& /*firstParty*/, const KURL& url, const String& value)
27
void setCookiesFromDOM(const NetworkStorageSession&, const URL& /*firstParty*/, const URL& url, const String& value)
28
{
28
{
29
    cookieManager().setCookies(url, value, NoHttpOnlyCookie);
29
    cookieManager().setCookies(url, value, NoHttpOnlyCookie);
30
}
30
}
31
31
32
String cookiesForDOM(const NetworkStorageSession&, const KURL& /*firstParty*/, const KURL& url)
32
String cookiesForDOM(const NetworkStorageSession&, const URL& /*firstParty*/, const URL& url)
33
{
33
{
34
    // 'HttpOnly' cookies should no be accessible from scripts, so we filter them out here.
34
    // 'HttpOnly' cookies should no be accessible from scripts, so we filter them out here.
35
    return cookieManager().getCookie(url, NoHttpOnlyCookie);
35
    return cookieManager().getCookie(url, NoHttpOnlyCookie);
36
}
36
}
37
37
38
String cookieRequestHeaderFieldValue(const NetworkStorageSession&, const KURL& /*firstParty*/, const KURL& url)
38
String cookieRequestHeaderFieldValue(const NetworkStorageSession&, const URL& /*firstParty*/, const URL& url)
39
{
39
{
40
    return cookieManager().getCookie(url, WithHttpOnlyCookies);
40
    return cookieManager().getCookie(url, WithHttpOnlyCookies);
41
}
41
}
42
42
43
bool cookiesEnabled(const NetworkStorageSession&, const KURL& /*firstParty*/, const KURL& /*url*/)
43
bool cookiesEnabled(const NetworkStorageSession&, const URL& /*firstParty*/, const URL& /*url*/)
44
{
44
{
45
    return !cookieManager().cookieJar().isEmpty();
45
    return !cookieManager().cookieJar().isEmpty();
46
}
46
}
47
47
48
bool getRawCookies(const NetworkStorageSession&, const KURL& /*firstParty*/, const KURL& url, Vector<Cookie>& rawCookies)
48
bool getRawCookies(const NetworkStorageSession&, const URL& /*firstParty*/, const URL& url, Vector<Cookie>& rawCookies)
49
{
49
{
50
    Vector<RefPtr<ParsedCookie> > result;
50
    Vector<RefPtr<ParsedCookie> > result;
51
    cookieManager().getRawCookies(result, url, WithHttpOnlyCookies);
51
    cookieManager().getRawCookies(result, url, WithHttpOnlyCookies);
Lines 54-60 bool getRawCookies(const NetworkStorageSession&, const KURL& /*firstParty*/, con a/Source/WebCore/platform/network/blackberry/CookieJarBlackBerry.cpp_sec2
54
    return true;
54
    return true;
55
}
55
}
56
56
57
void deleteCookie(const NetworkStorageSession&, const KURL& url, const String& name)
57
void deleteCookie(const NetworkStorageSession&, const URL& url, const String& name)
58
{
58
{
59
    cookieManager().removeCookieWithName(url, name);
59
    cookieManager().removeCookieWithName(url, name);
60
}
60
}
- a/Source/WebCore/platform/network/blackberry/CredentialBackingStore.cpp -1 / +1 lines
Lines 22-28 a/Source/WebCore/platform/network/blackberry/CredentialBackingStore.cpp_sec1
22
#if ENABLE(BLACKBERRY_CREDENTIAL_PERSIST)
22
#if ENABLE(BLACKBERRY_CREDENTIAL_PERSIST)
23
#include "CredentialStorage.h"
23
#include "CredentialStorage.h"
24
#include "FileSystem.h"
24
#include "FileSystem.h"
25
#include "KURL.h"
25
#include "URL.h"
26
#include "ProtectionSpaceHash.h"
26
#include "ProtectionSpaceHash.h"
27
#include "SQLiteStatement.h"
27
#include "SQLiteStatement.h"
28
#include <BlackBerryPlatformEncryptor.h>
28
#include <BlackBerryPlatformEncryptor.h>
- a/Source/WebCore/platform/network/blackberry/NetworkJob.cpp -10 / +10 lines
Lines 28-34 a/Source/WebCore/platform/network/blackberry/NetworkJob.cpp_sec1
28
#include "Frame.h"
28
#include "Frame.h"
29
#include "FrameLoaderClientBlackBerry.h"
29
#include "FrameLoaderClientBlackBerry.h"
30
#include "HTTPParsers.h"
30
#include "HTTPParsers.h"
31
#include "KURL.h"
31
#include "URL.h"
32
#include "MIMESniffing.h"
32
#include "MIMESniffing.h"
33
#include "MIMETypeRegistry.h"
33
#include "MIMETypeRegistry.h"
34
#include "NetworkManager.h"
34
#include "NetworkManager.h"
Lines 117-123 NetworkJob::~NetworkJob() a/Source/WebCore/platform/network/blackberry/NetworkJob.cpp_sec2
117
117
118
void NetworkJob::initialize(int playerId,
118
void NetworkJob::initialize(int playerId,
119
    const String& pageGroupName,
119
    const String& pageGroupName,
120
    const KURL& url,
120
    const URL& url,
121
    const BlackBerry::Platform::NetworkRequest& request,
121
    const BlackBerry::Platform::NetworkRequest& request,
122
    PassRefPtr<ResourceHandle> handle,
122
    PassRefPtr<ResourceHandle> handle,
123
    BlackBerry::Platform::NetworkStreamFactory* streamFactory,
123
    BlackBerry::Platform::NetworkStreamFactory* streamFactory,
Lines 450-456 void NetworkJob::handleNotifyMultipartHeaderReceived(const String& key, const St a/Source/WebCore/platform/network/blackberry/NetworkJob.cpp_sec3
450
450
451
void NetworkJob::handleSetCookieHeader(const String& value)
451
void NetworkJob::handleSetCookieHeader(const String& value)
452
{
452
{
453
    KURL url = m_response.url();
453
    URL url = m_response.url();
454
    CookieManager& manager = cookieManager();
454
    CookieManager& manager = cookieManager();
455
    if ((manager.cookiePolicy() == CookieStorageAcceptPolicyOnlyFromMainDocumentDomain)
455
    if ((manager.cookiePolicy() == CookieStorageAcceptPolicyOnlyFromMainDocumentDomain)
456
        && (m_handle->firstRequest().firstPartyForCookies() != url)
456
        && (m_handle->firstRequest().firstPartyForCookies() != url)
Lines 618-624 bool NetworkJob::retryAsFTPDirectory() a/Source/WebCore/platform/network/blackberry/NetworkJob.cpp_sec4
618
618
619
    ASSERT(m_handle);
619
    ASSERT(m_handle);
620
    ResourceRequest newRequest = m_handle->firstRequest();
620
    ResourceRequest newRequest = m_handle->firstRequest();
621
    KURL url = newRequest.url();
621
    URL url = newRequest.url();
622
    url.setPath(url.path() + "/");
622
    url.setPath(url.path() + "/");
623
    newRequest.setURL(url);
623
    newRequest.setURL(url);
624
    newRequest.setMustHandleInternally(true);
624
    newRequest.setMustHandleInternally(true);
Lines 672-678 bool NetworkJob::handleRedirect() a/Source/WebCore/platform/network/blackberry/NetworkJob.cpp_sec5
672
    if (location.isNull())
672
    if (location.isNull())
673
        return false;
673
        return false;
674
674
675
    KURL newURL(m_response.url(), location);
675
    URL newURL(m_response.url(), location);
676
    if (!newURL.isValid())
676
    if (!newURL.isValid())
677
        return false;
677
        return false;
678
678
Lines 813-819 NetworkJob::SendRequestResult NetworkJob::sendRequestWithCredentials(ProtectionS a/Source/WebCore/platform/network/blackberry/NetworkJob.cpp_sec6
813
    if (!m_handle)
813
    if (!m_handle)
814
        return SendRequestCancelled;
814
        return SendRequestCancelled;
815
815
816
    KURL newURL = m_response.url();
816
    URL newURL = m_response.url();
817
    if (!newURL.isValid())
817
    if (!newURL.isValid())
818
        return SendRequestCancelled;
818
        return SendRequestCancelled;
819
819
Lines 832-841 NetworkJob::SendRequestResult NetworkJob::sendRequestWithCredentials(ProtectionS a/Source/WebCore/platform/network/blackberry/NetworkJob.cpp_sec7
832
            host = m_response.url().host();
832
            host = m_response.url().host();
833
            port = m_response.url().port();
833
            port = m_response.url().port();
834
        } else {
834
        } else {
835
            // proxyInfo returns host:port, without a protocol. KURL can't parse this, so stick http
835
            // proxyInfo returns host:port, without a protocol. URL can't parse this, so stick http
836
            // on the front.
836
            // on the front.
837
            // (We could split into host and port by hand, but that gets hard to parse with IPv6 urls,
837
            // (We could split into host and port by hand, but that gets hard to parse with IPv6 urls,
838
            // so better to reuse KURL's parsing.)
838
            // so better to reuse URL's parsing.)
839
            StringBuilder proxyAddress;
839
            StringBuilder proxyAddress;
840
            if (type == ProtectionSpaceProxyHTTP)
840
            if (type == ProtectionSpaceProxyHTTP)
841
                proxyAddress.append("http://");
841
                proxyAddress.append("http://");
Lines 843-849 NetworkJob::SendRequestResult NetworkJob::sendRequestWithCredentials(ProtectionS a/Source/WebCore/platform/network/blackberry/NetworkJob.cpp_sec8
843
                proxyAddress.append("https://");
843
                proxyAddress.append("https://");
844
            proxyAddress.append(proxyInfo.address);
844
            proxyAddress.append(proxyInfo.address);
845
845
846
            KURL proxyURL(KURL(), proxyAddress.toString());
846
            URL proxyURL(URL(), proxyAddress.toString());
847
            host = proxyURL.host();
847
            host = proxyURL.host();
848
            port = proxyURL.port();
848
            port = proxyURL.port();
849
        }
849
        }
Lines 1028-1034 void NetworkJob::fireDeleteJobTimer(Timer<NetworkJob>*) a/Source/WebCore/platform/network/blackberry/NetworkJob.cpp_sec9
1028
    NetworkManager::instance()->deleteJob(this);
1028
    NetworkManager::instance()->deleteJob(this);
1029
}
1029
}
1030
1030
1031
void NetworkJob::notifyChallengeResult(const KURL& url, const ProtectionSpace& protectionSpace, AuthenticationChallengeResult result, const Credential& credential)
1031
void NetworkJob::notifyChallengeResult(const URL& url, const ProtectionSpace& protectionSpace, AuthenticationChallengeResult result, const Credential& credential)
1032
{
1032
{
1033
    ASSERT(url.isValid());
1033
    ASSERT(url.isValid());
1034
    ASSERT(url == m_response.url());
1034
    ASSERT(url == m_response.url());
- a/Source/WebCore/platform/network/blackberry/NetworkJob.h -3 / +3 lines
Lines 43-49 namespace WebCore { a/Source/WebCore/platform/network/blackberry/NetworkJob.h_sec1
43
43
44
class Credential;
44
class Credential;
45
class Frame;
45
class Frame;
46
class KURL;
46
class URL;
47
class ProtectionSpace;
47
class ProtectionSpace;
48
class ResourceRequest;
48
class ResourceRequest;
49
49
Lines 54-60 public: a/Source/WebCore/platform/network/blackberry/NetworkJob.h_sec2
54
54
55
    void initialize(int playerId,
55
    void initialize(int playerId,
56
        const String& pageGroupName,
56
        const String& pageGroupName,
57
        const KURL&,
57
        const URL&,
58
        const BlackBerry::Platform::NetworkRequest&,
58
        const BlackBerry::Platform::NetworkRequest&,
59
        PassRefPtr<ResourceHandle>,
59
        PassRefPtr<ResourceHandle>,
60
        BlackBerry::Platform::NetworkStreamFactory*,
60
        BlackBerry::Platform::NetworkStreamFactory*,
Lines 92-98 public: a/Source/WebCore/platform/network/blackberry/NetworkJob.h_sec3
92
    virtual int status() const { return m_extendedStatusCode; }
92
    virtual int status() const { return m_extendedStatusCode; }
93
    virtual const BlackBerry::Platform::String mimeType() const;
93
    virtual const BlackBerry::Platform::String mimeType() const;
94
94
95
    virtual void notifyChallengeResult(const KURL&, const ProtectionSpace&, AuthenticationChallengeResult, const Credential&);
95
    virtual void notifyChallengeResult(const URL&, const ProtectionSpace&, AuthenticationChallengeResult, const Credential&);
96
96
97
    // Implementation of FrameDestructionObserver pure virtuals.
97
    // Implementation of FrameDestructionObserver pure virtuals.
98
    virtual void frameDestroyed();
98
    virtual void frameDestroyed();
- a/Source/WebCore/platform/network/blackberry/NetworkManager.cpp -4 / +4 lines
Lines 142-153 int NetworkManager::startJob(int playerId, const String& pageGroupName, PassRefP a/Source/WebCore/platform/network/blackberry/NetworkManager.cpp_sec1
142
    // Make sure the ResourceHandle doesn't go out of scope while calling callbacks.
142
    // Make sure the ResourceHandle doesn't go out of scope while calling callbacks.
143
    RefPtr<ResourceHandle> guardJob(job);
143
    RefPtr<ResourceHandle> guardJob(job);
144
144
145
    KURL url = request.url();
145
    URL url = request.url();
146
146
147
    // Only load the initial url once.
147
    // Only load the initial url once.
148
    bool isInitial = (url == m_initialURL);
148
    bool isInitial = (url == m_initialURL);
149
    if (isInitial)
149
    if (isInitial)
150
        m_initialURL = KURL();
150
        m_initialURL = URL();
151
151
152
    // Always reread cookies on a redirect
152
    // Always reread cookies on a redirect
153
    if (redirectCount)
153
    if (redirectCount)
Lines 156-163 int NetworkManager::startJob(int playerId, const String& pageGroupName, PassRefP a/Source/WebCore/platform/network/blackberry/NetworkManager.cpp_sec2
156
    BlackBerry::Platform::NetworkRequest platformRequest;
156
    BlackBerry::Platform::NetworkRequest platformRequest;
157
    request.initializePlatformRequest(platformRequest, frame->loader() && frame->loader()->client() && static_cast<FrameLoaderClientBlackBerry*>(frame->loader()->client())->cookiesEnabled(), isInitial, rereadCookies);
157
    request.initializePlatformRequest(platformRequest, frame->loader() && frame->loader()->client() && static_cast<FrameLoaderClientBlackBerry*>(frame->loader()->client())->cookiesEnabled(), isInitial, rereadCookies);
158
158
159
    // GURL and KURL consider valid URLs differently, for example http:// is parsed as
159
    // GURL and URL consider valid URLs differently, for example http:// is parsed as
160
    // http:/ by KURL and considered valid, while GURL considers it invalid.
160
    // http:/ by URL and considered valid, while GURL considers it invalid.
161
    if (!platformRequest.url().is_valid())
161
    if (!platformRequest.url().is_valid())
162
        return BlackBerry::Platform::FilterStream::StatusErrorInvalidUrl;
162
        return BlackBerry::Platform::FilterStream::StatusErrorInvalidUrl;
163
163
- a/Source/WebCore/platform/network/blackberry/NetworkManager.h -4 / +4 lines
Lines 19-25 a/Source/WebCore/platform/network/blackberry/NetworkManager.h_sec1
19
#ifndef NetworkManager_h
19
#ifndef NetworkManager_h
20
#define NetworkManager_h
20
#define NetworkManager_h
21
21
22
#include "KURL.h"
22
#include "URL.h"
23
#include "ResourceHandle.h"
23
#include "ResourceHandle.h"
24
24
25
#include <BlackBerryPlatformSingleton.h>
25
#include <BlackBerryPlatformSingleton.h>
Lines 43-50 void protectionSpaceToPlatformAuth(const ProtectionSpace&, BlackBerry::Platform: a/Source/WebCore/platform/network/blackberry/NetworkManager.h_sec2
43
class NetworkManager : public BlackBerry::Platform::ThreadUnsafeSingleton<NetworkManager> {
43
class NetworkManager : public BlackBerry::Platform::ThreadUnsafeSingleton<NetworkManager> {
44
    SINGLETON_DEFINITION_THREADUNSAFE(NetworkManager)
44
    SINGLETON_DEFINITION_THREADUNSAFE(NetworkManager)
45
public:
45
public:
46
    void setInitialURL(const KURL& url) { m_initialURL = url; }
46
    void setInitialURL(const URL& url) { m_initialURL = url; }
47
    KURL initialURL() { return m_initialURL; }
47
    URL initialURL() { return m_initialURL; }
48
    int startJob(int playerId, PassRefPtr<ResourceHandle> job, Frame*, bool defersLoading);
48
    int startJob(int playerId, PassRefPtr<ResourceHandle> job, Frame*, bool defersLoading);
49
    int startJob(int playerId, PassRefPtr<ResourceHandle> job, const ResourceRequest&, Frame*, bool defersLoading);
49
    int startJob(int playerId, PassRefPtr<ResourceHandle> job, const ResourceRequest&, Frame*, bool defersLoading);
50
    bool stopJob(PassRefPtr<ResourceHandle>);
50
    bool stopJob(PassRefPtr<ResourceHandle>);
Lines 60-66 private: a/Source/WebCore/platform/network/blackberry/NetworkManager.h_sec3
60
    int startJob(int playerId, const String& pageGroupName, PassRefPtr<ResourceHandle>, const ResourceRequest&, BlackBerry::Platform::NetworkStreamFactory*, Frame*, int deferLoadingCount = 0, int redirectCount = 0, bool rereadCookies = false);
60
    int startJob(int playerId, const String& pageGroupName, PassRefPtr<ResourceHandle>, const ResourceRequest&, BlackBerry::Platform::NetworkStreamFactory*, Frame*, int deferLoadingCount = 0, int redirectCount = 0, bool rereadCookies = false);
61
61
62
    Vector<NetworkJob*> m_jobs;
62
    Vector<NetworkJob*> m_jobs;
63
    KURL m_initialURL;
63
    URL m_initialURL;
64
};
64
};
65
65
66
} // namespace WebCore
66
} // namespace WebCore
- a/Source/WebCore/platform/network/blackberry/ProxyServerBlackBerry.cpp -2 / +2 lines
Lines 26-37 a/Source/WebCore/platform/network/blackberry/ProxyServerBlackBerry.cpp_sec1
26
#include "config.h"
26
#include "config.h"
27
#include "ProxyServer.h"
27
#include "ProxyServer.h"
28
28
29
#include "KURL.h"
29
#include "URL.h"
30
#include "NotImplemented.h"
30
#include "NotImplemented.h"
31
31
32
namespace WebCore {
32
namespace WebCore {
33
33
34
Vector<ProxyServer> proxyServersForURL(const KURL&, const NetworkingContext*)
34
Vector<ProxyServer> proxyServersForURL(const URL&, const NetworkingContext*)
35
{
35
{
36
    notImplemented();
36
    notImplemented();
37
    return Vector<ProxyServer>();
37
    return Vector<ProxyServer>();
- a/Source/WebCore/platform/network/blackberry/ResourceRequest.h -4 / +4 lines
Lines 51-57 public: a/Source/WebCore/platform/network/blackberry/ResourceRequest.h_sec1
51
        TargetIsUnspecified,
51
        TargetIsUnspecified,
52
    };
52
    };
53
    ResourceRequest(const String& url)
53
    ResourceRequest(const String& url)
54
        : ResourceRequestBase(KURL(ParsedURLString, url), UseProtocolCachePolicy)
54
        : ResourceRequestBase(URL(ParsedURLString, url), UseProtocolCachePolicy)
55
        , m_isXMLHTTPRequest(false)
55
        , m_isXMLHTTPRequest(false)
56
        , m_mustHandleInternally(false)
56
        , m_mustHandleInternally(false)
57
        , m_forceDownload(false)
57
        , m_forceDownload(false)
Lines 59-65 public: a/Source/WebCore/platform/network/blackberry/ResourceRequest.h_sec2
59
    {
59
    {
60
    }
60
    }
61
61
62
    ResourceRequest(const KURL& url)
62
    ResourceRequest(const URL& url)
63
        : ResourceRequestBase(url, UseProtocolCachePolicy)
63
        : ResourceRequestBase(url, UseProtocolCachePolicy)
64
        , m_isXMLHTTPRequest(false)
64
        , m_isXMLHTTPRequest(false)
65
        , m_mustHandleInternally(false)
65
        , m_mustHandleInternally(false)
Lines 68-74 public: a/Source/WebCore/platform/network/blackberry/ResourceRequest.h_sec3
68
    {
68
    {
69
    }
69
    }
70
70
71
    ResourceRequest(const KURL& url, const String& referrer, ResourceRequestCachePolicy policy = UseProtocolCachePolicy)
71
    ResourceRequest(const URL& url, const String& referrer, ResourceRequestCachePolicy policy = UseProtocolCachePolicy)
72
        : ResourceRequestBase(url, policy)
72
        : ResourceRequestBase(url, policy)
73
        , m_isXMLHTTPRequest(false)
73
        , m_isXMLHTTPRequest(false)
74
        , m_mustHandleInternally(false)
74
        , m_mustHandleInternally(false)
Lines 79-85 public: a/Source/WebCore/platform/network/blackberry/ResourceRequest.h_sec4
79
    }
79
    }
80
80
81
    ResourceRequest()
81
    ResourceRequest()
82
        : ResourceRequestBase(KURL(), UseProtocolCachePolicy)
82
        : ResourceRequestBase(URL(), UseProtocolCachePolicy)
83
        , m_isXMLHTTPRequest(false)
83
        , m_isXMLHTTPRequest(false)
84
        , m_mustHandleInternally(false)
84
        , m_mustHandleInternally(false)
85
        , m_forceDownload(false)
85
        , m_forceDownload(false)
- a/Source/WebCore/platform/network/blackberry/ResourceResponse.h -1 / +1 lines
Lines 30-36 public: a/Source/WebCore/platform/network/blackberry/ResourceResponse.h_sec1
30
    {
30
    {
31
    }
31
    }
32
32
33
    ResourceResponse(const KURL& url, const String& mimeType, long long expectedLength, const String& textEncodingName, const String& filename)
33
    ResourceResponse(const URL& url, const String& mimeType, long long expectedLength, const String& textEncodingName, const String& filename)
34
        : ResourceResponseBase(url, mimeType, expectedLength, textEncodingName, filename)
34
        : ResourceResponseBase(url, mimeType, expectedLength, textEncodingName, filename)
35
        , m_isMultipartPayload(false)
35
        , m_isMultipartPayload(false)
36
    {
36
    {
- a/Source/WebCore/platform/network/blackberry/SocketStreamHandle.h -2 / +2 lines
Lines 48-54 class SocketStreamHandleClient; a/Source/WebCore/platform/network/blackberry/SocketStreamHandle.h_sec1
48
48
49
class SocketStreamHandle : public RefCounted<SocketStreamHandle>, public BlackBerry::Platform::FilterStream, public SocketStreamHandleBase {
49
class SocketStreamHandle : public RefCounted<SocketStreamHandle>, public BlackBerry::Platform::FilterStream, public SocketStreamHandleBase {
50
public:
50
public:
51
    static PassRefPtr<SocketStreamHandle> create(const String& groupName, const KURL& url, SocketStreamHandleClient* client) { return adoptRef(new SocketStreamHandle(groupName, url, client)); }
51
    static PassRefPtr<SocketStreamHandle> create(const String& groupName, const URL& url, SocketStreamHandleClient* client) { return adoptRef(new SocketStreamHandle(groupName, url, client)); }
52
52
53
    virtual ~SocketStreamHandle();
53
    virtual ~SocketStreamHandle();
54
54
Lines 64-70 protected: a/Source/WebCore/platform/network/blackberry/SocketStreamHandle.h_sec2
64
    virtual void platformClose();
64
    virtual void platformClose();
65
65
66
private:
66
private:
67
    SocketStreamHandle(const String& groupName, const KURL&, SocketStreamHandleClient*);
67
    SocketStreamHandle(const String& groupName, const URL&, SocketStreamHandleClient*);
68
68
69
    OwnPtr<BlackBerry::Platform::FilterStream> m_socketStream;
69
    OwnPtr<BlackBerry::Platform::FilterStream> m_socketStream;
70
    int m_status;
70
    int m_status;
- a/Source/WebCore/platform/network/blackberry/SocketStreamHandleBlackBerry.cpp -2 / +2 lines
Lines 34-40 a/Source/WebCore/platform/network/blackberry/SocketStreamHandleBlackBerry.cpp_sec1
34
34
35
#include "Chrome.h"
35
#include "Chrome.h"
36
#include "FrameLoaderClientBlackBerry.h"
36
#include "FrameLoaderClientBlackBerry.h"
37
#include "KURL.h"
37
#include "URL.h"
38
#include "Logging.h"
38
#include "Logging.h"
39
#include "Page.h"
39
#include "Page.h"
40
#include "PageClientBlackBerry.h"
40
#include "PageClientBlackBerry.h"
Lines 47-53 a/Source/WebCore/platform/network/blackberry/SocketStreamHandleBlackBerry.cpp_sec2
47
47
48
namespace WebCore {
48
namespace WebCore {
49
49
50
SocketStreamHandle::SocketStreamHandle(const String& groupName, const KURL& url, SocketStreamHandleClient* client)
50
SocketStreamHandle::SocketStreamHandle(const String& groupName, const URL& url, SocketStreamHandleClient* client)
51
    : SocketStreamHandleBase(url, client)
51
    : SocketStreamHandleBase(url, client)
52
{
52
{
53
    LOG(Network, "SocketStreamHandle %p new client %p", this, m_client);
53
    LOG(Network, "SocketStreamHandle %p new client %p", this, m_client);
- a/Source/WebCore/platform/network/blackberry/rss/RSSAtomParser.cpp -1 / +1 lines
Lines 63-69 RSSAtomParser::RSSAtomParser() a/Source/WebCore/platform/network/blackberry/rss/RSSAtomParser.cpp_sec1
63
63
64
bool RSSAtomParser::parseBuffer(const char* buffer, int length, const char* url, const char* encoding)
64
bool RSSAtomParser::parseBuffer(const char* buffer, int length, const char* url, const char* encoding)
65
{
65
{
66
    m_url = KURL(blankURL(), url);
66
    m_url = URL(blankURL(), url);
67
    return parseXmlDoc(xmlReadMemory(buffer, length, url, encoding, XML_PARSE_NOBLANKS | XML_PARSE_NONET));
67
    return parseXmlDoc(xmlReadMemory(buffer, length, url, encoding, XML_PARSE_NOBLANKS | XML_PARSE_NONET));
68
}
68
}
69
69
- a/Source/WebCore/platform/network/blackberry/rss/RSSAtomParser.h -2 / +2 lines
Lines 19-25 a/Source/WebCore/platform/network/blackberry/rss/RSSAtomParser.h_sec1
19
#ifndef RSSAtomParser_h
19
#ifndef RSSAtomParser_h
20
#define RSSAtomParser_h
20
#define RSSAtomParser_h
21
21
22
#include "KURL.h"
22
#include "URL.h"
23
#include "RSSParserBase.h"
23
#include "RSSParserBase.h"
24
24
25
namespace WebCore {
25
namespace WebCore {
Lines 70-76 private: a/Source/WebCore/platform/network/blackberry/rss/RSSAtomParser.h_sec2
70
    String parseContent(const String& base, xmlNode*);
70
    String parseContent(const String& base, xmlNode*);
71
    String parseAuthor(xmlNode*);
71
    String parseAuthor(xmlNode*);
72
    String parseCategory(xmlNode*);
72
    String parseCategory(xmlNode*);
73
    KURL m_url;
73
    URL m_url;
74
};
74
};
75
75
76
} // namespace WebCore
76
} // namespace WebCore
- a/Source/WebCore/platform/network/cf/CookieJarCFNet.cpp -7 / +7 lines
Lines 29-35 a/Source/WebCore/platform/network/cf/CookieJarCFNet.cpp_sec1
29
#if USE(CFNETWORK)
29
#if USE(CFNETWORK)
30
30
31
#include "Cookie.h"
31
#include "Cookie.h"
32
#include "KURL.h"
32
#include "URL.h"
33
#include "NetworkStorageSession.h"
33
#include "NetworkStorageSession.h"
34
#include "SoftLinking.h"
34
#include "SoftLinking.h"
35
#include <CFNetwork/CFHTTPCookiesPriv.h>
35
#include <CFNetwork/CFHTTPCookiesPriv.h>
Lines 93-99 static RetainPtr<CFArrayRef> filterCookies(CFArrayRef unfilteredCookies) a/Source/WebCore/platform/network/cf/CookieJarCFNet.cpp_sec2
93
    return filteredCookies;
93
    return filteredCookies;
94
}
94
}
95
95
96
void setCookiesFromDOM(const NetworkStorageSession& session, const KURL& firstParty, const KURL& url, const String& value)
96
void setCookiesFromDOM(const NetworkStorageSession& session, const URL& firstParty, const URL& url, const String& value)
97
{
97
{
98
    // <rdar://problem/5632883> CFHTTPCookieStorage stores an empty cookie, which would be sent as "Cookie: =".
98
    // <rdar://problem/5632883> CFHTTPCookieStorage stores an empty cookie, which would be sent as "Cookie: =".
99
    if (value.isEmpty())
99
    if (value.isEmpty())
Lines 117-123 void setCookiesFromDOM(const NetworkStorageSession& session, const KURL& firstPa a/Source/WebCore/platform/network/cf/CookieJarCFNet.cpp_sec3
117
    CFHTTPCookieStorageSetCookies(session.cookieStorage().get(), filterCookies(cookiesCF.get()).get(), urlCF.get(), firstPartyForCookiesCF.get());
117
    CFHTTPCookieStorageSetCookies(session.cookieStorage().get(), filterCookies(cookiesCF.get()).get(), urlCF.get(), firstPartyForCookiesCF.get());
118
}
118
}
119
119
120
String cookiesForDOM(const NetworkStorageSession& session, const KURL&, const KURL& url)
120
String cookiesForDOM(const NetworkStorageSession& session, const URL&, const URL& url)
121
{
121
{
122
    RetainPtr<CFURLRef> urlCF = url.createCFURL();
122
    RetainPtr<CFURLRef> urlCF = url.createCFURL();
123
123
Lines 127-133 String cookiesForDOM(const NetworkStorageSession& session, const KURL&, const KU a/Source/WebCore/platform/network/cf/CookieJarCFNet.cpp_sec4
127
    return (CFStringRef)CFDictionaryGetValue(headerCF.get(), s_cookieCF);
127
    return (CFStringRef)CFDictionaryGetValue(headerCF.get(), s_cookieCF);
128
}
128
}
129
129
130
String cookieRequestHeaderFieldValue(const NetworkStorageSession& session, const KURL& /*firstParty*/, const KURL& url)
130
String cookieRequestHeaderFieldValue(const NetworkStorageSession& session, const URL& /*firstParty*/, const URL& url)
131
{
131
{
132
    RetainPtr<CFURLRef> urlCF = url.createCFURL();
132
    RetainPtr<CFURLRef> urlCF = url.createCFURL();
133
133
Lines 137-149 String cookieRequestHeaderFieldValue(const NetworkStorageSession& session, const a/Source/WebCore/platform/network/cf/CookieJarCFNet.cpp_sec5
137
    return (CFStringRef)CFDictionaryGetValue(headerCF.get(), s_cookieCF);
137
    return (CFStringRef)CFDictionaryGetValue(headerCF.get(), s_cookieCF);
138
}
138
}
139
139
140
bool cookiesEnabled(const NetworkStorageSession& session, const KURL& /*firstParty*/, const KURL& /*url*/)
140
bool cookiesEnabled(const NetworkStorageSession& session, const URL& /*firstParty*/, const URL& /*url*/)
141
{
141
{
142
    CFHTTPCookieStorageAcceptPolicy policy = CFHTTPCookieStorageGetCookieAcceptPolicy(session.cookieStorage().get());
142
    CFHTTPCookieStorageAcceptPolicy policy = CFHTTPCookieStorageGetCookieAcceptPolicy(session.cookieStorage().get());
143
    return policy == CFHTTPCookieStorageAcceptPolicyOnlyFromMainDocumentDomain || policy == CFHTTPCookieStorageAcceptPolicyAlways;
143
    return policy == CFHTTPCookieStorageAcceptPolicyOnlyFromMainDocumentDomain || policy == CFHTTPCookieStorageAcceptPolicyAlways;
144
}
144
}
145
145
146
bool getRawCookies(const NetworkStorageSession& session, const KURL& /*firstParty*/, const KURL& url, Vector<Cookie>& rawCookies)
146
bool getRawCookies(const NetworkStorageSession& session, const URL& /*firstParty*/, const URL& url, Vector<Cookie>& rawCookies)
147
{
147
{
148
    rawCookies.clear();
148
    rawCookies.clear();
149
149
Lines 174-180 bool getRawCookies(const NetworkStorageSession& session, const KURL& /*firstPart a/Source/WebCore/platform/network/cf/CookieJarCFNet.cpp_sec6
174
    return true;
174
    return true;
175
}
175
}
176
176
177
void deleteCookie(const NetworkStorageSession& session, const KURL& url, const String& name)
177
void deleteCookie(const NetworkStorageSession& session, const URL& url, const String& name)
178
{
178
{
179
    RetainPtr<CFHTTPCookieStorageRef> cookieStorage = session.cookieStorage();
179
    RetainPtr<CFHTTPCookieStorageRef> cookieStorage = session.cookieStorage();
180
180
- a/Source/WebCore/platform/network/cf/DNSCFNet.cpp -3 / +3 lines
Lines 29-35 a/Source/WebCore/platform/network/cf/DNSCFNet.cpp_sec1
29
#include "DNS.h"
29
#include "DNS.h"
30
#include "DNSResolveQueue.h"
30
#include "DNSResolveQueue.h"
31
31
32
#include "KURL.h"
32
#include "URL.h"
33
#include "Timer.h"
33
#include "Timer.h"
34
#include <wtf/HashSet.h>
34
#include <wtf/HashSet.h>
35
#include <wtf/MainThread.h>
35
#include <wtf/MainThread.h>
Lines 55-62 bool DNSResolveQueue::platformProxyIsEnabledInSystemPreferences() a/Source/WebCore/platform/network/cf/DNSCFNet.cpp_sec2
55
    if (!proxySettings)
55
    if (!proxySettings)
56
        return false;
56
        return false;
57
57
58
    RetainPtr<CFURLRef> httpCFURL = KURL(ParsedURLString, "http://example.com/").createCFURL();
58
    RetainPtr<CFURLRef> httpCFURL = URL(ParsedURLString, "http://example.com/").createCFURL();
59
    RetainPtr<CFURLRef> httpsCFURL = KURL(ParsedURLString, "https://example.com/").createCFURL();
59
    RetainPtr<CFURLRef> httpsCFURL = URL(ParsedURLString, "https://example.com/").createCFURL();
60
60
61
    RetainPtr<CFArrayRef> httpProxyArray = adoptCF(CFNetworkCopyProxiesForURL(httpCFURL.get(), proxySettings.get()));
61
    RetainPtr<CFArrayRef> httpProxyArray = adoptCF(CFNetworkCopyProxiesForURL(httpCFURL.get(), proxySettings.get()));
62
    RetainPtr<CFArrayRef> httpsProxyArray = adoptCF(CFNetworkCopyProxiesForURL(httpsCFURL.get(), proxySettings.get()));
62
    RetainPtr<CFArrayRef> httpsProxyArray = adoptCF(CFNetworkCopyProxiesForURL(httpsCFURL.get(), proxySettings.get()));
- a/Source/WebCore/platform/network/cf/ProxyServerCFNet.cpp -3 / +3 lines
Lines 26-32 a/Source/WebCore/platform/network/cf/ProxyServerCFNet.cpp_sec1
26
#include "config.h"
26
#include "config.h"
27
#include "ProxyServer.h"
27
#include "ProxyServer.h"
28
28
29
#include "KURL.h"
29
#include "URL.h"
30
#include "Logging.h"
30
#include "Logging.h"
31
#include <wtf/RetainPtr.h>
31
#include <wtf/RetainPtr.h>
32
#include <wtf/text/CString.h>
32
#include <wtf/text/CString.h>
Lines 119-125 static void processProxyServers(Vector<ProxyServer>& proxyServers, CFArrayRef pr a/Source/WebCore/platform/network/cf/ProxyServerCFNet.cpp_sec2
119
    }
119
    }
120
}
120
}
121
121
122
static void addProxyServersForURL(Vector<ProxyServer>& proxyServers, const KURL& url)
122
static void addProxyServersForURL(Vector<ProxyServer>& proxyServers, const URL& url)
123
{
123
{
124
    RetainPtr<CFDictionaryRef> proxySettings = adoptCF(CFNetworkCopySystemProxySettings());
124
    RetainPtr<CFDictionaryRef> proxySettings = adoptCF(CFNetworkCopySystemProxySettings());
125
    if (!proxySettings)
125
    if (!proxySettings)
Lines 133-139 static void addProxyServersForURL(Vector<ProxyServer>& proxyServers, const KURL& a/Source/WebCore/platform/network/cf/ProxyServerCFNet.cpp_sec3
133
    processProxyServers(proxyServers, proxiesForURL.get(), cfURL.get());
133
    processProxyServers(proxyServers, proxiesForURL.get(), cfURL.get());
134
}
134
}
135
135
136
Vector<ProxyServer> proxyServersForURL(const KURL& url, const NetworkingContext*)
136
Vector<ProxyServer> proxyServersForURL(const URL& url, const NetworkingContext*)
137
{
137
{
138
    Vector<ProxyServer> proxyServers;
138
    Vector<ProxyServer> proxyServers;
139
    
139
    
- a/Source/WebCore/platform/network/cf/ResourceErrorCF.cpp -1 / +1 lines
Lines 28-34 a/Source/WebCore/platform/network/cf/ResourceErrorCF.cpp_sec1
28
28
29
#if USE(CFNETWORK)
29
#if USE(CFNETWORK)
30
30
31
#include "KURL.h"
31
#include "URL.h"
32
#include <CoreFoundation/CFError.h>
32
#include <CoreFoundation/CFError.h>
33
#include <CFNetwork/CFNetworkErrors.h>
33
#include <CFNetwork/CFNetworkErrors.h>
34
#include <wtf/RetainPtr.h>
34
#include <wtf/RetainPtr.h>
- a/Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp -4 / +4 lines
Lines 348-354 void ResourceHandle::createCFURLConnection(bool shouldUseCredentialStorage, bool a/Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp_sec1
348
{
348
{
349
    if ((!d->m_user.isEmpty() || !d->m_pass.isEmpty()) && !firstRequest().url().protocolIsInHTTPFamily()) {
349
    if ((!d->m_user.isEmpty() || !d->m_pass.isEmpty()) && !firstRequest().url().protocolIsInHTTPFamily()) {
350
        // Credentials for ftp can only be passed in URL, the didReceiveAuthenticationChallenge delegate call won't be made.
350
        // Credentials for ftp can only be passed in URL, the didReceiveAuthenticationChallenge delegate call won't be made.
351
        KURL urlWithCredentials(firstRequest().url());
351
        URL urlWithCredentials(firstRequest().url());
352
        urlWithCredentials.setUser(d->m_user);
352
        urlWithCredentials.setUser(d->m_user);
353
        urlWithCredentials.setPass(d->m_pass);
353
        urlWithCredentials.setPass(d->m_pass);
354
        firstRequest().setURL(urlWithCredentials);
354
        firstRequest().setURL(urlWithCredentials);
Lines 479-485 void ResourceHandle::cancel() a/Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp_sec2
479
479
480
void ResourceHandle::willSendRequest(ResourceRequest& request, const ResourceResponse& redirectResponse)
480
void ResourceHandle::willSendRequest(ResourceRequest& request, const ResourceResponse& redirectResponse)
481
{
481
{
482
    const KURL& url = request.url();
482
    const URL& url = request.url();
483
    d->m_user = url.user();
483
    d->m_user = url.user();
484
    d->m_pass = url.pass();
484
    d->m_pass = url.pass();
485
    d->m_lastHTTPMethod = request.httpMethod();
485
    d->m_lastHTTPMethod = request.httpMethod();
Lines 542-548 void ResourceHandle::didReceiveAuthenticationChallenge(const AuthenticationChall a/Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp_sec3
542
    if (!d->m_user.isNull() && !d->m_pass.isNull()) {
542
    if (!d->m_user.isNull() && !d->m_pass.isNull()) {
543
        RetainPtr<CFURLCredentialRef> credential = adoptCF(CFURLCredentialCreate(kCFAllocatorDefault, d->m_user.createCFString().get(), d->m_pass.createCFString().get(), 0, kCFURLCredentialPersistenceNone));
543
        RetainPtr<CFURLCredentialRef> credential = adoptCF(CFURLCredentialCreate(kCFAllocatorDefault, d->m_user.createCFString().get(), d->m_pass.createCFString().get(), 0, kCFURLCredentialPersistenceNone));
544
        
544
        
545
        KURL urlToStore;
545
        URL urlToStore;
546
        if (challenge.failureResponse().httpStatusCode() == 401)
546
        if (challenge.failureResponse().httpStatusCode() == 401)
547
            urlToStore = challenge.failureResponse().url();
547
            urlToStore = challenge.failureResponse().url();
548
        CredentialStorage::set(core(credential.get()), challenge.protectionSpace(), urlToStore);
548
        CredentialStorage::set(core(credential.get()), challenge.protectionSpace(), urlToStore);
Lines 613-619 void ResourceHandle::receivedCredential(const AuthenticationChallenge& challenge a/Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp_sec4
613
        Credential webCredential(credential.user(), credential.password(), CredentialPersistenceNone);
613
        Credential webCredential(credential.user(), credential.password(), CredentialPersistenceNone);
614
        RetainPtr<CFURLCredentialRef> cfCredential = adoptCF(createCF(webCredential));
614
        RetainPtr<CFURLCredentialRef> cfCredential = adoptCF(createCF(webCredential));
615
        
615
        
616
        KURL urlToStore;
616
        URL urlToStore;
617
        if (challenge.failureResponse().httpStatusCode() == 401)
617
        if (challenge.failureResponse().httpStatusCode() == 401)
618
            urlToStore = challenge.failureResponse().url();      
618
            urlToStore = challenge.failureResponse().url();      
619
        CredentialStorage::set(webCredential, challenge.protectionSpace(), urlToStore);
619
        CredentialStorage::set(webCredential, challenge.protectionSpace(), urlToStore);
- a/Source/WebCore/platform/network/cf/ResourceRequest.h -4 / +4 lines
Lines 42-64 namespace WebCore { a/Source/WebCore/platform/network/cf/ResourceRequest.h_sec1
42
    class ResourceRequest : public ResourceRequestBase {
42
    class ResourceRequest : public ResourceRequestBase {
43
    public:
43
    public:
44
        ResourceRequest(const String& url) 
44
        ResourceRequest(const String& url) 
45
            : ResourceRequestBase(KURL(ParsedURLString, url), UseProtocolCachePolicy)
45
            : ResourceRequestBase(URL(ParsedURLString, url), UseProtocolCachePolicy)
46
        {
46
        {
47
        }
47
        }
48
48
49
        ResourceRequest(const KURL& url) 
49
        ResourceRequest(const URL& url) 
50
            : ResourceRequestBase(url, UseProtocolCachePolicy)
50
            : ResourceRequestBase(url, UseProtocolCachePolicy)
51
        {
51
        {
52
        }
52
        }
53
53
54
        ResourceRequest(const KURL& url, const String& referrer, ResourceRequestCachePolicy policy = UseProtocolCachePolicy) 
54
        ResourceRequest(const URL& url, const String& referrer, ResourceRequestCachePolicy policy = UseProtocolCachePolicy) 
55
            : ResourceRequestBase(url, policy)
55
            : ResourceRequestBase(url, policy)
56
        {
56
        {
57
            setHTTPReferrer(referrer);
57
            setHTTPReferrer(referrer);
58
        }
58
        }
59
        
59
        
60
        ResourceRequest()
60
        ResourceRequest()
61
            : ResourceRequestBase(KURL(), UseProtocolCachePolicy)
61
            : ResourceRequestBase(URL(), UseProtocolCachePolicy)
62
        {
62
        {
63
        }
63
        }
64
        
64
        
- a/Source/WebCore/platform/network/cf/ResourceResponse.h -1 / +1 lines
Lines 66-72 public: a/Source/WebCore/platform/network/cf/ResourceResponse.h_sec1
66
    }
66
    }
67
#endif
67
#endif
68
68
69
    ResourceResponse(const KURL& url, const String& mimeType, long long expectedLength, const String& textEncodingName, const String& filename)
69
    ResourceResponse(const URL& url, const String& mimeType, long long expectedLength, const String& textEncodingName, const String& filename)
70
        : ResourceResponseBase(url, mimeType, expectedLength, textEncodingName, filename)
70
        : ResourceResponseBase(url, mimeType, expectedLength, textEncodingName, filename)
71
        , m_initLevel(CommonAndUncommonFields)
71
        , m_initLevel(CommonAndUncommonFields)
72
        , m_platformResponseIsUpToDate(false)
72
        , m_platformResponseIsUpToDate(false)
- a/Source/WebCore/platform/network/cf/SocketStreamHandle.h -2 / +2 lines
Lines 46-52 class SocketStreamHandleClient; a/Source/WebCore/platform/network/cf/SocketStreamHandle.h_sec1
46
46
47
class SocketStreamHandle : public ThreadSafeRefCounted<SocketStreamHandle>, public SocketStreamHandleBase, public AuthenticationClient {
47
class SocketStreamHandle : public ThreadSafeRefCounted<SocketStreamHandle>, public SocketStreamHandleBase, public AuthenticationClient {
48
public:
48
public:
49
    static PassRefPtr<SocketStreamHandle> create(const KURL& url, SocketStreamHandleClient* client) { return adoptRef(new SocketStreamHandle(url, client)); }
49
    static PassRefPtr<SocketStreamHandle> create(const URL& url, SocketStreamHandleClient* client) { return adoptRef(new SocketStreamHandle(url, client)); }
50
50
51
    virtual ~SocketStreamHandle();
51
    virtual ~SocketStreamHandle();
52
52
Lines 57-63 private: a/Source/WebCore/platform/network/cf/SocketStreamHandle.h_sec2
57
    virtual int platformSend(const char* data, int length);
57
    virtual int platformSend(const char* data, int length);
58
    virtual void platformClose();
58
    virtual void platformClose();
59
59
60
    SocketStreamHandle(const KURL&, SocketStreamHandleClient*);
60
    SocketStreamHandle(const URL&, SocketStreamHandleClient*);
61
    void createStreams();
61
    void createStreams();
62
    void scheduleStreams();
62
    void scheduleStreams();
63
    void chooseProxy();
63
    void chooseProxy();
- a/Source/WebCore/platform/network/cf/SocketStreamHandleCFNet.cpp -2 / +2 lines
Lines 55-61 extern "C" const CFStringRef _kCFStreamSocketSetNoDelay; a/Source/WebCore/platform/network/cf/SocketStreamHandleCFNet.cpp_sec1
55
55
56
namespace WebCore {
56
namespace WebCore {
57
57
58
SocketStreamHandle::SocketStreamHandle(const KURL& url, SocketStreamHandleClient* client)
58
SocketStreamHandle::SocketStreamHandle(const URL& url, SocketStreamHandleClient* client)
59
    : SocketStreamHandleBase(url, client)
59
    : SocketStreamHandleBase(url, client)
60
    , m_connectingSubstate(New)
60
    , m_connectingSubstate(New)
61
    , m_connectionType(Unknown)
61
    , m_connectionType(Unknown)
Lines 65-71 SocketStreamHandle::SocketStreamHandle(const KURL& url, SocketStreamHandleClient a/Source/WebCore/platform/network/cf/SocketStreamHandleCFNet.cpp_sec2
65
65
66
    ASSERT(url.protocolIs("ws") || url.protocolIs("wss"));
66
    ASSERT(url.protocolIs("ws") || url.protocolIs("wss"));
67
67
68
    KURL httpsURL(KURL(), "https://" + m_url.host());
68
    URL httpsURL(URL(), "https://" + m_url.host());
69
    m_httpsURL = httpsURL.createCFURL();
69
    m_httpsURL = httpsURL.createCFURL();
70
70
71
    createStreams();
71
    createStreams();
- a/Source/WebCore/platform/network/curl/CookieJarCurl.cpp -9 / +9 lines
Lines 18-24 a/Source/WebCore/platform/network/curl/CookieJarCurl.cpp_sec1
18
#include "PlatformCookieJar.h"
18
#include "PlatformCookieJar.h"
19
19
20
#include "Cookie.h"
20
#include "Cookie.h"
21
#include "KURL.h"
21
#include "URL.h"
22
#include "ResourceHandleManager.h"
22
#include "ResourceHandleManager.h"
23
23
24
#include <wtf/DateMath.h>
24
#include <wtf/DateMath.h>
Lines 135-141 static void addMatchingCurlCookie(const char* cookie, const String& domain, cons a/Source/WebCore/platform/network/curl/CookieJarCurl.cpp_sec2
135
135
136
}
136
}
137
137
138
static String getNetscapeCookieFormat(const KURL& url, const String& value)
138
static String getNetscapeCookieFormat(const URL& url, const String& value)
139
{
139
{
140
    // Constructs a cookie string in Netscape Cookie file format.
140
    // Constructs a cookie string in Netscape Cookie file format.
141
141
Lines 219-225 static String getNetscapeCookieFormat(const KURL& url, const String& value) a/Source/WebCore/platform/network/curl/CookieJarCurl.cpp_sec3
219
    return cookieStr.toString();
219
    return cookieStr.toString();
220
}
220
}
221
221
222
void setCookiesFromDOM(const NetworkStorageSession&, const KURL&, const KURL& url, const String& value)
222
void setCookiesFromDOM(const NetworkStorageSession&, const URL&, const URL& url, const String& value)
223
{
223
{
224
    CURL* curl = curl_easy_init();
224
    CURL* curl = curl_easy_init();
225
225
Lines 248-254 void setCookiesFromDOM(const NetworkStorageSession&, const KURL&, const KURL& ur a/Source/WebCore/platform/network/curl/CookieJarCurl.cpp_sec4
248
    curl_easy_cleanup(curl);
248
    curl_easy_cleanup(curl);
249
}
249
}
250
250
251
static String cookiesForSession(const NetworkStorageSession&, const KURL&, const KURL& url, bool httponly)
251
static String cookiesForSession(const NetworkStorageSession&, const URL&, const URL& url, bool httponly)
252
{
252
{
253
    String cookies;
253
    String cookies;
254
    CURL* curl = curl_easy_init();
254
    CURL* curl = curl_easy_init();
Lines 284-312 static String cookiesForSession(const NetworkStorageSession&, const KURL&, const a/Source/WebCore/platform/network/curl/CookieJarCurl.cpp_sec5
284
    return cookies;
284
    return cookies;
285
}
285
}
286
286
287
String cookiesForDOM(const NetworkStorageSession& session, const KURL& firstParty, const KURL& url)
287
String cookiesForDOM(const NetworkStorageSession& session, const URL& firstParty, const URL& url)
288
{
288
{
289
    return cookiesForSession(session, firstParty, url, false);
289
    return cookiesForSession(session, firstParty, url, false);
290
}
290
}
291
291
292
String cookieRequestHeaderFieldValue(const NetworkStorageSession& session, const KURL& firstParty, const KURL& url)
292
String cookieRequestHeaderFieldValue(const NetworkStorageSession& session, const URL& firstParty, const URL& url)
293
{
293
{
294
    return cookiesForSession(session, firstParty, url, true);
294
    return cookiesForSession(session, firstParty, url, true);
295
}
295
}
296
296
297
bool cookiesEnabled(const NetworkStorageSession&, const KURL& /*firstParty*/, const KURL& /*url*/)
297
bool cookiesEnabled(const NetworkStorageSession&, const URL& /*firstParty*/, const URL& /*url*/)
298
{
298
{
299
    return true;
299
    return true;
300
}
300
}
301
301
302
bool getRawCookies(const NetworkStorageSession&, const KURL& /*firstParty*/, const KURL& /*url*/, Vector<Cookie>& rawCookies)
302
bool getRawCookies(const NetworkStorageSession&, const URL& /*firstParty*/, const URL& /*url*/, Vector<Cookie>& rawCookies)
303
{
303
{
304
    // FIXME: Not yet implemented
304
    // FIXME: Not yet implemented
305
    rawCookies.clear();
305
    rawCookies.clear();
306
    return false; // return true when implemented
306
    return false; // return true when implemented
307
}
307
}
308
308
309
void deleteCookie(const NetworkStorageSession&, const KURL&, const String&)
309
void deleteCookie(const NetworkStorageSession&, const URL&, const String&)
310
{
310
{
311
    // FIXME: Not yet implemented
311
    // FIXME: Not yet implemented
312
}
312
}
- a/Source/WebCore/platform/network/curl/CurlDownload.cpp -3 / +3 lines
Lines 248-254 CurlDownload::~CurlDownload() a/Source/WebCore/platform/network/curl/CurlDownload.cpp_sec1
248
    moveFileToDestination();
248
    moveFileToDestination();
249
}
249
}
250
250
251
void CurlDownload::init(CurlDownloadListener* listener, const KURL& url)
251
void CurlDownload::init(CurlDownloadListener* listener, const URL& url)
252
{
252
{
253
    if (!listener)
253
    if (!listener)
254
        return;
254
        return;
Lines 288-294 void CurlDownload::init(CurlDownloadListener* listener, ResourceHandle*, const R a/Source/WebCore/platform/network/curl/CurlDownload.cpp_sec2
288
288
289
    MutexLocker locker(m_mutex);
289
    MutexLocker locker(m_mutex);
290
290
291
    KURL url(ParsedURLString, request.url());
291
    URL url(ParsedURLString, request.url());
292
292
293
    init(listener, url);
293
    init(listener, url);
294
294
Lines 390-396 void CurlDownload::didReceiveHeader(const String& header) a/Source/WebCore/platform/network/curl/CurlDownload.cpp_sec3
390
        if (httpCode >= 200 && httpCode < 300) {
390
        if (httpCode >= 200 && httpCode < 300) {
391
            const char* url = 0;
391
            const char* url = 0;
392
            err = curl_easy_getinfo(m_curlHandle, CURLINFO_EFFECTIVE_URL, &url);
392
            err = curl_easy_getinfo(m_curlHandle, CURLINFO_EFFECTIVE_URL, &url);
393
            m_response.setURL(KURL(ParsedURLString, url));
393
            m_response.setURL(URL(ParsedURLString, url));
394
394
395
            m_response.setMimeType(extractMIMETypeFromMediaType(m_response.httpHeaderField("Content-Type")));
395
            m_response.setMimeType(extractMIMETypeFromMediaType(m_response.httpHeaderField("Content-Type")));
396
            m_response.setTextEncodingName(extractCharsetFromMediaType(m_response.httpHeaderField("Content-Type")));
396
            m_response.setTextEncodingName(extractCharsetFromMediaType(m_response.httpHeaderField("Content-Type")));
- a/Source/WebCore/platform/network/curl/CurlDownload.h -1 / +1 lines
Lines 89-95 public: a/Source/WebCore/platform/network/curl/CurlDownload.h_sec1
89
    CurlDownload();
89
    CurlDownload();
90
    ~CurlDownload();
90
    ~CurlDownload();
91
91
92
    void init(CurlDownloadListener*, const WebCore::KURL&);
92
    void init(CurlDownloadListener*, const WebCore::URL&);
93
    void init(CurlDownloadListener*, ResourceHandle*, const ResourceRequest&, const ResourceResponse&);
93
    void init(CurlDownloadListener*, ResourceHandle*, const ResourceRequest&, const ResourceResponse&);
94
94
95
    bool start();
95
    bool start();
- a/Source/WebCore/platform/network/curl/ProxyServerCurl.cpp -2 / +2 lines
Lines 26-37 a/Source/WebCore/platform/network/curl/ProxyServerCurl.cpp_sec1
26
#include "config.h"
26
#include "config.h"
27
#include "ProxyServer.h"
27
#include "ProxyServer.h"
28
28
29
#include "KURL.h"
29
#include "URL.h"
30
#include <wtf/RetainPtr.h>
30
#include <wtf/RetainPtr.h>
31
31
32
namespace WebCore {
32
namespace WebCore {
33
33
34
Vector<ProxyServer> proxyServersForURL(const KURL&, const NetworkingContext*)
34
Vector<ProxyServer> proxyServersForURL(const URL&, const NetworkingContext*)
35
{
35
{
36
    // FIXME: Implement.
36
    // FIXME: Implement.
37
    return Vector<ProxyServer>();
37
    return Vector<ProxyServer>();
- a/Source/WebCore/platform/network/curl/ResourceHandleCurl.cpp -1 / +1 lines
Lines 231-237 void ResourceHandle::receivedCredential(const AuthenticationChallenge& challenge a/Source/WebCore/platform/network/curl/ResourceHandleCurl.cpp_sec1
231
231
232
    if (shouldUseCredentialStorage()) {
232
    if (shouldUseCredentialStorage()) {
233
        if (challenge.failureResponse().httpStatusCode() == 401) {
233
        if (challenge.failureResponse().httpStatusCode() == 401) {
234
            KURL urlToStore = challenge.failureResponse().url();
234
            URL urlToStore = challenge.failureResponse().url();
235
            CredentialStorage::set(credential, challenge.protectionSpace(), urlToStore);
235
            CredentialStorage::set(credential, challenge.protectionSpace(), urlToStore);
236
        }
236
        }
237
    }
237
    }
- a/Source/WebCore/platform/network/curl/ResourceHandleManager.cpp -7 / +7 lines
Lines 206-212 static void handleLocalReceiveResponse (CURL* handle, ResourceHandle* job, Resou a/Source/WebCore/platform/network/curl/ResourceHandleManager.cpp_sec1
206
     const char* hdr;
206
     const char* hdr;
207
     CURLcode err = curl_easy_getinfo(handle, CURLINFO_EFFECTIVE_URL, &hdr);
207
     CURLcode err = curl_easy_getinfo(handle, CURLINFO_EFFECTIVE_URL, &hdr);
208
     ASSERT_UNUSED(err, CURLE_OK == err);
208
     ASSERT_UNUSED(err, CURLE_OK == err);
209
     d->m_response.setURL(KURL(ParsedURLString, hdr));
209
     d->m_response.setURL(URL(ParsedURLString, hdr));
210
     if (d->client())
210
     if (d->client())
211
         d->client()->didReceiveResponse(job, d->m_response);
211
         d->client()->didReceiveResponse(job, d->m_response);
212
     d->m_response.setResponseFired(true);
212
     d->m_response.setResponseFired(true);
Lines 311-317 static bool getProtectionSpace(CURL* h, const ResourceResponse& response, Protec a/Source/WebCore/platform/network/curl/ResourceHandleManager.cpp_sec2
311
    if (err != CURLE_OK)
311
    if (err != CURLE_OK)
312
        return false;
312
        return false;
313
313
314
    KURL kurl(ParsedURLString, url);
314
    URL kurl(ParsedURLString, url);
315
315
316
    String host = kurl.host();
316
    String host = kurl.host();
317
    String protocol = kurl.protocol();
317
    String protocol = kurl.protocol();
Lines 393-399 static size_t headerCallback(char* ptr, size_t size, size_t nmemb, void* data) a/Source/WebCore/platform/network/curl/ResourceHandleManager.cpp_sec3
393
393
394
        const char* hdr;
394
        const char* hdr;
395
        curl_easy_getinfo(h, CURLINFO_EFFECTIVE_URL, &hdr);
395
        curl_easy_getinfo(h, CURLINFO_EFFECTIVE_URL, &hdr);
396
        d->m_response.setURL(KURL(ParsedURLString, hdr));
396
        d->m_response.setURL(URL(ParsedURLString, hdr));
397
397
398
        d->m_response.setHTTPStatusCode(httpCode);
398
        d->m_response.setHTTPStatusCode(httpCode);
399
        d->m_response.setMimeType(extractMIMETypeFromMediaType(d->m_response.httpHeaderField("Content-Type")).lower());
399
        d->m_response.setMimeType(extractMIMETypeFromMediaType(d->m_response.httpHeaderField("Content-Type")).lower());
Lines 411-417 static size_t headerCallback(char* ptr, size_t size, size_t nmemb, void* data) a/Source/WebCore/platform/network/curl/ResourceHandleManager.cpp_sec4
411
        if (isHttpRedirect(httpCode)) {
411
        if (isHttpRedirect(httpCode)) {
412
            String location = d->m_response.httpHeaderField("location");
412
            String location = d->m_response.httpHeaderField("location");
413
            if (!location.isEmpty()) {
413
            if (!location.isEmpty()) {
414
                KURL newURL = KURL(job->firstRequest().url(), location);
414
                URL newURL = URL(job->firstRequest().url(), location);
415
415
416
                ResourceRequest redirectedRequest = job->firstRequest();
416
                ResourceRequest redirectedRequest = job->firstRequest();
417
                redirectedRequest.setURL(newURL);
417
                redirectedRequest.setURL(newURL);
Lines 786-792 bool ResourceHandleManager::startScheduledJobs() a/Source/WebCore/platform/network/curl/ResourceHandleManager.cpp_sec5
786
786
787
void ResourceHandleManager::dispatchSynchronousJob(ResourceHandle* job)
787
void ResourceHandleManager::dispatchSynchronousJob(ResourceHandle* job)
788
{
788
{
789
    KURL kurl = job->firstRequest().url();
789
    URL kurl = job->firstRequest().url();
790
790
791
    if (kurl.protocolIsData()) {
791
    if (kurl.protocolIsData()) {
792
        handleDataURL(job);
792
        handleDataURL(job);
Lines 815-821 void ResourceHandleManager::dispatchSynchronousJob(ResourceHandle* job) a/Source/WebCore/platform/network/curl/ResourceHandleManager.cpp_sec6
815
815
816
void ResourceHandleManager::startJob(ResourceHandle* job)
816
void ResourceHandleManager::startJob(ResourceHandle* job)
817
{
817
{
818
    KURL kurl = job->firstRequest().url();
818
    URL kurl = job->firstRequest().url();
819
819
820
    if (kurl.protocolIsData()) {
820
    if (kurl.protocolIsData()) {
821
        handleDataURL(job);
821
        handleDataURL(job);
Lines 875-881 void ResourceHandleManager::applyAuthenticationToRequest(ResourceHandle* handle, a/Source/WebCore/platform/network/curl/ResourceHandleManager.cpp_sec7
875
void ResourceHandleManager::initializeHandle(ResourceHandle* job)
875
void ResourceHandleManager::initializeHandle(ResourceHandle* job)
876
{
876
{
877
    static const int allowedProtocols = CURLPROTO_FILE | CURLPROTO_FTP | CURLPROTO_FTPS | CURLPROTO_HTTP | CURLPROTO_HTTPS;
877
    static const int allowedProtocols = CURLPROTO_FILE | CURLPROTO_FTP | CURLPROTO_FTPS | CURLPROTO_HTTP | CURLPROTO_HTTPS;
878
    KURL kurl = job->firstRequest().url();
878
    URL kurl = job->firstRequest().url();
879
879
880
    // Remove any fragment part, otherwise curl will send it as part of the request.
880
    // Remove any fragment part, otherwise curl will send it as part of the request.
881
    kurl.removeFragmentIdentifier();
881
    kurl.removeFragmentIdentifier();
- a/Source/WebCore/platform/network/curl/ResourceRequest.h -4 / +4 lines
Lines 36-58 namespace WebCore { a/Source/WebCore/platform/network/curl/ResourceRequest.h_sec1
36
    class ResourceRequest : public ResourceRequestBase {
36
    class ResourceRequest : public ResourceRequestBase {
37
    public:
37
    public:
38
        ResourceRequest(const String& url)
38
        ResourceRequest(const String& url)
39
            : ResourceRequestBase(KURL(ParsedURLString, url), UseProtocolCachePolicy)
39
            : ResourceRequestBase(URL(ParsedURLString, url), UseProtocolCachePolicy)
40
        {
40
        {
41
        }
41
        }
42
42
43
        ResourceRequest(const KURL& url)
43
        ResourceRequest(const URL& url)
44
            : ResourceRequestBase(url, UseProtocolCachePolicy)
44
            : ResourceRequestBase(url, UseProtocolCachePolicy)
45
        {
45
        {
46
        }
46
        }
47
47
48
        ResourceRequest(const KURL& url, const String& referrer, ResourceRequestCachePolicy policy = UseProtocolCachePolicy)
48
        ResourceRequest(const URL& url, const String& referrer, ResourceRequestCachePolicy policy = UseProtocolCachePolicy)
49
            : ResourceRequestBase(url, policy)
49
            : ResourceRequestBase(url, policy)
50
        {
50
        {
51
            setHTTPReferrer(referrer);
51
            setHTTPReferrer(referrer);
52
        }
52
        }
53
53
54
        ResourceRequest()
54
        ResourceRequest()
55
            : ResourceRequestBase(KURL(), UseProtocolCachePolicy)
55
            : ResourceRequestBase(URL(), UseProtocolCachePolicy)
56
        {
56
        {
57
        }
57
        }
58
58
- a/Source/WebCore/platform/network/curl/ResourceResponse.h -1 / +1 lines
Lines 39-45 public: a/Source/WebCore/platform/network/curl/ResourceResponse.h_sec1
39
    {
39
    {
40
    }
40
    }
41
41
42
    ResourceResponse(const KURL& url, const String& mimeType, long long expectedLength, const String& textEncodingName, const String& filename)
42
    ResourceResponse(const URL& url, const String& mimeType, long long expectedLength, const String& textEncodingName, const String& filename)
43
        : ResourceResponseBase(url, mimeType, expectedLength, textEncodingName, filename),
43
        : ResourceResponseBase(url, mimeType, expectedLength, textEncodingName, filename),
44
          m_responseFired(false)
44
          m_responseFired(false)
45
    {
45
    {
- a/Source/WebCore/platform/network/curl/SocketStreamHandle.h -2 / +2 lines
Lines 45-51 namespace WebCore { a/Source/WebCore/platform/network/curl/SocketStreamHandle.h_sec1
45
45
46
    class SocketStreamHandle : public RefCounted<SocketStreamHandle>, public SocketStreamHandleBase {
46
    class SocketStreamHandle : public RefCounted<SocketStreamHandle>, public SocketStreamHandleBase {
47
    public:
47
    public:
48
        static PassRefPtr<SocketStreamHandle> create(const KURL& url, SocketStreamHandleClient* client) { return adoptRef(new SocketStreamHandle(url, client)); }
48
        static PassRefPtr<SocketStreamHandle> create(const URL& url, SocketStreamHandleClient* client) { return adoptRef(new SocketStreamHandle(url, client)); }
49
49
50
        virtual ~SocketStreamHandle();
50
        virtual ~SocketStreamHandle();
51
51
Lines 54-60 namespace WebCore { a/Source/WebCore/platform/network/curl/SocketStreamHandle.h_sec2
54
        virtual void platformClose();
54
        virtual void platformClose();
55
55
56
    private:
56
    private:
57
        SocketStreamHandle(const KURL&, SocketStreamHandleClient*);
57
        SocketStreamHandle(const URL&, SocketStreamHandleClient*);
58
58
59
        // No authentication for streams per se, but proxy may ask for credentials.
59
        // No authentication for streams per se, but proxy may ask for credentials.
60
        void didReceiveAuthenticationChallenge(const AuthenticationChallenge&);
60
        void didReceiveAuthenticationChallenge(const AuthenticationChallenge&);
- a/Source/WebCore/platform/network/curl/SocketStreamHandleCurl.cpp -2 / +2 lines
Lines 32-45 a/Source/WebCore/platform/network/curl/SocketStreamHandleCurl.cpp_sec1
32
#include "config.h"
32
#include "config.h"
33
#include "SocketStreamHandle.h"
33
#include "SocketStreamHandle.h"
34
34
35
#include "KURL.h"
35
#include "URL.h"
36
#include "Logging.h"
36
#include "Logging.h"
37
#include "NotImplemented.h"
37
#include "NotImplemented.h"
38
#include "SocketStreamHandleClient.h"
38
#include "SocketStreamHandleClient.h"
39
39
40
namespace WebCore {
40
namespace WebCore {
41
41
42
SocketStreamHandle::SocketStreamHandle(const KURL& url, SocketStreamHandleClient* client)
42
SocketStreamHandle::SocketStreamHandle(const URL& url, SocketStreamHandleClient* client)
43
    : SocketStreamHandleBase(url, client)
43
    : SocketStreamHandleBase(url, client)
44
{
44
{
45
    LOG(Network, "SocketStreamHandle %p new client %p", this, m_client);
45
    LOG(Network, "SocketStreamHandle %p new client %p", this, m_client);
- a/Source/WebCore/platform/network/mac/CookieJarMac.mm -7 / +7 lines
Lines 31-37 a/Source/WebCore/platform/network/mac/CookieJarMac.mm_sec1
31
#import "BlockExceptions.h"
31
#import "BlockExceptions.h"
32
#import "Cookie.h"
32
#import "Cookie.h"
33
#import "CookieStorage.h"
33
#import "CookieStorage.h"
34
#import "KURL.h"
34
#import "URL.h"
35
#import "NetworkStorageSession.h"
35
#import "NetworkStorageSession.h"
36
#import "WebCoreSystemInterface.h"
36
#import "WebCoreSystemInterface.h"
37
37
Lines 61-67 static RetainPtr<NSArray> filterCookies(NSArray *unfilteredCookies) a/Source/WebCore/platform/network/mac/CookieJarMac.mm_sec2
61
    return filteredCookies;
61
    return filteredCookies;
62
}
62
}
63
63
64
String cookiesForDOM(const NetworkStorageSession& session, const KURL&, const KURL& url)
64
String cookiesForDOM(const NetworkStorageSession& session, const URL&, const URL& url)
65
{
65
{
66
    BEGIN_BLOCK_OBJC_EXCEPTIONS;
66
    BEGIN_BLOCK_OBJC_EXCEPTIONS;
67
67
Lines 72-78 String cookiesForDOM(const NetworkStorageSession& session, const KURL&, const KU a/Source/WebCore/platform/network/mac/CookieJarMac.mm_sec3
72
    return String();
72
    return String();
73
}
73
}
74
74
75
String cookieRequestHeaderFieldValue(const NetworkStorageSession& session, const KURL& /*firstParty*/, const KURL& url)
75
String cookieRequestHeaderFieldValue(const NetworkStorageSession& session, const URL& /*firstParty*/, const URL& url)
76
{
76
{
77
    BEGIN_BLOCK_OBJC_EXCEPTIONS;
77
    BEGIN_BLOCK_OBJC_EXCEPTIONS;
78
78
Lines 83-89 String cookieRequestHeaderFieldValue(const NetworkStorageSession& session, const a/Source/WebCore/platform/network/mac/CookieJarMac.mm_sec4
83
    return String();
83
    return String();
84
}
84
}
85
85
86
void setCookiesFromDOM(const NetworkStorageSession& session, const KURL& firstParty, const KURL& url, const String& cookieStr)
86
void setCookiesFromDOM(const NetworkStorageSession& session, const URL& firstParty, const URL& url, const String& cookieStr)
87
{
87
{
88
    BEGIN_BLOCK_OBJC_EXCEPTIONS;
88
    BEGIN_BLOCK_OBJC_EXCEPTIONS;
89
89
Lines 105-111 void setCookiesFromDOM(const NetworkStorageSession& session, const KURL& firstPa a/Source/WebCore/platform/network/mac/CookieJarMac.mm_sec5
105
    END_BLOCK_OBJC_EXCEPTIONS;
105
    END_BLOCK_OBJC_EXCEPTIONS;
106
}
106
}
107
107
108
bool cookiesEnabled(const NetworkStorageSession& session, const KURL& /*firstParty*/, const KURL& /*url*/)
108
bool cookiesEnabled(const NetworkStorageSession& session, const URL& /*firstParty*/, const URL& /*url*/)
109
{
109
{
110
    BEGIN_BLOCK_OBJC_EXCEPTIONS;
110
    BEGIN_BLOCK_OBJC_EXCEPTIONS;
111
111
Lines 116-122 bool cookiesEnabled(const NetworkStorageSession& session, const KURL& /*firstPar a/Source/WebCore/platform/network/mac/CookieJarMac.mm_sec6
116
    return false;
116
    return false;
117
}
117
}
118
118
119
bool getRawCookies(const NetworkStorageSession& session, const KURL& /*firstParty*/, const KURL& url, Vector<Cookie>& rawCookies)
119
bool getRawCookies(const NetworkStorageSession& session, const URL& /*firstParty*/, const URL& url, Vector<Cookie>& rawCookies)
120
{
120
{
121
    rawCookies.clear();
121
    rawCookies.clear();
122
    BEGIN_BLOCK_OBJC_EXCEPTIONS;
122
    BEGIN_BLOCK_OBJC_EXCEPTIONS;
Lines 135-141 bool getRawCookies(const NetworkStorageSession& session, const KURL& /*firstPart a/Source/WebCore/platform/network/mac/CookieJarMac.mm_sec7
135
    return true;
135
    return true;
136
}
136
}
137
137
138
void deleteCookie(const NetworkStorageSession& session, const KURL& url, const String& cookieName)
138
void deleteCookie(const NetworkStorageSession& session, const URL& url, const String& cookieName)
139
{
139
{
140
    BEGIN_BLOCK_OBJC_EXCEPTIONS;
140
    BEGIN_BLOCK_OBJC_EXCEPTIONS;
141
141
- a/Source/WebCore/platform/network/mac/ResourceErrorMac.mm -1 / +1 lines
Lines 27-33 a/Source/WebCore/platform/network/mac/ResourceErrorMac.mm_sec1
27
#import "ResourceError.h"
27
#import "ResourceError.h"
28
28
29
#import "BlockExceptions.h"
29
#import "BlockExceptions.h"
30
#import "KURL.h"
30
#import "URL.h"
31
#import <CoreFoundation/CFError.h>
31
#import <CoreFoundation/CFError.h>
32
#import <Foundation/Foundation.h>
32
#import <Foundation/Foundation.h>
33
33
- a/Source/WebCore/platform/network/mac/ResourceHandleMac.mm -3 / +3 lines
Lines 98-104 void ResourceHandle::createNSURLConnection(id delegate, bool shouldUseCredential a/Source/WebCore/platform/network/mac/ResourceHandleMac.mm_sec1
98
{
98
{
99
    // Credentials for ftp can only be passed in URL, the connection:didReceiveAuthenticationChallenge: delegate call won't be made.
99
    // Credentials for ftp can only be passed in URL, the connection:didReceiveAuthenticationChallenge: delegate call won't be made.
100
    if ((!d->m_user.isEmpty() || !d->m_pass.isEmpty()) && !firstRequest().url().protocolIsInHTTPFamily()) {
100
    if ((!d->m_user.isEmpty() || !d->m_pass.isEmpty()) && !firstRequest().url().protocolIsInHTTPFamily()) {
101
        KURL urlWithCredentials(firstRequest().url());
101
        URL urlWithCredentials(firstRequest().url());
102
        urlWithCredentials.setUser(d->m_user);
102
        urlWithCredentials.setUser(d->m_user);
103
        urlWithCredentials.setPass(d->m_pass);
103
        urlWithCredentials.setPass(d->m_pass);
104
        firstRequest().setURL(urlWithCredentials);
104
        firstRequest().setURL(urlWithCredentials);
Lines 362-368 void ResourceHandle::willSendRequest(ResourceRequest& request, const ResourceRes a/Source/WebCore/platform/network/mac/ResourceHandleMac.mm_sec2
362
    if (!request.url().protocolIs("https") && protocolIs(request.httpReferrer(), "https") && d->m_context->shouldClearReferrerOnHTTPSToHTTPRedirect())
362
    if (!request.url().protocolIs("https") && protocolIs(request.httpReferrer(), "https") && d->m_context->shouldClearReferrerOnHTTPSToHTTPRedirect())
363
        request.clearHTTPReferrer();
363
        request.clearHTTPReferrer();
364
364
365
    const KURL& url = request.url();
365
    const URL& url = request.url();
366
    d->m_user = url.user();
366
    d->m_user = url.user();
367
    d->m_pass = url.pass();
367
    d->m_pass = url.pass();
368
    d->m_lastHTTPMethod = request.httpMethod();
368
    d->m_lastHTTPMethod = request.httpMethod();
Lines 554-560 void ResourceHandle::receivedCredential(const AuthenticationChallenge& challenge a/Source/WebCore/platform/network/mac/ResourceHandleMac.mm_sec3
554
        // to ignore it for a particular request (short of removing it altogether).
554
        // to ignore it for a particular request (short of removing it altogether).
555
        // <rdar://problem/6867598> gallery.me.com is temporarily whitelisted, so that QuickTime plug-in could see the credentials.
555
        // <rdar://problem/6867598> gallery.me.com is temporarily whitelisted, so that QuickTime plug-in could see the credentials.
556
        Credential webCredential(credential, CredentialPersistenceNone);
556
        Credential webCredential(credential, CredentialPersistenceNone);
557
        KURL urlToStore;
557
        URL urlToStore;
558
        if (challenge.failureResponse().httpStatusCode() == 401)
558
        if (challenge.failureResponse().httpStatusCode() == 401)
559
            urlToStore = challenge.failureResponse().url();
559
            urlToStore = challenge.failureResponse().url();
560
        CredentialStorage::set(webCredential, core([d->m_currentMacChallenge protectionSpace]), urlToStore);
560
        CredentialStorage::set(webCredential, core([d->m_currentMacChallenge protectionSpace]), urlToStore);
- a/Source/WebCore/platform/network/qt/CookieJarQt.cpp -7 / +7 lines
Lines 30-36 a/Source/WebCore/platform/network/qt/CookieJarQt.cpp_sec1
30
#include "CookieJarQt.h"
30
#include "CookieJarQt.h"
31
31
32
#include "Cookie.h"
32
#include "Cookie.h"
33
#include "KURL.h"
33
#include "URL.h"
34
#include "NetworkingContext.h"
34
#include "NetworkingContext.h"
35
#include "PlatformCookieJar.h"
35
#include "PlatformCookieJar.h"
36
#include "ThirdPartyCookiesQt.h"
36
#include "ThirdPartyCookiesQt.h"
Lines 46-52 namespace WebCore { a/Source/WebCore/platform/network/qt/CookieJarQt.cpp_sec2
46
46
47
static SharedCookieJarQt* s_sharedCookieJarQt = 0;
47
static SharedCookieJarQt* s_sharedCookieJarQt = 0;
48
48
49
void setCookiesFromDOM(const NetworkStorageSession& session, const KURL& firstParty, const KURL& url, const String& value)
49
void setCookiesFromDOM(const NetworkStorageSession& session, const URL& firstParty, const URL& url, const String& value)
50
{
50
{
51
    QNetworkCookieJar* jar = session.context() ? session.context()->networkAccessManager()->cookieJar() : SharedCookieJarQt::shared();
51
    QNetworkCookieJar* jar = session.context() ? session.context()->networkAccessManager()->cookieJar() : SharedCookieJarQt::shared();
52
    if (!jar)
52
    if (!jar)
Lines 69-75 void setCookiesFromDOM(const NetworkStorageSession& session, const KURL& firstPa a/Source/WebCore/platform/network/qt/CookieJarQt.cpp_sec3
69
    jar->setCookiesFromUrl(cookies, urlForCookies);
69
    jar->setCookiesFromUrl(cookies, urlForCookies);
70
}
70
}
71
71
72
String cookiesForDOM(const NetworkStorageSession& session, const KURL& firstParty, const KURL& url)
72
String cookiesForDOM(const NetworkStorageSession& session, const URL& firstParty, const URL& url)
73
{
73
{
74
    QNetworkCookieJar* jar = session.context() ? session.context()->networkAccessManager()->cookieJar() : SharedCookieJarQt::shared();
74
    QNetworkCookieJar* jar = session.context() ? session.context()->networkAccessManager()->cookieJar() : SharedCookieJarQt::shared();
75
    if (!jar)
75
    if (!jar)
Lines 94-100 String cookiesForDOM(const NetworkStorageSession& session, const KURL& firstPart a/Source/WebCore/platform/network/qt/CookieJarQt.cpp_sec4
94
    return resultCookies.join(QLatin1String("; "));
94
    return resultCookies.join(QLatin1String("; "));
95
}
95
}
96
96
97
String cookieRequestHeaderFieldValue(const NetworkStorageSession& session, const KURL& /*firstParty*/, const KURL& url)
97
String cookieRequestHeaderFieldValue(const NetworkStorageSession& session, const URL& /*firstParty*/, const URL& url)
98
{
98
{
99
    QNetworkCookieJar* jar = session.context() ? session.context()->networkAccessManager()->cookieJar() : SharedCookieJarQt::shared();
99
    QNetworkCookieJar* jar = session.context() ? session.context()->networkAccessManager()->cookieJar() : SharedCookieJarQt::shared();
100
    if (!jar)
100
    if (!jar)
Lines 111-130 String cookieRequestHeaderFieldValue(const NetworkStorageSession& session, const a/Source/WebCore/platform/network/qt/CookieJarQt.cpp_sec5
111
    return resultCookies.join(QLatin1String("; "));
111
    return resultCookies.join(QLatin1String("; "));
112
}
112
}
113
113
114
bool cookiesEnabled(const NetworkStorageSession& session, const KURL& /*firstParty*/, const KURL& /*url*/)
114
bool cookiesEnabled(const NetworkStorageSession& session, const URL& /*firstParty*/, const URL& /*url*/)
115
{
115
{
116
    QNetworkCookieJar* jar = session.context() ? session.context()->networkAccessManager()->cookieJar() : SharedCookieJarQt::shared();
116
    QNetworkCookieJar* jar = session.context() ? session.context()->networkAccessManager()->cookieJar() : SharedCookieJarQt::shared();
117
    return !!jar;
117
    return !!jar;
118
}
118
}
119
119
120
bool getRawCookies(const NetworkStorageSession& session, const KURL& /*firstParty*/, const KURL& /*url*/, Vector<Cookie>& rawCookies)
120
bool getRawCookies(const NetworkStorageSession& session, const URL& /*firstParty*/, const URL& /*url*/, Vector<Cookie>& rawCookies)
121
{
121
{
122
    // FIXME: Not yet implemented
122
    // FIXME: Not yet implemented
123
    rawCookies.clear();
123
    rawCookies.clear();
124
    return false; // return true when implemented
124
    return false; // return true when implemented
125
}
125
}
126
126
127
void deleteCookie(const NetworkStorageSession&, const KURL&, const String&)
127
void deleteCookie(const NetworkStorageSession&, const URL&, const String&)
128
{
128
{
129
    // FIXME: Not yet implemented
129
    // FIXME: Not yet implemented
130
}
130
}
- a/Source/WebCore/platform/network/qt/ProxyServerQt.cpp -2 / +2 lines
Lines 26-32 a/Source/WebCore/platform/network/qt/ProxyServerQt.cpp_sec1
26
#include "config.h"
26
#include "config.h"
27
#include "ProxyServer.h"
27
#include "ProxyServer.h"
28
28
29
#include "KURL.h"
29
#include "URL.h"
30
#include "NetworkingContext.h"
30
#include "NetworkingContext.h"
31
31
32
#include <QNetworkAccessManager>
32
#include <QNetworkAccessManager>
Lines 37-43 a/Source/WebCore/platform/network/qt/ProxyServerQt.cpp_sec2
37
37
38
namespace WebCore {
38
namespace WebCore {
39
39
40
Vector<ProxyServer> proxyServersForURL(const KURL& url, const NetworkingContext* context)
40
Vector<ProxyServer> proxyServersForURL(const URL& url, const NetworkingContext* context)
41
{
41
{
42
    Vector<ProxyServer> servers;
42
    Vector<ProxyServer> servers;
43
    
43
    
- a/Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp -1 / +1 lines
Lines 570-576 void QNetworkReplyHandler::sendResponseIfNeeded() a/Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp_sec1
570
        mimeType = MIMETypeRegistry::getMIMETypeForPath(m_replyWrapper->reply()->url().path());
570
        mimeType = MIMETypeRegistry::getMIMETypeForPath(m_replyWrapper->reply()->url().path());
571
    }
571
    }
572
572
573
    KURL url(m_replyWrapper->reply()->url());
573
    URL url(m_replyWrapper->reply()->url());
574
    ResourceResponse response(url, mimeType.lower(),
574
    ResourceResponse response(url, mimeType.lower(),
575
                              m_replyWrapper->reply()->header(QNetworkRequest::ContentLengthHeader).toLongLong(),
575
                              m_replyWrapper->reply()->header(QNetworkRequest::ContentLengthHeader).toLongLong(),
576
                              m_replyWrapper->encoding(), String());
576
                              m_replyWrapper->encoding(), String());
- a/Source/WebCore/platform/network/qt/ResourceHandleQt.cpp -2 / +2 lines
Lines 99-105 bool ResourceHandle::start() a/Source/WebCore/platform/network/qt/ResourceHandleQt.cpp_sec1
99
    if (!d->m_user.isEmpty() || !d->m_pass.isEmpty()) {
99
    if (!d->m_user.isEmpty() || !d->m_pass.isEmpty()) {
100
        // If credentials were specified for this request, add them to the url,
100
        // If credentials were specified for this request, add them to the url,
101
        // so that they will be passed to QNetworkRequest.
101
        // so that they will be passed to QNetworkRequest.
102
        KURL urlWithCredentials(firstRequest().url());
102
        URL urlWithCredentials(firstRequest().url());
103
        urlWithCredentials.setUser(d->m_user);
103
        urlWithCredentials.setUser(d->m_user);
104
        urlWithCredentials.setPass(d->m_pass);
104
        urlWithCredentials.setPass(d->m_pass);
105
        d->m_firstRequest.setURL(urlWithCredentials);
105
        d->m_firstRequest.setURL(urlWithCredentials);
Lines 132-138 void ResourceHandle::platformLoadResourceSynchronously(NetworkingContext* contex a/Source/WebCore/platform/network/qt/ResourceHandleQt.cpp_sec2
132
    if (!d->m_user.isEmpty() || !d->m_pass.isEmpty()) {
132
    if (!d->m_user.isEmpty() || !d->m_pass.isEmpty()) {
133
        // If credentials were specified for this request, add them to the url,
133
        // If credentials were specified for this request, add them to the url,
134
        // so that they will be passed to QNetworkRequest.
134
        // so that they will be passed to QNetworkRequest.
135
        KURL urlWithCredentials(d->m_firstRequest.url());
135
        URL urlWithCredentials(d->m_firstRequest.url());
136
        urlWithCredentials.setUser(d->m_user);
136
        urlWithCredentials.setUser(d->m_user);
137
        urlWithCredentials.setPass(d->m_pass);
137
        urlWithCredentials.setPass(d->m_pass);
138
        d->m_firstRequest.setURL(urlWithCredentials);
138
        d->m_firstRequest.setURL(urlWithCredentials);
- a/Source/WebCore/platform/network/qt/ResourceRequest.h -4 / +4 lines
Lines 39-61 class NetworkingContext; a/Source/WebCore/platform/network/qt/ResourceRequest.h_sec1
39
    class ResourceRequest : public ResourceRequestBase {
39
    class ResourceRequest : public ResourceRequestBase {
40
    public:
40
    public:
41
        ResourceRequest(const String& url) 
41
        ResourceRequest(const String& url) 
42
            : ResourceRequestBase(KURL(ParsedURLString, url), UseProtocolCachePolicy)
42
            : ResourceRequestBase(URL(ParsedURLString, url), UseProtocolCachePolicy)
43
        {
43
        {
44
        }
44
        }
45
45
46
        ResourceRequest(const KURL& url) 
46
        ResourceRequest(const URL& url) 
47
            : ResourceRequestBase(url, UseProtocolCachePolicy)
47
            : ResourceRequestBase(url, UseProtocolCachePolicy)
48
        {
48
        {
49
        }
49
        }
50
50
51
        ResourceRequest(const KURL& url, const String& referrer, ResourceRequestCachePolicy policy = UseProtocolCachePolicy) 
51
        ResourceRequest(const URL& url, const String& referrer, ResourceRequestCachePolicy policy = UseProtocolCachePolicy) 
52
            : ResourceRequestBase(url, policy)
52
            : ResourceRequestBase(url, policy)
53
        {
53
        {
54
            setHTTPReferrer(referrer);
54
            setHTTPReferrer(referrer);
55
        }
55
        }
56
56
57
        ResourceRequest()
57
        ResourceRequest()
58
            : ResourceRequestBase(KURL(), UseProtocolCachePolicy)
58
            : ResourceRequestBase(URL(), UseProtocolCachePolicy)
59
        {
59
        {
60
        }
60
        }
61
61
- a/Source/WebCore/platform/network/qt/ResourceResponse.h -1 / +1 lines
Lines 36-42 public: a/Source/WebCore/platform/network/qt/ResourceResponse.h_sec1
36
    {
36
    {
37
    }
37
    }
38
38
39
    ResourceResponse(const KURL& url, const String& mimeType, long long expectedLength, const String& textEncodingName, const String& filename)
39
    ResourceResponse(const URL& url, const String& mimeType, long long expectedLength, const String& textEncodingName, const String& filename)
40
        : ResourceResponseBase(url, mimeType, expectedLength, textEncodingName, filename)
40
        : ResourceResponseBase(url, mimeType, expectedLength, textEncodingName, filename)
41
    {
41
    {
42
    }
42
    }
- a/Source/WebCore/platform/network/qt/SocketStreamHandle.h -2 / +2 lines
Lines 55-61 namespace WebCore { a/Source/WebCore/platform/network/qt/SocketStreamHandle.h_sec1
55
55
56
    class SocketStreamHandle : public RefCounted<SocketStreamHandle>, public SocketStreamHandleBase {
56
    class SocketStreamHandle : public RefCounted<SocketStreamHandle>, public SocketStreamHandleBase {
57
    public:
57
    public:
58
        static PassRefPtr<SocketStreamHandle> create(const KURL& url, SocketStreamHandleClient* client) { return adoptRef(new SocketStreamHandle(url, client)); }
58
        static PassRefPtr<SocketStreamHandle> create(const URL& url, SocketStreamHandleClient* client) { return adoptRef(new SocketStreamHandle(url, client)); }
59
        static PassRefPtr<SocketStreamHandle> create(QTcpSocket* socket, SocketStreamHandleClient* client) { return adoptRef(new SocketStreamHandle(socket, client)); }
59
        static PassRefPtr<SocketStreamHandle> create(QTcpSocket* socket, SocketStreamHandleClient* client) { return adoptRef(new SocketStreamHandle(socket, client)); }
60
60
61
        virtual ~SocketStreamHandle();
61
        virtual ~SocketStreamHandle();
Lines 65-71 namespace WebCore { a/Source/WebCore/platform/network/qt/SocketStreamHandle.h_sec2
65
        virtual void platformClose();
65
        virtual void platformClose();
66
66
67
    private:
67
    private:
68
        SocketStreamHandle(const KURL&, SocketStreamHandleClient*);
68
        SocketStreamHandle(const URL&, SocketStreamHandleClient*);
69
        SocketStreamHandle(QTcpSocket*, SocketStreamHandleClient*);
69
        SocketStreamHandle(QTcpSocket*, SocketStreamHandleClient*);
70
70
71
        // No authentication for streams per se, but proxy may ask for credentials.
71
        // No authentication for streams per se, but proxy may ask for credentials.
- a/Source/WebCore/platform/network/qt/SocketStreamHandlePrivate.h -1 / +1 lines
Lines 46-52 class SocketStreamHandlePrivate; a/Source/WebCore/platform/network/qt/SocketStreamHandlePrivate.h_sec1
46
class SocketStreamHandlePrivate : public QObject {
46
class SocketStreamHandlePrivate : public QObject {
47
    Q_OBJECT
47
    Q_OBJECT
48
public:
48
public:
49
    SocketStreamHandlePrivate(SocketStreamHandle*, const KURL&);
49
    SocketStreamHandlePrivate(SocketStreamHandle*, const URL&);
50
    SocketStreamHandlePrivate(SocketStreamHandle*, QTcpSocket*);
50
    SocketStreamHandlePrivate(SocketStreamHandle*, QTcpSocket*);
51
    ~SocketStreamHandlePrivate();
51
    ~SocketStreamHandlePrivate();
52
52
- a/Source/WebCore/platform/network/qt/SocketStreamHandleQt.cpp -4 / +4 lines
Lines 32-38 a/Source/WebCore/platform/network/qt/SocketStreamHandleQt.cpp_sec1
32
#include "config.h"
32
#include "config.h"
33
#include "SocketStreamHandle.h"
33
#include "SocketStreamHandle.h"
34
34
35
#include "KURL.h"
35
#include "URL.h"
36
#include "Logging.h"
36
#include "Logging.h"
37
#include "NotImplemented.h"
37
#include "NotImplemented.h"
38
#include "SocketStreamError.h"
38
#include "SocketStreamError.h"
Lines 41-47 a/Source/WebCore/platform/network/qt/SocketStreamHandleQt.cpp_sec2
41
41
42
namespace WebCore {
42
namespace WebCore {
43
43
44
SocketStreamHandlePrivate::SocketStreamHandlePrivate(SocketStreamHandle* streamHandle, const KURL& url)
44
SocketStreamHandlePrivate::SocketStreamHandlePrivate(SocketStreamHandle* streamHandle, const URL& url)
45
{
45
{
46
    m_streamHandle = streamHandle;
46
    m_streamHandle = streamHandle;
47
    m_socket = 0;
47
    m_socket = 0;
Lines 183-189 void SocketStreamHandlePrivate::socketSslErrors(const QList<QSslError>& error) a/Source/WebCore/platform/network/qt/SocketStreamHandleQt.cpp_sec3
183
}
183
}
184
#endif
184
#endif
185
185
186
SocketStreamHandle::SocketStreamHandle(const KURL& url, SocketStreamHandleClient* client)
186
SocketStreamHandle::SocketStreamHandle(const URL& url, SocketStreamHandleClient* client)
187
    : SocketStreamHandleBase(url, client)
187
    : SocketStreamHandleBase(url, client)
188
{
188
{
189
    LOG(Network, "SocketStreamHandle %p new client %p", this, m_client);
189
    LOG(Network, "SocketStreamHandle %p new client %p", this, m_client);
Lines 191-197 SocketStreamHandle::SocketStreamHandle(const KURL& url, SocketStreamHandleClient a/Source/WebCore/platform/network/qt/SocketStreamHandleQt.cpp_sec4
191
}
191
}
192
192
193
SocketStreamHandle::SocketStreamHandle(QTcpSocket* socket, SocketStreamHandleClient* client)
193
SocketStreamHandle::SocketStreamHandle(QTcpSocket* socket, SocketStreamHandleClient* client)
194
    : SocketStreamHandleBase(KURL(), client)
194
    : SocketStreamHandleBase(URL(), client)
195
{
195
{
196
    LOG(Network, "SocketStreamHandle %p new client %p", this, m_client);
196
    LOG(Network, "SocketStreamHandle %p new client %p", this, m_client);
197
    m_p = new SocketStreamHandlePrivate(this, socket);
197
    m_p = new SocketStreamHandlePrivate(this, socket);
- a/Source/WebCore/platform/network/soup/CookieJarSoup.cpp -8 / +8 lines
Lines 23-29 a/Source/WebCore/platform/network/soup/CookieJarSoup.cpp_sec1
23
23
24
#include "Cookie.h"
24
#include "Cookie.h"
25
#include "GOwnPtrSoup.h"
25
#include "GOwnPtrSoup.h"
26
#include "KURL.h"
26
#include "URL.h"
27
#include "NetworkingContext.h"
27
#include "NetworkingContext.h"
28
#include "PlatformCookieJar.h"
28
#include "PlatformCookieJar.h"
29
#include "ResourceHandle.h"
29
#include "ResourceHandle.h"
Lines 83-89 static inline bool httpOnlyCookieExists(const GSList* cookies, const gchar* name a/Source/WebCore/platform/network/soup/CookieJarSoup.cpp_sec2
83
    return false;
83
    return false;
84
}
84
}
85
85
86
void setCookiesFromDOM(const NetworkStorageSession& session, const KURL& firstParty, const KURL& url, const String& value)
86
void setCookiesFromDOM(const NetworkStorageSession& session, const URL& firstParty, const URL& url, const String& value)
87
{
87
{
88
    SoupCookieJar* jar = cookieJarForSession(session);
88
    SoupCookieJar* jar = cookieJarForSession(session);
89
    if (!jar)
89
    if (!jar)
Lines 117-123 void setCookiesFromDOM(const NetworkStorageSession& session, const KURL& firstPa a/Source/WebCore/platform/network/soup/CookieJarSoup.cpp_sec3
117
    soup_cookies_free(existingCookies);
117
    soup_cookies_free(existingCookies);
118
}
118
}
119
119
120
static String cookiesForSession(const NetworkStorageSession& session, const KURL& url, bool forHTTPHeader)
120
static String cookiesForSession(const NetworkStorageSession& session, const URL& url, bool forHTTPHeader)
121
{
121
{
122
    SoupCookieJar* jar = cookieJarForSession(session);
122
    SoupCookieJar* jar = cookieJarForSession(session);
123
    if (!jar)
123
    if (!jar)
Lines 128-149 static String cookiesForSession(const NetworkStorageSession& session, const KURL a/Source/WebCore/platform/network/soup/CookieJarSoup.cpp_sec4
128
    return String::fromUTF8(cookies.get());
128
    return String::fromUTF8(cookies.get());
129
}
129
}
130
130
131
String cookiesForDOM(const NetworkStorageSession& session, const KURL&, const KURL& url)
131
String cookiesForDOM(const NetworkStorageSession& session, const URL&, const URL& url)
132
{
132
{
133
    return cookiesForSession(session, url, false);
133
    return cookiesForSession(session, url, false);
134
}
134
}
135
135
136
String cookieRequestHeaderFieldValue(const NetworkStorageSession& session, const KURL& /*firstParty*/, const KURL& url)
136
String cookieRequestHeaderFieldValue(const NetworkStorageSession& session, const URL& /*firstParty*/, const URL& url)
137
{
137
{
138
    return cookiesForSession(session, url, true);
138
    return cookiesForSession(session, url, true);
139
}
139
}
140
140
141
bool cookiesEnabled(const NetworkStorageSession& session, const KURL& /*firstParty*/, const KURL& /*url*/)
141
bool cookiesEnabled(const NetworkStorageSession& session, const URL& /*firstParty*/, const URL& /*url*/)
142
{
142
{
143
    return !!cookieJarForSession(session);
143
    return !!cookieJarForSession(session);
144
}
144
}
145
145
146
bool getRawCookies(const NetworkStorageSession& session, const KURL& /*firstParty*/, const KURL& url, Vector<Cookie>& rawCookies)
146
bool getRawCookies(const NetworkStorageSession& session, const URL& /*firstParty*/, const URL& url, Vector<Cookie>& rawCookies)
147
{
147
{
148
    rawCookies.clear();
148
    rawCookies.clear();
149
    SoupCookieJar* jar = cookieJarForSession(session);
149
    SoupCookieJar* jar = cookieJarForSession(session);
Lines 166-172 bool getRawCookies(const NetworkStorageSession& session, const KURL& /*firstPart a/Source/WebCore/platform/network/soup/CookieJarSoup.cpp_sec5
166
    return true;
166
    return true;
167
}
167
}
168
168
169
void deleteCookie(const NetworkStorageSession& session, const KURL& url, const String& name)
169
void deleteCookie(const NetworkStorageSession& session, const URL& url, const String& name)
170
{
170
{
171
    SoupCookieJar* jar = cookieJarForSession(session);
171
    SoupCookieJar* jar = cookieJarForSession(session);
172
    if (!jar)
172
    if (!jar)
- a/Source/WebCore/platform/network/soup/ProxyServerSoup.cpp -2 / +2 lines
Lines 26-36 a/Source/WebCore/platform/network/soup/ProxyServerSoup.cpp_sec1
26
#include "config.h"
26
#include "config.h"
27
#include "ProxyServer.h"
27
#include "ProxyServer.h"
28
28
29
#include "KURL.h"
29
#include "URL.h"
30
30
31
namespace WebCore {
31
namespace WebCore {
32
32
33
Vector<ProxyServer> proxyServersForURL(const KURL&, const NetworkingContext*)
33
Vector<ProxyServer> proxyServersForURL(const URL&, const NetworkingContext*)
34
{
34
{
35
    // FIXME: Implement.
35
    // FIXME: Implement.
36
    return Vector<ProxyServer>();
36
    return Vector<ProxyServer>();
- a/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp -4 / +4 lines
Lines 385-391 static void applyAuthenticationToRequest(ResourceHandle* handle, ResourceRequest a/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp_sec1
385
    // We always put the credentials into the URL. In the CFNetwork-port HTTP family credentials are applied in
385
    // We always put the credentials into the URL. In the CFNetwork-port HTTP family credentials are applied in
386
    // the didReceiveAuthenticationChallenge callback, but libsoup requires us to use this method to override
386
    // the didReceiveAuthenticationChallenge callback, but libsoup requires us to use this method to override
387
    // any previously remembered credentials. It has its own per-session credential storage.
387
    // any previously remembered credentials. It has its own per-session credential storage.
388
    KURL urlWithCredentials(request.url());
388
    URL urlWithCredentials(request.url());
389
    urlWithCredentials.setUser(user);
389
    urlWithCredentials.setUser(user);
390
    urlWithCredentials.setPass(password);
390
    urlWithCredentials.setPass(password);
391
    request.setURL(urlWithCredentials);
391
    request.setURL(urlWithCredentials);
Lines 422-428 static bool shouldRedirect(ResourceHandle* handle) a/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp_sec2
422
    return true;
422
    return true;
423
}
423
}
424
424
425
static bool shouldRedirectAsGET(SoupMessage* message, KURL& newURL, bool crossOrigin)
425
static bool shouldRedirectAsGET(SoupMessage* message, URL& newURL, bool crossOrigin)
426
{
426
{
427
    if (message->method == SOUP_METHOD_GET || message->method == SOUP_METHOD_HEAD)
427
    if (message->method == SOUP_METHOD_GET || message->method == SOUP_METHOD_HEAD)
428
        return false;
428
        return false;
Lines 460-466 static void doRedirect(ResourceHandle* handle) a/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp_sec3
460
    ResourceRequest newRequest = handle->firstRequest();
460
    ResourceRequest newRequest = handle->firstRequest();
461
    SoupMessage* message = d->m_soupMessage.get();
461
    SoupMessage* message = d->m_soupMessage.get();
462
    const char* location = soup_message_headers_get_one(message->response_headers, "Location");
462
    const char* location = soup_message_headers_get_one(message->response_headers, "Location");
463
    KURL newURL = KURL(soupURIToKURL(soup_message_get_uri(message)), location);
463
    URL newURL = URL(soupURIToKURL(soup_message_get_uri(message)), location);
464
    bool crossOrigin = !protocolHostAndPortAreEqual(handle->firstRequest().url(), newURL);
464
    bool crossOrigin = !protocolHostAndPortAreEqual(handle->firstRequest().url(), newURL);
465
    newRequest.setURL(newURL);
465
    newRequest.setURL(newURL);
466
    newRequest.setFirstPartyForCookies(newURL);
466
    newRequest.setFirstPartyForCookies(newURL);
Lines 779-785 static void addEncodedBlobItemToSoupMessageBody(SoupMessage* message, const Blob a/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp_sec4
779
779
780
static void addEncodedBlobToSoupMessageBody(SoupMessage* message, const FormDataElement& element, unsigned long& totalBodySize)
780
static void addEncodedBlobToSoupMessageBody(SoupMessage* message, const FormDataElement& element, unsigned long& totalBodySize)
781
{
781
{
782
    RefPtr<BlobStorageData> blobData = static_cast<BlobRegistryImpl&>(blobRegistry()).getBlobDataFromURL(KURL(ParsedURLString, element.m_url));
782
    RefPtr<BlobStorageData> blobData = static_cast<BlobRegistryImpl&>(blobRegistry()).getBlobDataFromURL(URL(ParsedURLString, element.m_url));
783
    if (!blobData)
783
    if (!blobData)
784
        return;
784
        return;
785
785
- a/Source/WebCore/platform/network/soup/ResourceRequest.h -5 / +5 lines
Lines 35-54 namespace WebCore { a/Source/WebCore/platform/network/soup/ResourceRequest.h_sec1
35
    class ResourceRequest : public ResourceRequestBase {
35
    class ResourceRequest : public ResourceRequestBase {
36
    public:
36
    public:
37
        ResourceRequest(const String& url)
37
        ResourceRequest(const String& url)
38
            : ResourceRequestBase(KURL(ParsedURLString, url), UseProtocolCachePolicy)
38
            : ResourceRequestBase(URL(ParsedURLString, url), UseProtocolCachePolicy)
39
            , m_acceptEncoding(true)
39
            , m_acceptEncoding(true)
40
            , m_soupFlags(static_cast<SoupMessageFlags>(0))
40
            , m_soupFlags(static_cast<SoupMessageFlags>(0))
41
        {
41
        {
42
        }
42
        }
43
43
44
        ResourceRequest(const KURL& url)
44
        ResourceRequest(const URL& url)
45
            : ResourceRequestBase(url, UseProtocolCachePolicy)
45
            : ResourceRequestBase(url, UseProtocolCachePolicy)
46
            , m_acceptEncoding(true)
46
            , m_acceptEncoding(true)
47
            , m_soupFlags(static_cast<SoupMessageFlags>(0))
47
            , m_soupFlags(static_cast<SoupMessageFlags>(0))
48
        {
48
        {
49
        }
49
        }
50
50
51
        ResourceRequest(const KURL& url, const String& referrer, ResourceRequestCachePolicy policy = UseProtocolCachePolicy)
51
        ResourceRequest(const URL& url, const String& referrer, ResourceRequestCachePolicy policy = UseProtocolCachePolicy)
52
            : ResourceRequestBase(url, policy)
52
            : ResourceRequestBase(url, policy)
53
            , m_acceptEncoding(true)
53
            , m_acceptEncoding(true)
54
            , m_soupFlags(static_cast<SoupMessageFlags>(0))
54
            , m_soupFlags(static_cast<SoupMessageFlags>(0))
Lines 57-70 namespace WebCore { a/Source/WebCore/platform/network/soup/ResourceRequest.h_sec2
57
        }
57
        }
58
58
59
        ResourceRequest()
59
        ResourceRequest()
60
            : ResourceRequestBase(KURL(), UseProtocolCachePolicy)
60
            : ResourceRequestBase(URL(), UseProtocolCachePolicy)
61
            , m_acceptEncoding(true)
61
            , m_acceptEncoding(true)
62
            , m_soupFlags(static_cast<SoupMessageFlags>(0))
62
            , m_soupFlags(static_cast<SoupMessageFlags>(0))
63
        {
63
        {
64
        }
64
        }
65
65
66
        ResourceRequest(SoupMessage* soupMessage)
66
        ResourceRequest(SoupMessage* soupMessage)
67
            : ResourceRequestBase(KURL(), UseProtocolCachePolicy)
67
            : ResourceRequestBase(URL(), UseProtocolCachePolicy)
68
            , m_acceptEncoding(true)
68
            , m_acceptEncoding(true)
69
            , m_soupFlags(static_cast<SoupMessageFlags>(0))
69
            , m_soupFlags(static_cast<SoupMessageFlags>(0))
70
        {
70
        {
- a/Source/WebCore/platform/network/soup/ResourceRequestSoup.cpp -1 / +1 lines
Lines 140-146 SoupURI* ResourceRequest::soupURI() const a/Source/WebCore/platform/network/soup/ResourceRequestSoup.cpp_sec1
140
        return soup_uri_new(urlString.utf8().data());
140
        return soup_uri_new(urlString.utf8().data());
141
    }
141
    }
142
142
143
    KURL url = m_url;
143
    URL url = m_url;
144
    url.removeFragmentIdentifier();
144
    url.removeFragmentIdentifier();
145
    SoupURI* uri = soup_uri_new(url.string().utf8().data());
145
    SoupURI* uri = soup_uri_new(url.string().utf8().data());
146
146
- a/Source/WebCore/platform/network/soup/ResourceResponse.h -1 / +1 lines
Lines 42-48 public: a/Source/WebCore/platform/network/soup/ResourceResponse.h_sec1
42
    {
42
    {
43
    }
43
    }
44
44
45
    ResourceResponse(const KURL& url, const String& mimeType, long long expectedLength, const String& textEncodingName, const String& filename)
45
    ResourceResponse(const URL& url, const String& mimeType, long long expectedLength, const String& textEncodingName, const String& filename)
46
        : ResourceResponseBase(url, mimeType, expectedLength, textEncodingName, filename)
46
        : ResourceResponseBase(url, mimeType, expectedLength, textEncodingName, filename)
47
        , m_soupFlags(static_cast<SoupMessageFlags>(0))
47
        , m_soupFlags(static_cast<SoupMessageFlags>(0))
48
        , m_tlsErrors(static_cast<GTlsCertificateFlags>(0))
48
        , m_tlsErrors(static_cast<GTlsCertificateFlags>(0))
- a/Source/WebCore/platform/network/soup/SocketStreamHandle.h -2 / +2 lines
Lines 46-52 namespace WebCore { a/Source/WebCore/platform/network/soup/SocketStreamHandle.h_sec1
46
46
47
    class SocketStreamHandle : public RefCounted<SocketStreamHandle>, public SocketStreamHandleBase {
47
    class SocketStreamHandle : public RefCounted<SocketStreamHandle>, public SocketStreamHandleBase {
48
    public:
48
    public:
49
        static PassRefPtr<SocketStreamHandle> create(const KURL& url, SocketStreamHandleClient* client) { return adoptRef(new SocketStreamHandle(url, client)); }
49
        static PassRefPtr<SocketStreamHandle> create(const URL& url, SocketStreamHandleClient* client) { return adoptRef(new SocketStreamHandle(url, client)); }
50
        static PassRefPtr<SocketStreamHandle> create(GSocketConnection* socketConnection, SocketStreamHandleClient* client) { return adoptRef(new SocketStreamHandle(socketConnection, client)); }
50
        static PassRefPtr<SocketStreamHandle> create(GSocketConnection* socketConnection, SocketStreamHandleClient* client) { return adoptRef(new SocketStreamHandle(socketConnection, client)); }
51
51
52
        virtual ~SocketStreamHandle();
52
        virtual ~SocketStreamHandle();
Lines 67-73 namespace WebCore { a/Source/WebCore/platform/network/soup/SocketStreamHandle.h_sec2
67
        char* m_readBuffer;
67
        char* m_readBuffer;
68
        void* m_id;
68
        void* m_id;
69
69
70
        SocketStreamHandle(const KURL&, SocketStreamHandleClient*);
70
        SocketStreamHandle(const URL&, SocketStreamHandleClient*);
71
        SocketStreamHandle(GSocketConnection*, SocketStreamHandleClient*);
71
        SocketStreamHandle(GSocketConnection*, SocketStreamHandleClient*);
72
72
73
        // No authentication for streams per se, but proxy may ask for credentials.
73
        // No authentication for streams per se, but proxy may ask for credentials.
- a/Source/WebCore/platform/network/soup/SocketStreamHandleSoup.cpp -3 / +3 lines
Lines 32-38 a/Source/WebCore/platform/network/soup/SocketStreamHandleSoup.cpp_sec1
32
#include "config.h"
32
#include "config.h"
33
#include "SocketStreamHandle.h"
33
#include "SocketStreamHandle.h"
34
34
35
#include "KURL.h"
35
#include "URL.h"
36
#include "Logging.h"
36
#include "Logging.h"
37
#include "NotImplemented.h"
37
#include "NotImplemented.h"
38
#include "SocketStreamError.h"
38
#include "SocketStreamError.h"
Lines 80-86 static void* activateHandle(SocketStreamHandle* handle) a/Source/WebCore/platform/network/soup/SocketStreamHandleSoup.cpp_sec2
80
    return id;
80
    return id;
81
}
81
}
82
82
83
SocketStreamHandle::SocketStreamHandle(const KURL& url, SocketStreamHandleClient* client)
83
SocketStreamHandle::SocketStreamHandle(const URL& url, SocketStreamHandleClient* client)
84
    : SocketStreamHandleBase(url, client)
84
    : SocketStreamHandleBase(url, client)
85
    , m_readBuffer(0)
85
    , m_readBuffer(0)
86
{
86
{
Lines 96-102 SocketStreamHandle::SocketStreamHandle(const KURL& url, SocketStreamHandleClient a/Source/WebCore/platform/network/soup/SocketStreamHandleSoup.cpp_sec3
96
}
96
}
97
97
98
SocketStreamHandle::SocketStreamHandle(GSocketConnection* socketConnection, SocketStreamHandleClient* client)
98
SocketStreamHandle::SocketStreamHandle(GSocketConnection* socketConnection, SocketStreamHandleClient* client)
99
    : SocketStreamHandleBase(KURL(), client)
99
    : SocketStreamHandleBase(URL(), client)
100
    , m_readBuffer(0)
100
    , m_readBuffer(0)
101
{
101
{
102
    LOG(Network, "SocketStreamHandle %p new client %p", this, m_client);
102
    LOG(Network, "SocketStreamHandle %p new client %p", this, m_client);
- a/Source/WebCore/platform/network/soup/SoupURIUtils.cpp -2 / +2 lines
Lines 29-38 namespace WebCore { a/Source/WebCore/platform/network/soup/SoupURIUtils.cpp_sec1
29
// soup_uri_to_string, and thus the requests are not properly
29
// soup_uri_to_string, and thus the requests are not properly
30
// built. Fixing soup_uri_to_string is a no-no as the maintainer does
30
// built. Fixing soup_uri_to_string is a no-no as the maintainer does
31
// not want to break compatibility with previous implementations
31
// not want to break compatibility with previous implementations
32
KURL soupURIToKURL(SoupURI* soupURI)
32
URL soupURIToKURL(SoupURI* soupURI)
33
{
33
{
34
    GOwnPtr<gchar> urlString(soup_uri_to_string(soupURI, FALSE));
34
    GOwnPtr<gchar> urlString(soup_uri_to_string(soupURI, FALSE));
35
    KURL url(KURL(), String::fromUTF8(urlString.get()));
35
    URL url(URL(), String::fromUTF8(urlString.get()));
36
36
37
    if (!soupURI->password)
37
    if (!soupURI->password)
38
        return url;
38
        return url;
- a/Source/WebCore/platform/network/soup/SoupURIUtils.h -2 / +2 lines
Lines 26-37 a/Source/WebCore/platform/network/soup/SoupURIUtils.h_sec1
26
#ifndef SoupURIUtils_h
26
#ifndef SoupURIUtils_h
27
#define SoupURIUtils_h
27
#define SoupURIUtils_h
28
28
29
#include "KURL.h"
29
#include "URL.h"
30
30
31
typedef struct _SoupURI SoupURI;
31
typedef struct _SoupURI SoupURI;
32
32
33
namespace WebCore {
33
namespace WebCore {
34
KURL soupURIToKURL(SoupURI* soupURI);
34
URL soupURIToKURL(SoupURI* soupURI);
35
}
35
}
36
36
37
#endif
37
#endif
- a/Source/WebCore/platform/network/win/CookieJarWin.cpp -7 / +7 lines
Lines 27-33 a/Source/WebCore/platform/network/win/CookieJarWin.cpp_sec1
27
#include "PlatformCookieJar.h"
27
#include "PlatformCookieJar.h"
28
28
29
#include "Cookie.h"
29
#include "Cookie.h"
30
#include "KURL.h"
30
#include "URL.h"
31
#include "NetworkingContext.h"
31
#include "NetworkingContext.h"
32
#include "ResourceHandle.h"
32
#include "ResourceHandle.h"
33
#include <windows.h>
33
#include <windows.h>
Lines 36-42 a/Source/WebCore/platform/network/win/CookieJarWin.cpp_sec2
36
36
37
namespace WebCore {
37
namespace WebCore {
38
38
39
void setCookiesFromDOM(const NetworkStorageSession&, const KURL&, const KURL& url, const String& value)
39
void setCookiesFromDOM(const NetworkStorageSession&, const URL&, const URL& url, const String& value)
40
{
40
{
41
    // FIXME: Deal with firstParty argument.
41
    // FIXME: Deal with firstParty argument.
42
    String str = url.string();
42
    String str = url.string();
Lines 44-50 void setCookiesFromDOM(const NetworkStorageSession&, const KURL&, const KURL& ur a/Source/WebCore/platform/network/win/CookieJarWin.cpp_sec3
44
    InternetSetCookie(str.charactersWithNullTermination().data(), 0, val.charactersWithNullTermination().data());
44
    InternetSetCookie(str.charactersWithNullTermination().data(), 0, val.charactersWithNullTermination().data());
45
}
45
}
46
46
47
String cookiesForDOM(const NetworkStorageSession&, const KURL&, const KURL& url)
47
String cookiesForDOM(const NetworkStorageSession&, const URL&, const URL& url)
48
{
48
{
49
    // FIXME: Deal with firstParty argument.
49
    // FIXME: Deal with firstParty argument.
50
50
Lines 65-89 String cookiesForDOM(const NetworkStorageSession&, const KURL&, const KURL& url) a/Source/WebCore/platform/network/win/CookieJarWin.cpp_sec4
65
    return String::adopt(buffer);
65
    return String::adopt(buffer);
66
}
66
}
67
67
68
String cookieRequestHeaderFieldValue(const NetworkStorageSession& session, const KURL& firstParty, const KURL& url)
68
String cookieRequestHeaderFieldValue(const NetworkStorageSession& session, const URL& firstParty, const URL& url)
69
{
69
{
70
    // FIXME: include HttpOnly cookie
70
    // FIXME: include HttpOnly cookie
71
    return cookiesForDOM(session.context(), firstParty, url);
71
    return cookiesForDOM(session.context(), firstParty, url);
72
}
72
}
73
73
74
bool cookiesEnabled(const NetworkStorageSession& session, const KURL& /*firstParty*/, const KURL& /*url*/)
74
bool cookiesEnabled(const NetworkStorageSession& session, const URL& /*firstParty*/, const URL& /*url*/)
75
{
75
{
76
    return true;
76
    return true;
77
}
77
}
78
78
79
bool getRawCookies(const NetworkStorageSession& session, const KURL& /*firstParty*/, const KURL& /*url*/, Vector<Cookie>& rawCookies)
79
bool getRawCookies(const NetworkStorageSession& session, const URL& /*firstParty*/, const URL& /*url*/, Vector<Cookie>& rawCookies)
80
{
80
{
81
    // FIXME: Not yet implemented
81
    // FIXME: Not yet implemented
82
    rawCookies.clear();
82
    rawCookies.clear();
83
    return false; // return true when implemented
83
    return false; // return true when implemented
84
}
84
}
85
85
86
void deleteCookie(const NetworkStorageSession&, const KURL&, const String&)
86
void deleteCookie(const NetworkStorageSession&, const URL&, const String&)
87
{
87
{
88
    // FIXME: Not yet implemented
88
    // FIXME: Not yet implemented
89
}
89
}
- a/Source/WebCore/platform/network/win/ProxyServerWin.cpp -1 / +1 lines
Lines 28-34 a/Source/WebCore/platform/network/win/ProxyServerWin.cpp_sec1
28
28
29
namespace WebCore {
29
namespace WebCore {
30
30
31
Vector<ProxyServer> proxyServersForURL(const KURL&, const NetworkingContext*)
31
Vector<ProxyServer> proxyServersForURL(const URL&, const NetworkingContext*)
32
{
32
{
33
    // FIXME: Implement.
33
    // FIXME: Implement.
34
    return Vector<ProxyServer>();
34
    return Vector<ProxyServer>();
- a/Source/WebCore/platform/network/win/ResourceHandleWin.cpp -1 / +1 lines
Lines 174-180 void ResourceHandle::internetStatusCallback(HINTERNET internetHandle, DWORD_PTR a/Source/WebCore/platform/network/win/ResourceHandleWin.cpp_sec1
174
void ResourceHandle::onRedirect()
174
void ResourceHandle::onRedirect()
175
{
175
{
176
    ResourceRequest newRequest = firstRequest();
176
    ResourceRequest newRequest = firstRequest();
177
    newRequest.setURL(KURL(ParsedURLString, d->m_redirectUrl));
177
    newRequest.setURL(URL(ParsedURLString, d->m_redirectUrl));
178
178
179
    ResourceResponse response(firstRequest().url(), String(), 0, String(), String());
179
    ResourceResponse response(firstRequest().url(), String(), 0, String(), String());
180
180
- a/Source/WebCore/platform/network/win/ResourceRequest.h -4 / +4 lines
Lines 33-55 namespace WebCore { a/Source/WebCore/platform/network/win/ResourceRequest.h_sec1
33
class ResourceRequest : public ResourceRequestBase {
33
class ResourceRequest : public ResourceRequestBase {
34
public:
34
public:
35
    ResourceRequest(const String& url)
35
    ResourceRequest(const String& url)
36
        : ResourceRequestBase(KURL(ParsedURLString, url), UseProtocolCachePolicy)
36
        : ResourceRequestBase(URL(ParsedURLString, url), UseProtocolCachePolicy)
37
    {
37
    {
38
    }
38
    }
39
39
40
    ResourceRequest(const KURL& url)
40
    ResourceRequest(const URL& url)
41
        : ResourceRequestBase(url, UseProtocolCachePolicy)
41
        : ResourceRequestBase(url, UseProtocolCachePolicy)
42
    {
42
    {
43
    }
43
    }
44
44
45
    ResourceRequest(const KURL& url, const String& referrer, ResourceRequestCachePolicy policy = UseProtocolCachePolicy)
45
    ResourceRequest(const URL& url, const String& referrer, ResourceRequestCachePolicy policy = UseProtocolCachePolicy)
46
        : ResourceRequestBase(url, policy)
46
        : ResourceRequestBase(url, policy)
47
    {
47
    {
48
        setHTTPReferrer(referrer);
48
        setHTTPReferrer(referrer);
49
    }
49
    }
50
50
51
    ResourceRequest()
51
    ResourceRequest()
52
        : ResourceRequestBase(KURL(), UseProtocolCachePolicy)
52
        : ResourceRequestBase(URL(), UseProtocolCachePolicy)
53
    {
53
    {
54
    }
54
    }
55
55
- a/Source/WebCore/platform/network/win/ResourceResponse.h -1 / +1 lines
Lines 35-41 public: a/Source/WebCore/platform/network/win/ResourceResponse.h_sec1
35
    {
35
    {
36
    }
36
    }
37
37
38
    ResourceResponse(const KURL& url, const String& mimeType, long long expectedLength, const String& textEncodingName, const String& filename)
38
    ResourceResponse(const URL& url, const String& mimeType, long long expectedLength, const String& textEncodingName, const String& filename)
39
        : ResourceResponseBase(url, mimeType, expectedLength, textEncodingName, filename)
39
        : ResourceResponseBase(url, mimeType, expectedLength, textEncodingName, filename)
40
    {
40
    {
41
    }
41
    }
- a/Source/WebCore/platform/network/win/SocketStreamHandle.h -2 / +2 lines
Lines 45-51 class SocketStreamHandleClient; a/Source/WebCore/platform/network/win/SocketStreamHandle.h_sec1
45
45
46
class SocketStreamHandle : public RefCounted<SocketStreamHandle>, public SocketStreamHandleBase {
46
class SocketStreamHandle : public RefCounted<SocketStreamHandle>, public SocketStreamHandleBase {
47
public:
47
public:
48
    static PassRefPtr<SocketStreamHandle> create(const KURL& url, SocketStreamHandleClient* client) { return adoptRef(new SocketStreamHandle(url, client)); }
48
    static PassRefPtr<SocketStreamHandle> create(const URL& url, SocketStreamHandleClient* client) { return adoptRef(new SocketStreamHandle(url, client)); }
49
49
50
    virtual ~SocketStreamHandle();
50
    virtual ~SocketStreamHandle();
51
51
Lines 54-60 protected: a/Source/WebCore/platform/network/win/SocketStreamHandle.h_sec2
54
    virtual void platformClose();
54
    virtual void platformClose();
55
55
56
private:
56
private:
57
    SocketStreamHandle(const KURL&, SocketStreamHandleClient*);
57
    SocketStreamHandle(const URL&, SocketStreamHandleClient*);
58
58
59
    // No authentication for streams per se, but proxy may ask for credentials.
59
    // No authentication for streams per se, but proxy may ask for credentials.
60
    void didReceiveAuthenticationChallenge(const AuthenticationChallenge&);
60
    void didReceiveAuthenticationChallenge(const AuthenticationChallenge&);
- a/Source/WebCore/platform/network/win/SocketStreamHandleWin.cpp -2 / +2 lines
Lines 32-45 a/Source/WebCore/platform/network/win/SocketStreamHandleWin.cpp_sec1
32
#include "config.h"
32
#include "config.h"
33
#include "SocketStreamHandle.h"
33
#include "SocketStreamHandle.h"
34
34
35
#include "KURL.h"
35
#include "URL.h"
36
#include "Logging.h"
36
#include "Logging.h"
37
#include "NotImplemented.h"
37
#include "NotImplemented.h"
38
#include "SocketStreamHandleClient.h"
38
#include "SocketStreamHandleClient.h"
39
39
40
namespace WebCore {
40
namespace WebCore {
41
41
42
SocketStreamHandle::SocketStreamHandle(const KURL& url, SocketStreamHandleClient* client)
42
SocketStreamHandle::SocketStreamHandle(const URL& url, SocketStreamHandleClient* client)
43
    : SocketStreamHandleBase(url, client)
43
    : SocketStreamHandleBase(url, client)
44
{
44
{
45
    LOG(Network, "SocketStreamHandle %p new client %p", this, m_client);
45
    LOG(Network, "SocketStreamHandle %p new client %p", this, m_client);
- a/Source/WebCore/platform/nix/PasteboardNix.cpp -1 / +1 lines
Lines 56-62 void Pasteboard::write(const PasteboardURL&) a/Source/WebCore/platform/nix/PasteboardNix.cpp_sec1
56
    notImplemented();
56
    notImplemented();
57
}
57
}
58
58
59
void Pasteboard::writeImage(Node*, const KURL&, const String&)
59
void Pasteboard::writeImage(Node*, const URL&, const String&)
60
{
60
{
61
    notImplemented();
61
    notImplemented();
62
}
62
}
- a/Source/WebCore/platform/qt/KURLQt.cpp -55 lines
Lines 1-55 a/Source/WebCore/platform/qt/KURLQt.cpp_sec1
1
/*
2
 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
3
 *
4
 * This library is free software; you can redistribute it and/or
5
 * modify it under the terms of the GNU Library General Public
6
 * License as published by the Free Software Foundation; either
7
 * version 2 of the License, or (at your option) any later version.
8
 *
9
 * This library is distributed in the hope that it will be useful,
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12
 * Library General Public License for more details.
13
 *
14
 * You should have received a copy of the GNU Library General Public License
15
 * along with this library; see the file COPYING.LIB.  If not, write to
16
 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17
 * Boston, MA 02110-1301, USA.
18
 *
19
 */
20
#include "config.h"
21
#include "KURL.h"
22
23
#include "NotImplemented.h"
24
#include "TextEncoding.h"
25
#include "qurl.h"
26
#include <wtf/text/CString.h>
27
28
namespace WebCore {
29
30
KURL::KURL(const QUrl& url)
31
{
32
    *this = KURL(KURL(), url.toEncoded().constData(), UTF8Encoding());
33
}
34
35
KURL::operator QUrl() const
36
{
37
    return QUrl(m_string);
38
}
39
40
String KURL::fileSystemPath() const
41
{
42
    if (!isValid())
43
        return String();
44
45
    if (isLocalFile())
46
        return static_cast<QUrl>(*this).toLocalFile();
47
48
    // A valid qrc resource path begins with a colon.
49
    if (protocolIs("qrc"))
50
        return ":" + decodeURLEscapeSequences(path());
51
52
    return String();
53
}
54
55
}
- a/Source/WebCore/platform/qt/PasteboardQt.cpp -1 / +1 lines
Lines 205-211 void Pasteboard::write(const PasteboardURL& pasteboardURL) a/Source/WebCore/platform/qt/PasteboardQt.cpp_sec1
205
#endif
205
#endif
206
}
206
}
207
207
208
void Pasteboard::writeImage(Node* node, const KURL&, const String&)
208
void Pasteboard::writeImage(Node* node, const URL&, const String&)
209
{
209
{
210
    ASSERT(node);
210
    ASSERT(node);
211
211
- a/Source/WebCore/platform/qt/PlatformSupport.h -1 / +1 lines
Lines 26-32 a/Source/WebCore/platform/qt/PlatformSupport.h_sec1
26
#ifndef PlatformSupport_h
26
#ifndef PlatformSupport_h
27
#define PlatformSupport_h
27
#define PlatformSupport_h
28
28
29
#include "KURL.h"
29
#include "URL.h"
30
30
31
#include <wtf/Vector.h>
31
#include <wtf/Vector.h>
32
#include <wtf/text/WTFString.h>
32
#include <wtf/text/WTFString.h>
- a/Source/WebCore/platform/qt/TemporaryLinkStubsQt.cpp -2 / +2 lines
Lines 47-53 a/Source/WebCore/platform/qt/TemporaryLinkStubsQt.cpp_sec1
47
#include "GraphicsContext.h"
47
#include "GraphicsContext.h"
48
#include "IconLoader.h"
48
#include "IconLoader.h"
49
#include "IntPoint.h"
49
#include "IntPoint.h"
50
#include "KURL.h"
50
#include "URL.h"
51
#include "Language.h"
51
#include "Language.h"
52
#include "LocalizedStrings.h"
52
#include "LocalizedStrings.h"
53
#include "Node.h"
53
#include "Node.h"
Lines 104-110 void getSupportedKeySizes(Vector<String>&) a/Source/WebCore/platform/qt/TemporaryLinkStubsQt.cpp_sec2
104
    notImplemented();
104
    notImplemented();
105
}
105
}
106
106
107
String signedPublicKeyAndChallengeString(unsigned, const String&, const KURL&)
107
String signedPublicKeyAndChallengeString(unsigned, const String&, const URL&)
108
{
108
{
109
    return String();
109
    return String();
110
}
110
}
- a/Source/WebCore/platform/win/BString.cpp -2 / +2 lines
Lines 26-32 a/Source/WebCore/platform/win/BString.cpp_sec1
26
#include "config.h"
26
#include "config.h"
27
#include "BString.h"
27
#include "BString.h"
28
28
29
#include "KURL.h"
29
#include "URL.h"
30
#include <windows.h>
30
#include <windows.h>
31
#include <wtf/text/AtomicString.h>
31
#include <wtf/text/AtomicString.h>
32
#include <wtf/text/WTFString.h>
32
#include <wtf/text/WTFString.h>
Lines 68-74 BString::BString(const String& s) a/Source/WebCore/platform/win/BString.cpp_sec2
68
        m_bstr = SysAllocStringLen(s.characters(), s.length());
68
        m_bstr = SysAllocStringLen(s.characters(), s.length());
69
}
69
}
70
70
71
BString::BString(const KURL& url)
71
BString::BString(const URL& url)
72
{
72
{
73
    if (url.isNull())
73
    if (url.isNull())
74
        m_bstr = 0;
74
        m_bstr = 0;
- a/Source/WebCore/platform/win/BString.h -2 / +2 lines
Lines 36-42 typedef wchar_t* BSTR; a/Source/WebCore/platform/win/BString.h_sec1
36
36
37
namespace WebCore {
37
namespace WebCore {
38
38
39
    class KURL;
39
    class URL;
40
40
41
    class BString {
41
    class BString {
42
    public:
42
    public:
Lines 45-51 namespace WebCore { a/Source/WebCore/platform/win/BString.h_sec2
45
        BString(const wchar_t*, size_t length);
45
        BString(const wchar_t*, size_t length);
46
        BString(const String&);
46
        BString(const String&);
47
        BString(const AtomicString&);
47
        BString(const AtomicString&);
48
        BString(const KURL&);
48
        BString(const URL&);
49
#if USE(CF)
49
#if USE(CF)
50
        BString(CFStringRef);
50
        BString(CFStringRef);
51
#endif
51
#endif
- a/Source/WebCore/platform/win/ClipboardUtilitiesWin.cpp -2 / +2 lines
Lines 27-34 a/Source/WebCore/platform/win/ClipboardUtilitiesWin.cpp_sec1
27
#include "ClipboardUtilitiesWin.h"
27
#include "ClipboardUtilitiesWin.h"
28
28
29
#include "DocumentFragment.h"
29
#include "DocumentFragment.h"
30
#include "KURL.h"
31
#include "TextEncoding.h"
30
#include "TextEncoding.h"
31
#include "URL.h"
32
#include "markup.h"
32
#include "markup.h"
33
#include <shlobj.h>
33
#include <shlobj.h>
34
#include <wininet.h> // for INTERNET_MAX_URL_LENGTH
34
#include <wininet.h> // for INTERNET_MAX_URL_LENGTH
Lines 173-179 static FORMATETC* texthtmlFormat() a/Source/WebCore/platform/win/ClipboardUtilitiesWin.cpp_sec2
173
    return &texthtmlFormat;
173
    return &texthtmlFormat;
174
}
174
}
175
175
176
HGLOBAL createGlobalData(const KURL& url, const String& title)
176
HGLOBAL createGlobalData(const URL& url, const String& title)
177
{
177
{
178
    String mutableURL(url.string());
178
    String mutableURL(url.string());
179
    String mutableTitle(title);
179
    String mutableTitle(title);
- a/Source/WebCore/platform/win/ClipboardUtilitiesWin.h -2 / +2 lines
Lines 33-43 a/Source/WebCore/platform/win/ClipboardUtilitiesWin.h_sec1
33
namespace WebCore {
33
namespace WebCore {
34
34
35
class Document;
35
class Document;
36
class KURL;
36
class URL;
37
37
38
HGLOBAL createGlobalData(const String&);
38
HGLOBAL createGlobalData(const String&);
39
HGLOBAL createGlobalData(const Vector<char>&);
39
HGLOBAL createGlobalData(const Vector<char>&);
40
HGLOBAL createGlobalData(const KURL& url, const String& title);
40
HGLOBAL createGlobalData(const URL& url, const String& title);
41
41
42
FORMATETC* urlWFormat();
42
FORMATETC* urlWFormat();
43
FORMATETC* urlFormat();
43
FORMATETC* urlFormat();
- a/Source/WebCore/platform/win/DragImageWin.cpp -2 / +2 lines
Lines 33-39 a/Source/WebCore/platform/win/DragImageWin.cpp_sec1
33
#include "GraphicsContext.h"
33
#include "GraphicsContext.h"
34
#include "HWndDC.h"
34
#include "HWndDC.h"
35
#include "Image.h"
35
#include "Image.h"
36
#include "KURL.h"
36
#include "URL.h"
37
#include "StringTruncator.h"
37
#include "StringTruncator.h"
38
#include "TextRun.h"
38
#include "TextRun.h"
39
#include "WebCoreTextRenderer.h"
39
#include "WebCoreTextRenderer.h"
Lines 121-127 static Font dragLabelFont(int size, bool bold, FontRenderingMode renderingMode) a/Source/WebCore/platform/win/DragImageWin.cpp_sec2
121
    return result;
121
    return result;
122
}
122
}
123
123
124
DragImageRef createDragImageForLink(KURL& url, const String& inLabel, FontRenderingMode fontRenderingMode)
124
DragImageRef createDragImageForLink(URL& url, const String& inLabel, FontRenderingMode fontRenderingMode)
125
{
125
{
126
    // This is more or less an exact match for the Mac OS X code.
126
    // This is more or less an exact match for the Mac OS X code.
127
127
- a/Source/WebCore/platform/win/PasteboardWin.cpp -10 / +10 lines
Lines 40-46 a/Source/WebCore/platform/win/PasteboardWin.cpp_sec1
40
#include "HWndDC.h"
40
#include "HWndDC.h"
41
#include "HitTestResult.h"
41
#include "HitTestResult.h"
42
#include "Image.h"
42
#include "Image.h"
43
#include "KURL.h"
43
#include "URL.h"
44
#include "NotImplemented.h"
44
#include "NotImplemented.h"
45
#include "Page.h"
45
#include "Page.h"
46
#include "Range.h"
46
#include "Range.h"
Lines 344-350 Vector<String> Pasteboard::readFilenames() a/Source/WebCore/platform/win/PasteboardWin.cpp_sec2
344
#endif
344
#endif
345
}
345
}
346
346
347
static bool writeURL(WCDataObject *data, const KURL& url, String title, bool withPlainText, bool withHTML)
347
static bool writeURL(WCDataObject *data, const URL& url, String title, bool withPlainText, bool withHTML)
348
{
348
{
349
    ASSERT(data);
349
    ASSERT(data);
350
350
Lines 396-402 bool Pasteboard::writeString(const String& type, const String& data) a/Source/WebCore/platform/win/PasteboardWin.cpp_sec3
396
    ClipboardDataType winType = clipboardTypeFromMIMEType(type);
396
    ClipboardDataType winType = clipboardTypeFromMIMEType(type);
397
397
398
    if (winType == ClipboardDataTypeURL)
398
    if (winType == ClipboardDataTypeURL)
399
        return WebCore::writeURL(m_writableDataObject.get(), KURL(KURL(), data), String(), false, true);
399
        return WebCore::writeURL(m_writableDataObject.get(), URL(URL(), data), String(), false, true);
400
400
401
    if (winType == ClipboardDataTypeText) {
401
    if (winType == ClipboardDataTypeText) {
402
        STGMEDIUM medium = {0};
402
        STGMEDIUM medium = {0};
Lines 565-571 static String filesystemPathFromUrlOrTitle(const String& url, const String& titl a/Source/WebCore/platform/win/PasteboardWin.cpp_sec4
565
    }
565
    }
566
566
567
    if (!lstrlen(fsPathBuffer)) {
567
    if (!lstrlen(fsPathBuffer)) {
568
        KURL kurl(KURL(), url);
568
        URL kurl(URL(), url);
569
        usedURL = true;
569
        usedURL = true;
570
        // The filename for any content based drag or file url should be the last element of 
570
        // The filename for any content based drag or file url should be the last element of 
571
        // the path. If we can't find it, or we're coming up with the name for a link
571
        // the path. If we can't find it, or we're coming up with the name for a link
Lines 640-653 exit: a/Source/WebCore/platform/win/PasteboardWin.cpp_sec5
640
    return hr;
640
    return hr;
641
}
641
}
642
642
643
void Pasteboard::writeURLToDataObject(const KURL& kurl, const String& titleStr)
643
void Pasteboard::writeURLToDataObject(const URL& kurl, const String& titleStr)
644
{
644
{
645
    if (!m_writableDataObject)
645
    if (!m_writableDataObject)
646
        return;
646
        return;
647
    WebCore::writeURL(m_writableDataObject.get(), kurl, titleStr, true, true);
647
    WebCore::writeURL(m_writableDataObject.get(), kurl, titleStr, true, true);
648
648
649
    String url = kurl.string();
649
    String url = kurl.string();
650
    ASSERT(url.containsOnlyASCII()); // KURL::string() is URL encoded.
650
    ASSERT(url.containsOnlyASCII()); // URL::string() is URL encoded.
651
651
652
    String fsPath = filesystemPathFromUrlOrTitle(url, titleStr, L".URL", true);
652
    String fsPath = filesystemPathFromUrlOrTitle(url, titleStr, L".URL", true);
653
    String contentString("[InternetShortcut]\r\nURL=" + url + "\r\n");
653
    String contentString("[InternetShortcut]\r\nURL=" + url + "\r\n");
Lines 725-731 void Pasteboard::write(const PasteboardURL& pasteboardURL) a/Source/WebCore/platform/win/PasteboardWin.cpp_sec6
725
    writeURLToDataObject(pasteboardURL.url, pasteboardURL.title);
725
    writeURLToDataObject(pasteboardURL.url, pasteboardURL.title);
726
}
726
}
727
727
728
void Pasteboard::writeImage(Node* node, const KURL&, const String&)
728
void Pasteboard::writeImage(Node* node, const URL&, const String&)
729
{
729
{
730
    ASSERT(node);
730
    ASSERT(node);
731
731
Lines 932-938 static HGLOBAL createGlobalImageFileContent(SharedBuffer* data) a/Source/WebCore/platform/win/PasteboardWin.cpp_sec7
932
    return memObj;
932
    return memObj;
933
}
933
}
934
934
935
static HGLOBAL createGlobalHDropContent(const KURL& url, String& fileName, SharedBuffer* data)
935
static HGLOBAL createGlobalHDropContent(const URL& url, String& fileName, SharedBuffer* data)
936
{
936
{
937
    if (fileName.isEmpty() || !data)
937
    if (fileName.isEmpty() || !data)
938
        return 0;
938
        return 0;
Lines 1001-1007 static HGLOBAL createGlobalHDropContent(const KURL& url, String& fileName, Share a/Source/WebCore/platform/win/PasteboardWin.cpp_sec8
1001
    return memObj;
1001
    return memObj;
1002
}
1002
}
1003
1003
1004
void Pasteboard::writeImageToDataObject(Element* element, const KURL& url)
1004
void Pasteboard::writeImageToDataObject(Element* element, const URL& url)
1005
{
1005
{
1006
    // Shove image data into a DataObject for use as a file
1006
    // Shove image data into a DataObject for use as a file
1007
    CachedImage* cachedImage = getCachedImage(element);
1007
    CachedImage* cachedImage = getCachedImage(element);
Lines 1032-1038 void Pasteboard::writeImageToDataObject(Element* element, const KURL& url) a/Source/WebCore/platform/win/PasteboardWin.cpp_sec9
1032
    writeFileToDataObject(m_writableDataObject.get(), imageFileDescriptor, imageFileContent, hDropContent);
1032
    writeFileToDataObject(m_writableDataObject.get(), imageFileDescriptor, imageFileContent, hDropContent);
1033
}
1033
}
1034
1034
1035
void Pasteboard::writeURLToWritableDataObject(const KURL& url, const String& title)
1035
void Pasteboard::writeURLToWritableDataObject(const URL& url, const String& title)
1036
{
1036
{
1037
    WebCore::writeURL(m_writableDataObject.get(), url, title, true, false);
1037
    WebCore::writeURL(m_writableDataObject.get(), url, title, true, false);
1038
}
1038
}
- a/Source/WebCore/platform/win/SSLKeyGeneratorWin.cpp -1 / +1 lines
Lines 35-41 void WebCore::getSupportedKeySizes(Vector<String>& v) a/Source/WebCore/platform/win/SSLKeyGeneratorWin.cpp_sec1
35
    v.append("Medium Grade");
35
    v.append("Medium Grade");
36
}
36
}
37
37
38
String WebCore::signedPublicKeyAndChallengeString(unsigned index, const String& challenge, const KURL& url)
38
String WebCore::signedPublicKeyAndChallengeString(unsigned index, const String& challenge, const URL& url)
39
{
39
{
40
    String keyString;
40
    String keyString;
41
41
- a/Source/WebCore/platform/win/TemporaryLinkStubs.cpp -1 / +1 lines
Lines 34-40 a/Source/WebCore/platform/win/TemporaryLinkStubs.cpp_sec1
34
namespace WebCore {
34
namespace WebCore {
35
35
36
// <keygen>
36
// <keygen>
37
String signedPublicKeyAndChallengeString(unsigned, const String&, const KURL&) { notImplemented(); return String(); }
37
String signedPublicKeyAndChallengeString(unsigned, const String&, const URL&) { notImplemented(); return String(); }
38
void getSupportedKeySizes(Vector<String>&) { notImplemented(); }
38
void getSupportedKeySizes(Vector<String>&) { notImplemented(); }
39
39
40
#if !USE(CFNETWORK)
40
#if !USE(CFNETWORK)
- a/Source/WebCore/plugins/PluginDatabase.cpp -2 / +2 lines
Lines 28-34 a/Source/WebCore/plugins/PluginDatabase.cpp_sec1
28
#include "PluginDatabase.h"
28
#include "PluginDatabase.h"
29
29
30
#include "Frame.h"
30
#include "Frame.h"
31
#include "KURL.h"
31
#include "URL.h"
32
#include "PluginPackage.h"
32
#include "PluginPackage.h"
33
#if ENABLE(NETSCAPE_PLUGIN_METADATA_CACHE)
33
#if ENABLE(NETSCAPE_PLUGIN_METADATA_CACHE)
34
#include "FileSystem.h"
34
#include "FileSystem.h"
Lines 281-287 String PluginDatabase::MIMETypeForExtension(const String& extension) const a/Source/WebCore/plugins/PluginDatabase.cpp_sec2
281
    return mimeTypeForPlugin.get(pluginChoices[0]);
281
    return mimeTypeForPlugin.get(pluginChoices[0]);
282
}
282
}
283
283
284
PluginPackage* PluginDatabase::findPlugin(const KURL& url, String& mimeType)
284
PluginPackage* PluginDatabase::findPlugin(const URL& url, String& mimeType)
285
{
285
{
286
    if (!mimeType.isEmpty())
286
    if (!mimeType.isEmpty())
287
        return pluginForMIMEType(mimeType);
287
        return pluginForMIMEType(mimeType);
- a/Source/WebCore/plugins/PluginDatabase.h -2 / +2 lines
Lines 38-44 namespace WebCore { a/Source/WebCore/plugins/PluginDatabase.h_sec1
38
    class Element;
38
    class Element;
39
    class Frame;
39
    class Frame;
40
    class IntSize;
40
    class IntSize;
41
    class KURL;
41
    class URL;
42
    class PluginDatabaseClient;
42
    class PluginDatabaseClient;
43
    class PluginPackage;
43
    class PluginPackage;
44
44
Lines 65-71 namespace WebCore { a/Source/WebCore/plugins/PluginDatabase.h_sec2
65
        static bool isPreferredPluginDirectory(const String& directory);
65
        static bool isPreferredPluginDirectory(const String& directory);
66
        static int preferredPluginCompare(const void*, const void*);
66
        static int preferredPluginCompare(const void*, const void*);
67
67
68
        PluginPackage* findPlugin(const KURL&, String& mimeType);
68
        PluginPackage* findPlugin(const URL&, String& mimeType);
69
        PluginPackage* pluginForMIMEType(const String& mimeType);
69
        PluginPackage* pluginForMIMEType(const String& mimeType);
70
        void setPreferredPluginForMIMEType(const String& mimeType, PluginPackage* plugin);
70
        void setPreferredPluginForMIMEType(const String& mimeType, PluginPackage* plugin);
71
71
- a/Source/WebCore/plugins/PluginStream.cpp -2 / +2 lines
Lines 135-141 void PluginStream::startStream() a/Source/WebCore/plugins/PluginStream.cpp_sec1
135
{
135
{
136
    ASSERT(m_streamState == StreamBeforeStarted);
136
    ASSERT(m_streamState == StreamBeforeStarted);
137
137
138
    const KURL& responseURL = m_resourceResponse.url();
138
    const URL& responseURL = m_resourceResponse.url();
139
139
140
    // Some plugins (Flash) expect that javascript URLs are passed back decoded as this is the
140
    // Some plugins (Flash) expect that javascript URLs are passed back decoded as this is the
141
    // format used when requesting the URL.
141
    // format used when requesting the URL.
Lines 386-392 void PluginStream::deliverData() a/Source/WebCore/plugins/PluginStream.cpp_sec2
386
    } 
386
    } 
387
}
387
}
388
388
389
void PluginStream::sendJavaScriptStream(const KURL& requestURL, const CString& resultString)
389
void PluginStream::sendJavaScriptStream(const URL& requestURL, const CString& resultString)
390
{
390
{
391
    didReceiveResponse(0, ResourceResponse(requestURL, "text/plain", resultString.length(), "", ""));
391
    didReceiveResponse(0, ResourceResponse(requestURL, "text/plain", resultString.length(), "", ""));
392
392
- a/Source/WebCore/plugins/PluginStream.h -2 / +2 lines
Lines 28-34 a/Source/WebCore/plugins/PluginStream.h_sec1
28
#define PluginStream_h
28
#define PluginStream_h
29
29
30
#include "FileSystem.h"
30
#include "FileSystem.h"
31
#include "KURL.h"
31
#include "URL.h"
32
#include "NetscapePlugInStreamLoader.h"
32
#include "NetscapePlugInStreamLoader.h"
33
#include "PluginQuirkSet.h"
33
#include "PluginQuirkSet.h"
34
#include "ResourceRequest.h"
34
#include "ResourceRequest.h"
Lines 70-76 namespace WebCore { a/Source/WebCore/plugins/PluginStream.h_sec2
70
70
71
        void setLoadManually(bool loadManually) { m_loadManually = loadManually; }
71
        void setLoadManually(bool loadManually) { m_loadManually = loadManually; }
72
72
73
        void sendJavaScriptStream(const KURL& requestURL, const WTF::CString& resultString);
73
        void sendJavaScriptStream(const URL& requestURL, const WTF::CString& resultString);
74
        void cancelAndDestroyStream(NPReason);
74
        void cancelAndDestroyStream(NPReason);
75
75
76
        static NPP ownerForStream(NPStream*);
76
        static NPP ownerForStream(NPStream*);
- a/Source/WebCore/plugins/PluginView.cpp -10 / +10 lines
Lines 103-109 static InstanceMap& instanceMap() a/Source/WebCore/plugins/PluginView.cpp_sec1
103
    return map;
103
    return map;
104
}
104
}
105
105
106
static String scriptStringIfJavaScriptURL(const KURL& url)
106
static String scriptStringIfJavaScriptURL(const URL& url)
107
{
107
{
108
    if (!protocolIsJavaScript(url))
108
    if (!protocolIsJavaScript(url))
109
        return String();
109
        return String();
Lines 426-432 void PluginView::performRequest(PluginRequest* request) a/Source/WebCore/plugins/PluginView.cpp_sec2
426
    if (m_parentFrame->loader().documentLoader() != m_parentFrame->loader().activeDocumentLoader() && (targetFrameName.isNull() || m_parentFrame->tree().find(targetFrameName) != m_parentFrame))
426
    if (m_parentFrame->loader().documentLoader() != m_parentFrame->loader().activeDocumentLoader() && (targetFrameName.isNull() || m_parentFrame->tree().find(targetFrameName) != m_parentFrame))
427
        return;
427
        return;
428
428
429
    KURL requestURL = request->frameLoadRequest().resourceRequest().url();
429
    URL requestURL = request->frameLoadRequest().resourceRequest().url();
430
    String jsString = scriptStringIfJavaScriptURL(requestURL);
430
    String jsString = scriptStringIfJavaScriptURL(requestURL);
431
431
432
    UserGestureIndicator gestureIndicator(request->shouldAllowPopups() ? DefinitelyProcessingUserGesture : PossiblyProcessingUserGesture);
432
    UserGestureIndicator gestureIndicator(request->shouldAllowPopups() ? DefinitelyProcessingUserGesture : PossiblyProcessingUserGesture);
Lines 512-518 NPError PluginView::load(const FrameLoadRequest& frameLoadRequest, bool sendNoti a/Source/WebCore/plugins/PluginView.cpp_sec3
512
{
512
{
513
    ASSERT(frameLoadRequest.resourceRequest().httpMethod() == "GET" || frameLoadRequest.resourceRequest().httpMethod() == "POST");
513
    ASSERT(frameLoadRequest.resourceRequest().httpMethod() == "GET" || frameLoadRequest.resourceRequest().httpMethod() == "POST");
514
514
515
    KURL url = frameLoadRequest.resourceRequest().url();
515
    URL url = frameLoadRequest.resourceRequest().url();
516
    
516
    
517
    if (url.isEmpty())
517
    if (url.isEmpty())
518
        return NPERR_INVALID_URL;
518
        return NPERR_INVALID_URL;
Lines 541-547 NPError PluginView::load(const FrameLoadRequest& frameLoadRequest, bool sendNoti a/Source/WebCore/plugins/PluginView.cpp_sec4
541
    return NPERR_NO_ERROR;
541
    return NPERR_NO_ERROR;
542
}
542
}
543
543
544
static KURL makeURL(const KURL& baseURL, const char* relativeURLString)
544
static URL makeURL(const URL& baseURL, const char* relativeURLString)
545
{
545
{
546
    String urlString = relativeURLString;
546
    String urlString = relativeURLString;
547
547
Lines 549-555 static KURL makeURL(const KURL& baseURL, const char* relativeURLString) a/Source/WebCore/plugins/PluginView.cpp_sec5
549
    urlString.replaceWithLiteral('\n', "");
549
    urlString.replaceWithLiteral('\n', "");
550
    urlString.replaceWithLiteral('\r', "");
550
    urlString.replaceWithLiteral('\r', "");
551
551
552
    return KURL(baseURL, urlString);
552
    return URL(baseURL, urlString);
553
}
553
}
554
554
555
NPError PluginView::getURLNotify(const char* url, const char* target, void* notifyData)
555
NPError PluginView::getURLNotify(const char* url, const char* target, void* notifyData)
Lines 796-802 void PluginView::setParameters(const Vector<String>& paramNames, const Vector<St a/Source/WebCore/plugins/PluginView.cpp_sec6
796
    m_paramCount = paramCount;
796
    m_paramCount = paramCount;
797
}
797
}
798
798
799
PluginView::PluginView(Frame* parentFrame, const IntSize& size, PluginPackage* plugin, HTMLPlugInElement* element, const KURL& url, const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType, bool loadManually)
799
PluginView::PluginView(Frame* parentFrame, const IntSize& size, PluginPackage* plugin, HTMLPlugInElement* element, const URL& url, const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType, bool loadManually)
800
    : m_parentFrame(parentFrame)
800
    : m_parentFrame(parentFrame)
801
    , m_plugin(plugin)
801
    , m_plugin(plugin)
802
    , m_element(element)
802
    , m_element(element)
Lines 948-954 bool PluginView::isCallingPlugin() a/Source/WebCore/plugins/PluginView.cpp_sec7
948
    return s_callingPlugin > 0;
948
    return s_callingPlugin > 0;
949
}
949
}
950
950
951
PassRefPtr<PluginView> PluginView::create(Frame* parentFrame, const IntSize& size, HTMLPlugInElement* element, const KURL& url, const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType, bool loadManually)
951
PassRefPtr<PluginView> PluginView::create(Frame* parentFrame, const IntSize& size, HTMLPlugInElement* element, const URL& url, const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType, bool loadManually)
952
{
952
{
953
    // if we fail to find a plugin for this MIME type, findPlugin will search for
953
    // if we fail to find a plugin for this MIME type, findPlugin will search for
954
    // a plugin by the file extension and update the MIME type, so pass a mutable String
954
    // a plugin by the file extension and update the MIME type, so pass a mutable String
Lines 1382-1388 NPError PluginView::getValueForURL(NPNURLVariable variable, const char* url, cha a/Source/WebCore/plugins/PluginView.cpp_sec8
1382
1382
1383
    switch (variable) {
1383
    switch (variable) {
1384
    case NPNURLVCookie: {
1384
    case NPNURLVCookie: {
1385
        KURL u(m_parentFrame->document()->baseURL(), url);
1385
        URL u(m_parentFrame->document()->baseURL(), url);
1386
        if (u.isValid()) {
1386
        if (u.isValid()) {
1387
            Frame* frame = getFrame(parentFrame(), m_element);
1387
            Frame* frame = getFrame(parentFrame(), m_element);
1388
            if (frame) {
1388
            if (frame) {
Lines 1404-1410 NPError PluginView::getValueForURL(NPNURLVariable variable, const char* url, cha a/Source/WebCore/plugins/PluginView.cpp_sec9
1404
        break;
1404
        break;
1405
    }
1405
    }
1406
    case NPNURLVProxy: {
1406
    case NPNURLVProxy: {
1407
        KURL u(m_parentFrame->document()->baseURL(), url);
1407
        URL u(m_parentFrame->document()->baseURL(), url);
1408
        if (u.isValid()) {
1408
        if (u.isValid()) {
1409
            Frame* frame = getFrame(parentFrame(), m_element);
1409
            Frame* frame = getFrame(parentFrame(), m_element);
1410
            const FrameLoader* frameLoader = frame ? &frame->loader() : 0;
1410
            const FrameLoader* frameLoader = frame ? &frame->loader() : 0;
Lines 1443-1449 NPError PluginView::setValueForURL(NPNURLVariable variable, const char* url, con a/Source/WebCore/plugins/PluginView.cpp_sec10
1443
1443
1444
    switch (variable) {
1444
    switch (variable) {
1445
    case NPNURLVCookie: {
1445
    case NPNURLVCookie: {
1446
        KURL u(m_parentFrame->document()->baseURL(), url);
1446
        URL u(m_parentFrame->document()->baseURL(), url);
1447
        if (u.isValid()) {
1447
        if (u.isValid()) {
1448
            const String cookieStr = String::fromUTF8(value, len);
1448
            const String cookieStr = String::fromUTF8(value, len);
1449
            Frame* frame = getFrame(parentFrame(), m_element);
1449
            Frame* frame = getFrame(parentFrame(), m_element);
- a/Source/WebCore/plugins/PluginView.h -5 / +5 lines
Lines 79-85 namespace WebCore { a/Source/WebCore/plugins/PluginView.h_sec1
79
    class HTMLPlugInElement;
79
    class HTMLPlugInElement;
80
    class KeyboardEvent;
80
    class KeyboardEvent;
81
    class MouseEvent;
81
    class MouseEvent;
82
    class KURL;
82
    class URL;
83
#if OS(WINDOWS) && ENABLE(NETSCAPE_PLUGIN_API)
83
#if OS(WINDOWS) && ENABLE(NETSCAPE_PLUGIN_API)
84
    class PluginMessageThrottlerWin;
84
    class PluginMessageThrottlerWin;
85
#endif
85
#endif
Lines 132-138 namespace WebCore { a/Source/WebCore/plugins/PluginView.h_sec2
132
                     , public PluginManualLoader
132
                     , public PluginManualLoader
133
                     , private MediaCanStartListener {
133
                     , private MediaCanStartListener {
134
    public:
134
    public:
135
        static PassRefPtr<PluginView> create(Frame* parentFrame, const IntSize&, HTMLPlugInElement*, const KURL&, const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType, bool loadManually);
135
        static PassRefPtr<PluginView> create(Frame* parentFrame, const IntSize&, HTMLPlugInElement*, const URL&, const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType, bool loadManually);
136
        virtual ~PluginView();
136
        virtual ~PluginView();
137
137
138
        PluginPackage* plugin() const { return m_plugin.get(); }
138
        PluginPackage* plugin() const { return m_plugin.get(); }
Lines 217-223 namespace WebCore { a/Source/WebCore/plugins/PluginView.h_sec3
217
217
218
        const String& pluginsPage() const { return m_pluginsPage; }
218
        const String& pluginsPage() const { return m_pluginsPage; }
219
        const String& mimeType() const { return m_mimeType; }
219
        const String& mimeType() const { return m_mimeType; }
220
        const KURL& url() const { return m_url; }
220
        const URL& url() const { return m_url; }
221
221
222
#if defined(XP_MACOSX) && ENABLE(NETSCAPE_PLUGIN_API)
222
#if defined(XP_MACOSX) && ENABLE(NETSCAPE_PLUGIN_API)
223
        bool popUpContextMenu(NPMenu*);
223
        bool popUpContextMenu(NPMenu*);
Lines 250-256 namespace WebCore { a/Source/WebCore/plugins/PluginView.h_sec4
250
#endif
250
#endif
251
251
252
    private:
252
    private:
253
        PluginView(Frame* parentFrame, const IntSize&, PluginPackage*, HTMLPlugInElement*, const KURL&, const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType, bool loadManually);
253
        PluginView(Frame* parentFrame, const IntSize&, PluginPackage*, HTMLPlugInElement*, const URL&, const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType, bool loadManually);
254
254
255
        void setParameters(const Vector<String>& paramNames, const Vector<String>& paramValues);
255
        void setParameters(const Vector<String>& paramNames, const Vector<String>& paramValues);
256
        bool startOrAddToUnstartedList();
256
        bool startOrAddToUnstartedList();
Lines 286-292 namespace WebCore { a/Source/WebCore/plugins/PluginView.h_sec5
286
        RefPtr<PluginPackage> m_plugin;
286
        RefPtr<PluginPackage> m_plugin;
287
        HTMLPlugInElement* m_element;
287
        HTMLPlugInElement* m_element;
288
        bool m_isStarted;
288
        bool m_isStarted;
289
        KURL m_url;
289
        URL m_url;
290
        PluginStatus m_status;
290
        PluginStatus m_status;
291
        Vector<IntRect> m_invalidRects;
291
        Vector<IntRect> m_invalidRects;
292
292
- a/Source/WebCore/plugins/win/PluginDatabaseWin.cpp -1 / +1 lines
Lines 29-35 a/Source/WebCore/plugins/win/PluginDatabaseWin.cpp_sec1
29
#include "PluginDatabase.h"
29
#include "PluginDatabase.h"
30
30
31
#include "Frame.h"
31
#include "Frame.h"
32
#include "KURL.h"
32
#include "URL.h"
33
#include "PluginPackage.h"
33
#include "PluginPackage.h"
34
#include <wtf/WindowsExtras.h>
34
#include <wtf/WindowsExtras.h>
35
35
- a/Source/WebCore/rendering/HitTestLocation.h -1 / +1 lines
Lines 41-47 class Frame; a/Source/WebCore/rendering/HitTestLocation.h_sec1
41
class HTMLMediaElement;
41
class HTMLMediaElement;
42
#endif
42
#endif
43
class Image;
43
class Image;
44
class KURL;
44
class URL;
45
class Node;
45
class Node;
46
class RenderRegion;
46
class RenderRegion;
47
class Scrollbar;
47
class Scrollbar;
- a/Source/WebCore/rendering/HitTestResult.cpp -16 / +16 lines
Lines 310-322 IntRect HitTestResult::imageRect() const a/Source/WebCore/rendering/HitTestResult.cpp_sec1
310
    return m_innerNonSharedNode->renderBox()->absoluteContentQuad().enclosingBoundingBox();
310
    return m_innerNonSharedNode->renderBox()->absoluteContentQuad().enclosingBoundingBox();
311
}
311
}
312
312
313
KURL HitTestResult::absoluteImageURL() const
313
URL HitTestResult::absoluteImageURL() const
314
{
314
{
315
    if (!m_innerNonSharedNode)
315
    if (!m_innerNonSharedNode)
316
        return KURL();
316
        return URL();
317
317
318
    if (!(m_innerNonSharedNode->renderer() && m_innerNonSharedNode->renderer()->isImage()))
318
    if (!(m_innerNonSharedNode->renderer() && m_innerNonSharedNode->renderer()->isImage()))
319
        return KURL();
319
        return URL();
320
320
321
    AtomicString urlString;
321
    AtomicString urlString;
322
    if (m_innerNonSharedNode->hasTagName(embedTag)
322
    if (m_innerNonSharedNode->hasTagName(embedTag)
Lines 330-366 KURL HitTestResult::absoluteImageURL() const a/Source/WebCore/rendering/HitTestResult.cpp_sec2
330
        Element* element = toElement(m_innerNonSharedNode.get());
330
        Element* element = toElement(m_innerNonSharedNode.get());
331
        urlString = element->imageSourceURL();
331
        urlString = element->imageSourceURL();
332
    } else
332
    } else
333
        return KURL();
333
        return URL();
334
334
335
    return m_innerNonSharedNode->document().completeURL(stripLeadingAndTrailingHTMLSpaces(urlString));
335
    return m_innerNonSharedNode->document().completeURL(stripLeadingAndTrailingHTMLSpaces(urlString));
336
}
336
}
337
337
338
KURL HitTestResult::absolutePDFURL() const
338
URL HitTestResult::absolutePDFURL() const
339
{
339
{
340
    if (!m_innerNonSharedNode)
340
    if (!m_innerNonSharedNode)
341
        return KURL();
341
        return URL();
342
342
343
    if (!m_innerNonSharedNode->hasTagName(embedTag) && !m_innerNonSharedNode->hasTagName(objectTag))
343
    if (!m_innerNonSharedNode->hasTagName(embedTag) && !m_innerNonSharedNode->hasTagName(objectTag))
344
        return KURL();
344
        return URL();
345
345
346
    HTMLPlugInImageElement* element = toHTMLPlugInImageElement(m_innerNonSharedNode.get());
346
    HTMLPlugInImageElement* element = toHTMLPlugInImageElement(m_innerNonSharedNode.get());
347
    KURL url = m_innerNonSharedNode->document().completeURL(stripLeadingAndTrailingHTMLSpaces(element->url()));
347
    URL url = m_innerNonSharedNode->document().completeURL(stripLeadingAndTrailingHTMLSpaces(element->url()));
348
    if (!url.isValid())
348
    if (!url.isValid())
349
        return KURL();
349
        return URL();
350
350
351
    if (element->serviceType() == "application/pdf" || (element->serviceType().isEmpty() && url.path().lower().endsWith(".pdf")))
351
    if (element->serviceType() == "application/pdf" || (element->serviceType().isEmpty() && url.path().lower().endsWith(".pdf")))
352
        return url;
352
        return url;
353
    return KURL();
353
    return URL();
354
}
354
}
355
355
356
KURL HitTestResult::absoluteMediaURL() const
356
URL HitTestResult::absoluteMediaURL() const
357
{
357
{
358
#if ENABLE(VIDEO)
358
#if ENABLE(VIDEO)
359
    if (HTMLMediaElement* mediaElt = mediaElement())
359
    if (HTMLMediaElement* mediaElt = mediaElement())
360
        return mediaElt->currentSrc();
360
        return mediaElt->currentSrc();
361
    return KURL();
361
    return URL();
362
#else
362
#else
363
    return KURL();
363
    return URL();
364
#endif
364
#endif
365
}
365
}
366
366
Lines 510-519 void HitTestResult::toggleMediaMuteState() const a/Source/WebCore/rendering/HitTestResult.cpp_sec3
510
#endif
510
#endif
511
}
511
}
512
512
513
KURL HitTestResult::absoluteLinkURL() const
513
URL HitTestResult::absoluteLinkURL() const
514
{
514
{
515
    if (!m_innerURLElement)
515
    if (!m_innerURLElement)
516
        return KURL();
516
        return URL();
517
517
518
    AtomicString urlString;
518
    AtomicString urlString;
519
    if (isHTMLAnchorElement(m_innerURLElement.get()) || isHTMLAreaElement(m_innerURLElement.get()) || m_innerURLElement->hasTagName(linkTag))
519
    if (isHTMLAnchorElement(m_innerURLElement.get()) || isHTMLAreaElement(m_innerURLElement.get()) || m_innerURLElement->hasTagName(linkTag))
Lines 523-529 KURL HitTestResult::absoluteLinkURL() const a/Source/WebCore/rendering/HitTestResult.cpp_sec4
523
        urlString = m_innerURLElement->getAttribute(XLinkNames::hrefAttr);
523
        urlString = m_innerURLElement->getAttribute(XLinkNames::hrefAttr);
524
#endif
524
#endif
525
    else
525
    else
526
        return KURL();
526
        return URL();
527
527
528
    return m_innerURLElement->document().completeURL(stripLeadingAndTrailingHTMLSpaces(urlString));
528
    return m_innerURLElement->document().completeURL(stripLeadingAndTrailingHTMLSpaces(urlString));
529
}
529
}
- a/Source/WebCore/rendering/HitTestResult.h -5 / +5 lines
Lines 41-47 class Frame; a/Source/WebCore/rendering/HitTestResult.h_sec1
41
class HTMLMediaElement;
41
class HTMLMediaElement;
42
#endif
42
#endif
43
class Image;
43
class Image;
44
class KURL;
44
class URL;
45
class Node;
45
class Node;
46
class RenderRegion;
46
class RenderRegion;
47
class Scrollbar;
47
class Scrollbar;
Lines 103-112 public: a/Source/WebCore/rendering/HitTestResult.h_sec2
103
    String titleDisplayString() const;
103
    String titleDisplayString() const;
104
    Image* image() const;
104
    Image* image() const;
105
    IntRect imageRect() const;
105
    IntRect imageRect() const;
106
    KURL absoluteImageURL() const;
106
    URL absoluteImageURL() const;
107
    KURL absolutePDFURL() const;
107
    URL absolutePDFURL() const;
108
    KURL absoluteMediaURL() const;
108
    URL absoluteMediaURL() const;
109
    KURL absoluteLinkURL() const;
109
    URL absoluteLinkURL() const;
110
    String textContent() const;
110
    String textContent() const;
111
    bool isLiveLink() const;
111
    bool isLiveLink() const;
112
    bool isOverLink() const;
112
    bool isOverLink() const;
- a/Source/WebCore/rendering/style/StyleCustomFilterProgram.h -8 / +8 lines
Lines 35-41 a/Source/WebCore/rendering/style/StyleCustomFilterProgram.h_sec1
35
#include "CachedResourceHandle.h"
35
#include "CachedResourceHandle.h"
36
#include "CachedShader.h"
36
#include "CachedShader.h"
37
#include "CustomFilterProgram.h"
37
#include "CustomFilterProgram.h"
38
#include "KURL.h"
38
#include "URL.h"
39
#include "StyleShader.h"
39
#include "StyleShader.h"
40
#include <wtf/FastMalloc.h>
40
#include <wtf/FastMalloc.h>
41
41
Lines 48-55 class StyleCustomFilterProgramCache; a/Source/WebCore/rendering/style/StyleCustomFilterProgram.h_sec2
48
class StyleCustomFilterProgram : public CustomFilterProgram, public CachedResourceClient {
48
class StyleCustomFilterProgram : public CustomFilterProgram, public CachedResourceClient {
49
    WTF_MAKE_FAST_ALLOCATED;
49
    WTF_MAKE_FAST_ALLOCATED;
50
public:
50
public:
51
    static PassRefPtr<StyleCustomFilterProgram> create(KURL vertexShaderURL, PassRefPtr<StyleShader> vertexShader, 
51
    static PassRefPtr<StyleCustomFilterProgram> create(URL vertexShaderURL, PassRefPtr<StyleShader> vertexShader, 
52
        KURL fragmentShaderURL, PassRefPtr<StyleShader> fragmentShader, CustomFilterProgramType programType,
52
        URL fragmentShaderURL, PassRefPtr<StyleShader> fragmentShader, CustomFilterProgramType programType,
53
        const CustomFilterProgramMixSettings& mixSettings, CustomFilterMeshType meshType)
53
        const CustomFilterProgramMixSettings& mixSettings, CustomFilterMeshType meshType)
54
    {
54
    {
55
        return adoptRef(new StyleCustomFilterProgram(vertexShaderURL, vertexShader, fragmentShaderURL, fragmentShader, programType, mixSettings, meshType));
55
        return adoptRef(new StyleCustomFilterProgram(vertexShaderURL, vertexShader, fragmentShaderURL, fragmentShader, programType, mixSettings, meshType));
Lines 143-153 public: a/Source/WebCore/rendering/style/StyleCustomFilterProgram.h_sec3
143
    void setCache(StyleCustomFilterProgramCache* cache) { m_cache = cache; }
143
    void setCache(StyleCustomFilterProgramCache* cache) { m_cache = cache; }
144
    bool inCache() const { return m_cache; }
144
    bool inCache() const { return m_cache; }
145
    
145
    
146
    KURL vertexShaderURL() const { return m_vertexShaderURL; }
146
    URL vertexShaderURL() const { return m_vertexShaderURL; }
147
    KURL fragmentShaderURL() const { return m_fragmentShaderURL; }
147
    URL fragmentShaderURL() const { return m_fragmentShaderURL; }
148
148
149
private:
149
private:
150
    StyleCustomFilterProgram(KURL vertexShaderURL, PassRefPtr<StyleShader> vertexShader, KURL fragmentShaderURL, PassRefPtr<StyleShader> fragmentShader, 
150
    StyleCustomFilterProgram(URL vertexShaderURL, PassRefPtr<StyleShader> vertexShader, URL fragmentShaderURL, PassRefPtr<StyleShader> fragmentShader, 
151
        CustomFilterProgramType programType, const CustomFilterProgramMixSettings& mixSettings, CustomFilterMeshType meshType)
151
        CustomFilterProgramType programType, const CustomFilterProgramMixSettings& mixSettings, CustomFilterMeshType meshType)
152
        : CustomFilterProgram(programType, mixSettings, meshType)
152
        : CustomFilterProgram(programType, mixSettings, meshType)
153
        , m_vertexShader(vertexShader)
153
        , m_vertexShader(vertexShader)
Lines 170-177 private: a/Source/WebCore/rendering/style/StyleCustomFilterProgram.h_sec4
170
170
171
    // The URLs form the key of the StyleCustomFilterProgram in the cache and are used
171
    // The URLs form the key of the StyleCustomFilterProgram in the cache and are used
172
    // to lookup the StyleCustomFilterProgram when it's removed from the cache.
172
    // to lookup the StyleCustomFilterProgram when it's removed from the cache.
173
    KURL m_vertexShaderURL;
173
    URL m_vertexShaderURL;
174
    KURL m_fragmentShaderURL;
174
    URL m_fragmentShaderURL;
175
175
176
    // The Cache is responsible of invalidating this reference.
176
    // The Cache is responsible of invalidating this reference.
177
    StyleCustomFilterProgramCache* m_cache;
177
    StyleCustomFilterProgramCache* m_cache;
- a/Source/WebCore/svg/SVGCursorElement.cpp -1 / +1 lines
Lines 132-138 void SVGCursorElement::svgAttributeChanged(const QualifiedName& attrName) a/Source/WebCore/svg/SVGCursorElement.cpp_sec1
132
        (*it)->setNeedsStyleRecalc();
132
        (*it)->setNeedsStyleRecalc();
133
}
133
}
134
134
135
void SVGCursorElement::addSubresourceAttributeURLs(ListHashSet<KURL>& urls) const
135
void SVGCursorElement::addSubresourceAttributeURLs(ListHashSet<URL>& urls) const
136
{
136
{
137
    SVGElement::addSubresourceAttributeURLs(urls);
137
    SVGElement::addSubresourceAttributeURLs(urls);
138
138
- a/Source/WebCore/svg/SVGCursorElement.h -1 / +1 lines
Lines 56-62 private: a/Source/WebCore/svg/SVGCursorElement.h_sec1
56
56
57
    virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE { return false; }
57
    virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE { return false; }
58
58
59
    virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const;
59
    virtual void addSubresourceAttributeURLs(ListHashSet<URL>&) const;
60
60
61
    BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGCursorElement)
61
    BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGCursorElement)
62
        DECLARE_ANIMATED_LENGTH(X, x)
62
        DECLARE_ANIMATED_LENGTH(X, x)
- a/Source/WebCore/svg/SVGDocument.cpp -1 / +1 lines
Lines 35-41 a/Source/WebCore/svg/SVGDocument.cpp_sec1
35
35
36
namespace WebCore {
36
namespace WebCore {
37
37
38
SVGDocument::SVGDocument(Frame* frame, const KURL& url)
38
SVGDocument::SVGDocument(Frame* frame, const URL& url)
39
    : Document(frame, url, SVGDocumentClass)
39
    : Document(frame, url, SVGDocumentClass)
40
{
40
{
41
}
41
}
- a/Source/WebCore/svg/SVGDocument.h -2 / +2 lines
Lines 33-39 class SVGSVGElement; a/Source/WebCore/svg/SVGDocument.h_sec1
33
33
34
class SVGDocument FINAL : public Document {
34
class SVGDocument FINAL : public Document {
35
public:
35
public:
36
    static PassRefPtr<SVGDocument> create(Frame* frame, const KURL& url)
36
    static PassRefPtr<SVGDocument> create(Frame* frame, const URL& url)
37
    {
37
    {
38
        return adoptRef(new SVGDocument(frame, url));
38
        return adoptRef(new SVGDocument(frame, url));
39
    }
39
    }
Lines 49-55 public: a/Source/WebCore/svg/SVGDocument.h_sec2
49
    void updatePan(const FloatPoint& pos) const;
49
    void updatePan(const FloatPoint& pos) const;
50
50
51
private:
51
private:
52
    SVGDocument(Frame*, const KURL&);
52
    SVGDocument(Frame*, const URL&);
53
53
54
    virtual bool childShouldCreateRenderer(const Node*) const;
54
    virtual bool childShouldCreateRenderer(const Node*) const;
55
55
- a/Source/WebCore/svg/SVGFEImageElement.cpp -1 / +1 lines
Lines 209-215 PassRefPtr<FilterEffect> SVGFEImageElement::build(SVGFilterBuilder*, Filter* fil a/Source/WebCore/svg/SVGFEImageElement.cpp_sec1
209
    return FEImage::createWithIRIReference(filter, document(), href(), preserveAspectRatio());
209
    return FEImage::createWithIRIReference(filter, document(), href(), preserveAspectRatio());
210
}
210
}
211
211
212
void SVGFEImageElement::addSubresourceAttributeURLs(ListHashSet<KURL>& urls) const
212
void SVGFEImageElement::addSubresourceAttributeURLs(ListHashSet<URL>& urls) const
213
{
213
{
214
    SVGFilterPrimitiveStandardAttributes::addSubresourceAttributeURLs(urls);
214
    SVGFilterPrimitiveStandardAttributes::addSubresourceAttributeURLs(urls);
215
215
- a/Source/WebCore/svg/SVGFEImageElement.h -1 / +1 lines
Lines 51-57 private: a/Source/WebCore/svg/SVGFEImageElement.h_sec1
51
    virtual void svgAttributeChanged(const QualifiedName&);
51
    virtual void svgAttributeChanged(const QualifiedName&);
52
    virtual void notifyFinished(CachedResource*);
52
    virtual void notifyFinished(CachedResource*);
53
53
54
    virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const;
54
    virtual void addSubresourceAttributeURLs(ListHashSet<URL>&) const;
55
    virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*, Filter*);
55
    virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*, Filter*);
56
56
57
    void clearResourceReferences();
57
    void clearResourceReferences();
- a/Source/WebCore/svg/SVGImageElement.cpp -1 / +1 lines
Lines 219-225 const AtomicString& SVGImageElement::imageSourceURL() const a/Source/WebCore/svg/SVGImageElement.cpp_sec1
219
    return getAttribute(XLinkNames::hrefAttr);
219
    return getAttribute(XLinkNames::hrefAttr);
220
}
220
}
221
221
222
void SVGImageElement::addSubresourceAttributeURLs(ListHashSet<KURL>& urls) const
222
void SVGImageElement::addSubresourceAttributeURLs(ListHashSet<URL>& urls) const
223
{
223
{
224
    SVGGraphicsElement::addSubresourceAttributeURLs(urls);
224
    SVGGraphicsElement::addSubresourceAttributeURLs(urls);
225
225
- a/Source/WebCore/svg/SVGImageElement.h -1 / +1 lines
Lines 56-62 private: a/Source/WebCore/svg/SVGImageElement.h_sec1
56
    virtual RenderElement* createRenderer(RenderArena&, RenderStyle&);
56
    virtual RenderElement* createRenderer(RenderArena&, RenderStyle&);
57
57
58
    virtual const AtomicString& imageSourceURL() const OVERRIDE;
58
    virtual const AtomicString& imageSourceURL() const OVERRIDE;
59
    virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const;
59
    virtual void addSubresourceAttributeURLs(ListHashSet<URL>&) const;
60
60
61
    virtual bool haveLoadedRequiredResources();
61
    virtual bool haveLoadedRequiredResources();
62
62
- a/Source/WebCore/svg/SVGImageLoader.cpp -2 / +2 lines
Lines 50-58 void SVGImageLoader::dispatchLoadEvent() a/Source/WebCore/svg/SVGImageLoader.cpp_sec1
50
50
51
String SVGImageLoader::sourceURI(const AtomicString& attribute) const
51
String SVGImageLoader::sourceURI(const AtomicString& attribute) const
52
{
52
{
53
    KURL base = element()->baseURI();
53
    URL base = element()->baseURI();
54
    if (base.isValid())
54
    if (base.isValid())
55
        return KURL(base, stripLeadingAndTrailingHTMLSpaces(attribute)).string();
55
        return URL(base, stripLeadingAndTrailingHTMLSpaces(attribute)).string();
56
    return element()->document().completeURL(stripLeadingAndTrailingHTMLSpaces(attribute));
56
    return element()->document().completeURL(stripLeadingAndTrailingHTMLSpaces(attribute));
57
}
57
}
58
58
- a/Source/WebCore/svg/SVGScriptElement.cpp -1 / +1 lines
Lines 153-159 void SVGScriptElement::setType(const String& type) a/Source/WebCore/svg/SVGScriptElement.cpp_sec1
153
    m_type = type;
153
    m_type = type;
154
}
154
}
155
155
156
void SVGScriptElement::addSubresourceAttributeURLs(ListHashSet<KURL>& urls) const
156
void SVGScriptElement::addSubresourceAttributeURLs(ListHashSet<URL>& urls) const
157
{
157
{
158
    SVGElement::addSubresourceAttributeURLs(urls);
158
    SVGElement::addSubresourceAttributeURLs(urls);
159
159
- a/Source/WebCore/svg/SVGScriptElement.h -1 / +1 lines
Lines 53-59 private: a/Source/WebCore/svg/SVGScriptElement.h_sec1
53
    virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
53
    virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
54
    virtual void finishParsingChildren();
54
    virtual void finishParsingChildren();
55
55
56
    virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const;
56
    virtual void addSubresourceAttributeURLs(ListHashSet<URL>&) const;
57
57
58
    virtual bool haveLoadedRequiredResources() { return SVGExternalResourcesRequired::haveLoadedRequiredResources(); }
58
    virtual bool haveLoadedRequiredResources() { return SVGExternalResourcesRequired::haveLoadedRequiredResources(); }
59
59
- a/Source/WebCore/svg/SVGURIReference.cpp -10 / +10 lines
Lines 26-32 a/Source/WebCore/svg/SVGURIReference.cpp_sec1
26
#include "Attribute.h"
26
#include "Attribute.h"
27
#include "Document.h"
27
#include "Document.h"
28
#include "Element.h"
28
#include "Element.h"
29
#include "KURL.h"
29
#include "URL.h"
30
#include "XLinkNames.h"
30
#include "XLinkNames.h"
31
31
32
namespace WebCore {
32
namespace WebCore {
Lines 52-60 String SVGURIReference::fragmentIdentifierFromIRIString(const String& url, Docum a/Source/WebCore/svg/SVGURIReference.cpp_sec2
52
    if (start == notFound)
52
    if (start == notFound)
53
        return emptyString();
53
        return emptyString();
54
54
55
    KURL base = start ? KURL(document.baseURI(), url.substring(0, start)) : document.baseURI();
55
    URL base = start ? URL(document.baseURI(), url.substring(0, start)) : document.baseURI();
56
    String fragmentIdentifier = url.substring(start);
56
    String fragmentIdentifier = url.substring(start);
57
    KURL kurl(base, fragmentIdentifier);
57
    URL kurl(base, fragmentIdentifier);
58
    if (equalIgnoringFragmentIdentifier(kurl, document.url()))
58
    if (equalIgnoringFragmentIdentifier(kurl, document.url()))
59
        return fragmentIdentifier.substring(1);
59
        return fragmentIdentifier.substring(1);
60
60
Lines 62-89 String SVGURIReference::fragmentIdentifierFromIRIString(const String& url, Docum a/Source/WebCore/svg/SVGURIReference.cpp_sec3
62
    return emptyString();
62
    return emptyString();
63
}
63
}
64
64
65
static inline KURL urlFromIRIStringWithFragmentIdentifier(const String& url, Document& document, String& fragmentIdentifier)
65
static inline URL urlFromIRIStringWithFragmentIdentifier(const String& url, Document& document, String& fragmentIdentifier)
66
{
66
{
67
    size_t startOfFragmentIdentifier = url.find('#');
67
    size_t startOfFragmentIdentifier = url.find('#');
68
    if (startOfFragmentIdentifier == notFound)
68
    if (startOfFragmentIdentifier == notFound)
69
        return KURL();
69
        return URL();
70
70
71
    // Exclude the '#' character when determining the fragmentIdentifier.
71
    // Exclude the '#' character when determining the fragmentIdentifier.
72
    fragmentIdentifier = url.substring(startOfFragmentIdentifier + 1);
72
    fragmentIdentifier = url.substring(startOfFragmentIdentifier + 1);
73
    if (startOfFragmentIdentifier) {
73
    if (startOfFragmentIdentifier) {
74
        KURL base(document.baseURI(), url.substring(0, startOfFragmentIdentifier));
74
        URL base(document.baseURI(), url.substring(0, startOfFragmentIdentifier));
75
        return KURL(base, url.substring(startOfFragmentIdentifier));
75
        return URL(base, url.substring(startOfFragmentIdentifier));
76
    }
76
    }
77
77
78
    return KURL(document.baseURI(), url.substring(startOfFragmentIdentifier));
78
    return URL(document.baseURI(), url.substring(startOfFragmentIdentifier));
79
}
79
}
80
80
81
Element* SVGURIReference::targetElementFromIRIString(const String& iri, Document& document, String* fragmentIdentifier, Document* externalDocument)
81
Element* SVGURIReference::targetElementFromIRIString(const String& iri, Document& document, String* fragmentIdentifier, Document* externalDocument)
82
{
82
{
83
    // If there's no fragment identifier contained within the IRI string, we can't lookup an element.
83
    // If there's no fragment identifier contained within the IRI string, we can't lookup an element.
84
    String id;
84
    String id;
85
    KURL url = urlFromIRIStringWithFragmentIdentifier(iri, document, id);
85
    URL url = urlFromIRIStringWithFragmentIdentifier(iri, document, id);
86
    if (url == KURL())
86
    if (url == URL())
87
        return 0;
87
        return 0;
88
88
89
    if (fragmentIdentifier)
89
    if (fragmentIdentifier)
- a/Source/WebCore/svg/SVGURIReference.h -1 / +1 lines
Lines 47-53 public: a/Source/WebCore/svg/SVGURIReference.h_sec1
47
            return false;
47
            return false;
48
48
49
        // If the URI matches our documents URL, we're dealing with a local reference.
49
        // If the URI matches our documents URL, we're dealing with a local reference.
50
        KURL url = document.completeURL(uri);
50
        URL url = document.completeURL(uri);
51
        return !equalIgnoringFragmentIdentifier(url, document.url());
51
        return !equalIgnoringFragmentIdentifier(url, document.url());
52
    }
52
    }
53
53
- a/Source/WebCore/svg/SVGUseElement.cpp -1 / +1 lines
Lines 241-247 void SVGUseElement::svgAttributeChanged(const QualifiedName& attrName) a/Source/WebCore/svg/SVGUseElement.cpp_sec1
241
    if (SVGURIReference::isKnownAttribute(attrName)) {
241
    if (SVGURIReference::isKnownAttribute(attrName)) {
242
        bool isExternalReference = isExternalURIReference(href(), document());
242
        bool isExternalReference = isExternalURIReference(href(), document());
243
        if (isExternalReference) {
243
        if (isExternalReference) {
244
            KURL url = document().completeURL(href());
244
            URL url = document().completeURL(href());
245
            if (url.hasFragmentIdentifier()) {
245
            if (url.hasFragmentIdentifier()) {
246
                CachedResourceRequest request(ResourceRequest(url.string()));
246
                CachedResourceRequest request(ResourceRequest(url.string()));
247
                request.setInitiator(this);
247
                request.setInitiator(this);
- a/Source/WebCore/svg/graphics/SVGImage.cpp -1 / +1 lines
Lines 372-378 bool SVGImage::dataChanged(bool allDataReceived) a/Source/WebCore/svg/graphics/SVGImage.cpp_sec1
372
372
373
        ASSERT(loader.activeDocumentLoader()); // DocumentLoader should have been created by frame->init().
373
        ASSERT(loader.activeDocumentLoader()); // DocumentLoader should have been created by frame->init().
374
        loader.activeDocumentLoader()->writer()->setMIMEType("image/svg+xml");
374
        loader.activeDocumentLoader()->writer()->setMIMEType("image/svg+xml");
375
        loader.activeDocumentLoader()->writer()->begin(KURL()); // create the empty document
375
        loader.activeDocumentLoader()->writer()->begin(URL()); // create the empty document
376
        loader.activeDocumentLoader()->writer()->addData(data()->data(), data()->size());
376
        loader.activeDocumentLoader()->writer()->addData(data()->data(), data()->size());
377
        loader.activeDocumentLoader()->writer()->end();
377
        loader.activeDocumentLoader()->writer()->end();
378
378
- a/Source/WebCore/workers/AbstractWorker.cpp -6 / +6 lines
Lines 60-87 void AbstractWorker::contextDestroyed() a/Source/WebCore/workers/AbstractWorker.cpp_sec1
60
    ActiveDOMObject::contextDestroyed(); 
60
    ActiveDOMObject::contextDestroyed(); 
61
}
61
}
62
62
63
KURL AbstractWorker::resolveURL(const String& url, ExceptionCode& ec)
63
URL AbstractWorker::resolveURL(const String& url, ExceptionCode& ec)
64
{
64
{
65
    if (url.isEmpty()) {
65
    if (url.isEmpty()) {
66
        ec = SYNTAX_ERR;
66
        ec = SYNTAX_ERR;
67
        return KURL();
67
        return URL();
68
    }
68
    }
69
69
70
    // FIXME: This should use the dynamic global scope (bug #27887)
70
    // FIXME: This should use the dynamic global scope (bug #27887)
71
    KURL scriptURL = scriptExecutionContext()->completeURL(url);
71
    URL scriptURL = scriptExecutionContext()->completeURL(url);
72
    if (!scriptURL.isValid()) {
72
    if (!scriptURL.isValid()) {
73
        ec = SYNTAX_ERR;
73
        ec = SYNTAX_ERR;
74
        return KURL();
74
        return URL();
75
    }
75
    }
76
76
77
    if (!scriptExecutionContext()->securityOrigin()->canRequest(scriptURL)) {
77
    if (!scriptExecutionContext()->securityOrigin()->canRequest(scriptURL)) {
78
        ec = SECURITY_ERR;
78
        ec = SECURITY_ERR;
79
        return KURL();
79
        return URL();
80
    }
80
    }
81
81
82
    if (scriptExecutionContext()->contentSecurityPolicy() && !scriptExecutionContext()->contentSecurityPolicy()->allowScriptFromSource(scriptURL)) {
82
    if (scriptExecutionContext()->contentSecurityPolicy() && !scriptExecutionContext()->contentSecurityPolicy()->allowScriptFromSource(scriptURL)) {
83
        ec = SECURITY_ERR;
83
        ec = SECURITY_ERR;
84
        return KURL();
84
        return URL();
85
    }
85
    }
86
86
87
    return scriptURL;
87
    return scriptURL;
- a/Source/WebCore/workers/AbstractWorker.h -2 / +2 lines
Lines 44-50 a/Source/WebCore/workers/AbstractWorker.h_sec1
44
44
45
namespace WebCore {
45
namespace WebCore {
46
46
47
    class KURL;
47
    class URL;
48
    class ScriptExecutionContext;
48
    class ScriptExecutionContext;
49
49
50
    class AbstractWorker : public RefCounted<AbstractWorker>, public ActiveDOMObject, public EventTargetWithInlineData {
50
    class AbstractWorker : public RefCounted<AbstractWorker>, public ActiveDOMObject, public EventTargetWithInlineData {
Lines 62-68 namespace WebCore { a/Source/WebCore/workers/AbstractWorker.h_sec2
62
62
63
    protected:
63
    protected:
64
        // Helper function that converts a URL to an absolute URL and checks the result for validity.
64
        // Helper function that converts a URL to an absolute URL and checks the result for validity.
65
        KURL resolveURL(const String& url, ExceptionCode& ec);
65
        URL resolveURL(const String& url, ExceptionCode& ec);
66
        intptr_t asID() const { return reinterpret_cast<intptr_t>(this); }
66
        intptr_t asID() const { return reinterpret_cast<intptr_t>(this); }
67
67
68
    private:
68
    private:
- a/Source/WebCore/workers/DedicatedWorkerGlobalScope.cpp -2 / +2 lines
Lines 40-53 a/Source/WebCore/workers/DedicatedWorkerGlobalScope.cpp_sec1
40
40
41
namespace WebCore {
41
namespace WebCore {
42
42
43
PassRefPtr<DedicatedWorkerGlobalScope> DedicatedWorkerGlobalScope::create(const KURL& url, const String& userAgent, PassOwnPtr<GroupSettings> settings, DedicatedWorkerThread* thread, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType contentSecurityPolicyType, PassRefPtr<SecurityOrigin> topOrigin)
43
PassRefPtr<DedicatedWorkerGlobalScope> DedicatedWorkerGlobalScope::create(const URL& url, const String& userAgent, PassOwnPtr<GroupSettings> settings, DedicatedWorkerThread* thread, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType contentSecurityPolicyType, PassRefPtr<SecurityOrigin> topOrigin)
44
{
44
{
45
    RefPtr<DedicatedWorkerGlobalScope> context = adoptRef(new DedicatedWorkerGlobalScope(url, userAgent, settings, thread, topOrigin));
45
    RefPtr<DedicatedWorkerGlobalScope> context = adoptRef(new DedicatedWorkerGlobalScope(url, userAgent, settings, thread, topOrigin));
46
    context->applyContentSecurityPolicyFromString(contentSecurityPolicy, contentSecurityPolicyType);
46
    context->applyContentSecurityPolicyFromString(contentSecurityPolicy, contentSecurityPolicyType);
47
    return context.release();
47
    return context.release();
48
}
48
}
49
49
50
DedicatedWorkerGlobalScope::DedicatedWorkerGlobalScope(const KURL& url, const String& userAgent, PassOwnPtr<GroupSettings> settings, DedicatedWorkerThread* thread, PassRefPtr<SecurityOrigin> topOrigin)
50
DedicatedWorkerGlobalScope::DedicatedWorkerGlobalScope(const URL& url, const String& userAgent, PassOwnPtr<GroupSettings> settings, DedicatedWorkerThread* thread, PassRefPtr<SecurityOrigin> topOrigin)
51
    : WorkerGlobalScope(url, userAgent, settings, thread, topOrigin)
51
    : WorkerGlobalScope(url, userAgent, settings, thread, topOrigin)
52
{
52
{
53
}
53
}
- a/Source/WebCore/workers/DedicatedWorkerGlobalScope.h -2 / +2 lines
Lines 44-50 namespace WebCore { a/Source/WebCore/workers/DedicatedWorkerGlobalScope.h_sec1
44
    class DedicatedWorkerGlobalScope : public WorkerGlobalScope {
44
    class DedicatedWorkerGlobalScope : public WorkerGlobalScope {
45
    public:
45
    public:
46
        typedef WorkerGlobalScope Base;
46
        typedef WorkerGlobalScope Base;
47
        static PassRefPtr<DedicatedWorkerGlobalScope> create(const KURL&, const String& userAgent, PassOwnPtr<GroupSettings>, DedicatedWorkerThread*, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType contentSecurityPolicyType, PassRefPtr<SecurityOrigin> topOrigin);
47
        static PassRefPtr<DedicatedWorkerGlobalScope> create(const URL&, const String& userAgent, PassOwnPtr<GroupSettings>, DedicatedWorkerThread*, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType contentSecurityPolicyType, PassRefPtr<SecurityOrigin> topOrigin);
48
        virtual ~DedicatedWorkerGlobalScope();
48
        virtual ~DedicatedWorkerGlobalScope();
49
49
50
        virtual bool isDedicatedWorkerGlobalScope() const OVERRIDE { return true; }
50
        virtual bool isDedicatedWorkerGlobalScope() const OVERRIDE { return true; }
Lines 64-70 namespace WebCore { a/Source/WebCore/workers/DedicatedWorkerGlobalScope.h_sec2
64
        DedicatedWorkerThread* thread();
64
        DedicatedWorkerThread* thread();
65
65
66
    private:
66
    private:
67
        DedicatedWorkerGlobalScope(const KURL&, const String& userAgent, PassOwnPtr<GroupSettings>, DedicatedWorkerThread*, PassRefPtr<SecurityOrigin> topOrigin);
67
        DedicatedWorkerGlobalScope(const URL&, const String& userAgent, PassOwnPtr<GroupSettings>, DedicatedWorkerThread*, PassRefPtr<SecurityOrigin> topOrigin);
68
    };
68
    };
69
69
70
} // namespace WebCore
70
} // namespace WebCore
- a/Source/WebCore/workers/DedicatedWorkerThread.cpp -3 / +3 lines
Lines 40-51 a/Source/WebCore/workers/DedicatedWorkerThread.cpp_sec1
40
40
41
namespace WebCore {
41
namespace WebCore {
42
42
43
PassRefPtr<DedicatedWorkerThread> DedicatedWorkerThread::create(const KURL& scriptURL, const String& userAgent, const GroupSettings* settings, const String& sourceCode, WorkerLoaderProxy& workerLoaderProxy, WorkerObjectProxy& workerObjectProxy, WorkerThreadStartMode startMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType contentSecurityPolicyType, const SecurityOrigin* topOrigin)
43
PassRefPtr<DedicatedWorkerThread> DedicatedWorkerThread::create(const URL& scriptURL, const String& userAgent, const GroupSettings* settings, const String& sourceCode, WorkerLoaderProxy& workerLoaderProxy, WorkerObjectProxy& workerObjectProxy, WorkerThreadStartMode startMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType contentSecurityPolicyType, const SecurityOrigin* topOrigin)
44
{
44
{
45
    return adoptRef(new DedicatedWorkerThread(scriptURL, userAgent, settings, sourceCode, workerLoaderProxy, workerObjectProxy, startMode, contentSecurityPolicy, contentSecurityPolicyType, topOrigin));
45
    return adoptRef(new DedicatedWorkerThread(scriptURL, userAgent, settings, sourceCode, workerLoaderProxy, workerObjectProxy, startMode, contentSecurityPolicy, contentSecurityPolicyType, topOrigin));
46
}
46
}
47
47
48
DedicatedWorkerThread::DedicatedWorkerThread(const KURL& url, const String& userAgent, const GroupSettings* settings, const String& sourceCode, WorkerLoaderProxy& workerLoaderProxy, WorkerObjectProxy& workerObjectProxy, WorkerThreadStartMode startMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType contentSecurityPolicyType, const SecurityOrigin* topOrigin)
48
DedicatedWorkerThread::DedicatedWorkerThread(const URL& url, const String& userAgent, const GroupSettings* settings, const String& sourceCode, WorkerLoaderProxy& workerLoaderProxy, WorkerObjectProxy& workerObjectProxy, WorkerThreadStartMode startMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType contentSecurityPolicyType, const SecurityOrigin* topOrigin)
49
    : WorkerThread(url, userAgent, settings, sourceCode, workerLoaderProxy, workerObjectProxy, startMode, contentSecurityPolicy, contentSecurityPolicyType, topOrigin)
49
    : WorkerThread(url, userAgent, settings, sourceCode, workerLoaderProxy, workerObjectProxy, startMode, contentSecurityPolicy, contentSecurityPolicyType, topOrigin)
50
    , m_workerObjectProxy(workerObjectProxy)
50
    , m_workerObjectProxy(workerObjectProxy)
51
{
51
{
Lines 55-61 DedicatedWorkerThread::~DedicatedWorkerThread() a/Source/WebCore/workers/DedicatedWorkerThread.cpp_sec2
55
{
55
{
56
}
56
}
57
57
58
PassRefPtr<WorkerGlobalScope> DedicatedWorkerThread::createWorkerGlobalScope(const KURL& url, const String& userAgent, PassOwnPtr<GroupSettings> settings, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType contentSecurityPolicyType, PassRefPtr<SecurityOrigin> topOrigin)
58
PassRefPtr<WorkerGlobalScope> DedicatedWorkerThread::createWorkerGlobalScope(const URL& url, const String& userAgent, PassOwnPtr<GroupSettings> settings, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType contentSecurityPolicyType, PassRefPtr<SecurityOrigin> topOrigin)
59
{
59
{
60
    return DedicatedWorkerGlobalScope::create(url, userAgent, settings, this, contentSecurityPolicy, contentSecurityPolicyType, topOrigin);
60
    return DedicatedWorkerGlobalScope::create(url, userAgent, settings, this, contentSecurityPolicy, contentSecurityPolicyType, topOrigin);
61
}
61
}
- a/Source/WebCore/workers/DedicatedWorkerThread.h -3 / +3 lines
Lines 41-56 namespace WebCore { a/Source/WebCore/workers/DedicatedWorkerThread.h_sec1
41
41
42
    class DedicatedWorkerThread : public WorkerThread {
42
    class DedicatedWorkerThread : public WorkerThread {
43
    public:
43
    public:
44
        static PassRefPtr<DedicatedWorkerThread> create(const KURL& scriptURL, const String& userAgent, const GroupSettings*, const String& sourceCode, WorkerLoaderProxy&, WorkerObjectProxy&, WorkerThreadStartMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType, const SecurityOrigin* topOrigin);
44
        static PassRefPtr<DedicatedWorkerThread> create(const URL& scriptURL, const String& userAgent, const GroupSettings*, const String& sourceCode, WorkerLoaderProxy&, WorkerObjectProxy&, WorkerThreadStartMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType, const SecurityOrigin* topOrigin);
45
        WorkerObjectProxy& workerObjectProxy() const { return m_workerObjectProxy; }
45
        WorkerObjectProxy& workerObjectProxy() const { return m_workerObjectProxy; }
46
        virtual ~DedicatedWorkerThread();
46
        virtual ~DedicatedWorkerThread();
47
47
48
    protected:
48
    protected:
49
        virtual PassRefPtr<WorkerGlobalScope> createWorkerGlobalScope(const KURL&, const String& userAgent, PassOwnPtr<GroupSettings>, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType, PassRefPtr<SecurityOrigin> topOrigin) OVERRIDE;
49
        virtual PassRefPtr<WorkerGlobalScope> createWorkerGlobalScope(const URL&, const String& userAgent, PassOwnPtr<GroupSettings>, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType, PassRefPtr<SecurityOrigin> topOrigin) OVERRIDE;
50
        virtual void runEventLoop() OVERRIDE;
50
        virtual void runEventLoop() OVERRIDE;
51
51
52
    private:
52
    private:
53
        DedicatedWorkerThread(const KURL&, const String& userAgent, const GroupSettings*, const String& sourceCode, WorkerLoaderProxy&, WorkerObjectProxy&, WorkerThreadStartMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType, const SecurityOrigin* topOrigin);
53
        DedicatedWorkerThread(const URL&, const String& userAgent, const GroupSettings*, const String& sourceCode, WorkerLoaderProxy&, WorkerObjectProxy&, WorkerThreadStartMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType, const SecurityOrigin* topOrigin);
54
54
55
        WorkerObjectProxy& m_workerObjectProxy;
55
        WorkerObjectProxy& m_workerObjectProxy;
56
    };
56
    };
- a/Source/WebCore/workers/DefaultSharedWorkerRepository.cpp -13 / +13 lines
Lines 64-82 namespace WebCore { a/Source/WebCore/workers/DefaultSharedWorkerRepository.cpp_sec1
64
64
65
class SharedWorkerProxy : public ThreadSafeRefCounted<SharedWorkerProxy>, public WorkerLoaderProxy, public WorkerReportingProxy {
65
class SharedWorkerProxy : public ThreadSafeRefCounted<SharedWorkerProxy>, public WorkerLoaderProxy, public WorkerReportingProxy {
66
public:
66
public:
67
    static PassRefPtr<SharedWorkerProxy> create(const String& name, const KURL& url, PassRefPtr<SecurityOrigin> origin) { return adoptRef(new SharedWorkerProxy(name, url, origin)); }
67
    static PassRefPtr<SharedWorkerProxy> create(const String& name, const URL& url, PassRefPtr<SecurityOrigin> origin) { return adoptRef(new SharedWorkerProxy(name, url, origin)); }
68
68
69
    void setThread(PassRefPtr<SharedWorkerThread> thread) { m_thread = thread; }
69
    void setThread(PassRefPtr<SharedWorkerThread> thread) { m_thread = thread; }
70
    SharedWorkerThread* thread() { return m_thread.get(); }
70
    SharedWorkerThread* thread() { return m_thread.get(); }
71
    bool isClosing() const { return m_closing; }
71
    bool isClosing() const { return m_closing; }
72
    KURL url() const
72
    URL url() const
73
    {
73
    {
74
        // Don't use m_url.copy() because it isn't a threadsafe method.
74
        // Don't use m_url.copy() because it isn't a threadsafe method.
75
        return KURL(ParsedURLString, m_url.string().isolatedCopy());
75
        return URL(ParsedURLString, m_url.string().isolatedCopy());
76
    }
76
    }
77
77
78
    String name() const { return m_name.isolatedCopy(); }
78
    String name() const { return m_name.isolatedCopy(); }
79
    bool matches(const String& name, PassRefPtr<SecurityOrigin> origin, const KURL& urlToMatch) const;
79
    bool matches(const String& name, PassRefPtr<SecurityOrigin> origin, const URL& urlToMatch) const;
80
80
81
    // WorkerLoaderProxy
81
    // WorkerLoaderProxy
82
    virtual void postTaskToLoader(PassOwnPtr<ScriptExecutionContext::Task>);
82
    virtual void postTaskToLoader(PassOwnPtr<ScriptExecutionContext::Task>);
Lines 103-114 public: a/Source/WebCore/workers/DefaultSharedWorkerRepository.cpp_sec2
103
    GroupSettings* groupSettings() const; // Page GroupSettings used by worker thread.
103
    GroupSettings* groupSettings() const; // Page GroupSettings used by worker thread.
104
104
105
private:
105
private:
106
    SharedWorkerProxy(const String& name, const KURL&, PassRefPtr<SecurityOrigin>);
106
    SharedWorkerProxy(const String& name, const URL&, PassRefPtr<SecurityOrigin>);
107
    void close();
107
    void close();
108
108
109
    bool m_closing;
109
    bool m_closing;
110
    String m_name;
110
    String m_name;
111
    KURL m_url;
111
    URL m_url;
112
    // The thread is freed when the proxy is destroyed, so we need to make sure that the proxy stays around until the SharedWorkerGlobalScope exits.
112
    // The thread is freed when the proxy is destroyed, so we need to make sure that the proxy stays around until the SharedWorkerGlobalScope exits.
113
    RefPtr<SharedWorkerThread> m_thread;
113
    RefPtr<SharedWorkerThread> m_thread;
114
    RefPtr<SecurityOrigin> m_origin;
114
    RefPtr<SecurityOrigin> m_origin;
Lines 117-123 private: a/Source/WebCore/workers/DefaultSharedWorkerRepository.cpp_sec3
117
    Mutex m_workerDocumentsLock;
117
    Mutex m_workerDocumentsLock;
118
};
118
};
119
119
120
SharedWorkerProxy::SharedWorkerProxy(const String& name, const KURL& url, PassRefPtr<SecurityOrigin> origin)
120
SharedWorkerProxy::SharedWorkerProxy(const String& name, const URL& url, PassRefPtr<SecurityOrigin> origin)
121
    : m_closing(false)
121
    : m_closing(false)
122
    , m_name(name.isolatedCopy())
122
    , m_name(name.isolatedCopy())
123
    , m_url(url.copy())
123
    , m_url(url.copy())
Lines 127-133 SharedWorkerProxy::SharedWorkerProxy(const String& name, const KURL& url, PassRe a/Source/WebCore/workers/DefaultSharedWorkerRepository.cpp_sec4
127
    ASSERT(m_origin->hasOneRef());
127
    ASSERT(m_origin->hasOneRef());
128
}
128
}
129
129
130
bool SharedWorkerProxy::matches(const String& name, PassRefPtr<SecurityOrigin> origin, const KURL& urlToMatch) const
130
bool SharedWorkerProxy::matches(const String& name, PassRefPtr<SecurityOrigin> origin, const URL& urlToMatch) const
131
{
131
{
132
    // If the origins don't match, or the names don't match, then this is not the proxy we are looking for.
132
    // If the origins don't match, or the names don't match, then this is not the proxy we are looking for.
133
    if (!origin->equal(m_origin.get()))
133
    if (!origin->equal(m_origin.get()))
Lines 289-295 private: a/Source/WebCore/workers/DefaultSharedWorkerRepository.cpp_sec5
289
class SharedWorkerScriptLoader : public RefCounted<SharedWorkerScriptLoader>, private WorkerScriptLoaderClient {
289
class SharedWorkerScriptLoader : public RefCounted<SharedWorkerScriptLoader>, private WorkerScriptLoaderClient {
290
public:
290
public:
291
    SharedWorkerScriptLoader(PassRefPtr<SharedWorker>, PassOwnPtr<MessagePortChannel>, PassRefPtr<SharedWorkerProxy>);
291
    SharedWorkerScriptLoader(PassRefPtr<SharedWorker>, PassOwnPtr<MessagePortChannel>, PassRefPtr<SharedWorkerProxy>);
292
    void load(const KURL&);
292
    void load(const URL&);
293
293
294
private:
294
private:
295
    // WorkerScriptLoaderClient callbacks
295
    // WorkerScriptLoaderClient callbacks
Lines 309-315 SharedWorkerScriptLoader::SharedWorkerScriptLoader(PassRefPtr<SharedWorker> work a/Source/WebCore/workers/DefaultSharedWorkerRepository.cpp_sec6
309
{
309
{
310
}
310
}
311
311
312
void SharedWorkerScriptLoader::load(const KURL& url)
312
void SharedWorkerScriptLoader::load(const URL& url)
313
{
313
{
314
    // Stay alive (and keep the SharedWorker and JS wrapper alive) until the load finishes.
314
    // Stay alive (and keep the SharedWorker and JS wrapper alive) until the load finishes.
315
    this->ref();
315
    this->ref();
Lines 401-407 void DefaultSharedWorkerRepository::documentDetached(Document* document) a/Source/WebCore/workers/DefaultSharedWorkerRepository.cpp_sec7
401
        m_proxies[i]->documentDetached(document);
401
        m_proxies[i]->documentDetached(document);
402
}
402
}
403
403
404
void DefaultSharedWorkerRepository::connectToWorker(PassRefPtr<SharedWorker> worker, PassOwnPtr<MessagePortChannel> port, const KURL& url, const String& name, ExceptionCode& ec)
404
void DefaultSharedWorkerRepository::connectToWorker(PassRefPtr<SharedWorker> worker, PassOwnPtr<MessagePortChannel> port, const URL& url, const String& name, ExceptionCode& ec)
405
{
405
{
406
    MutexLocker lock(m_lock);
406
    MutexLocker lock(m_lock);
407
    ASSERT(worker->scriptExecutionContext()->securityOrigin()->canAccess(SecurityOrigin::create(url).get()));
407
    ASSERT(worker->scriptExecutionContext()->securityOrigin()->canAccess(SecurityOrigin::create(url).get()));
Lines 426-437 void DefaultSharedWorkerRepository::connectToWorker(PassRefPtr<SharedWorker> wor a/Source/WebCore/workers/DefaultSharedWorkerRepository.cpp_sec8
426
}
426
}
427
427
428
// Creates a new SharedWorkerProxy or returns an existing one from the repository. Must only be called while the repository mutex is held.
428
// Creates a new SharedWorkerProxy or returns an existing one from the repository. Must only be called while the repository mutex is held.
429
PassRefPtr<SharedWorkerProxy> DefaultSharedWorkerRepository::getProxy(const String& name, const KURL& url)
429
PassRefPtr<SharedWorkerProxy> DefaultSharedWorkerRepository::getProxy(const String& name, const URL& url)
430
{
430
{
431
    // Look for an existing worker, and create one if it doesn't exist.
431
    // Look for an existing worker, and create one if it doesn't exist.
432
    // Items in the cache are freed on another thread, so do a threadsafe copy of the URL before creating the origin,
432
    // Items in the cache are freed on another thread, so do a threadsafe copy of the URL before creating the origin,
433
    // to make sure no references to external strings linger.
433
    // to make sure no references to external strings linger.
434
    RefPtr<SecurityOrigin> origin = SecurityOrigin::create(KURL(ParsedURLString, url.string().isolatedCopy()));
434
    RefPtr<SecurityOrigin> origin = SecurityOrigin::create(URL(ParsedURLString, url.string().isolatedCopy()));
435
    for (unsigned i = 0; i < m_proxies.size(); i++) {
435
    for (unsigned i = 0; i < m_proxies.size(); i++) {
436
        if (!m_proxies[i]->isClosing() && m_proxies[i]->matches(name, origin, url))
436
        if (!m_proxies[i]->isClosing() && m_proxies[i]->matches(name, origin, url))
437
            return m_proxies[i];
437
            return m_proxies[i];
- a/Source/WebCore/workers/DefaultSharedWorkerRepository.h -3 / +3 lines
Lines 46-52 a/Source/WebCore/workers/DefaultSharedWorkerRepository.h_sec1
46
namespace WebCore {
46
namespace WebCore {
47
47
48
    class Document;
48
    class Document;
49
    class KURL;
49
    class URL;
50
    class MessagePortChannel;
50
    class MessagePortChannel;
51
    class ScriptExecutionContext;
51
    class ScriptExecutionContext;
52
    class SharedWorker;
52
    class SharedWorker;
Lines 65-71 namespace WebCore { a/Source/WebCore/workers/DefaultSharedWorkerRepository.h_sec2
65
        void workerScriptLoaded(SharedWorkerProxy&, const String& userAgent, const String& workerScript, PassOwnPtr<MessagePortChannel>, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType);
65
        void workerScriptLoaded(SharedWorkerProxy&, const String& userAgent, const String& workerScript, PassOwnPtr<MessagePortChannel>, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType);
66
66
67
        // Internal implementation of SharedWorkerRepository::connect()
67
        // Internal implementation of SharedWorkerRepository::connect()
68
        void connectToWorker(PassRefPtr<SharedWorker>, PassOwnPtr<MessagePortChannel>, const KURL&, const String& name, ExceptionCode&);
68
        void connectToWorker(PassRefPtr<SharedWorker>, PassOwnPtr<MessagePortChannel>, const URL&, const String& name, ExceptionCode&);
69
69
70
        // Notification that a document has been detached.
70
        // Notification that a document has been detached.
71
        void documentDetached(Document*);
71
        void documentDetached(Document*);
Lines 80-86 namespace WebCore { a/Source/WebCore/workers/DefaultSharedWorkerRepository.h_sec3
80
        DefaultSharedWorkerRepository();
80
        DefaultSharedWorkerRepository();
81
        ~DefaultSharedWorkerRepository();
81
        ~DefaultSharedWorkerRepository();
82
82
83
        PassRefPtr<SharedWorkerProxy> getProxy(const String& name, const KURL&);
83
        PassRefPtr<SharedWorkerProxy> getProxy(const String& name, const URL&);
84
        // Mutex used to protect internal data structures.
84
        // Mutex used to protect internal data structures.
85
        Mutex m_lock;
85
        Mutex m_lock;
86
86
- a/Source/WebCore/workers/SharedWorker.cpp -2 / +2 lines
Lines 38-44 a/Source/WebCore/workers/SharedWorker.cpp_sec1
38
#include "ExceptionCode.h"
38
#include "ExceptionCode.h"
39
#include "FeatureObserver.h"
39
#include "FeatureObserver.h"
40
#include "InspectorInstrumentation.h"
40
#include "InspectorInstrumentation.h"
41
#include "KURL.h"
41
#include "URL.h"
42
#include "MessageChannel.h"
42
#include "MessageChannel.h"
43
#include "MessagePort.h"
43
#include "MessagePort.h"
44
#include "ScriptExecutionContext.h"
44
#include "ScriptExecutionContext.h"
Lines 66-72 PassRefPtr<SharedWorker> SharedWorker::create(ScriptExecutionContext* context, c a/Source/WebCore/workers/SharedWorker.cpp_sec2
66
66
67
    worker->suspendIfNeeded();
67
    worker->suspendIfNeeded();
68
68
69
    KURL scriptURL = worker->resolveURL(url, ec);
69
    URL scriptURL = worker->resolveURL(url, ec);
70
    if (scriptURL.isEmpty())
70
    if (scriptURL.isEmpty())
71
        return 0;
71
        return 0;
72
72
- a/Source/WebCore/workers/SharedWorkerGlobalScope.cpp -2 / +2 lines
Lines 53-66 PassRefPtr<MessageEvent> createConnectEvent(PassRefPtr<MessagePort> prpPort) a/Source/WebCore/workers/SharedWorkerGlobalScope.cpp_sec1
53
}
53
}
54
54
55
// static
55
// static
56
PassRefPtr<SharedWorkerGlobalScope> SharedWorkerGlobalScope::create(const String& name, const KURL& url, const String& userAgent, PassOwnPtr<GroupSettings> settings, SharedWorkerThread* thread, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType contentSecurityPolicyType)
56
PassRefPtr<SharedWorkerGlobalScope> SharedWorkerGlobalScope::create(const String& name, const URL& url, const String& userAgent, PassOwnPtr<GroupSettings> settings, SharedWorkerThread* thread, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType contentSecurityPolicyType)
57
{
57
{
58
    RefPtr<SharedWorkerGlobalScope> context = adoptRef(new SharedWorkerGlobalScope(name, url, userAgent, settings, thread));
58
    RefPtr<SharedWorkerGlobalScope> context = adoptRef(new SharedWorkerGlobalScope(name, url, userAgent, settings, thread));
59
    context->applyContentSecurityPolicyFromString(contentSecurityPolicy, contentSecurityPolicyType);
59
    context->applyContentSecurityPolicyFromString(contentSecurityPolicy, contentSecurityPolicyType);
60
    return context.release();
60
    return context.release();
61
}
61
}
62
62
63
SharedWorkerGlobalScope::SharedWorkerGlobalScope(const String& name, const KURL& url, const String& userAgent, PassOwnPtr<GroupSettings> settings, SharedWorkerThread* thread)
63
SharedWorkerGlobalScope::SharedWorkerGlobalScope(const String& name, const URL& url, const String& userAgent, PassOwnPtr<GroupSettings> settings, SharedWorkerThread* thread)
64
    : WorkerGlobalScope(url, userAgent, settings, thread, 0)
64
    : WorkerGlobalScope(url, userAgent, settings, thread, 0)
65
    , m_name(name)
65
    , m_name(name)
66
{
66
{
- a/Source/WebCore/workers/SharedWorkerGlobalScope.h -2 / +2 lines
Lines 44-50 namespace WebCore { a/Source/WebCore/workers/SharedWorkerGlobalScope.h_sec1
44
    class SharedWorkerGlobalScope : public WorkerGlobalScope {
44
    class SharedWorkerGlobalScope : public WorkerGlobalScope {
45
    public:
45
    public:
46
        typedef WorkerGlobalScope Base;
46
        typedef WorkerGlobalScope Base;
47
        static PassRefPtr<SharedWorkerGlobalScope> create(const String& name, const KURL&, const String& userAgent, PassOwnPtr<GroupSettings>, SharedWorkerThread*, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType contentSecurityPolicyType);
47
        static PassRefPtr<SharedWorkerGlobalScope> create(const String& name, const URL&, const String& userAgent, PassOwnPtr<GroupSettings>, SharedWorkerThread*, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType contentSecurityPolicyType);
48
        virtual ~SharedWorkerGlobalScope();
48
        virtual ~SharedWorkerGlobalScope();
49
49
50
        virtual bool isSharedWorkerGlobalScope() const OVERRIDE { return true; }
50
        virtual bool isSharedWorkerGlobalScope() const OVERRIDE { return true; }
Lines 59-65 namespace WebCore { a/Source/WebCore/workers/SharedWorkerGlobalScope.h_sec2
59
        SharedWorkerThread* thread();
59
        SharedWorkerThread* thread();
60
60
61
    private:
61
    private:
62
        SharedWorkerGlobalScope(const String& name, const KURL&, const String& userAgent, PassOwnPtr<GroupSettings>, SharedWorkerThread*);
62
        SharedWorkerGlobalScope(const String& name, const URL&, const String& userAgent, PassOwnPtr<GroupSettings>, SharedWorkerThread*);
63
        virtual void logExceptionToConsole(const String& errorMessage, const String& sourceURL, int lineNumber, int columnNumber, PassRefPtr<ScriptCallStack>) OVERRIDE;
63
        virtual void logExceptionToConsole(const String& errorMessage, const String& sourceURL, int lineNumber, int columnNumber, PassRefPtr<ScriptCallStack>) OVERRIDE;
64
64
65
        String m_name;
65
        String m_name;
- a/Source/WebCore/workers/SharedWorkerRepository.cpp -1 / +1 lines
Lines 41-47 bool SharedWorkerRepository::isAvailable() a/Source/WebCore/workers/SharedWorkerRepository.cpp_sec1
41
    return DefaultSharedWorkerRepository::instance().isAvailable();
41
    return DefaultSharedWorkerRepository::instance().isAvailable();
42
}
42
}
43
43
44
void SharedWorkerRepository::connect(PassRefPtr<SharedWorker> worker, PassOwnPtr<MessagePortChannel> port, const KURL& url, const String& name, ExceptionCode& ec)
44
void SharedWorkerRepository::connect(PassRefPtr<SharedWorker> worker, PassOwnPtr<MessagePortChannel> port, const URL& url, const String& name, ExceptionCode& ec)
45
{
45
{
46
    DefaultSharedWorkerRepository::instance().connectToWorker(worker, port, url, name, ec);
46
    DefaultSharedWorkerRepository::instance().connectToWorker(worker, port, url, name, ec);
47
}
47
}
- a/Source/WebCore/workers/SharedWorkerRepository.h -2 / +2 lines
Lines 40-46 a/Source/WebCore/workers/SharedWorkerRepository.h_sec1
40
namespace WebCore {
40
namespace WebCore {
41
41
42
    class Document;
42
    class Document;
43
    class KURL;
43
    class URL;
44
    class MessagePortChannel;
44
    class MessagePortChannel;
45
    class SharedWorker;
45
    class SharedWorker;
46
46
Lines 53-59 namespace WebCore { a/Source/WebCore/workers/SharedWorkerRepository.h_sec2
53
        static bool isAvailable();
53
        static bool isAvailable();
54
54
55
        // Connects the passed SharedWorker object with the specified worker thread, creating a new thread if necessary.
55
        // Connects the passed SharedWorker object with the specified worker thread, creating a new thread if necessary.
56
        static void connect(PassRefPtr<SharedWorker>, PassOwnPtr<MessagePortChannel>, const KURL&, const String& name, ExceptionCode&);
56
        static void connect(PassRefPtr<SharedWorker>, PassOwnPtr<MessagePortChannel>, const URL&, const String& name, ExceptionCode&);
57
57
58
        // Invoked when a document has been detached.
58
        // Invoked when a document has been detached.
59
        static void documentDetached(Document*);
59
        static void documentDetached(Document*);
- a/Source/WebCore/workers/SharedWorkerThread.cpp -3 / +3 lines
Lines 38-49 a/Source/WebCore/workers/SharedWorkerThread.cpp_sec1
38
38
39
namespace WebCore {
39
namespace WebCore {
40
40
41
PassRefPtr<SharedWorkerThread> SharedWorkerThread::create(const String& name, const KURL& scriptURL, const String& userAgent, const GroupSettings* settings, const String& sourceCode, WorkerLoaderProxy& workerLoaderProxy, WorkerReportingProxy& workerReportingProxy, WorkerThreadStartMode startMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType contentSecurityPolicyType)
41
PassRefPtr<SharedWorkerThread> SharedWorkerThread::create(const String& name, const URL& scriptURL, const String& userAgent, const GroupSettings* settings, const String& sourceCode, WorkerLoaderProxy& workerLoaderProxy, WorkerReportingProxy& workerReportingProxy, WorkerThreadStartMode startMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType contentSecurityPolicyType)
42
{
42
{
43
    return adoptRef(new SharedWorkerThread(name, scriptURL, userAgent, settings, sourceCode, workerLoaderProxy, workerReportingProxy, startMode, contentSecurityPolicy, contentSecurityPolicyType));
43
    return adoptRef(new SharedWorkerThread(name, scriptURL, userAgent, settings, sourceCode, workerLoaderProxy, workerReportingProxy, startMode, contentSecurityPolicy, contentSecurityPolicyType));
44
}
44
}
45
45
46
SharedWorkerThread::SharedWorkerThread(const String& name, const KURL& url, const String& userAgent, const GroupSettings* settings, const String& sourceCode, WorkerLoaderProxy& workerLoaderProxy, WorkerReportingProxy& workerReportingProxy, WorkerThreadStartMode startMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType contentSecurityPolicyType)
46
SharedWorkerThread::SharedWorkerThread(const String& name, const URL& url, const String& userAgent, const GroupSettings* settings, const String& sourceCode, WorkerLoaderProxy& workerLoaderProxy, WorkerReportingProxy& workerReportingProxy, WorkerThreadStartMode startMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType contentSecurityPolicyType)
47
    : WorkerThread(url, userAgent, settings, sourceCode, workerLoaderProxy, workerReportingProxy, startMode, contentSecurityPolicy, contentSecurityPolicyType, 0)
47
    : WorkerThread(url, userAgent, settings, sourceCode, workerLoaderProxy, workerReportingProxy, startMode, contentSecurityPolicy, contentSecurityPolicyType, 0)
48
    , m_name(name.isolatedCopy())
48
    , m_name(name.isolatedCopy())
49
{
49
{
Lines 53-59 SharedWorkerThread::~SharedWorkerThread() a/Source/WebCore/workers/SharedWorkerThread.cpp_sec2
53
{
53
{
54
}
54
}
55
55
56
PassRefPtr<WorkerGlobalScope> SharedWorkerThread::createWorkerGlobalScope(const KURL& url, const String& userAgent, PassOwnPtr<GroupSettings> settings, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType contentSecurityPolicyType, PassRefPtr<SecurityOrigin>)
56
PassRefPtr<WorkerGlobalScope> SharedWorkerThread::createWorkerGlobalScope(const URL& url, const String& userAgent, PassOwnPtr<GroupSettings> settings, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType contentSecurityPolicyType, PassRefPtr<SecurityOrigin>)
57
{
57
{
58
    return SharedWorkerGlobalScope::create(m_name, url, userAgent, settings, this, contentSecurityPolicy, contentSecurityPolicyType);
58
    return SharedWorkerGlobalScope::create(m_name, url, userAgent, settings, this, contentSecurityPolicy, contentSecurityPolicyType);
59
}
59
}
- a/Source/WebCore/workers/SharedWorkerThread.h -3 / +3 lines
Lines 39-52 namespace WebCore { a/Source/WebCore/workers/SharedWorkerThread.h_sec1
39
39
40
    class SharedWorkerThread : public WorkerThread {
40
    class SharedWorkerThread : public WorkerThread {
41
    public:
41
    public:
42
        static PassRefPtr<SharedWorkerThread> create(const String& name, const KURL&, const String& userAgent, const GroupSettings*, const String& sourceCode, WorkerLoaderProxy&, WorkerReportingProxy&, WorkerThreadStartMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType);
42
        static PassRefPtr<SharedWorkerThread> create(const String& name, const URL&, const String& userAgent, const GroupSettings*, const String& sourceCode, WorkerLoaderProxy&, WorkerReportingProxy&, WorkerThreadStartMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType);
43
        virtual ~SharedWorkerThread();
43
        virtual ~SharedWorkerThread();
44
44
45
    protected:
45
    protected:
46
        virtual PassRefPtr<WorkerGlobalScope> createWorkerGlobalScope(const KURL&, const String& userAgent, PassOwnPtr<GroupSettings>, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType, PassRefPtr<SecurityOrigin> topOrigin) OVERRIDE;
46
        virtual PassRefPtr<WorkerGlobalScope> createWorkerGlobalScope(const URL&, const String& userAgent, PassOwnPtr<GroupSettings>, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType, PassRefPtr<SecurityOrigin> topOrigin) OVERRIDE;
47
47
48
    private:
48
    private:
49
        SharedWorkerThread(const String& name, const KURL&, const String& userAgent, const GroupSettings*, const String& sourceCode, WorkerLoaderProxy&, WorkerReportingProxy&, WorkerThreadStartMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType);
49
        SharedWorkerThread(const String& name, const URL&, const String& userAgent, const GroupSettings*, const String& sourceCode, WorkerLoaderProxy&, WorkerReportingProxy&, WorkerThreadStartMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType);
50
50
51
        String m_name;
51
        String m_name;
52
    };
52
    };
- a/Source/WebCore/workers/Worker.cpp -1 / +1 lines
Lines 84-90 PassRefPtr<Worker> Worker::create(ScriptExecutionContext* context, const String& a/Source/WebCore/workers/Worker.cpp_sec1
84
84
85
    worker->suspendIfNeeded();
85
    worker->suspendIfNeeded();
86
86
87
    KURL scriptURL = worker->resolveURL(url, ec);
87
    URL scriptURL = worker->resolveURL(url, ec);
88
    if (scriptURL.isEmpty())
88
    if (scriptURL.isEmpty())
89
        return 0;
89
        return 0;
90
90
- a/Source/WebCore/workers/WorkerGlobalScope.cpp -11 / +11 lines
Lines 40-46 a/Source/WebCore/workers/WorkerGlobalScope.cpp_sec1
40
#include "Event.h"
40
#include "Event.h"
41
#include "EventException.h"
41
#include "EventException.h"
42
#include "InspectorConsoleInstrumentation.h"
42
#include "InspectorConsoleInstrumentation.h"
43
#include "KURL.h"
43
#include "URL.h"
44
#include "MessagePort.h"
44
#include "MessagePort.h"
45
#include "NotImplemented.h"
45
#include "NotImplemented.h"
46
#include "ScheduledAction.h"
46
#include "ScheduledAction.h"
Lines 84-90 public: a/Source/WebCore/workers/WorkerGlobalScope.cpp_sec2
84
    virtual bool isCleanupTask() const { return true; }
84
    virtual bool isCleanupTask() const { return true; }
85
};
85
};
86
86
87
WorkerGlobalScope::WorkerGlobalScope(const KURL& url, const String& userAgent, PassOwnPtr<GroupSettings> settings, WorkerThread* thread, PassRefPtr<SecurityOrigin> topOrigin)
87
WorkerGlobalScope::WorkerGlobalScope(const URL& url, const String& userAgent, PassOwnPtr<GroupSettings> settings, WorkerThread* thread, PassRefPtr<SecurityOrigin> topOrigin)
88
    : m_url(url)
88
    : m_url(url)
89
    , m_userAgent(userAgent)
89
    , m_userAgent(userAgent)
90
    , m_groupSettings(settings)
90
    , m_groupSettings(settings)
Lines 117-133 void WorkerGlobalScope::applyContentSecurityPolicyFromString(const String& polic a/Source/WebCore/workers/WorkerGlobalScope.cpp_sec3
117
    contentSecurityPolicy()->didReceiveHeader(policy, contentSecurityPolicyType);
117
    contentSecurityPolicy()->didReceiveHeader(policy, contentSecurityPolicyType);
118
}
118
}
119
119
120
KURL WorkerGlobalScope::completeURL(const String& url) const
120
URL WorkerGlobalScope::completeURL(const String& url) const
121
{
121
{
122
    // Always return a null URL when passed a null string.
122
    // Always return a null URL when passed a null string.
123
    // FIXME: Should we change the KURL constructor to have this behavior?
123
    // FIXME: Should we change the URL constructor to have this behavior?
124
    if (url.isNull())
124
    if (url.isNull())
125
        return KURL();
125
        return URL();
126
    // Always use UTF-8 in Workers.
126
    // Always use UTF-8 in Workers.
127
    return KURL(m_url, url);
127
    return URL(m_url, url);
128
}
128
}
129
129
130
String WorkerGlobalScope::userAgent(const KURL&) const
130
String WorkerGlobalScope::userAgent(const URL&) const
131
{
131
{
132
    return m_userAgent;
132
    return m_userAgent;
133
}
133
}
Lines 217-234 void WorkerGlobalScope::importScripts(const Vector<String>& urls, ExceptionCode& a/Source/WebCore/workers/WorkerGlobalScope.cpp_sec4
217
    ASSERT(contentSecurityPolicy());
217
    ASSERT(contentSecurityPolicy());
218
    ec = 0;
218
    ec = 0;
219
    Vector<String>::const_iterator urlsEnd = urls.end();
219
    Vector<String>::const_iterator urlsEnd = urls.end();
220
    Vector<KURL> completedURLs;
220
    Vector<URL> completedURLs;
221
    for (Vector<String>::const_iterator it = urls.begin(); it != urlsEnd; ++it) {
221
    for (Vector<String>::const_iterator it = urls.begin(); it != urlsEnd; ++it) {
222
        const KURL& url = scriptExecutionContext()->completeURL(*it);
222
        const URL& url = scriptExecutionContext()->completeURL(*it);
223
        if (!url.isValid()) {
223
        if (!url.isValid()) {
224
            ec = SYNTAX_ERR;
224
            ec = SYNTAX_ERR;
225
            return;
225
            return;
226
        }
226
        }
227
        completedURLs.append(url);
227
        completedURLs.append(url);
228
    }
228
    }
229
    Vector<KURL>::const_iterator end = completedURLs.end();
229
    Vector<URL>::const_iterator end = completedURLs.end();
230
230
231
    for (Vector<KURL>::const_iterator it = completedURLs.begin(); it != end; ++it) {
231
    for (Vector<URL>::const_iterator it = completedURLs.begin(); it != end; ++it) {
232
        RefPtr<WorkerScriptLoader> scriptLoader(WorkerScriptLoader::create());
232
        RefPtr<WorkerScriptLoader> scriptLoader(WorkerScriptLoader::create());
233
#if PLATFORM(BLACKBERRY)
233
#if PLATFORM(BLACKBERRY)
234
        scriptLoader->setTargetType(ResourceRequest::TargetIsScript);
234
        scriptLoader->setTargetType(ResourceRequest::TargetIsScript);
- a/Source/WebCore/workers/WorkerGlobalScope.h -5 / +5 lines
Lines 65-75 namespace WebCore { a/Source/WebCore/workers/WorkerGlobalScope.h_sec1
65
        virtual bool isSharedWorkerGlobalScope() const { return false; }
65
        virtual bool isSharedWorkerGlobalScope() const { return false; }
66
        virtual bool isDedicatedWorkerGlobalScope() const { return false; }
66
        virtual bool isDedicatedWorkerGlobalScope() const { return false; }
67
67
68
        virtual const KURL& url() const OVERRIDE FINAL { return m_url; }
68
        virtual const URL& url() const OVERRIDE FINAL { return m_url; }
69
        virtual KURL completeURL(const String&) const OVERRIDE FINAL;
69
        virtual URL completeURL(const String&) const OVERRIDE FINAL;
70
70
71
        const GroupSettings* groupSettings() { return m_groupSettings.get(); }
71
        const GroupSettings* groupSettings() { return m_groupSettings.get(); }
72
        virtual String userAgent(const KURL&) const;
72
        virtual String userAgent(const URL&) const;
73
73
74
        virtual void disableEval(const String& errorMessage) OVERRIDE;
74
        virtual void disableEval(const String& errorMessage) OVERRIDE;
75
75
Lines 139-145 namespace WebCore { a/Source/WebCore/workers/WorkerGlobalScope.h_sec2
139
        virtual SecurityOrigin* topOrigin() const OVERRIDE { return m_topOrigin.get(); }
139
        virtual SecurityOrigin* topOrigin() const OVERRIDE { return m_topOrigin.get(); }
140
140
141
    protected:
141
    protected:
142
        WorkerGlobalScope(const KURL&, const String& userAgent, PassOwnPtr<GroupSettings>, WorkerThread*, PassRefPtr<SecurityOrigin> topOrigin);
142
        WorkerGlobalScope(const URL&, const String& userAgent, PassOwnPtr<GroupSettings>, WorkerThread*, PassRefPtr<SecurityOrigin> topOrigin);
143
        void applyContentSecurityPolicyFromString(const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType);
143
        void applyContentSecurityPolicyFromString(const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType);
144
144
145
        virtual void logExceptionToConsole(const String& errorMessage, const String& sourceURL, int lineNumber, int columnNumber, PassRefPtr<ScriptCallStack>) OVERRIDE;
145
        virtual void logExceptionToConsole(const String& errorMessage, const String& sourceURL, int lineNumber, int columnNumber, PassRefPtr<ScriptCallStack>) OVERRIDE;
Lines 159-165 namespace WebCore { a/Source/WebCore/workers/WorkerGlobalScope.h_sec3
159
159
160
        virtual WorkerEventQueue& eventQueue() const OVERRIDE FINAL;
160
        virtual WorkerEventQueue& eventQueue() const OVERRIDE FINAL;
161
161
162
        KURL m_url;
162
        URL m_url;
163
        String m_userAgent;
163
        String m_userAgent;
164
        OwnPtr<GroupSettings> m_groupSettings;
164
        OwnPtr<GroupSettings> m_groupSettings;
165
165
- a/Source/WebCore/workers/WorkerGlobalScopeProxy.h -2 / +2 lines
Lines 40-46 a/Source/WebCore/workers/WorkerGlobalScopeProxy.h_sec1
40
40
41
namespace WebCore {
41
namespace WebCore {
42
42
43
    class KURL;
43
    class URL;
44
    class Worker;
44
    class Worker;
45
45
46
    // A proxy to talk to the worker context.
46
    // A proxy to talk to the worker context.
Lines 50-56 namespace WebCore { a/Source/WebCore/workers/WorkerGlobalScopeProxy.h_sec2
50
50
51
        virtual ~WorkerGlobalScopeProxy() { }
51
        virtual ~WorkerGlobalScopeProxy() { }
52
52
53
        virtual void startWorkerGlobalScope(const KURL& scriptURL, const String& userAgent, const String& sourceCode, WorkerThreadStartMode) = 0;
53
        virtual void startWorkerGlobalScope(const URL& scriptURL, const String& userAgent, const String& sourceCode, WorkerThreadStartMode) = 0;
54
54
55
        virtual void terminateWorkerGlobalScope() = 0;
55
        virtual void terminateWorkerGlobalScope() = 0;
56
56
- a/Source/WebCore/workers/WorkerLocation.h -5 / +5 lines
Lines 29-35 a/Source/WebCore/workers/WorkerLocation.h_sec1
29
29
30
#if ENABLE(WORKERS)
30
#if ENABLE(WORKERS)
31
31
32
#include "KURL.h"
32
#include "URL.h"
33
#include <wtf/PassRefPtr.h>
33
#include <wtf/PassRefPtr.h>
34
#include <wtf/RefCounted.h>
34
#include <wtf/RefCounted.h>
35
#include <wtf/RefPtr.h>
35
#include <wtf/RefPtr.h>
Lines 39-50 namespace WebCore { a/Source/WebCore/workers/WorkerLocation.h_sec2
39
39
40
    class WorkerLocation : public RefCounted<WorkerLocation> {
40
    class WorkerLocation : public RefCounted<WorkerLocation> {
41
    public:
41
    public:
42
        static PassRefPtr<WorkerLocation> create(const KURL& url)
42
        static PassRefPtr<WorkerLocation> create(const URL& url)
43
        {
43
        {
44
            return adoptRef(new WorkerLocation(url));
44
            return adoptRef(new WorkerLocation(url));
45
        }
45
        }
46
46
47
        const KURL& url() const { return m_url; }
47
        const URL& url() const { return m_url; }
48
48
49
        String href() const;
49
        String href() const;
50
50
Lines 60-68 namespace WebCore { a/Source/WebCore/workers/WorkerLocation.h_sec3
60
        String toString() const { return href(); }
60
        String toString() const { return href(); }
61
61
62
    private:
62
    private:
63
        explicit WorkerLocation(const KURL& url) : m_url(url) { }
63
        explicit WorkerLocation(const URL& url) : m_url(url) { }
64
64
65
        KURL m_url;
65
        URL m_url;
66
    };
66
    };
67
67
68
} // namespace WebCore
68
} // namespace WebCore
- a/Source/WebCore/workers/WorkerMessagingProxy.cpp -1 / +1 lines
Lines 296-302 WorkerMessagingProxy::~WorkerMessagingProxy() a/Source/WebCore/workers/WorkerMessagingProxy.cpp_sec1
296
           || (m_scriptExecutionContext->isWorkerGlobalScope() && currentThread() == static_cast<WorkerGlobalScope*>(m_scriptExecutionContext.get())->thread()->threadID()));
296
           || (m_scriptExecutionContext->isWorkerGlobalScope() && currentThread() == static_cast<WorkerGlobalScope*>(m_scriptExecutionContext.get())->thread()->threadID()));
297
}
297
}
298
298
299
void WorkerMessagingProxy::startWorkerGlobalScope(const KURL& scriptURL, const String& userAgent, const String& sourceCode, WorkerThreadStartMode startMode)
299
void WorkerMessagingProxy::startWorkerGlobalScope(const URL& scriptURL, const String& userAgent, const String& sourceCode, WorkerThreadStartMode startMode)
300
{
300
{
301
    // FIXME: This need to be revisited when we support nested worker one day
301
    // FIXME: This need to be revisited when we support nested worker one day
302
    ASSERT(m_scriptExecutionContext->isDocument());
302
    ASSERT(m_scriptExecutionContext->isDocument());
- a/Source/WebCore/workers/WorkerMessagingProxy.h -1 / +1 lines
Lines 53-59 namespace WebCore { a/Source/WebCore/workers/WorkerMessagingProxy.h_sec1
53
53
54
        // Implementations of WorkerGlobalScopeProxy.
54
        // Implementations of WorkerGlobalScopeProxy.
55
        // (Only use these methods in the worker object thread.)
55
        // (Only use these methods in the worker object thread.)
56
        virtual void startWorkerGlobalScope(const KURL& scriptURL, const String& userAgent, const String& sourceCode, WorkerThreadStartMode) OVERRIDE;
56
        virtual void startWorkerGlobalScope(const URL& scriptURL, const String& userAgent, const String& sourceCode, WorkerThreadStartMode) OVERRIDE;
57
        virtual void terminateWorkerGlobalScope() OVERRIDE;
57
        virtual void terminateWorkerGlobalScope() OVERRIDE;
58
        virtual void postMessageToWorkerGlobalScope(PassRefPtr<SerializedScriptValue>, PassOwnPtr<MessagePortChannelArray>) OVERRIDE;
58
        virtual void postMessageToWorkerGlobalScope(PassRefPtr<SerializedScriptValue>, PassOwnPtr<MessagePortChannelArray>) OVERRIDE;
59
        virtual bool hasPendingActivity() const OVERRIDE;
59
        virtual bool hasPendingActivity() const OVERRIDE;
- a/Source/WebCore/workers/WorkerScriptLoader.cpp -3 / +3 lines
Lines 57-63 WorkerScriptLoader::~WorkerScriptLoader() a/Source/WebCore/workers/WorkerScriptLoader.cpp_sec1
57
{
57
{
58
}
58
}
59
59
60
void WorkerScriptLoader::loadSynchronously(ScriptExecutionContext* scriptExecutionContext, const KURL& url, CrossOriginRequestPolicy crossOriginRequestPolicy)
60
void WorkerScriptLoader::loadSynchronously(ScriptExecutionContext* scriptExecutionContext, const URL& url, CrossOriginRequestPolicy crossOriginRequestPolicy)
61
{
61
{
62
    m_url = url;
62
    m_url = url;
63
63
Lines 75-81 void WorkerScriptLoader::loadSynchronously(ScriptExecutionContext* scriptExecuti a/Source/WebCore/workers/WorkerScriptLoader.cpp_sec2
75
    WorkerThreadableLoader::loadResourceSynchronously(static_cast<WorkerGlobalScope*>(scriptExecutionContext), *request, *this, options);
75
    WorkerThreadableLoader::loadResourceSynchronously(static_cast<WorkerGlobalScope*>(scriptExecutionContext), *request, *this, options);
76
}
76
}
77
    
77
    
78
void WorkerScriptLoader::loadAsynchronously(ScriptExecutionContext* scriptExecutionContext, const KURL& url, CrossOriginRequestPolicy crossOriginRequestPolicy, WorkerScriptLoaderClient* client)
78
void WorkerScriptLoader::loadAsynchronously(ScriptExecutionContext* scriptExecutionContext, const URL& url, CrossOriginRequestPolicy crossOriginRequestPolicy, WorkerScriptLoaderClient* client)
79
{
79
{
80
    ASSERT(client);
80
    ASSERT(client);
81
    m_client = client;
81
    m_client = client;
Lines 95-101 void WorkerScriptLoader::loadAsynchronously(ScriptExecutionContext* scriptExecut a/Source/WebCore/workers/WorkerScriptLoader.cpp_sec3
95
    m_threadableLoader = ThreadableLoader::create(scriptExecutionContext, this, *request, options);
95
    m_threadableLoader = ThreadableLoader::create(scriptExecutionContext, this, *request, options);
96
}
96
}
97
97
98
const KURL& WorkerScriptLoader::responseURL() const
98
const URL& WorkerScriptLoader::responseURL() const
99
{
99
{
100
    ASSERT(!failed());
100
    ASSERT(!failed());
101
    return m_responseURL;
101
    return m_responseURL;
- a/Source/WebCore/workers/WorkerScriptLoader.h -7 / +7 lines
Lines 30-36 a/Source/WebCore/workers/WorkerScriptLoader.h_sec1
30
30
31
#if ENABLE(WORKERS)
31
#if ENABLE(WORKERS)
32
32
33
#include "KURL.h"
33
#include "URL.h"
34
#include "ResourceRequest.h"
34
#include "ResourceRequest.h"
35
#include "ThreadableLoader.h"
35
#include "ThreadableLoader.h"
36
#include "ThreadableLoaderClient.h"
36
#include "ThreadableLoaderClient.h"
Lines 56-69 namespace WebCore { a/Source/WebCore/workers/WorkerScriptLoader.h_sec2
56
            return adoptRef(new WorkerScriptLoader());
56
            return adoptRef(new WorkerScriptLoader());
57
        }
57
        }
58
58
59
        void loadSynchronously(ScriptExecutionContext*, const KURL&, CrossOriginRequestPolicy);
59
        void loadSynchronously(ScriptExecutionContext*, const URL&, CrossOriginRequestPolicy);
60
        void loadAsynchronously(ScriptExecutionContext*, const KURL&, CrossOriginRequestPolicy, WorkerScriptLoaderClient*);
60
        void loadAsynchronously(ScriptExecutionContext*, const URL&, CrossOriginRequestPolicy, WorkerScriptLoaderClient*);
61
61
62
        void notifyError();
62
        void notifyError();
63
63
64
        String script();
64
        String script();
65
        const KURL& url() const { return m_url; }
65
        const URL& url() const { return m_url; }
66
        const KURL& responseURL() const;
66
        const URL& responseURL() const;
67
        bool failed() const { return m_failed; }
67
        bool failed() const { return m_failed; }
68
        unsigned long identifier() const { return m_identifier; }
68
        unsigned long identifier() const { return m_identifier; }
69
69
Lines 91-98 namespace WebCore { a/Source/WebCore/workers/WorkerScriptLoader.h_sec3
91
        String m_responseEncoding;        
91
        String m_responseEncoding;        
92
        RefPtr<TextResourceDecoder> m_decoder;
92
        RefPtr<TextResourceDecoder> m_decoder;
93
        StringBuilder m_script;
93
        StringBuilder m_script;
94
        KURL m_url;
94
        URL m_url;
95
        KURL m_responseURL;
95
        URL m_responseURL;
96
        bool m_failed;
96
        bool m_failed;
97
        unsigned long m_identifier;
97
        unsigned long m_identifier;
98
        bool m_finishing;
98
        bool m_finishing;
- a/Source/WebCore/workers/WorkerThread.cpp -6 / +6 lines
Lines 32-42 a/Source/WebCore/workers/WorkerThread.cpp_sec1
32
32
33
#include "DedicatedWorkerGlobalScope.h"
33
#include "DedicatedWorkerGlobalScope.h"
34
#include "InspectorInstrumentation.h"
34
#include "InspectorInstrumentation.h"
35
#include "KURL.h"
36
#include "ScriptSourceCode.h"
35
#include "ScriptSourceCode.h"
37
#include "ScriptValue.h"
36
#include "ScriptValue.h"
38
#include "SecurityOrigin.h"
37
#include "SecurityOrigin.h"
39
#include "ThreadGlobalData.h"
38
#include "ThreadGlobalData.h"
39
#include "URL.h"
40
#include <utility>
40
#include <utility>
41
#include <wtf/Noncopyable.h>
41
#include <wtf/Noncopyable.h>
42
#include <wtf/text/WTFString.h>
42
#include <wtf/text/WTFString.h>
Lines 69-80 unsigned WorkerThread::workerThreadCount() a/Source/WebCore/workers/WorkerThread.cpp_sec2
69
struct WorkerThreadStartupData {
69
struct WorkerThreadStartupData {
70
    WTF_MAKE_NONCOPYABLE(WorkerThreadStartupData); WTF_MAKE_FAST_ALLOCATED;
70
    WTF_MAKE_NONCOPYABLE(WorkerThreadStartupData); WTF_MAKE_FAST_ALLOCATED;
71
public:
71
public:
72
    static PassOwnPtr<WorkerThreadStartupData> create(const KURL& scriptURL, const String& userAgent, const GroupSettings* settings, const String& sourceCode, WorkerThreadStartMode startMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType contentSecurityPolicyType, const SecurityOrigin* topOrigin)
72
    static PassOwnPtr<WorkerThreadStartupData> create(const URL& scriptURL, const String& userAgent, const GroupSettings* settings, const String& sourceCode, WorkerThreadStartMode startMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType contentSecurityPolicyType, const SecurityOrigin* topOrigin)
73
    {
73
    {
74
        return adoptPtr(new WorkerThreadStartupData(scriptURL, userAgent, settings, sourceCode, startMode, contentSecurityPolicy, contentSecurityPolicyType, topOrigin));
74
        return adoptPtr(new WorkerThreadStartupData(scriptURL, userAgent, settings, sourceCode, startMode, contentSecurityPolicy, contentSecurityPolicyType, topOrigin));
75
    }
75
    }
76
76
77
    KURL m_scriptURL;
77
    URL m_scriptURL;
78
    String m_userAgent;
78
    String m_userAgent;
79
    OwnPtr<GroupSettings> m_groupSettings;
79
    OwnPtr<GroupSettings> m_groupSettings;
80
    String m_sourceCode;
80
    String m_sourceCode;
Lines 83-92 public: a/Source/WebCore/workers/WorkerThread.cpp_sec3
83
    ContentSecurityPolicy::HeaderType m_contentSecurityPolicyType;
83
    ContentSecurityPolicy::HeaderType m_contentSecurityPolicyType;
84
    RefPtr<SecurityOrigin> m_topOrigin;
84
    RefPtr<SecurityOrigin> m_topOrigin;
85
private:
85
private:
86
    WorkerThreadStartupData(const KURL& scriptURL, const String& userAgent, const GroupSettings*, const String& sourceCode, WorkerThreadStartMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType contentSecurityPolicyType, const SecurityOrigin* topOrigin);
86
    WorkerThreadStartupData(const URL& scriptURL, const String& userAgent, const GroupSettings*, const String& sourceCode, WorkerThreadStartMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType contentSecurityPolicyType, const SecurityOrigin* topOrigin);
87
};
87
};
88
88
89
WorkerThreadStartupData::WorkerThreadStartupData(const KURL& scriptURL, const String& userAgent, const GroupSettings* settings, const String& sourceCode, WorkerThreadStartMode startMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType contentSecurityPolicyType, const SecurityOrigin* topOrigin)
89
WorkerThreadStartupData::WorkerThreadStartupData(const URL& scriptURL, const String& userAgent, const GroupSettings* settings, const String& sourceCode, WorkerThreadStartMode startMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType contentSecurityPolicyType, const SecurityOrigin* topOrigin)
90
    : m_scriptURL(scriptURL.copy())
90
    : m_scriptURL(scriptURL.copy())
91
    , m_userAgent(userAgent.isolatedCopy())
91
    , m_userAgent(userAgent.isolatedCopy())
92
    , m_sourceCode(sourceCode.isolatedCopy())
92
    , m_sourceCode(sourceCode.isolatedCopy())
Lines 104-110 WorkerThreadStartupData::WorkerThreadStartupData(const KURL& scriptURL, const St a/Source/WebCore/workers/WorkerThread.cpp_sec4
104
    m_groupSettings->setIndexedDBDatabasePath(settings->indexedDBDatabasePath().isolatedCopy());
104
    m_groupSettings->setIndexedDBDatabasePath(settings->indexedDBDatabasePath().isolatedCopy());
105
}
105
}
106
106
107
WorkerThread::WorkerThread(const KURL& scriptURL, const String& userAgent, const GroupSettings* settings, const String& sourceCode, WorkerLoaderProxy& workerLoaderProxy, WorkerReportingProxy& workerReportingProxy, WorkerThreadStartMode startMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType contentSecurityPolicyType, const SecurityOrigin* topOrigin)
107
WorkerThread::WorkerThread(const URL& scriptURL, const String& userAgent, const GroupSettings* settings, const String& sourceCode, WorkerLoaderProxy& workerLoaderProxy, WorkerReportingProxy& workerReportingProxy, WorkerThreadStartMode startMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType contentSecurityPolicyType, const SecurityOrigin* topOrigin)
108
    : m_threadID(0)
108
    : m_threadID(0)
109
    , m_workerLoaderProxy(workerLoaderProxy)
109
    , m_workerLoaderProxy(workerLoaderProxy)
110
    , m_workerReportingProxy(workerReportingProxy)
110
    , m_workerReportingProxy(workerReportingProxy)
- a/Source/WebCore/workers/WorkerThread.h -3 / +3 lines
Lines 39-45 a/Source/WebCore/workers/WorkerThread.h_sec1
39
39
40
namespace WebCore {
40
namespace WebCore {
41
41
42
    class KURL;
42
    class URL;
43
    class NotificationClient;
43
    class NotificationClient;
44
    class SecurityOrigin;
44
    class SecurityOrigin;
45
    class WorkerGlobalScope;
45
    class WorkerGlobalScope;
Lines 71-80 namespace WebCore { a/Source/WebCore/workers/WorkerThread.h_sec2
71
#endif
71
#endif
72
72
73
    protected:
73
    protected:
74
        WorkerThread(const KURL&, const String& userAgent, const GroupSettings*,  const String& sourceCode, WorkerLoaderProxy&, WorkerReportingProxy&, WorkerThreadStartMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType, const SecurityOrigin* topOrigin);
74
        WorkerThread(const URL&, const String& userAgent, const GroupSettings*,  const String& sourceCode, WorkerLoaderProxy&, WorkerReportingProxy&, WorkerThreadStartMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType, const SecurityOrigin* topOrigin);
75
75
76
        // Factory method for creating a new worker context for the thread.
76
        // Factory method for creating a new worker context for the thread.
77
        virtual PassRefPtr<WorkerGlobalScope> createWorkerGlobalScope(const KURL&, const String& userAgent, PassOwnPtr<GroupSettings>, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType, PassRefPtr<SecurityOrigin> topOrigin) = 0;
77
        virtual PassRefPtr<WorkerGlobalScope> createWorkerGlobalScope(const URL&, const String& userAgent, PassOwnPtr<GroupSettings>, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType, PassRefPtr<SecurityOrigin> topOrigin) = 0;
78
78
79
        // Executes the event loop for the worker thread. Derived classes can override to perform actions before/after entering the event loop.
79
        // Executes the event loop for the worker thread. Derived classes can override to perform actions before/after entering the event loop.
80
        virtual void runEventLoop();
80
        virtual void runEventLoop();
- a/Source/WebCore/xml/DOMParser.cpp -1 / +1 lines
Lines 36-42 PassRefPtr<Document> DOMParser::parseFromString(const String& str, const String& a/Source/WebCore/xml/DOMParser.cpp_sec1
36
        return 0;
36
        return 0;
37
    }
37
    }
38
38
39
    RefPtr<Document> doc = DOMImplementation::createDocument(contentType, 0, KURL(), false);
39
    RefPtr<Document> doc = DOMImplementation::createDocument(contentType, 0, URL(), false);
40
    doc->setContent(str);
40
    doc->setContent(str);
41
    return doc.release();
41
    return doc.release();
42
}
42
}
- a/Source/WebCore/xml/XMLHttpRequest.cpp -6 / +6 lines
Lines 469-480 bool XMLHttpRequest::isAllowedHTTPHeader(const String& name) a/Source/WebCore/xml/XMLHttpRequest.cpp_sec1
469
        && !name.startsWith(staticData->m_secHeaderPrefix, false);
469
        && !name.startsWith(staticData->m_secHeaderPrefix, false);
470
}
470
}
471
471
472
void XMLHttpRequest::open(const String& method, const KURL& url, ExceptionCode& ec)
472
void XMLHttpRequest::open(const String& method, const URL& url, ExceptionCode& ec)
473
{
473
{
474
    open(method, url, true, ec);
474
    open(method, url, true, ec);
475
}
475
}
476
476
477
void XMLHttpRequest::open(const String& method, const KURL& url, bool async, ExceptionCode& ec)
477
void XMLHttpRequest::open(const String& method, const URL& url, bool async, ExceptionCode& ec)
478
{
478
{
479
    internalAbort();
479
    internalAbort();
480
    State previousState = m_state;
480
    State previousState = m_state;
Lines 554-570 void XMLHttpRequest::open(const String& method, const KURL& url, bool async, Exc a/Source/WebCore/xml/XMLHttpRequest.cpp_sec2
554
        m_state = OPENED;
554
        m_state = OPENED;
555
}
555
}
556
556
557
void XMLHttpRequest::open(const String& method, const KURL& url, bool async, const String& user, ExceptionCode& ec)
557
void XMLHttpRequest::open(const String& method, const URL& url, bool async, const String& user, ExceptionCode& ec)
558
{
558
{
559
    KURL urlWithCredentials(url);
559
    URL urlWithCredentials(url);
560
    urlWithCredentials.setUser(user);
560
    urlWithCredentials.setUser(user);
561
561
562
    open(method, urlWithCredentials, async, ec);
562
    open(method, urlWithCredentials, async, ec);
563
}
563
}
564
564
565
void XMLHttpRequest::open(const String& method, const KURL& url, bool async, const String& user, const String& password, ExceptionCode& ec)
565
void XMLHttpRequest::open(const String& method, const URL& url, bool async, const String& user, const String& password, ExceptionCode& ec)
566
{
566
{
567
    KURL urlWithCredentials(url);
567
    URL urlWithCredentials(url);
568
    urlWithCredentials.setUser(user);
568
    urlWithCredentials.setUser(user);
569
    urlWithCredentials.setPass(password);
569
    urlWithCredentials.setPass(password);
570
570
- a/Source/WebCore/xml/XMLHttpRequest.h -6 / +6 lines
Lines 86-101 public: a/Source/WebCore/xml/XMLHttpRequest.h_sec1
86
    virtual EventTargetInterface eventTargetInterface() const OVERRIDE FINAL { return XMLHttpRequestEventTargetInterfaceType; }
86
    virtual EventTargetInterface eventTargetInterface() const OVERRIDE FINAL { return XMLHttpRequestEventTargetInterfaceType; }
87
    virtual ScriptExecutionContext* scriptExecutionContext() const OVERRIDE FINAL { return ActiveDOMObject::scriptExecutionContext(); }
87
    virtual ScriptExecutionContext* scriptExecutionContext() const OVERRIDE FINAL { return ActiveDOMObject::scriptExecutionContext(); }
88
88
89
    const KURL& url() const { return m_url; }
89
    const URL& url() const { return m_url; }
90
    String statusText(ExceptionCode&) const;
90
    String statusText(ExceptionCode&) const;
91
    int status(ExceptionCode&) const;
91
    int status(ExceptionCode&) const;
92
    State readyState() const;
92
    State readyState() const;
93
    bool withCredentials() const { return m_includeCredentials; }
93
    bool withCredentials() const { return m_includeCredentials; }
94
    void setWithCredentials(bool, ExceptionCode&);
94
    void setWithCredentials(bool, ExceptionCode&);
95
    void open(const String& method, const KURL&, ExceptionCode&);
95
    void open(const String& method, const URL&, ExceptionCode&);
96
    void open(const String& method, const KURL&, bool async, ExceptionCode&);
96
    void open(const String& method, const URL&, bool async, ExceptionCode&);
97
    void open(const String& method, const KURL&, bool async, const String& user, ExceptionCode&);
97
    void open(const String& method, const URL&, bool async, const String& user, ExceptionCode&);
98
    void open(const String& method, const KURL&, bool async, const String& user, const String& password, ExceptionCode&);
98
    void open(const String& method, const URL&, bool async, const String& user, const String& password, ExceptionCode&);
99
    void send(ExceptionCode&);
99
    void send(ExceptionCode&);
100
    void send(Document*, ExceptionCode&);
100
    void send(Document*, ExceptionCode&);
101
    void send(const String&, ExceptionCode&);
101
    void send(const String&, ExceptionCode&);
Lines 212-218 private: a/Source/WebCore/xml/XMLHttpRequest.h_sec2
212
212
213
    OwnPtr<XMLHttpRequestUpload> m_upload;
213
    OwnPtr<XMLHttpRequestUpload> m_upload;
214
214
215
    KURL m_url;
215
    URL m_url;
216
    String m_method;
216
    String m_method;
217
    HTTPHeaderMap m_requestHeaders;
217
    HTTPHeaderMap m_requestHeaders;
218
    RefPtr<FormData> m_requestEntityBody;
218
    RefPtr<FormData> m_requestEntityBody;
- a/Source/WebCore/xml/XSLImportRule.cpp -2 / +2 lines
Lines 49-55 XSLImportRule::~XSLImportRule() a/Source/WebCore/xml/XSLImportRule.cpp_sec1
49
        m_cachedSheet->removeClient(this);
49
        m_cachedSheet->removeClient(this);
50
}
50
}
51
51
52
void XSLImportRule::setXSLStyleSheet(const String& href, const KURL& baseURL, const String& sheet)
52
void XSLImportRule::setXSLStyleSheet(const String& href, const URL& baseURL, const String& sheet)
53
{
53
{
54
    if (m_styleSheet)
54
    if (m_styleSheet)
55
        m_styleSheet->setParentStyleSheet(0);
55
        m_styleSheet->setParentStyleSheet(0);
Lines 90-96 void XSLImportRule::loadSheet() a/Source/WebCore/xml/XSLImportRule.cpp_sec2
90
    XSLStyleSheet* parentSheet = parentStyleSheet();
90
    XSLStyleSheet* parentSheet = parentStyleSheet();
91
    if (!parentSheet->baseURL().isNull())
91
    if (!parentSheet->baseURL().isNull())
92
        // use parent styleheet's URL as the base URL
92
        // use parent styleheet's URL as the base URL
93
        absHref = KURL(parentSheet->baseURL(), m_strHref).string();
93
        absHref = URL(parentSheet->baseURL(), m_strHref).string();
94
    
94
    
95
    // Check for a cycle in our import chain.  If we encounter a stylesheet
95
    // Check for a cycle in our import chain.  If we encounter a stylesheet
96
    // in our parent chain with the same URL, then just bail.
96
    // in our parent chain with the same URL, then just bail.
- a/Source/WebCore/xml/XSLImportRule.h -1 / +1 lines
Lines 56-62 public: a/Source/WebCore/xml/XSLImportRule.h_sec1
56
private:
56
private:
57
    XSLImportRule(XSLStyleSheet* parentSheet, const String& href);
57
    XSLImportRule(XSLStyleSheet* parentSheet, const String& href);
58
58
59
    virtual void setXSLStyleSheet(const String& href, const KURL& baseURL, const String& sheet);
59
    virtual void setXSLStyleSheet(const String& href, const URL& baseURL, const String& sheet);
60
    
60
    
61
    XSLStyleSheet* m_parentStyleSheet;
61
    XSLStyleSheet* m_parentStyleSheet;
62
    String m_strHref;
62
    String m_strHref;
- a/Source/WebCore/xml/XSLStyleSheet.h -9 / +9 lines
Lines 40-61 class XSLImportRule; a/Source/WebCore/xml/XSLStyleSheet.h_sec1
40
    
40
    
41
class XSLStyleSheet FINAL : public StyleSheet {
41
class XSLStyleSheet FINAL : public StyleSheet {
42
public:
42
public:
43
    static PassRefPtr<XSLStyleSheet> create(XSLImportRule* parentImport, const String& originalURL, const KURL& finalURL)
43
    static PassRefPtr<XSLStyleSheet> create(XSLImportRule* parentImport, const String& originalURL, const URL& finalURL)
44
    {
44
    {
45
        return adoptRef(new XSLStyleSheet(parentImport, originalURL, finalURL));
45
        return adoptRef(new XSLStyleSheet(parentImport, originalURL, finalURL));
46
    }
46
    }
47
    static PassRefPtr<XSLStyleSheet> create(ProcessingInstruction* parentNode, const String& originalURL, const KURL& finalURL)
47
    static PassRefPtr<XSLStyleSheet> create(ProcessingInstruction* parentNode, const String& originalURL, const URL& finalURL)
48
    {
48
    {
49
        return adoptRef(new XSLStyleSheet(parentNode, originalURL, finalURL, false));
49
        return adoptRef(new XSLStyleSheet(parentNode, originalURL, finalURL, false));
50
    }
50
    }
51
    static PassRefPtr<XSLStyleSheet> createEmbedded(ProcessingInstruction* parentNode, const KURL& finalURL)
51
    static PassRefPtr<XSLStyleSheet> createEmbedded(ProcessingInstruction* parentNode, const URL& finalURL)
52
    {
52
    {
53
        return adoptRef(new XSLStyleSheet(parentNode, finalURL.string(), finalURL, true));
53
        return adoptRef(new XSLStyleSheet(parentNode, finalURL.string(), finalURL, true));
54
    }
54
    }
55
55
56
    // Taking an arbitrary node is unsafe, because owner node pointer can become stale.
56
    // Taking an arbitrary node is unsafe, because owner node pointer can become stale.
57
    // XSLTProcessor ensures that the stylesheet doesn't outlive its parent, in part by not exposing it to JavaScript.
57
    // XSLTProcessor ensures that the stylesheet doesn't outlive its parent, in part by not exposing it to JavaScript.
58
    static PassRefPtr<XSLStyleSheet> createForXSLTProcessor(Node* parentNode, const String& originalURL, const KURL& finalURL)
58
    static PassRefPtr<XSLStyleSheet> createForXSLTProcessor(Node* parentNode, const String& originalURL, const URL& finalURL)
59
    {
59
    {
60
        return adoptRef(new XSLStyleSheet(parentNode, originalURL, finalURL, false));
60
        return adoptRef(new XSLStyleSheet(parentNode, originalURL, finalURL, false));
61
    }
61
    }
Lines 66-72 public: a/Source/WebCore/xml/XSLStyleSheet.h_sec2
66
    
66
    
67
    void checkLoaded();
67
    void checkLoaded();
68
    
68
    
69
    const KURL& finalURL() const { return m_finalURL; }
69
    const URL& finalURL() const { return m_finalURL; }
70
70
71
    void loadChildSheets();
71
    void loadChildSheets();
72
    void loadChildSheet(const String& href);
72
    void loadChildSheet(const String& href);
Lines 94-111 public: a/Source/WebCore/xml/XSLStyleSheet.h_sec3
94
    virtual String title() const OVERRIDE { return emptyString(); }
94
    virtual String title() const OVERRIDE { return emptyString(); }
95
95
96
    virtual void clearOwnerNode() OVERRIDE { m_ownerNode = 0; }
96
    virtual void clearOwnerNode() OVERRIDE { m_ownerNode = 0; }
97
    virtual KURL baseURL() const OVERRIDE { return m_finalURL; }
97
    virtual URL baseURL() const OVERRIDE { return m_finalURL; }
98
    virtual bool isLoading() const OVERRIDE;
98
    virtual bool isLoading() const OVERRIDE;
99
99
100
    virtual bool isXSLStyleSheet() const OVERRIDE { return true; }
100
    virtual bool isXSLStyleSheet() const OVERRIDE { return true; }
101
101
102
private:
102
private:
103
    XSLStyleSheet(Node* parentNode, const String& originalURL, const KURL& finalURL, bool embedded);
103
    XSLStyleSheet(Node* parentNode, const String& originalURL, const URL& finalURL, bool embedded);
104
    XSLStyleSheet(XSLImportRule* parentImport, const String& originalURL, const KURL& finalURL);
104
    XSLStyleSheet(XSLImportRule* parentImport, const String& originalURL, const URL& finalURL);
105
    
105
    
106
    Node* m_ownerNode;
106
    Node* m_ownerNode;
107
    String m_originalURL;
107
    String m_originalURL;
108
    KURL m_finalURL;
108
    URL m_finalURL;
109
    bool m_isDisabled;
109
    bool m_isDisabled;
110
110
111
    Vector<OwnPtr<XSLImportRule> > m_children;
111
    Vector<OwnPtr<XSLImportRule> > m_children;
- a/Source/WebCore/xml/XSLStyleSheetLibxslt.cpp -2 / +2 lines
Lines 54-60 SOFT_LINK(libxslt, xsltLoadStylesheetPI, xsltStylesheetPtr, (xmlDocPtr doc), (do a/Source/WebCore/xml/XSLStyleSheetLibxslt.cpp_sec1
54
54
55
namespace WebCore {
55
namespace WebCore {
56
56
57
XSLStyleSheet::XSLStyleSheet(XSLImportRule* parentRule, const String& originalURL, const KURL& finalURL)
57
XSLStyleSheet::XSLStyleSheet(XSLImportRule* parentRule, const String& originalURL, const URL& finalURL)
58
    : m_ownerNode(0)
58
    : m_ownerNode(0)
59
    , m_originalURL(originalURL)
59
    , m_originalURL(originalURL)
60
    , m_finalURL(finalURL)
60
    , m_finalURL(finalURL)
Lines 67-73 XSLStyleSheet::XSLStyleSheet(XSLImportRule* parentRule, const String& originalUR a/Source/WebCore/xml/XSLStyleSheetLibxslt.cpp_sec2
67
{
67
{
68
}
68
}
69
69
70
XSLStyleSheet::XSLStyleSheet(Node* parentNode, const String& originalURL, const KURL& finalURL,  bool embedded)
70
XSLStyleSheet::XSLStyleSheet(Node* parentNode, const String& originalURL, const URL& finalURL,  bool embedded)
71
    : m_ownerNode(parentNode)
71
    : m_ownerNode(parentNode)
72
    , m_originalURL(originalURL)
72
    , m_originalURL(originalURL)
73
    , m_finalURL(finalURL)
73
    , m_finalURL(finalURL)
- a/Source/WebCore/xml/XSLTProcessor.cpp -2 / +2 lines
Lines 76-85 PassRefPtr<Document> XSLTProcessor::createDocumentFromSource(const String& sourc a/Source/WebCore/xml/XSLTProcessor.cpp_sec1
76
76
77
    RefPtr<Document> result;
77
    RefPtr<Document> result;
78
    if (sourceMIMEType == "text/plain") {
78
    if (sourceMIMEType == "text/plain") {
79
        result = Document::create(frame, sourceIsDocument ? ownerDocument->url() : KURL());
79
        result = Document::create(frame, sourceIsDocument ? ownerDocument->url() : URL());
80
        transformTextStringToXHTMLDocumentString(documentSource);
80
        transformTextStringToXHTMLDocumentString(documentSource);
81
    } else
81
    } else
82
        result = DOMImplementation::createDocument(sourceMIMEType, frame, sourceIsDocument ? ownerDocument->url() : KURL(), false);
82
        result = DOMImplementation::createDocument(sourceMIMEType, frame, sourceIsDocument ? ownerDocument->url() : URL(), false);
83
83
84
    // Before parsing, we need to save & detach the old document and get the new document
84
    // Before parsing, we need to save & detach the old document and get the new document
85
    // in place. We have to do this only if we're rendering the result document.
85
    // in place. We have to do this only if we're rendering the result document.
- a/Source/WebCore/xml/XSLTProcessorLibxslt.cpp -1 / +1 lines
Lines 120-126 static xmlDocPtr docLoaderFunc(const xmlChar* uri, a/Source/WebCore/xml/XSLTProcessorLibxslt.cpp_sec1
120
    case XSLT_LOAD_DOCUMENT: {
120
    case XSLT_LOAD_DOCUMENT: {
121
        xsltTransformContextPtr context = (xsltTransformContextPtr)ctxt;
121
        xsltTransformContextPtr context = (xsltTransformContextPtr)ctxt;
122
        xmlChar* base = xmlNodeGetBase(context->document->doc, context->node);
122
        xmlChar* base = xmlNodeGetBase(context->document->doc, context->node);
123
        KURL url(KURL(ParsedURLString, reinterpret_cast<const char*>(base)), reinterpret_cast<const char*>(uri));
123
        URL url(URL(ParsedURLString, reinterpret_cast<const char*>(base)), reinterpret_cast<const char*>(uri));
124
        xmlFree(base);
124
        xmlFree(base);
125
        ResourceError error;
125
        ResourceError error;
126
        ResourceResponse response;
126
        ResourceResponse response;
- a/Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp -2 / +2 lines
Lines 410-416 static void switchToUTF16(xmlParserCtxtPtr ctxt) a/Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp_sec1
410
    xmlSwitchEncoding(ctxt, BOMHighByte == 0xFF ? XML_CHAR_ENCODING_UTF16LE : XML_CHAR_ENCODING_UTF16BE);
410
    xmlSwitchEncoding(ctxt, BOMHighByte == 0xFF ? XML_CHAR_ENCODING_UTF16LE : XML_CHAR_ENCODING_UTF16BE);
411
}
411
}
412
412
413
static bool shouldAllowExternalLoad(const KURL& url)
413
static bool shouldAllowExternalLoad(const URL& url)
414
{
414
{
415
    String urlString = url.string();
415
    String urlString = url.string();
416
416
Lines 451-457 static void* openFunc(const char* uri) a/Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp_sec2
451
    ASSERT(XMLDocumentParserScope::currentCachedResourceLoader);
451
    ASSERT(XMLDocumentParserScope::currentCachedResourceLoader);
452
    ASSERT(currentThread() == libxmlLoaderThread);
452
    ASSERT(currentThread() == libxmlLoaderThread);
453
453
454
    KURL url(KURL(), uri);
454
    URL url(URL(), uri);
455
455
456
    if (!shouldAllowExternalLoad(url))
456
    if (!shouldAllowExternalLoad(url))
457
        return &globalDescriptor;
457
        return &globalDescriptor;
- a/Source/WebKit/ChangeLog +10 lines
Lines 1-3 a/Source/WebKit/ChangeLog_sec1
1
2013-09-26  Darin Adler  <darin@apple.com>
2
3
        rename KURL to URL
4
        https://bugs.webkit.org/show_bug.cgi?id=16214
5
6
        Reviewed by Andreas Kling.
7
8
        * WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:
9
        Let the script to try to rename here.
10
1
2013-09-26  Eric Carlson  <eric.carlson@apple.com>
11
2013-09-26  Eric Carlson  <eric.carlson@apple.com>
2
12
3
        [MediaStream] make MediaStream testable
13
        [MediaStream] make MediaStream testable
- a/Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in -1 / +1 lines
Lines 393-399 EXPORTS a/Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in_sec1
393
        symbolWithPointer(?addAuthorSheet@DocumentStyleSheetCollection@WebCore@@QAEXV?$PassRefPtr@VStyleSheetContents@WebCore@@@WTF@@@Z, ?addAuthorSheet@DocumentStyleSheetCollection@WebCore@@QEAAXV?$PassRefPtr@VStyleSheetContents@WebCore@@@WTF@@@Z)
393
        symbolWithPointer(?addAuthorSheet@DocumentStyleSheetCollection@WebCore@@QAEXV?$PassRefPtr@VStyleSheetContents@WebCore@@@WTF@@@Z, ?addAuthorSheet@DocumentStyleSheetCollection@WebCore@@QEAAXV?$PassRefPtr@VStyleSheetContents@WebCore@@@WTF@@@Z)
394
        symbolWithPointer(?parseString@StyleSheetContents@WebCore@@QAE_NABVString@WTF@@@Z, ?parseString@StyleSheetContents@WebCore@@QEAA_NAEBVString@WTF@@@Z)
394
        symbolWithPointer(?parseString@StyleSheetContents@WebCore@@QAE_NABVString@WTF@@@Z, ?parseString@StyleSheetContents@WebCore@@QEAA_NAEBVString@WTF@@@Z)
395
        symbolWithPointer(?emptyString@WTF@@YAABVString@1@XZ, ?emptyString@WTF@@YAAEBVString@1@XZ)
395
        symbolWithPointer(?emptyString@WTF@@YAABVString@1@XZ, ?emptyString@WTF@@YAAEBVString@1@XZ)
396
        symbolWithPointer(?invalidate@KURL@WebCore@@AAEXXZ, ?invalidate@KURL@WebCore@@AEAAXXZ)
396
        symbolWithPointer(?invalidate@URL@WebCore@@AAEXXZ, ?invalidate@URL@WebCore@@AEAAXXZ)
397
        symbolWithPointer(??0StyleSheetContents@WebCore@@AAE@PAVStyleRuleImport@1@ABVString@WTF@@ABUCSSParserContext@1@@Z, ??0StyleSheetContents@WebCore@@AEAA@PEAVStyleRuleImport@1@AEBVString@WTF@@AEBUCSSParserContext@1@@Z)
397
        symbolWithPointer(??0StyleSheetContents@WebCore@@AAE@PAVStyleRuleImport@1@ABVString@WTF@@ABUCSSParserContext@1@@Z, ??0StyleSheetContents@WebCore@@AEAA@PEAVStyleRuleImport@1@AEBVString@WTF@@AEBUCSSParserContext@1@@Z)
398
        symbolWithPointer(?addUserSheet@DocumentStyleSheetCollection@WebCore@@QAEXV?$PassRefPtr@VStyleSheetContents@WebCore@@@WTF@@@Z, ?addUserSheet@DocumentStyleSheetCollection@WebCore@@QEAAXV?$PassRefPtr@VStyleSheetContents@WebCore@@@WTF@@@Z)
398
        symbolWithPointer(?addUserSheet@DocumentStyleSheetCollection@WebCore@@QAEXV?$PassRefPtr@VStyleSheetContents@WebCore@@@WTF@@@Z, ?addUserSheet@DocumentStyleSheetCollection@WebCore@@QEAAXV?$PassRefPtr@VStyleSheetContents@WebCore@@@WTF@@@Z)
399
        symbolWithPointer(??1StyleSheetContents@WebCore@@QAE@XZ, ??1StyleSheetContents@WebCore@@QEAA@XZ)
399
        symbolWithPointer(??1StyleSheetContents@WebCore@@QAE@XZ, ??1StyleSheetContents@WebCore@@QEAA@XZ)
- a/Source/WebKit/blackberry/Api/WebCookieJar.cpp -3 / +3 lines
Lines 21-27 a/Source/WebKit/blackberry/Api/WebCookieJar.cpp_sec1
21
#include "WebCookieJar.h"
21
#include "WebCookieJar.h"
22
22
23
#include "CookieManager.h"
23
#include "CookieManager.h"
24
#include "KURL.h"
24
#include "URL.h"
25
#include <BlackBerryPlatformString.h>
25
#include <BlackBerryPlatformString.h>
26
26
27
using namespace WebCore;
27
using namespace WebCore;
Lines 35-41 WebCookieJar::WebCookieJar() a/Source/WebKit/blackberry/Api/WebCookieJar.cpp_sec2
35
35
36
std::vector<BlackBerry::Platform::String> WebCookieJar::cookies(const BlackBerry::Platform::String& url)
36
std::vector<BlackBerry::Platform::String> WebCookieJar::cookies(const BlackBerry::Platform::String& url)
37
{
37
{
38
    KURL kurl = KURL(KURL(), url);
38
    URL kurl = URL(URL(), url);
39
39
40
    Vector<RefPtr<ParsedCookie> > rawCookies;
40
    Vector<RefPtr<ParsedCookie> > rawCookies;
41
    cookieManager().getRawCookies(rawCookies, kurl, WithHttpOnlyCookies);
41
    cookieManager().getRawCookies(rawCookies, kurl, WithHttpOnlyCookies);
Lines 49-55 std::vector<BlackBerry::Platform::String> WebCookieJar::cookies(const BlackBerry a/Source/WebKit/blackberry/Api/WebCookieJar.cpp_sec3
49
49
50
void WebCookieJar::setCookies(const BlackBerry::Platform::String& url, const std::vector<BlackBerry::Platform::String>& cookies)
50
void WebCookieJar::setCookies(const BlackBerry::Platform::String& url, const std::vector<BlackBerry::Platform::String>& cookies)
51
{
51
{
52
    KURL kurl = KURL(KURL(), url);
52
    URL kurl = URL(URL(), url);
53
    Vector<String> coreCookies;
53
    Vector<String> coreCookies;
54
    for (size_t i = 0; i < cookies.size(); ++i)
54
    for (size_t i = 0; i < cookies.size(); ++i)
55
        coreCookies.append(cookies[i]);
55
        coreCookies.append(cookies[i]);
- a/Source/WebKit/blackberry/Api/WebKitTextCodec.cpp -1 / +1 lines
Lines 19-25 a/Source/WebKit/blackberry/Api/WebKitTextCodec.cpp_sec1
19
#include "config.h"
19
#include "config.h"
20
#include "WebKitTextCodec.h"
20
#include "WebKitTextCodec.h"
21
21
22
#include "KURL.h"
22
#include "URL.h"
23
#include "TextCodecICU.h"
23
#include "TextCodecICU.h"
24
#include <BlackBerryPlatformString.h>
24
#include <BlackBerryPlatformString.h>
25
#include <wtf/Vector.h>
25
#include <wtf/Vector.h>
- a/Source/WebKit/blackberry/Api/WebPage.cpp -15 / +15 lines
Lines 224-236 const double maximumImageDocumentZoomToFitScale = 2; a/Source/WebKit/blackberry/Api/WebPage.cpp_sec1
224
const double zoomFactorEpsilon = 0.0001;
224
const double zoomFactorEpsilon = 0.0001;
225
225
226
// Helper function to parse a URL and fill in missing parts.
226
// Helper function to parse a URL and fill in missing parts.
227
static KURL parseUrl(const String& url)
227
static URL parseUrl(const String& url)
228
{
228
{
229
    String urlString(url);
229
    String urlString(url);
230
    KURL kurl = KURL(KURL(), urlString);
230
    URL kurl = URL(URL(), urlString);
231
    if (kurl.protocol().isEmpty()) {
231
    if (kurl.protocol().isEmpty()) {
232
        urlString.insert("http://", 0);
232
        urlString.insert("http://", 0);
233
        kurl = KURL(KURL(), urlString);
233
        kurl = URL(URL(), urlString);
234
    }
234
    }
235
235
236
    return kurl;
236
    return kurl;
Lines 659-665 void WebPagePrivate::init(const BlackBerry::Platform::String& pageGroupName) a/Source/WebKit/blackberry/Api/WebPage.cpp_sec2
659
659
660
class DeferredTaskLoadManualScript: public DeferredTask<&WebPagePrivate::m_wouldLoadManualScript> {
660
class DeferredTaskLoadManualScript: public DeferredTask<&WebPagePrivate::m_wouldLoadManualScript> {
661
public:
661
public:
662
    explicit DeferredTaskLoadManualScript(WebPagePrivate* webPagePrivate, const KURL& url)
662
    explicit DeferredTaskLoadManualScript(WebPagePrivate* webPagePrivate, const URL& url)
663
        : DeferredTaskType(webPagePrivate)
663
        : DeferredTaskType(webPagePrivate)
664
    {
664
    {
665
        webPagePrivate->m_cachedManualScript = url;
665
        webPagePrivate->m_cachedManualScript = url;
Lines 683-689 void WebPagePrivate::load(const Platform::NetworkRequest& netReq, bool needRefer a/Source/WebKit/blackberry/Api/WebPage.cpp_sec3
683
    } else
683
    } else
684
        m_mainFrame->setInViewSourceMode(false);
684
        m_mainFrame->setInViewSourceMode(false);
685
685
686
    KURL kurl = parseUrl(urlString);
686
    URL kurl = parseUrl(urlString);
687
    if (protocolIs(kurl, "javascript")) {
687
    if (protocolIs(kurl, "javascript")) {
688
        // Never run javascript while loading is deferred.
688
        // Never run javascript while loading is deferred.
689
        if (m_page->defersLoading())
689
        if (m_page->defersLoading())
Lines 739-752 void WebPage::load(const Platform::NetworkRequest& request, bool needReferer) a/Source/WebKit/blackberry/Api/WebPage.cpp_sec4
739
739
740
void WebPagePrivate::loadString(const BlackBerry::Platform::String& string, const BlackBerry::Platform::String& baseURL, const BlackBerry::Platform::String& contentType, const BlackBerry::Platform::String& failingURL)
740
void WebPagePrivate::loadString(const BlackBerry::Platform::String& string, const BlackBerry::Platform::String& baseURL, const BlackBerry::Platform::String& contentType, const BlackBerry::Platform::String& failingURL)
741
{
741
{
742
    KURL kurl = parseUrl(baseURL);
742
    URL kurl = parseUrl(baseURL);
743
    ResourceRequest request(kurl);
743
    ResourceRequest request(kurl);
744
    WTF::RefPtr<SharedBuffer> buffer
744
    WTF::RefPtr<SharedBuffer> buffer
745
        = SharedBuffer::create(string.c_str(), string.length());
745
        = SharedBuffer::create(string.c_str(), string.length());
746
    SubstituteData substituteData(buffer,
746
    SubstituteData substituteData(buffer,
747
        extractMIMETypeFromMediaType(contentType),
747
        extractMIMETypeFromMediaType(contentType),
748
        extractCharsetFromMediaType(contentType),
748
        extractCharsetFromMediaType(contentType),
749
        !failingURL.empty() ? parseUrl(failingURL) : KURL());
749
        !failingURL.empty() ? parseUrl(failingURL) : URL());
750
    m_mainFrame->loader().load(FrameLoadRequest(m_mainFrame, request, substituteData));
750
    m_mainFrame->loader().load(FrameLoadRequest(m_mainFrame, request, substituteData));
751
}
751
}
752
752
Lines 858-871 bool WebPage::executeJavaScriptInIsolatedWorld(const std::wstring& script, JavaS a/Source/WebKit/blackberry/Api/WebPage.cpp_sec5
858
        return false;
858
        return false;
859
    }
859
    }
860
    String str = String(data, lengthCopied);
860
    String str = String(data, lengthCopied);
861
    ScriptSourceCode sourceCode(str, KURL());
861
    ScriptSourceCode sourceCode(str, URL());
862
    return d->executeJavaScriptInIsolatedWorld(sourceCode, returnType, returnValue);
862
    return d->executeJavaScriptInIsolatedWorld(sourceCode, returnType, returnValue);
863
}
863
}
864
864
865
bool WebPage::executeJavaScriptInIsolatedWorld(const BlackBerry::Platform::String& scriptUTF8, JavaScriptDataType& returnType, BlackBerry::Platform::String& returnValue)
865
bool WebPage::executeJavaScriptInIsolatedWorld(const BlackBerry::Platform::String& scriptUTF8, JavaScriptDataType& returnType, BlackBerry::Platform::String& returnValue)
866
{
866
{
867
    BLACKBERRY_ASSERT(scriptUTF8.isUtf8());
867
    BLACKBERRY_ASSERT(scriptUTF8.isUtf8());
868
    ScriptSourceCode sourceCode(scriptUTF8, KURL());
868
    ScriptSourceCode sourceCode(scriptUTF8, URL());
869
    return d->executeJavaScriptInIsolatedWorld(sourceCode, returnType, returnValue);
869
    return d->executeJavaScriptInIsolatedWorld(sourceCode, returnType, returnValue);
870
}
870
}
871
871
Lines 998-1004 void WebPagePrivate::addOriginAccessWhitelistEntry(const BlackBerry::Platform::S a/Source/WebKit/blackberry/Api/WebPage.cpp_sec6
998
    if (source->isUnique())
998
    if (source->isUnique())
999
        return;
999
        return;
1000
1000
1001
    KURL destination(KURL(), destinationOrigin);
1001
    URL destination(URL(), destinationOrigin);
1002
    SecurityPolicy::addOriginAccessWhitelistEntry(*source, destination.protocol(), destination.host(), allowDestinationSubdomains);
1002
    SecurityPolicy::addOriginAccessWhitelistEntry(*source, destination.protocol(), destination.host(), allowDestinationSubdomains);
1003
}
1003
}
1004
1004
Lines 1013-1019 void WebPagePrivate::removeOriginAccessWhitelistEntry(const BlackBerry::Platform a/Source/WebKit/blackberry/Api/WebPage.cpp_sec7
1013
    if (source->isUnique())
1013
    if (source->isUnique())
1014
        return;
1014
        return;
1015
1015
1016
    KURL destination(KURL(), destinationOrigin);
1016
    URL destination(URL(), destinationOrigin);
1017
    SecurityPolicy::removeOriginAccessWhitelistEntry(*source, destination.protocol(), destination.host(), allowDestinationSubdomains);
1017
    SecurityPolicy::removeOriginAccessWhitelistEntry(*source, destination.protocol(), destination.host(), allowDestinationSubdomains);
1018
}
1018
}
1019
1019
Lines 2064-2070 bool WebPagePrivate::isActive() const a/Source/WebKit/blackberry/Api/WebPage.cpp_sec8
2064
    return m_client->isActive();
2064
    return m_client->isActive();
2065
}
2065
}
2066
2066
2067
void WebPagePrivate::authenticationChallenge(const KURL& url, const ProtectionSpace& protectionSpace, const Credential& inputCredential)
2067
void WebPagePrivate::authenticationChallenge(const URL& url, const ProtectionSpace& protectionSpace, const Credential& inputCredential)
2068
{
2068
{
2069
    AuthenticationChallengeManager* authmgr = AuthenticationChallengeManager::instance();
2069
    AuthenticationChallengeManager* authmgr = AuthenticationChallengeManager::instance();
2070
    BlackBerry::Platform::String username;
2070
    BlackBerry::Platform::String username;
Lines 2156-2162 Platform::WebContext WebPagePrivate::webContext(TargetDetectionStrategy strategy a/Source/WebKit/blackberry/Api/WebPage.cpp_sec9
2156
    Node* linkNode = node->enclosingLinkEventParentOrSelf();
2156
    Node* linkNode = node->enclosingLinkEventParentOrSelf();
2157
    // Set link url only when the node is linked image, or text inside anchor. Prevent CCM popup when long press non-link element(eg. button) inside an anchor.
2157
    // Set link url only when the node is linked image, or text inside anchor. Prevent CCM popup when long press non-link element(eg. button) inside an anchor.
2158
    if (linkNode && (node == linkNode || node->isTextNode() || nodeIsImage)) {
2158
    if (linkNode && (node == linkNode || node->isTextNode() || nodeIsImage)) {
2159
        KURL href;
2159
        URL href;
2160
        if (linkNode->isLink() && linkNode->hasAttributes()) {
2160
        if (linkNode->isLink() && linkNode->hasAttributes()) {
2161
            if (const Attribute* attribute = toElement(linkNode)->findAttributeByName(HTMLNames::hrefAttr))
2161
            if (const Attribute* attribute = toElement(linkNode)->findAttributeByName(HTMLNames::hrefAttr))
2162
                href = linkNode->document()->completeURL(stripLeadingAndTrailingHTMLSpaces(attribute->value()));
2162
                href = linkNode->document()->completeURL(stripLeadingAndTrailingHTMLSpaces(attribute->value()));
Lines 4897-4903 void WebPage::initPopupWebView(BlackBerry::WebKit::WebPage* webPage) a/Source/WebKit/blackberry/Api/WebPage.cpp_sec10
4897
    d->m_pagePopup->initialize(webPage);
4897
    d->m_pagePopup->initialize(webPage);
4898
}
4898
}
4899
4899
4900
String WebPagePrivate::findPatternStringForUrl(const KURL& url) const
4900
String WebPagePrivate::findPatternStringForUrl(const URL& url) const
4901
{
4901
{
4902
    if ((m_webSettings->shouldHandlePatternUrls() && protocolIs(url, "pattern"))
4902
    if ((m_webSettings->shouldHandlePatternUrls() && protocolIs(url, "pattern"))
4903
        || protocolIs(url, "tel")
4903
        || protocolIs(url, "tel")
Lines 5841-5847 void WebPagePrivate::didChangeSettings(WebSettings* webSettings) a/Source/WebKit/blackberry/Api/WebPage.cpp_sec11
5841
5841
5842
    BlackBerry::Platform::String stylesheetURL = webSettings->userStyleSheetLocation();
5842
    BlackBerry::Platform::String stylesheetURL = webSettings->userStyleSheetLocation();
5843
    if (!stylesheetURL.empty())
5843
    if (!stylesheetURL.empty())
5844
        coreSettings->setUserStyleSheetLocation(KURL(KURL(), stylesheetURL));
5844
        coreSettings->setUserStyleSheetLocation(URL(URL(), stylesheetURL));
5845
5845
5846
    coreSettings->setFirstScheduledLayoutDelay(webSettings->firstScheduledLayoutDelay());
5846
    coreSettings->setFirstScheduledLayoutDelay(webSettings->firstScheduledLayoutDelay());
5847
    coreSettings->setUseCache(webSettings->useWebKitCache());
5847
    coreSettings->setUseCache(webSettings->useWebKitCache());
- a/Source/WebKit/blackberry/Api/WebPage_p.h -4 / +4 lines
Lines 30-36 a/Source/WebKit/blackberry/Api/WebPage_p.h_sec1
30
#include "LayerRenderer.h"
30
#include "LayerRenderer.h"
31
#include <EGL/egl.h>
31
#include <EGL/egl.h>
32
#endif
32
#endif
33
#include "KURL.h"
33
#include "URL.h"
34
#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
34
#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
35
#include "NotificationManager.h"
35
#include "NotificationManager.h"
36
#endif
36
#endif
Lines 216-222 public: a/Source/WebKit/blackberry/Api/WebPage_p.h_sec2
216
    virtual int showAlertDialog(WebPageClient::AlertType atype);
216
    virtual int showAlertDialog(WebPageClient::AlertType atype);
217
    virtual bool isActive() const;
217
    virtual bool isActive() const;
218
    virtual bool isVisible() const { return m_visible; }
218
    virtual bool isVisible() const { return m_visible; }
219
    virtual void authenticationChallenge(const WebCore::KURL&, const WebCore::ProtectionSpace&, const WebCore::Credential&);
219
    virtual void authenticationChallenge(const WebCore::URL&, const WebCore::ProtectionSpace&, const WebCore::Credential&);
220
    virtual SaveCredentialType notifyShouldSaveCredential(bool);
220
    virtual SaveCredentialType notifyShouldSaveCredential(bool);
221
    virtual void syncProxyCredential(const WebCore::Credential&);
221
    virtual void syncProxyCredential(const WebCore::Credential&);
222
222
Lines 349-355 public: a/Source/WebKit/blackberry/Api/WebPage_p.h_sec3
349
349
350
    // If this url should be handled as a pattern, returns the pattern
350
    // If this url should be handled as a pattern, returns the pattern
351
    // otherwise, returns an empty string.
351
    // otherwise, returns an empty string.
352
    String findPatternStringForUrl(const WebCore::KURL&) const;
352
    String findPatternStringForUrl(const WebCore::URL&) const;
353
353
354
    void suspendBackingStore();
354
    void suspendBackingStore();
355
    void resumeBackingStore();
355
    void resumeBackingStore();
Lines 621-627 public: a/Source/WebKit/blackberry/Api/WebPage_p.h_sec4
621
    int m_cachedPopupListSelectedIndex;
621
    int m_cachedPopupListSelectedIndex;
622
    BlackBerry::Platform::String m_cachedDateTimeInput;
622
    BlackBerry::Platform::String m_cachedDateTimeInput;
623
    BlackBerry::Platform::String m_cachedColorInput;
623
    BlackBerry::Platform::String m_cachedColorInput;
624
    WebCore::KURL m_cachedManualScript;
624
    WebCore::URL m_cachedManualScript;
625
625
626
    class DeferredTaskBase {
626
    class DeferredTaskBase {
627
    public:
627
    public:
- a/Source/WebKit/blackberry/ChangeLog +9 lines
Lines 1-3 a/Source/WebKit/blackberry/ChangeLog_sec1
1
2013-09-26  Darin Adler  <darin@apple.com>
2
3
        rename KURL to URL
4
        https://bugs.webkit.org/show_bug.cgi?id=16214
5
6
        Reviewed by Andreas Kling.
7
8
        * many files: Renamed, using script.
9
1
2013-09-25  Brent Fulgham  <bfulgham@apple.com>
10
2013-09-25  Brent Fulgham  <bfulgham@apple.com>
2
11
3
        Refactor RuntimeEnabledFeatures as a Singleton.
12
        Refactor RuntimeEnabledFeatures as a Singleton.
- a/Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp -2 / +2 lines
Lines 41-47 a/Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp_sec1
41
#include "HitTestResult.h"
41
#include "HitTestResult.h"
42
#include "Icon.h"
42
#include "Icon.h"
43
#include "InputHandler.h"
43
#include "InputHandler.h"
44
#include "KURL.h"
45
#include "Node.h"
44
#include "Node.h"
46
#include "NotImplemented.h"
45
#include "NotImplemented.h"
47
#include "Page.h"
46
#include "Page.h"
Lines 54-59 a/Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp_sec2
54
#include "SecurityOrigin.h"
53
#include "SecurityOrigin.h"
55
#include "Settings.h"
54
#include "Settings.h"
56
#include "SharedPointer.h"
55
#include "SharedPointer.h"
56
#include "URL.h"
57
#include "ViewportArguments.h"
57
#include "ViewportArguments.h"
58
#include "WebPage.h"
58
#include "WebPage.h"
59
#include "WebPageClient.h"
59
#include "WebPageClient.h"
Lines 222-228 Page* ChromeClientBlackBerry::createWindow(Frame* frame, const FrameLoadRequest& a/Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp_sec3
222
    // Bail out early when we aren't allowed to display the target origin, otherwise,
222
    // Bail out early when we aren't allowed to display the target origin, otherwise,
223
    // it would be harmful and the window would be useless. This is the same check
223
    // it would be harmful and the window would be useless. This is the same check
224
    // as the one in FrameLoader::loadFrameRequest().
224
    // as the one in FrameLoader::loadFrameRequest().
225
    const KURL& url = request.resourceRequest().url();
225
    const URL& url = request.resourceRequest().url();
226
    if (!request.requester()->canDisplay(url)) {
226
    if (!request.requester()->canDisplay(url)) {
227
        frame->loader().reportLocalLoadFailed(frame, url.string());
227
        frame->loader().reportLocalLoadFailed(frame, url.string());
228
        return 0;
228
        return 0;
- a/Source/WebKit/blackberry/WebCoreSupport/CredentialManager.cpp -1 / +1 lines
Lines 24-30 a/Source/WebKit/blackberry/WebCoreSupport/CredentialManager.cpp_sec1
24
#include "CredentialBackingStore.h"
24
#include "CredentialBackingStore.h"
25
#include "CredentialTransformData.h"
25
#include "CredentialTransformData.h"
26
#include "HTMLFormElement.h"
26
#include "HTMLFormElement.h"
27
#include "KURL.h"
27
#include "URL.h"
28
#include "Logging.h"
28
#include "Logging.h"
29
#include "PageClientBlackBerry.h"
29
#include "PageClientBlackBerry.h"
30
30
- a/Source/WebKit/blackberry/WebCoreSupport/CredentialManager.h -1 / +1 lines
Lines 33-39 class String; a/Source/WebKit/blackberry/WebCoreSupport/CredentialManager.h_sec1
33
}
33
}
34
34
35
namespace WebCore {
35
namespace WebCore {
36
class KURL;
36
class URL;
37
class ProtectionSpace;
37
class ProtectionSpace;
38
class CredentialTransformData;
38
class CredentialTransformData;
39
39
- a/Source/WebKit/blackberry/WebCoreSupport/CredentialTransformData.cpp -6 / +6 lines
Lines 38-44 a/Source/WebKit/blackberry/WebCoreSupport/CredentialTransformData.cpp_sec1
38
#include "CredentialTransformData.h"
38
#include "CredentialTransformData.h"
39
39
40
#include "HTMLInputElement.h"
40
#include "HTMLInputElement.h"
41
#include "KURL.h"
41
#include "URL.h"
42
#include <wtf/Vector.h>
42
#include <wtf/Vector.h>
43
43
44
namespace WebCore {
44
namespace WebCore {
Lines 49-57 namespace { a/Source/WebKit/blackberry/WebCoreSupport/CredentialTransformData.cpp_sec2
49
static const size_t maxPasswords = 3;
49
static const size_t maxPasswords = 3;
50
50
51
// Helper method to clear url of unneeded parts.
51
// Helper method to clear url of unneeded parts.
52
KURL stripURL(const KURL& url)
52
URL stripURL(const URL& url)
53
{
53
{
54
    KURL strippedURL = url;
54
    URL strippedURL = url;
55
    strippedURL.setUser(String());
55
    strippedURL.setUser(String());
56
    strippedURL.setPass(String());
56
    strippedURL.setPass(String());
57
    strippedURL.setQuery(String());
57
    strippedURL.setQuery(String());
Lines 78-90 CredentialTransformData::CredentialTransformData(HTMLFormElement* form, bool isF a/Source/WebKit/blackberry/WebCoreSupport/CredentialTransformData.cpp_sec3
78
    ASSERT(form);
78
    ASSERT(form);
79
79
80
    // Get the document URL
80
    // Get the document URL
81
    KURL fullOrigin(ParsedURLString, form->document()->documentURI());
81
    URL fullOrigin(ParsedURLString, form->document()->documentURI());
82
82
83
    // Calculate the canonical action URL
83
    // Calculate the canonical action URL
84
    String action = form->action();
84
    String action = form->action();
85
    if (action.isNull())
85
    if (action.isNull())
86
        action = ""; // missing 'action' attribute implies current URL
86
        action = ""; // missing 'action' attribute implies current URL
87
    KURL fullAction = form->document()->completeURL(action);
87
    URL fullAction = form->document()->completeURL(action);
88
    if (!fullAction.isValid())
88
    if (!fullAction.isValid())
89
        return;
89
        return;
90
90
Lines 95-101 CredentialTransformData::CredentialTransformData(HTMLFormElement* form, bool isF a/Source/WebKit/blackberry/WebCoreSupport/CredentialTransformData.cpp_sec4
95
    if (!isForSaving && m_oldPasswordElement)
95
    if (!isForSaving && m_oldPasswordElement)
96
        return;
96
        return;
97
97
98
    KURL url = stripURL(fullOrigin);
98
    URL url = stripURL(fullOrigin);
99
    m_action = stripURL(fullAction);
99
    m_action = stripURL(fullAction);
100
    m_protectionSpace = ProtectionSpace(url.host(), url.port(), ProtectionSpaceServerHTTP, "Form", ProtectionSpaceAuthenticationSchemeHTMLForm);
100
    m_protectionSpace = ProtectionSpace(url.host(), url.port(), ProtectionSpaceServerHTTP, "Form", ProtectionSpaceAuthenticationSchemeHTMLForm);
101
    m_credential = Credential(m_userNameElement->value(), m_passwordElement->value(), CredentialPersistencePermanent);
101
    m_credential = Credential(m_userNameElement->value(), m_passwordElement->value(), CredentialPersistencePermanent);
- a/Source/WebKit/blackberry/WebCoreSupport/CredentialTransformData.h -2 / +2 lines
Lines 22-28 a/Source/WebKit/blackberry/WebCoreSupport/CredentialTransformData.h_sec1
22
#include "Credential.h"
22
#include "Credential.h"
23
#include "HTMLFormElement.h"
23
#include "HTMLFormElement.h"
24
#include "HTMLInputElement.h"
24
#include "HTMLInputElement.h"
25
#include "KURL.h"
25
#include "URL.h"
26
#include "ProtectionSpace.h"
26
#include "ProtectionSpace.h"
27
27
28
#include <wtf/RefPtr.h>
28
#include <wtf/RefPtr.h>
Lines 47-53 private: a/Source/WebKit/blackberry/WebCoreSupport/CredentialTransformData.h_sec2
47
    bool findPasswordFormFields(const HTMLFormElement*);
47
    bool findPasswordFormFields(const HTMLFormElement*);
48
    bool locateSpecificPasswords(const Vector<HTMLInputElement*>& passwords);
48
    bool locateSpecificPasswords(const Vector<HTMLInputElement*>& passwords);
49
49
50
    KURL m_action;
50
    URL m_action;
51
    ProtectionSpace m_protectionSpace;
51
    ProtectionSpace m_protectionSpace;
52
    mutable Credential m_credential;
52
    mutable Credential m_credential;
53
    RefPtr<HTMLInputElement> m_userNameElement;
53
    RefPtr<HTMLInputElement> m_userNameElement;
- a/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp -12 / +12 lines
Lines 155-161 void FrameLoaderClientBlackBerry::dispatchDidCancelClientRedirect() a/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp_sec1
155
    m_clientRedirectIsPending = false;
155
    m_clientRedirectIsPending = false;
156
}
156
}
157
157
158
void FrameLoaderClientBlackBerry::dispatchWillPerformClientRedirect(const KURL&, double, double)
158
void FrameLoaderClientBlackBerry::dispatchWillPerformClientRedirect(const URL&, double, double)
159
{
159
{
160
    if (m_webPagePrivate->m_dumpRenderTree)
160
    if (m_webPagePrivate->m_dumpRenderTree)
161
        m_webPagePrivate->m_dumpRenderTree->didDispatchWillPerformClientRedirect();
161
        m_webPagePrivate->m_dumpRenderTree->didDispatchWillPerformClientRedirect();
Lines 186-197 void FrameLoaderClientBlackBerry::dispatchDecidePolicyForNavigationAction(FrameP a/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp_sec2
186
{
186
{
187
    PolicyAction decision = PolicyIgnore;
187
    PolicyAction decision = PolicyIgnore;
188
188
189
    const KURL& url = request.url();
189
    const URL& url = request.url();
190
    if (!url.isNull()) {
190
    if (!url.isNull()) {
191
        // Fragment scrolls on the same page should always be handled internally.
191
        // Fragment scrolls on the same page should always be handled internally.
192
        // (Only count as a fragment scroll if we are scrolling to a #fragment url, not back to the top, and reloading
192
        // (Only count as a fragment scroll if we are scrolling to a #fragment url, not back to the top, and reloading
193
        // the same url is not a fragment scroll even if it has a #fragment.)
193
        // the same url is not a fragment scroll even if it has a #fragment.)
194
        const KURL& currentUrl = m_frame->document()->url();
194
        const URL& currentUrl = m_frame->document()->url();
195
        bool isFragmentScroll = url.hasFragmentIdentifier() && url != currentUrl && equalIgnoringFragmentIdentifier(currentUrl, url);
195
        bool isFragmentScroll = url.hasFragmentIdentifier() && url != currentUrl && equalIgnoringFragmentIdentifier(currentUrl, url);
196
        decision = decidePolicyForExternalLoad(request, isFragmentScroll);
196
        decision = decidePolicyForExternalLoad(request, isFragmentScroll);
197
197
Lines 312-318 bool FrameLoaderClientBlackBerry::shouldAlwaysUsePluginDocument(const String& mi a/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp_sec3
312
}
312
}
313
313
314
PassRefPtr<Widget> FrameLoaderClientBlackBerry::createPlugin(const IntSize& pluginSize,
314
PassRefPtr<Widget> FrameLoaderClientBlackBerry::createPlugin(const IntSize& pluginSize,
315
    HTMLPlugInElement* element, const KURL& url, const Vector<String>& paramNames,
315
    HTMLPlugInElement* element, const URL& url, const Vector<String>& paramNames,
316
    const Vector<String>& paramValues, const String& mimeTypeIn, bool loadManually)
316
    const Vector<String>& paramValues, const String& mimeTypeIn, bool loadManually)
317
{
317
{
318
    String mimeType(mimeTypeIn);
318
    String mimeType(mimeTypeIn);
Lines 395-401 PassRefPtr<DocumentLoader> FrameLoaderClientBlackBerry::createDocumentLoader(con a/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp_sec4
395
        if (!source.isEmpty()) {
395
        if (!source.isEmpty()) {
396
            // Always ignore existing substitute data if any.
396
            // Always ignore existing substitute data if any.
397
            WTF::RefPtr<SharedBuffer> buffer = SharedBuffer::create(source.is8Bit() ? reinterpret_cast<const char*>(source.characters8()) : source.latin1().data(), source.length());
397
            WTF::RefPtr<SharedBuffer> buffer = SharedBuffer::create(source.is8Bit() ? reinterpret_cast<const char*>(source.characters8()) : source.latin1().data(), source.length());
398
            substituteDataLocal = SubstituteData(buffer, "text/html", "latin1", KURL());
398
            substituteDataLocal = SubstituteData(buffer, "text/html", "latin1", URL());
399
        }
399
        }
400
    }
400
    }
401
401
Lines 460-466 void FrameLoaderClientBlackBerry::transitionToCommittedForNewPage() a/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp_sec5
460
    }
460
    }
461
}
461
}
462
462
463
String FrameLoaderClientBlackBerry::userAgent(const KURL&)
463
String FrameLoaderClientBlackBerry::userAgent(const URL&)
464
{
464
{
465
    return m_webPagePrivate->m_webSettings->userAgentString();
465
    return m_webPagePrivate->m_webSettings->userAgentString();
466
}
466
}
Lines 519-525 void FrameLoaderClientBlackBerry::dispatchDidReceiveTitle(const StringWithDirect a/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp_sec6
519
        m_webPagePrivate->m_dumpRenderTree->didReceiveTitleForFrame(title.string(), m_frame);
519
        m_webPagePrivate->m_dumpRenderTree->didReceiveTitleForFrame(title.string(), m_frame);
520
}
520
}
521
521
522
void FrameLoaderClientBlackBerry::setTitle(const StringWithDirection& /*title*/, const KURL& /*url*/)
522
void FrameLoaderClientBlackBerry::setTitle(const StringWithDirection& /*title*/, const URL& /*url*/)
523
{
523
{
524
    // Used by Apple WebKit to update the title of an existing history item.
524
    // Used by Apple WebKit to update the title of an existing history item.
525
    // QtWebKit doesn't accomodate this on history items. If it ever does,
525
    // QtWebKit doesn't accomodate this on history items. If it ever does,
Lines 726-732 void FrameLoaderClientBlackBerry::dispatchDidFailProvisionalLoad(const ResourceE a/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp_sec7
726
        return;
726
        return;
727
727
728
    String errorPage = m_webPagePrivate->m_client->getErrorPage(error.errorCode(), error.localizedDescription(), error.failingURL());
728
    String errorPage = m_webPagePrivate->m_client->getErrorPage(error.errorCode(), error.localizedDescription(), error.failingURL());
729
    SubstituteData errorData(utf8Buffer(errorPage), "text/html", "utf-8", KURL(KURL(), error.failingURL()));
729
    SubstituteData errorData(utf8Buffer(errorPage), "text/html", "utf-8", URL(URL(), error.failingURL()));
730
730
731
    // Loading using SubstituteData will replace the original request with our
731
    // Loading using SubstituteData will replace the original request with our
732
    // error data. This must be done within dispatchDidFailProvisionalLoad,
732
    // error data. This must be done within dispatchDidFailProvisionalLoad,
Lines 777-783 void FrameLoaderClientBlackBerry::dispatchWillSendSubmitEvent(PassRefPtr<FormSta a/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp_sec8
777
    }
777
    }
778
}
778
}
779
779
780
PassRefPtr<Frame> FrameLoaderClientBlackBerry::createFrame(const KURL& url, const String& name
780
PassRefPtr<Frame> FrameLoaderClientBlackBerry::createFrame(const URL& url, const String& name
781
    , HTMLFrameOwnerElement* ownerElement, const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight)
781
    , HTMLFrameOwnerElement* ownerElement, const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight)
782
{
782
{
783
    if (!m_webPagePrivate)
783
    if (!m_webPagePrivate)
Lines 815-821 PassRefPtr<Frame> FrameLoaderClientBlackBerry::createFrame(const KURL& url, cons a/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp_sec9
815
    return childFrame.release();
815
    return childFrame.release();
816
}
816
}
817
817
818
ObjectContentType FrameLoaderClientBlackBerry::objectContentType(const KURL& url, const String& mimeTypeIn, bool shouldPreferPlugInsForImages)
818
ObjectContentType FrameLoaderClientBlackBerry::objectContentType(const URL& url, const String& mimeTypeIn, bool shouldPreferPlugInsForImages)
819
{
819
{
820
    String mimeType = mimeTypeIn;
820
    String mimeType = mimeTypeIn;
821
    if (mimeType.isEmpty())
821
    if (mimeType.isEmpty())
Lines 1139-1145 PolicyAction FrameLoaderClientBlackBerry::decidePolicyForExternalLoad(const Reso a/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp_sec10
1139
    // and exposed to client. Before that, don't return PolicyIgnore so we can continue to
1139
    // and exposed to client. Before that, don't return PolicyIgnore so we can continue to
1140
    // create new window and get to dispatchDecidePolicyForNavigationAction() where the client
1140
    // create new window and get to dispatchDecidePolicyForNavigationAction() where the client
1141
    // is given a chance to decide how to handle patterns such as 'mailto:'.
1141
    // is given a chance to decide how to handle patterns such as 'mailto:'.
1142
    const KURL& url = request.url();
1142
    const URL& url = request.url();
1143
    String pattern = m_webPagePrivate->findPatternStringForUrl(url);
1143
    String pattern = m_webPagePrivate->findPatternStringForUrl(url);
1144
    if (!pattern.isEmpty()) {
1144
    if (!pattern.isEmpty()) {
1145
        m_webPagePrivate->m_client->handleStringPattern(pattern.characters(), pattern.length());
1145
        m_webPagePrivate->m_client->handleStringPattern(pattern.characters(), pattern.length());
Lines 1342-1348 void FrameLoaderClientBlackBerry::dispatchDidLoadFromApplicationCache(const Reso a/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp_sec11
1342
    m_webPagePrivate->m_client->notifyDidLoadFromApplicationCache();
1342
    m_webPagePrivate->m_client->notifyDidLoadFromApplicationCache();
1343
}
1343
}
1344
1344
1345
PassRefPtr<SecurityOrigin> FrameLoaderClientBlackBerry::securityOriginForNewDocument(const KURL& url)
1345
PassRefPtr<SecurityOrigin> FrameLoaderClientBlackBerry::securityOriginForNewDocument(const URL& url)
1346
{
1346
{
1347
    // What we are trying to do here is to keep using the old path as origin when a file-based html page
1347
    // What we are trying to do here is to keep using the old path as origin when a file-based html page
1348
    // changes its location to some html in a subfolder. This will allow some file-based html packages
1348
    // changes its location to some html in a subfolder. This will allow some file-based html packages
- a/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.h -13 / +13 lines
Lines 68-74 public: a/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.h_sec1
68
    virtual void dispatchDidHandleOnloadEvents();
68
    virtual void dispatchDidHandleOnloadEvents();
69
    virtual void dispatchDidReceiveServerRedirectForProvisionalLoad() { notImplemented(); }
69
    virtual void dispatchDidReceiveServerRedirectForProvisionalLoad() { notImplemented(); }
70
    virtual void dispatchDidCancelClientRedirect();
70
    virtual void dispatchDidCancelClientRedirect();
71
    virtual void dispatchWillPerformClientRedirect(const KURL&, double, double);
71
    virtual void dispatchWillPerformClientRedirect(const URL&, double, double);
72
    virtual void dispatchDidChangeLocationWithinPage();
72
    virtual void dispatchDidChangeLocationWithinPage();
73
    virtual void dispatchDidPushStateWithinPage();
73
    virtual void dispatchDidPushStateWithinPage();
74
    virtual void dispatchDidReplaceStateWithinPage();
74
    virtual void dispatchDidReplaceStateWithinPage();
Lines 77-83 public: a/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.h_sec2
77
    virtual void dispatchDidReceiveIcon();
77
    virtual void dispatchDidReceiveIcon();
78
    virtual void dispatchDidStartProvisionalLoad();
78
    virtual void dispatchDidStartProvisionalLoad();
79
    virtual void dispatchDidReceiveTitle(const StringWithDirection&);
79
    virtual void dispatchDidReceiveTitle(const StringWithDirection&);
80
    virtual void setTitle(const StringWithDirection& title, const KURL&);
80
    virtual void setTitle(const StringWithDirection& title, const URL&);
81
    virtual void dispatchDidCommitLoad();
81
    virtual void dispatchDidCommitLoad();
82
    virtual void dispatchDidFailProvisionalLoad(const ResourceError&);
82
    virtual void dispatchDidFailProvisionalLoad(const ResourceError&);
83
    virtual void dispatchDidFailLoad(const ResourceError&);
83
    virtual void dispatchDidFailLoad(const ResourceError&);
Lines 111-117 public: a/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.h_sec3
111
    virtual void dispatchWillUpdateApplicationCache(const ResourceRequest&);
111
    virtual void dispatchWillUpdateApplicationCache(const ResourceRequest&);
112
    virtual void dispatchDidLoadFromApplicationCache(const ResourceRequest&);
112
    virtual void dispatchDidLoadFromApplicationCache(const ResourceRequest&);
113
    virtual void didDisplayInsecureContent() { notImplemented(); }
113
    virtual void didDisplayInsecureContent() { notImplemented(); }
114
    virtual void didRunInsecureContent(SecurityOrigin*, const KURL&) { notImplemented(); }
114
    virtual void didRunInsecureContent(SecurityOrigin*, const URL&) { notImplemented(); }
115
    virtual ResourceError interruptedForPolicyChangeError(const ResourceRequest&) { notImplemented(); return ResourceError(emptyString(), 0, emptyString(), emptyString()); }
115
    virtual ResourceError interruptedForPolicyChangeError(const ResourceRequest&) { notImplemented(); return ResourceError(emptyString(), 0, emptyString(), emptyString()); }
116
    virtual ResourceError cancelledError(const ResourceRequest&) { notImplemented(); return ResourceError(emptyString(), 0, emptyString(), emptyString()); }
116
    virtual ResourceError cancelledError(const ResourceRequest&) { notImplemented(); return ResourceError(emptyString(), 0, emptyString(), emptyString()); }
117
    virtual ResourceError blockedError(const ResourceRequest&) { notImplemented(); return ResourceError(emptyString(), 0, emptyString(), emptyString()); }
117
    virtual ResourceError blockedError(const ResourceRequest&) { notImplemented(); return ResourceError(emptyString(), 0, emptyString(), emptyString()); }
Lines 133-140 public: a/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.h_sec4
133
    virtual void didFinishLoad() { notImplemented(); }
133
    virtual void didFinishLoad() { notImplemented(); }
134
    virtual void prepareForDataSourceReplacement() { notImplemented(); }
134
    virtual void prepareForDataSourceReplacement() { notImplemented(); }
135
    virtual PassRefPtr<DocumentLoader> createDocumentLoader(const ResourceRequest&, const SubstituteData&);
135
    virtual PassRefPtr<DocumentLoader> createDocumentLoader(const ResourceRequest&, const SubstituteData&);
136
    virtual void setTitle(const String&, const KURL&) { notImplemented(); }
136
    virtual void setTitle(const String&, const URL&) { notImplemented(); }
137
    virtual String userAgent(const KURL&);
137
    virtual String userAgent(const URL&);
138
    virtual void savePlatformDataToCachedFrame(CachedFrame*) { notImplemented(); }
138
    virtual void savePlatformDataToCachedFrame(CachedFrame*) { notImplemented(); }
139
    virtual void transitionToCommittedFromCachedFrame(CachedFrame*) { notImplemented(); }
139
    virtual void transitionToCommittedFromCachedFrame(CachedFrame*) { notImplemented(); }
140
    virtual void transitionToCommittedForNewPage();
140
    virtual void transitionToCommittedForNewPage();
Lines 143-155 public: a/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.h_sec5
143
    virtual void didRestoreFromPageCache();
143
    virtual void didRestoreFromPageCache();
144
    virtual void dispatchDidBecomeFrameset(bool) { }
144
    virtual void dispatchDidBecomeFrameset(bool) { }
145
    virtual void convertMainResourceLoadToDownload(DocumentLoader*, const ResourceRequest&, const ResourceResponse&);
145
    virtual void convertMainResourceLoadToDownload(DocumentLoader*, const ResourceRequest&, const ResourceResponse&);
146
    virtual PassRefPtr<Frame> createFrame(const KURL&, const String&, HTMLFrameOwnerElement*, const String&, bool, int, int);
146
    virtual PassRefPtr<Frame> createFrame(const URL&, const String&, HTMLFrameOwnerElement*, const String&, bool, int, int);
147
    virtual bool shouldAlwaysUsePluginDocument(const String&) const;
147
    virtual bool shouldAlwaysUsePluginDocument(const String&) const;
148
    virtual PassRefPtr<Widget> createPlugin(const IntSize&, HTMLPlugInElement*, const KURL&, const Vector<String>&, const Vector<String>&, const String&, bool);
148
    virtual PassRefPtr<Widget> createPlugin(const IntSize&, HTMLPlugInElement*, const URL&, const Vector<String>&, const Vector<String>&, const String&, bool);
149
    virtual void redirectDataToPlugin(Widget*);
149
    virtual void redirectDataToPlugin(Widget*);
150
    virtual PassRefPtr<Widget> createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const KURL&, const Vector<String>&, const Vector<String>&) { notImplemented(); return 0; }
150
    virtual PassRefPtr<Widget> createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const URL&, const Vector<String>&, const Vector<String>&) { notImplemented(); return 0; }
151
151
152
    virtual ObjectContentType objectContentType(const KURL&, const String& mimeType, bool shouldPreferPlugInsForImages);
152
    virtual ObjectContentType objectContentType(const URL&, const String& mimeType, bool shouldPreferPlugInsForImages);
153
    virtual String overrideMediaType() const { notImplemented(); return String(); }
153
    virtual String overrideMediaType() const { notImplemented(); return String(); }
154
    virtual void dispatchDidClearWindowObjectInWorld(DOMWrapperWorld*);
154
    virtual void dispatchDidClearWindowObjectInWorld(DOMWrapperWorld*);
155
    virtual void documentElementAvailable() { notImplemented(); }
155
    virtual void documentElementAvailable() { notImplemented(); }
Lines 159-165 public: a/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.h_sec6
159
    virtual bool shouldLoadIconExternally() { return false; }
159
    virtual bool shouldLoadIconExternally() { return false; }
160
    virtual void loadIconExternally(const String& originalPageUrl, const String& finalPageUrl, const String& iconUrl);
160
    virtual void loadIconExternally(const String& originalPageUrl, const String& finalPageUrl, const String& iconUrl);
161
161
162
    virtual void didDetectXSS(const KURL&, bool) { }
162
    virtual void didDetectXSS(const URL&, bool) { }
163
    virtual void dispatchDidChangeIcons(IconType) { notImplemented(); };
163
    virtual void dispatchDidChangeIcons(IconType) { notImplemented(); };
164
    virtual void dispatchWillSendSubmitEvent(PassRefPtr<FormState>);
164
    virtual void dispatchWillSendSubmitEvent(PassRefPtr<FormState>);
165
165
Lines 168-174 public: a/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.h_sec7
168
168
169
    virtual PassRefPtr<FrameNetworkingContext> createNetworkingContext();
169
    virtual PassRefPtr<FrameNetworkingContext> createNetworkingContext();
170
170
171
    virtual PassRefPtr<SecurityOrigin> securityOriginForNewDocument(const KURL&);
171
    virtual PassRefPtr<SecurityOrigin> securityOriginForNewDocument(const URL&);
172
172
173
    void readyToRender(bool pageIsVisuallyNonEmpty);
173
    void readyToRender(bool pageIsVisuallyNonEmpty);
174
174
Lines 203-210 private: a/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.h_sec8
203
    bool m_childFrameCreationSuppressed;
203
    bool m_childFrameCreationSuppressed;
204
204
205
    // This set includes the original and final urls for server redirects.
205
    // This set includes the original and final urls for server redirects.
206
    HashSet<KURL> m_historyNavigationSourceURLs;
206
    HashSet<URL> m_historyNavigationSourceURLs;
207
    HashSet<KURL> m_redirectURLsToSkipDueToHistoryNavigation;
207
    HashSet<URL> m_redirectURLsToSkipDueToHistoryNavigation;
208
208
209
    // Plugin view to redirect data to.
209
    // Plugin view to redirect data to.
210
    PluginView* m_pluginView;
210
    PluginView* m_pluginView;
- a/Source/WebKit/blackberry/WebCoreSupport/PlatformStrategiesBlackBerry.cpp -7 / +7 lines
Lines 81-112 VisitedLinkStrategy* PlatformStrategiesBlackBerry::createVisitedLinkStrategy() a/Source/WebKit/blackberry/WebCoreSupport/PlatformStrategiesBlackBerry.cpp_sec1
81
}
81
}
82
82
83
// CookiesStrategy
83
// CookiesStrategy
84
String PlatformStrategiesBlackBerry::cookiesForDOM(const NetworkStorageSession& session, const KURL& firstParty, const KURL& url)
84
String PlatformStrategiesBlackBerry::cookiesForDOM(const NetworkStorageSession& session, const URL& firstParty, const URL& url)
85
{
85
{
86
    return WebCore::cookiesForDOM(session, firstParty, url);
86
    return WebCore::cookiesForDOM(session, firstParty, url);
87
}
87
}
88
88
89
void PlatformStrategiesBlackBerry::setCookiesFromDOM(const NetworkStorageSession& session, const KURL& firstParty, const KURL& url, const String& cookieString)
89
void PlatformStrategiesBlackBerry::setCookiesFromDOM(const NetworkStorageSession& session, const URL& firstParty, const URL& url, const String& cookieString)
90
{
90
{
91
    WebCore::setCookiesFromDOM(session, firstParty, url, cookieString);
91
    WebCore::setCookiesFromDOM(session, firstParty, url, cookieString);
92
}
92
}
93
93
94
bool PlatformStrategiesBlackBerry::cookiesEnabled(const NetworkStorageSession& session, const KURL& firstParty, const KURL& url)
94
bool PlatformStrategiesBlackBerry::cookiesEnabled(const NetworkStorageSession& session, const URL& firstParty, const URL& url)
95
{
95
{
96
    return WebCore::cookiesEnabled(session, firstParty, url);
96
    return WebCore::cookiesEnabled(session, firstParty, url);
97
}
97
}
98
98
99
String PlatformStrategiesBlackBerry::cookieRequestHeaderFieldValue(const NetworkStorageSession& session, const KURL& firstParty, const KURL& url)
99
String PlatformStrategiesBlackBerry::cookieRequestHeaderFieldValue(const NetworkStorageSession& session, const URL& firstParty, const URL& url)
100
{
100
{
101
    return WebCore::cookieRequestHeaderFieldValue(session, firstParty, url);
101
    return WebCore::cookieRequestHeaderFieldValue(session, firstParty, url);
102
}
102
}
103
103
104
bool PlatformStrategiesBlackBerry::getRawCookies(const NetworkStorageSession& session, const KURL& firstParty, const KURL& url, Vector<Cookie>& rawCookies)
104
bool PlatformStrategiesBlackBerry::getRawCookies(const NetworkStorageSession& session, const URL& firstParty, const URL& url, Vector<Cookie>& rawCookies)
105
{
105
{
106
    return WebCore::getRawCookies(session, firstParty, url, rawCookies);
106
    return WebCore::getRawCookies(session, firstParty, url, rawCookies);
107
}
107
}
108
108
109
void PlatformStrategiesBlackBerry::deleteCookie(const NetworkStorageSession& session, const KURL& url, const String& cookieName)
109
void PlatformStrategiesBlackBerry::deleteCookie(const NetworkStorageSession& session, const URL& url, const String& cookieName)
110
{
110
{
111
    WebCore::deleteCookie(session, url, cookieName);
111
    WebCore::deleteCookie(session, url, cookieName);
112
}
112
}
Lines 151-157 void PlatformStrategiesBlackBerry::getPluginInfo(const Page*, Vector<PluginInfo> a/Source/WebKit/blackberry/WebCoreSupport/PlatformStrategiesBlackBerry.cpp_sec2
151
}
151
}
152
152
153
// VisitedLinkStrategy
153
// VisitedLinkStrategy
154
bool PlatformStrategiesBlackBerry::isLinkVisited(Page* page, LinkHash hash, const KURL&, const AtomicString&)
154
bool PlatformStrategiesBlackBerry::isLinkVisited(Page* page, LinkHash hash, const URL&, const AtomicString&)
155
{
155
{
156
    return page->group().isLinkVisited(hash);
156
    return page->group().isLinkVisited(hash);
157
}
157
}
- a/Source/WebKit/blackberry/WebCoreSupport/PlatformStrategiesBlackBerry.h -7 / +7 lines
Lines 47-58 private: a/Source/WebKit/blackberry/WebCoreSupport/PlatformStrategiesBlackBerry.h_sec1
47
    virtual WebCore::VisitedLinkStrategy* createVisitedLinkStrategy();
47
    virtual WebCore::VisitedLinkStrategy* createVisitedLinkStrategy();
48
48
49
    // WebCore::CookiesStrategy
49
    // WebCore::CookiesStrategy
50
    virtual String cookiesForDOM(const WebCore::NetworkStorageSession&, const WebCore::KURL& firstParty, const WebCore::KURL&);
50
    virtual String cookiesForDOM(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&);
51
    virtual void setCookiesFromDOM(const WebCore::NetworkStorageSession&, const WebCore::KURL& firstParty, const WebCore::KURL&, const String&);
51
    virtual void setCookiesFromDOM(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&, const String&);
52
    virtual bool cookiesEnabled(const WebCore::NetworkStorageSession&, const WebCore::KURL& firstParty, const WebCore::KURL&);
52
    virtual bool cookiesEnabled(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&);
53
    virtual String cookieRequestHeaderFieldValue(const WebCore::NetworkStorageSession&, const WebCore::KURL& firstParty, const WebCore::KURL&);
53
    virtual String cookieRequestHeaderFieldValue(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&);
54
    virtual bool getRawCookies(const WebCore::NetworkStorageSession&, const WebCore::KURL& firstParty, const WebCore::KURL&, Vector<WebCore::Cookie>&);
54
    virtual bool getRawCookies(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&, Vector<WebCore::Cookie>&);
55
    virtual void deleteCookie(const WebCore::NetworkStorageSession&, const WebCore::KURL&, const String&);
55
    virtual void deleteCookie(const WebCore::NetworkStorageSession&, const WebCore::URL&, const String&);
56
56
57
    // WebCore::DatabaseStrategy
57
    // WebCore::DatabaseStrategy
58
    // - Using default implementation.
58
    // - Using default implementation.
Lines 62-68 private: a/Source/WebKit/blackberry/WebCoreSupport/PlatformStrategiesBlackBerry.h_sec2
62
    virtual void getPluginInfo(const WebCore::Page*, Vector<WebCore::PluginInfo>&);
62
    virtual void getPluginInfo(const WebCore::Page*, Vector<WebCore::PluginInfo>&);
63
63
64
    // WebCore::VisitedLinkStrategy
64
    // WebCore::VisitedLinkStrategy
65
    virtual bool isLinkVisited(WebCore::Page*, WebCore::LinkHash, const WebCore::KURL& baseURL, const WTF::AtomicString& attributeURL);
65
    virtual bool isLinkVisited(WebCore::Page*, WebCore::LinkHash, const WebCore::URL& baseURL, const WTF::AtomicString& attributeURL);
66
    virtual void addVisitedLink(WebCore::Page*, WebCore::LinkHash);
66
    virtual void addVisitedLink(WebCore::Page*, WebCore::LinkHash);
67
};
67
};
68
68
- a/Source/WebKit/blackberry/WebKitSupport/PagePopup.cpp -2 / +2 lines
Lines 26-34 a/Source/WebKit/blackberry/WebKitSupport/PagePopup.cpp_sec1
26
#include "JSDOMWindowBase.h"
26
#include "JSDOMWindowBase.h"
27
#include "JSObject.h"
27
#include "JSObject.h"
28
#include "JSRetainPtr.h"
28
#include "JSRetainPtr.h"
29
#include "KURL.h"
30
#include "PagePopupClient.h"
29
#include "PagePopupClient.h"
31
#include "Settings.h"
30
#include "Settings.h"
31
#include "URL.h"
32
#include "WebPage.h"
32
#include "WebPage.h"
33
#include "WebPage_p.h"
33
#include "WebPage_p.h"
34
#include <JavaScriptCore/API/JSCallbackObject.h>
34
#include <JavaScriptCore/API/JSCallbackObject.h>
Lines 69-75 void PagePopup::writeDocument(DocumentWriter* writer) a/Source/WebKit/blackberry/WebKitSupport/PagePopup.cpp_sec2
69
{
69
{
70
    ASSERT(writer);
70
    ASSERT(writer);
71
    writer->setMIMEType("text/html");
71
    writer->setMIMEType("text/html");
72
    writer->begin(KURL());
72
    writer->begin(URL());
73
73
74
    // All the popups have the same html head and the page content should be non-zoomable.
74
    // All the popups have the same html head and the page content should be non-zoomable.
75
    StringBuilder source;
75
    StringBuilder source;
- a/Source/WebKit/efl/ChangeLog +9 lines
Lines 1-3 a/Source/WebKit/efl/ChangeLog_sec1
1
2013-09-26  Darin Adler  <darin@apple.com>
2
3
        rename KURL to URL
4
        https://bugs.webkit.org/show_bug.cgi?id=16214
5
6
        Reviewed by Andreas Kling.
7
8
        * many files: Renamed, using script.
9
1
2013-09-25  Brent Fulgham  <bfulgham@apple.com>
10
2013-09-25  Brent Fulgham  <bfulgham@apple.com>
2
11
3
        Refactor RuntimeEnabledFeatures as a Singleton.
12
        Refactor RuntimeEnabledFeatures as a Singleton.
- a/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp -3 / +3 lines
Lines 43-49 a/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp_sec1
43
#include "FrameLoaderClientEfl.h"
43
#include "FrameLoaderClientEfl.h"
44
#include "HitTestResult.h"
44
#include "HitTestResult.h"
45
#include "IntRect.h"
45
#include "IntRect.h"
46
#include "KURL.h"
46
#include "URL.h"
47
#include "NavigationAction.h"
47
#include "NavigationAction.h"
48
#include "NotImplemented.h"
48
#include "NotImplemented.h"
49
#include "PopupMenuEfl.h"
49
#include "PopupMenuEfl.h"
Lines 363-369 void ChromeClientEfl::mouseDidMoveOverElement(const HitTestResult& hit, unsigned a/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp_sec2
363
    // FIXME, compare with old link, look at Qt impl.
363
    // FIXME, compare with old link, look at Qt impl.
364
    bool isLink = hit.isLiveLink();
364
    bool isLink = hit.isLiveLink();
365
    if (isLink) {
365
    if (isLink) {
366
        KURL url = hit.absoluteLinkURL();
366
        URL url = hit.absoluteLinkURL();
367
        if (!url.isEmpty() && url != m_hoveredLinkURL) {
367
        if (!url.isEmpty() && url != m_hoveredLinkURL) {
368
            const char* link[2];
368
            const char* link[2];
369
            TextDirection dir;
369
            TextDirection dir;
Lines 376-382 void ChromeClientEfl::mouseDidMoveOverElement(const HitTestResult& hit, unsigned a/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp_sec3
376
        }
376
        }
377
    } else if (!isLink && !m_hoveredLinkURL.isEmpty()) {
377
    } else if (!isLink && !m_hoveredLinkURL.isEmpty()) {
378
        ewk_view_mouse_link_hover_out(m_view);
378
        ewk_view_mouse_link_hover_out(m_view);
379
        m_hoveredLinkURL = KURL();
379
        m_hoveredLinkURL = URL();
380
    }
380
    }
381
}
381
}
382
382
- a/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.h -2 / +2 lines
Lines 25-31 a/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.h_sec1
25
#define ChromeClientEfl_h
25
#define ChromeClientEfl_h
26
26
27
#include "ChromeClient.h"
27
#include "ChromeClient.h"
28
#include "KURL.h"
28
#include "URL.h"
29
#include "PopupMenu.h"
29
#include "PopupMenu.h"
30
30
31
#if ENABLE(INPUT_TYPE_COLOR)
31
#if ENABLE(INPUT_TYPE_COLOR)
Lines 188-194 public: a/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.h_sec2
188
#endif
188
#endif
189
189
190
    Evas_Object* m_view;
190
    Evas_Object* m_view;
191
    KURL m_hoveredLinkURL;
191
    URL m_hoveredLinkURL;
192
#if ENABLE(FULLSCREEN_API)
192
#if ENABLE(FULLSCREEN_API)
193
    RefPtr<Element> m_fullScreenElement;
193
    RefPtr<Element> m_fullScreenElement;
194
#endif
194
#endif
- a/Source/WebKit/efl/WebCoreSupport/ContextMenuClientEfl.cpp -2 / +2 lines
Lines 33-39 a/Source/WebKit/efl/WebCoreSupport/ContextMenuClientEfl.cpp_sec1
33
33
34
#include "ContextMenu.h"
34
#include "ContextMenu.h"
35
#include "HitTestResult.h"
35
#include "HitTestResult.h"
36
#include "KURL.h"
36
#include "URL.h"
37
#include "NotImplemented.h"
37
#include "NotImplemented.h"
38
#include <wtf/RefCounted.h>
38
#include <wtf/RefCounted.h>
39
39
Lines 55-61 void ContextMenuClientEfl::contextMenuItemSelected(ContextMenuItem*, const Conte a/Source/WebKit/efl/WebCoreSupport/ContextMenuClientEfl.cpp_sec2
55
    notImplemented();
55
    notImplemented();
56
}
56
}
57
57
58
void ContextMenuClientEfl::downloadURL(const KURL&)
58
void ContextMenuClientEfl::downloadURL(const URL&)
59
{
59
{
60
    notImplemented();
60
    notImplemented();
61
}
61
}
- a/Source/WebKit/efl/WebCoreSupport/ContextMenuClientEfl.h -1 / +1 lines
Lines 45-51 public: a/Source/WebKit/efl/WebCoreSupport/ContextMenuClientEfl.h_sec1
45
    virtual PassOwnPtr<ContextMenu> customizeMenu(PassOwnPtr<ContextMenu>);
45
    virtual PassOwnPtr<ContextMenu> customizeMenu(PassOwnPtr<ContextMenu>);
46
    virtual void contextMenuItemSelected(ContextMenuItem*, const ContextMenu*);
46
    virtual void contextMenuItemSelected(ContextMenuItem*, const ContextMenu*);
47
47
48
    virtual void downloadURL(const KURL&);
48
    virtual void downloadURL(const URL&);
49
    virtual void lookUpInDictionary(Frame*);
49
    virtual void lookUpInDictionary(Frame*);
50
    virtual void speak(const String&);
50
    virtual void speak(const String&);
51
    virtual bool isSpeaking();
51
    virtual bool isSpeaking();
- a/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.cpp -5 / +5 lines
Lines 221-233 String DumpRenderTreeSupportEfl::suitableDRTFrameName(const Evas_Object* ewkFram a/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.cpp_sec1
221
    return String("frame (anonymous)");
221
    return String("frame (anonymous)");
222
}
222
}
223
223
224
const WebCore::KURL DumpRenderTreeSupportEfl::provisionalURL(const Evas_Object* ewkFrame)
224
const WebCore::URL DumpRenderTreeSupportEfl::provisionalURL(const Evas_Object* ewkFrame)
225
{
225
{
226
    DRT_SUPPORT_FRAME_GET_OR_RETURN(ewkFrame, frame, WebCore::KURL());
226
    DRT_SUPPORT_FRAME_GET_OR_RETURN(ewkFrame, frame, WebCore::URL());
227
227
228
    WebCore::DocumentLoader* provisionalDocumentLoader = frame->loader().provisionalDocumentLoader();
228
    WebCore::DocumentLoader* provisionalDocumentLoader = frame->loader().provisionalDocumentLoader();
229
    if (!provisionalDocumentLoader)
229
    if (!provisionalDocumentLoader)
230
        return WebCore::KURL();
230
        return WebCore::URL();
231
231
232
    return provisionalDocumentLoader->url();
232
    return provisionalDocumentLoader->url();
233
}
233
}
Lines 270-276 void DumpRenderTreeSupportEfl::addUserScript(const Evas_Object* ewkView, const S a/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.cpp_sec2
270
{
270
{
271
    DRT_SUPPRT_PAGE_GET_OR_RETURN(ewkView, page);
271
    DRT_SUPPRT_PAGE_GET_OR_RETURN(ewkView, page);
272
272
273
    page->group().addUserScriptToWorld(WebCore::mainThreadNormalWorld(), sourceCode, WebCore::KURL(),
273
    page->group().addUserScriptToWorld(WebCore::mainThreadNormalWorld(), sourceCode, WebCore::URL(),
274
                                       Vector<String>(), Vector<String>(), runAtStart ? WebCore::InjectAtDocumentStart : WebCore::InjectAtDocumentEnd,
274
                                       Vector<String>(), Vector<String>(), runAtStart ? WebCore::InjectAtDocumentStart : WebCore::InjectAtDocumentEnd,
275
                                       allFrames ? WebCore::InjectInAllFrames : WebCore::InjectInTopFrameOnly);
275
                                       allFrames ? WebCore::InjectInAllFrames : WebCore::InjectInTopFrameOnly);
276
}
276
}
Lines 286-292 void DumpRenderTreeSupportEfl::addUserStyleSheet(const Evas_Object* ewkView, con a/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.cpp_sec3
286
{
286
{
287
    DRT_SUPPRT_PAGE_GET_OR_RETURN(ewkView, page);
287
    DRT_SUPPRT_PAGE_GET_OR_RETURN(ewkView, page);
288
288
289
    page->group().addUserStyleSheetToWorld(WebCore::mainThreadNormalWorld(), sourceCode, WebCore::KURL(), Vector<String>(), Vector<String>(), allFrames ? WebCore::InjectInAllFrames : WebCore::InjectInTopFrameOnly);
289
    page->group().addUserStyleSheetToWorld(WebCore::mainThreadNormalWorld(), sourceCode, WebCore::URL(), Vector<String>(), Vector<String>(), allFrames ? WebCore::InjectInAllFrames : WebCore::InjectInTopFrameOnly);
290
}
290
}
291
291
292
void DumpRenderTreeSupportEfl::clearUserStyleSheets(const Evas_Object* ewkView)
292
void DumpRenderTreeSupportEfl::clearUserStyleSheets(const Evas_Object* ewkView)
- a/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.h -2 / +2 lines
Lines 22-28 a/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.h_sec1
22
#ifndef DumpRenderTreeSupportEfl_h
22
#ifndef DumpRenderTreeSupportEfl_h
23
#define DumpRenderTreeSupportEfl_h
23
#define DumpRenderTreeSupportEfl_h
24
24
25
#include "KURL.h"
25
#include "URL.h"
26
#include <Eina.h>
26
#include <Eina.h>
27
#include <FindOptions.h>
27
#include <FindOptions.h>
28
#include <IntRect.h>
28
#include <IntRect.h>
Lines 66-72 public: a/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.h_sec2
66
    static String responseMimeType(const Evas_Object* ewkFrame);
66
    static String responseMimeType(const Evas_Object* ewkFrame);
67
    static WebCore::IntRect selectionRectangle(const Evas_Object* ewkFrame);
67
    static WebCore::IntRect selectionRectangle(const Evas_Object* ewkFrame);
68
    static String suitableDRTFrameName(const Evas_Object* ewkFrame);
68
    static String suitableDRTFrameName(const Evas_Object* ewkFrame);
69
    static const WebCore::KURL provisionalURL(const Evas_Object* ewkFrame);
69
    static const WebCore::URL provisionalURL(const Evas_Object* ewkFrame);
70
    static String layerTreeAsText(const Evas_Object* ewkFrame);
70
    static String layerTreeAsText(const Evas_Object* ewkFrame);
71
    static void setValueForUser(JSContextRef, JSValueRef nodeObject, const String& value);
71
    static void setValueForUser(JSContextRef, JSValueRef nodeObject, const String& value);
72
    static void setDefersLoading(Evas_Object* ewkView, bool defers);
72
    static void setDefersLoading(Evas_Object* ewkView, bool defers);
- a/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp -10 / +10 lines
Lines 93-99 const String& FrameLoaderClientEfl::customUserAgent() const a/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp_sec1
93
    return m_customUserAgent;
93
    return m_customUserAgent;
94
}
94
}
95
95
96
String FrameLoaderClientEfl::userAgent(const KURL&)
96
String FrameLoaderClientEfl::userAgent(const URL&)
97
{
97
{
98
    if (!m_customUserAgent.isEmpty())
98
    if (!m_customUserAgent.isEmpty())
99
        return m_customUserAgent;
99
        return m_customUserAgent;
Lines 212-218 void FrameLoaderClientEfl::dispatchWillSendRequest(DocumentLoader* loader, unsig a/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp_sec2
212
    evas_object_smart_callback_call(m_view, "resource,request,willsend", &messages);
212
    evas_object_smart_callback_call(m_view, "resource,request,willsend", &messages);
213
213
214
    if (request.url != orig.url) {
214
    if (request.url != orig.url) {
215
        coreRequest.setURL(KURL(KURL(), request.url));
215
        coreRequest.setURL(URL(URL(), request.url));
216
216
217
        // Calling client might have changed our url pointer.
217
        // Calling client might have changed our url pointer.
218
        // Free the new allocated string.
218
        // Free the new allocated string.
Lines 356-362 void FrameLoaderClientEfl::dispatchDecidePolicyForNavigationAction(FramePolicyFu a/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp_sec3
356
    callPolicyFunction(function, policy);
356
    callPolicyFunction(function, policy);
357
}
357
}
358
358
359
PassRefPtr<Widget> FrameLoaderClientEfl::createPlugin(const IntSize& pluginSize, HTMLPlugInElement* element, const KURL& url, const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType, bool loadManually)
359
PassRefPtr<Widget> FrameLoaderClientEfl::createPlugin(const IntSize& pluginSize, HTMLPlugInElement* element, const URL& url, const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType, bool loadManually)
360
{
360
{
361
    ASSERT(m_frame);
361
    ASSERT(m_frame);
362
    ASSERT(m_view);
362
    ASSERT(m_view);
Lines 366-372 PassRefPtr<Widget> FrameLoaderClientEfl::createPlugin(const IntSize& pluginSize, a/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp_sec4
366
                                  mimeType, loadManually);
366
                                  mimeType, loadManually);
367
}
367
}
368
368
369
PassRefPtr<Frame> FrameLoaderClientEfl::createFrame(const KURL& url, const String& name, HTMLFrameOwnerElement* ownerElement, const String& referrer, bool /*allowsScrolling*/, int /*marginWidth*/, int /*marginHeight*/)
369
PassRefPtr<Frame> FrameLoaderClientEfl::createFrame(const URL& url, const String& name, HTMLFrameOwnerElement* ownerElement, const String& referrer, bool /*allowsScrolling*/, int /*marginWidth*/, int /*marginHeight*/)
370
{
370
{
371
    ASSERT(m_frame);
371
    ASSERT(m_frame);
372
    ASSERT(m_view);
372
    ASSERT(m_view);
Lines 406-419 void FrameLoaderClientEfl::redirectDataToPlugin(Widget* pluginWidget) a/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp_sec5
406
        m_hasSentResponseToPlugin = false;
406
        m_hasSentResponseToPlugin = false;
407
}
407
}
408
408
409
PassRefPtr<Widget> FrameLoaderClientEfl::createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const KURL&,
409
PassRefPtr<Widget> FrameLoaderClientEfl::createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const URL&,
410
                                                                const Vector<String>& /*paramNames*/, const Vector<String>& /*paramValues*/)
410
                                                                const Vector<String>& /*paramNames*/, const Vector<String>& /*paramValues*/)
411
{
411
{
412
    notImplemented();
412
    notImplemented();
413
    return 0;
413
    return 0;
414
}
414
}
415
415
416
ObjectContentType FrameLoaderClientEfl::objectContentType(const KURL& url, const String& mimeType, bool shouldPreferPlugInsForImages)
416
ObjectContentType FrameLoaderClientEfl::objectContentType(const URL& url, const String& mimeType, bool shouldPreferPlugInsForImages)
417
{
417
{
418
    // FIXME: once plugin support is enabled, this method needs to correctly handle the 'shouldPreferPlugInsForImages' flag. See
418
    // FIXME: once plugin support is enabled, this method needs to correctly handle the 'shouldPreferPlugInsForImages' flag. See
419
    // WebCore::FrameLoader::defaultObjectContentType() for an example.
419
    // WebCore::FrameLoader::defaultObjectContentType() for an example.
Lines 575-586 void FrameLoaderClientEfl::didDisplayInsecureContent() a/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp_sec6
575
    ewk_frame_mixed_content_displayed_set(m_frame, true);
575
    ewk_frame_mixed_content_displayed_set(m_frame, true);
576
}
576
}
577
577
578
void FrameLoaderClientEfl::didRunInsecureContent(SecurityOrigin*, const KURL&)
578
void FrameLoaderClientEfl::didRunInsecureContent(SecurityOrigin*, const URL&)
579
{
579
{
580
    ewk_frame_mixed_content_run_set(m_frame, true);
580
    ewk_frame_mixed_content_run_set(m_frame, true);
581
}
581
}
582
582
583
void FrameLoaderClientEfl::didDetectXSS(const KURL& insecureURL, bool didBlockEntirePage)
583
void FrameLoaderClientEfl::didDetectXSS(const URL& insecureURL, bool didBlockEntirePage)
584
{
584
{
585
    CString cs = insecureURL.string().utf8();
585
    CString cs = insecureURL.string().utf8();
586
    Ewk_Frame_Xss_Notification xssInfo = { cs.data(), didBlockEntirePage };
586
    Ewk_Frame_Xss_Notification xssInfo = { cs.data(), didBlockEntirePage };
Lines 630-636 void FrameLoaderClientEfl::dispatchDidCancelClientRedirect() a/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp_sec7
630
    ewk_frame_redirect_cancelled(m_frame);
630
    ewk_frame_redirect_cancelled(m_frame);
631
}
631
}
632
632
633
void FrameLoaderClientEfl::dispatchWillPerformClientRedirect(const KURL& url, double, double)
633
void FrameLoaderClientEfl::dispatchWillPerformClientRedirect(const URL& url, double, double)
634
{
634
{
635
    ewk_frame_redirect_requested(m_frame, url.string().utf8().data());
635
    ewk_frame_redirect_requested(m_frame, url.string().utf8().data());
636
}
636
}
Lines 788-794 void FrameLoaderClientEfl::prepareForDataSourceReplacement() a/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp_sec8
788
    notImplemented();
788
    notImplemented();
789
}
789
}
790
790
791
void FrameLoaderClientEfl::setTitle(const StringWithDirection&, const KURL&)
791
void FrameLoaderClientEfl::setTitle(const StringWithDirection&, const URL&)
792
{
792
{
793
    // no need for, dispatchDidReceiveTitle is the right callback
793
    // no need for, dispatchDidReceiveTitle is the right callback
794
}
794
}
- a/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h -9 / +9 lines
Lines 94-100 class FrameLoaderClientEfl : public FrameLoaderClient { a/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h_sec1
94
    virtual void dispatchDidHandleOnloadEvents();
94
    virtual void dispatchDidHandleOnloadEvents();
95
    virtual void dispatchDidReceiveServerRedirectForProvisionalLoad();
95
    virtual void dispatchDidReceiveServerRedirectForProvisionalLoad();
96
    virtual void dispatchDidCancelClientRedirect();
96
    virtual void dispatchDidCancelClientRedirect();
97
    virtual void dispatchWillPerformClientRedirect(const KURL&, double, double);
97
    virtual void dispatchWillPerformClientRedirect(const URL&, double, double);
98
    virtual void dispatchDidChangeLocationWithinPage();
98
    virtual void dispatchDidChangeLocationWithinPage();
99
    virtual void dispatchWillClose();
99
    virtual void dispatchWillClose();
100
    virtual void dispatchDidReceiveIcon();
100
    virtual void dispatchDidReceiveIcon();
Lines 128-140 class FrameLoaderClientEfl : public FrameLoaderClient { a/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h_sec2
128
    virtual void postProgressEstimateChangedNotification();
128
    virtual void postProgressEstimateChangedNotification();
129
    virtual void postProgressFinishedNotification();
129
    virtual void postProgressFinishedNotification();
130
130
131
    virtual PassRefPtr<Frame> createFrame(const KURL&, const String& name, HTMLFrameOwnerElement*,
131
    virtual PassRefPtr<Frame> createFrame(const URL&, const String& name, HTMLFrameOwnerElement*,
132
                               const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight);
132
                               const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight);
133
133
134
    virtual PassRefPtr<Widget> createPlugin(const IntSize&, HTMLPlugInElement*, const KURL&, const WTF::Vector<String>&, const WTF::Vector<String>&, const String&, bool);
134
    virtual PassRefPtr<Widget> createPlugin(const IntSize&, HTMLPlugInElement*, const URL&, const WTF::Vector<String>&, const WTF::Vector<String>&, const String&, bool);
135
    virtual void recreatePlugin(Widget*) { }
135
    virtual void recreatePlugin(Widget*) { }
136
    virtual void redirectDataToPlugin(Widget* pluginWidget);
136
    virtual void redirectDataToPlugin(Widget* pluginWidget);
137
    virtual PassRefPtr<Widget> createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const KURL& baseURL, const WTF::Vector<String>& paramNames, const WTF::Vector<String>& paramValues);
137
    virtual PassRefPtr<Widget> createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const URL& baseURL, const WTF::Vector<String>& paramNames, const WTF::Vector<String>& paramValues);
138
    virtual String overrideMediaType() const;
138
    virtual String overrideMediaType() const;
139
    virtual void documentElementAvailable();
139
    virtual void documentElementAvailable();
140
140
Lines 142-148 class FrameLoaderClientEfl : public FrameLoaderClient { a/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h_sec3
142
142
143
    virtual void registerForIconNotification(bool);
143
    virtual void registerForIconNotification(bool);
144
144
145
    virtual ObjectContentType objectContentType(const KURL&, const String& mimeType, bool shouldPreferPlugInsForImages);
145
    virtual ObjectContentType objectContentType(const URL&, const String& mimeType, bool shouldPreferPlugInsForImages);
146
146
147
    virtual void setMainFrameDocumentReady(bool);
147
    virtual void setMainFrameDocumentReady(bool);
148
148
Lines 159-166 class FrameLoaderClientEfl : public FrameLoaderClient { a/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h_sec4
159
    virtual bool shouldGoToHistoryItem(HistoryItem*) const;
159
    virtual bool shouldGoToHistoryItem(HistoryItem*) const;
160
    virtual bool shouldStopLoadingForHistoryItem(HistoryItem*) const;
160
    virtual bool shouldStopLoadingForHistoryItem(HistoryItem*) const;
161
    virtual void didDisplayInsecureContent();
161
    virtual void didDisplayInsecureContent();
162
    virtual void didRunInsecureContent(SecurityOrigin*, const KURL&);
162
    virtual void didRunInsecureContent(SecurityOrigin*, const URL&);
163
    virtual void didDetectXSS(const KURL&, bool didBlockEntirePage);
163
    virtual void didDetectXSS(const URL&, bool didBlockEntirePage);
164
164
165
    virtual ResourceError cancelledError(const ResourceRequest&);
165
    virtual ResourceError cancelledError(const ResourceRequest&);
166
    virtual ResourceError blockedError(const ResourceRequest&);
166
    virtual ResourceError blockedError(const ResourceRequest&);
Lines 187-195 class FrameLoaderClientEfl : public FrameLoaderClient { a/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h_sec5
187
    virtual void prepareForDataSourceReplacement();
187
    virtual void prepareForDataSourceReplacement();
188
188
189
    virtual WTF::PassRefPtr<DocumentLoader> createDocumentLoader(const ResourceRequest&, const SubstituteData&);
189
    virtual WTF::PassRefPtr<DocumentLoader> createDocumentLoader(const ResourceRequest&, const SubstituteData&);
190
    virtual void setTitle(const StringWithDirection& title, const KURL&);
190
    virtual void setTitle(const StringWithDirection& title, const URL&);
191
191
192
    virtual String userAgent(const KURL&);
192
    virtual String userAgent(const URL&);
193
193
194
    virtual void savePlatformDataToCachedFrame(CachedFrame*);
194
    virtual void savePlatformDataToCachedFrame(CachedFrame*);
195
    virtual void transitionToCommittedFromCachedFrame(CachedFrame*);
195
    virtual void transitionToCommittedFromCachedFrame(CachedFrame*);
- a/Source/WebKit/efl/WebCoreSupport/PlatformStrategiesEfl.cpp -7 / +7 lines
Lines 87-118 StorageStrategy* PlatformStrategiesEfl::createStorageStrategy() a/Source/WebKit/efl/WebCoreSupport/PlatformStrategiesEfl.cpp_sec1
87
}
87
}
88
88
89
// CookiesStrategy
89
// CookiesStrategy
90
String PlatformStrategiesEfl::cookiesForDOM(const NetworkStorageSession& session, const KURL& firstParty, const KURL& url)
90
String PlatformStrategiesEfl::cookiesForDOM(const NetworkStorageSession& session, const URL& firstParty, const URL& url)
91
{
91
{
92
    return WebCore::cookiesForDOM(session, firstParty, url);
92
    return WebCore::cookiesForDOM(session, firstParty, url);
93
}
93
}
94
94
95
void PlatformStrategiesEfl::setCookiesFromDOM(const NetworkStorageSession& session, const KURL& firstParty, const KURL& url, const String& cookieString)
95
void PlatformStrategiesEfl::setCookiesFromDOM(const NetworkStorageSession& session, const URL& firstParty, const URL& url, const String& cookieString)
96
{
96
{
97
    WebCore::setCookiesFromDOM(session, firstParty, url, cookieString);
97
    WebCore::setCookiesFromDOM(session, firstParty, url, cookieString);
98
}
98
}
99
99
100
bool PlatformStrategiesEfl::cookiesEnabled(const NetworkStorageSession& session, const KURL& firstParty, const KURL& url)
100
bool PlatformStrategiesEfl::cookiesEnabled(const NetworkStorageSession& session, const URL& firstParty, const URL& url)
101
{
101
{
102
    return WebCore::cookiesEnabled(session, firstParty, url);
102
    return WebCore::cookiesEnabled(session, firstParty, url);
103
}
103
}
104
104
105
String PlatformStrategiesEfl::cookieRequestHeaderFieldValue(const NetworkStorageSession& session, const KURL& firstParty, const KURL& url)
105
String PlatformStrategiesEfl::cookieRequestHeaderFieldValue(const NetworkStorageSession& session, const URL& firstParty, const URL& url)
106
{
106
{
107
    return WebCore::cookieRequestHeaderFieldValue(session, firstParty, url);
107
    return WebCore::cookieRequestHeaderFieldValue(session, firstParty, url);
108
}
108
}
109
109
110
bool PlatformStrategiesEfl::getRawCookies(const NetworkStorageSession& session, const KURL& firstParty, const KURL& url, Vector<Cookie>& rawCookies)
110
bool PlatformStrategiesEfl::getRawCookies(const NetworkStorageSession& session, const URL& firstParty, const URL& url, Vector<Cookie>& rawCookies)
111
{
111
{
112
    return WebCore::getRawCookies(session, firstParty, url, rawCookies);
112
    return WebCore::getRawCookies(session, firstParty, url, rawCookies);
113
}
113
}
114
114
115
void PlatformStrategiesEfl::deleteCookie(const NetworkStorageSession& session, const KURL& url, const String& cookieName)
115
void PlatformStrategiesEfl::deleteCookie(const NetworkStorageSession& session, const URL& url, const String& cookieName)
116
{
116
{
117
    WebCore::deleteCookie(session, url, cookieName);
117
    WebCore::deleteCookie(session, url, cookieName);
118
}
118
}
Lines 158-164 void PlatformStrategiesEfl::getPluginInfo(const Page*, Vector<PluginInfo>& outPl a/Source/WebKit/efl/WebCoreSupport/PlatformStrategiesEfl.cpp_sec2
158
}
158
}
159
159
160
// VisitedLinkStrategy
160
// VisitedLinkStrategy
161
bool PlatformStrategiesEfl::isLinkVisited(Page* page, LinkHash hash, const KURL&, const AtomicString&)
161
bool PlatformStrategiesEfl::isLinkVisited(Page* page, LinkHash hash, const URL&, const AtomicString&)
162
{
162
{
163
    return page->group().isLinkVisited(hash);
163
    return page->group().isLinkVisited(hash);
164
}
164
}
- a/Source/WebKit/efl/WebCoreSupport/PlatformStrategiesEfl.h -7 / +7 lines
Lines 48-59 private: a/Source/WebKit/efl/WebCoreSupport/PlatformStrategiesEfl.h_sec1
48
    virtual WebCore::VisitedLinkStrategy* createVisitedLinkStrategy();
48
    virtual WebCore::VisitedLinkStrategy* createVisitedLinkStrategy();
49
49
50
    // WebCore::CookiesStrategy
50
    // WebCore::CookiesStrategy
51
    virtual String cookiesForDOM(const WebCore::NetworkStorageSession&, const WebCore::KURL& firstParty, const WebCore::KURL&);
51
    virtual String cookiesForDOM(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&);
52
    virtual void setCookiesFromDOM(const WebCore::NetworkStorageSession&, const WebCore::KURL& firstParty, const WebCore::KURL&, const String&);
52
    virtual void setCookiesFromDOM(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&, const String&);
53
    virtual bool cookiesEnabled(const WebCore::NetworkStorageSession&, const WebCore::KURL& firstParty, const WebCore::KURL&);
53
    virtual bool cookiesEnabled(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&);
54
    virtual String cookieRequestHeaderFieldValue(const WebCore::NetworkStorageSession&, const WebCore::KURL& firstParty, const WebCore::KURL&);
54
    virtual String cookieRequestHeaderFieldValue(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&);
55
    virtual bool getRawCookies(const WebCore::NetworkStorageSession&, const WebCore::KURL& firstParty, const WebCore::KURL&, Vector<WebCore::Cookie>&);
55
    virtual bool getRawCookies(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&, Vector<WebCore::Cookie>&);
56
    virtual void deleteCookie(const WebCore::NetworkStorageSession&, const WebCore::KURL&, const String&);
56
    virtual void deleteCookie(const WebCore::NetworkStorageSession&, const WebCore::URL&, const String&);
57
57
58
    // WebCore::DatabaseStrategy
58
    // WebCore::DatabaseStrategy
59
    // - Using default implementation.
59
    // - Using default implementation.
Lines 63-69 private: a/Source/WebKit/efl/WebCoreSupport/PlatformStrategiesEfl.h_sec2
63
    virtual void getPluginInfo(const WebCore::Page*, Vector<WebCore::PluginInfo>&);
63
    virtual void getPluginInfo(const WebCore::Page*, Vector<WebCore::PluginInfo>&);
64
64
65
    // WebCore::VisitedLinkStrategy
65
    // WebCore::VisitedLinkStrategy
66
    virtual bool isLinkVisited(WebCore::Page*, WebCore::LinkHash, const WebCore::KURL& baseURL, const WTF::AtomicString& attributeURL);
66
    virtual bool isLinkVisited(WebCore::Page*, WebCore::LinkHash, const WebCore::URL& baseURL, const WTF::AtomicString& attributeURL);
67
    virtual void addVisitedLink(WebCore::Page*, WebCore::LinkHash);
67
    virtual void addVisitedLink(WebCore::Page*, WebCore::LinkHash);
68
};
68
};
69
69
- a/Source/WebKit/efl/ewk/ewk_frame.cpp -8 / +8 lines
Lines 43-49 a/Source/WebKit/efl/ewk/ewk_frame.cpp_sec1
43
#include "HitTestRequest.h"
43
#include "HitTestRequest.h"
44
#include "HitTestResult.h"
44
#include "HitTestResult.h"
45
#include "IntSize.h"
45
#include "IntSize.h"
46
#include "KURL.h"
46
#include "URL.h"
47
#include "PlatformEvent.h"
47
#include "PlatformEvent.h"
48
#include "PlatformKeyboardEvent.h"
48
#include "PlatformKeyboardEvent.h"
49
#include "PlatformMessagePortChannel.h"
49
#include "PlatformMessagePortChannel.h"
Lines 336-342 Evas_Object* ewk_frame_child_find(Evas_Object* ewkFrame, const char* name) a/Source/WebKit/efl/ewk/ewk_frame.cpp_sec2
336
Eina_Bool ewk_frame_uri_set(Evas_Object* ewkFrame, const char* uri)
336
Eina_Bool ewk_frame_uri_set(Evas_Object* ewkFrame, const char* uri)
337
{
337
{
338
    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, smartData, false);
338
    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, smartData, false);
339
    WebCore::KURL kurl(WebCore::KURL(), WTF::String::fromUTF8(uri));
339
    WebCore::URL kurl(WebCore::URL(), WTF::String::fromUTF8(uri));
340
    WebCore::ResourceRequest req(kurl);
340
    WebCore::ResourceRequest req(kurl);
341
    smartData->frame->loader().load(WebCore::FrameLoadRequest(smartData->frame, req));
341
    smartData->frame->loader().load(WebCore::FrameLoadRequest(smartData->frame, req));
342
342
Lines 402-413 static Eina_Bool _ewk_frame_contents_set_internal(Ewk_Frame_Smart_Data* smartDat a/Source/WebKit/efl/ewk/ewk_frame.cpp_sec3
402
    if (!baseUri)
402
    if (!baseUri)
403
        baseUri = "about:blank";
403
        baseUri = "about:blank";
404
404
405
    WebCore::KURL baseKURL(WebCore::KURL(), WTF::String::fromUTF8(baseUri));
405
    WebCore::URL baseKURL(WebCore::URL(), WTF::String::fromUTF8(baseUri));
406
    WebCore::KURL unreachableKURL;
406
    WebCore::URL unreachableKURL;
407
    if (unreachableUri)
407
    if (unreachableUri)
408
        unreachableKURL = WebCore::KURL(WebCore::KURL(), WTF::String::fromUTF8(unreachableUri));
408
        unreachableKURL = WebCore::URL(WebCore::URL(), WTF::String::fromUTF8(unreachableUri));
409
    else
409
    else
410
        unreachableKURL = WebCore::KURL();
410
        unreachableKURL = WebCore::URL();
411
411
412
    WTF::RefPtr<WebCore::SharedBuffer> buffer = WebCore::SharedBuffer::create(contents, contentsSize);
412
    WTF::RefPtr<WebCore::SharedBuffer> buffer = WebCore::SharedBuffer::create(contents, contentsSize);
413
    WebCore::SubstituteData substituteData
413
    WebCore::SubstituteData substituteData
Lines 1690-1696 Ewk_Certificate_Status ewk_frame_certificate_status_get(Evas_Object* ewkFrame) a/Source/WebKit/efl/ewk/ewk_frame.cpp_sec4
1690
1690
1691
    const WebCore::FrameLoader& frameLoader = smartData->frame->loader();
1691
    const WebCore::FrameLoader& frameLoader = smartData->frame->loader();
1692
    const WebCore::DocumentLoader* documentLoader = frameLoader.documentLoader();
1692
    const WebCore::DocumentLoader* documentLoader = frameLoader.documentLoader();
1693
    const WebCore::KURL documentURL = documentLoader->requestURL();
1693
    const WebCore::URL documentURL = documentLoader->requestURL();
1694
1694
1695
    if (!documentURL.protocolIs("https"))
1695
    if (!documentURL.protocolIs("https"))
1696
        return EWK_CERTIFICATE_STATUS_NO_CERTIFICATE;
1696
        return EWK_CERTIFICATE_STATUS_NO_CERTIFICATE;
Lines 1763-1769 void ewk_frame_force_layout(Evas_Object* ewkFrame) a/Source/WebKit/efl/ewk/ewk_frame.cpp_sec5
1763
 *
1763
 *
1764
 * Creates plugin.
1764
 * Creates plugin.
1765
 */
1765
 */
1766
WTF::PassRefPtr<WebCore::Widget> ewk_frame_plugin_create(Evas_Object* ewkFrame, const WebCore::IntSize& pluginSize, WebCore::HTMLPlugInElement* element, const WebCore::KURL& url, const WTF::Vector<WTF::String>& paramNames, const WTF::Vector<WTF::String>& paramValues, const WTF::String& mimeType, bool loadManually)
1766
WTF::PassRefPtr<WebCore::Widget> ewk_frame_plugin_create(Evas_Object* ewkFrame, const WebCore::IntSize& pluginSize, WebCore::HTMLPlugInElement* element, const WebCore::URL& url, const WTF::Vector<WTF::String>& paramNames, const WTF::Vector<WTF::String>& paramValues, const WTF::String& mimeType, bool loadManually)
1767
{
1767
{
1768
#if ENABLE(NETSCAPE_PLUGIN_API)
1768
#if ENABLE(NETSCAPE_PLUGIN_API)
1769
    DBG("ewkFrame=%p, size=%dx%d, element=%p, url=%s, mimeType=%s",
1769
    DBG("ewkFrame=%p, size=%dx%d, element=%p, url=%s, mimeType=%s",
- a/Source/WebKit/efl/ewk/ewk_frame_private.h -2 / +2 lines
Lines 32-38 class FrameLoaderClientEfl; a/Source/WebKit/efl/ewk/ewk_frame_private.h_sec1
32
class HistoryItem;
32
class HistoryItem;
33
class HTMLPlugInElement;
33
class HTMLPlugInElement;
34
class HTMLFrameOwnerElement;
34
class HTMLFrameOwnerElement;
35
class KURL;
35
class URL;
36
class Frame;
36
class Frame;
37
class IntSize;
37
class IntSize;
38
class Widget;
38
class Widget;
Lines 76-82 bool ewk_frame_uri_changed(Evas_Object* ewkFrame); a/Source/WebKit/efl/ewk/ewk_frame_private.h_sec2
76
void ewk_frame_force_layout(Evas_Object* ewkFrame);
76
void ewk_frame_force_layout(Evas_Object* ewkFrame);
77
void ewk_frame_icon_changed(Evas_Object* ewkFrame);
77
void ewk_frame_icon_changed(Evas_Object* ewkFrame);
78
78
79
WTF::PassRefPtr<WebCore::Widget> ewk_frame_plugin_create(Evas_Object* ewkFrame, const WebCore::IntSize& pluginSize, WebCore::HTMLPlugInElement* element, const WebCore::KURL& url, const WTF::Vector<WTF::String>& paramNames, const WTF::Vector<WTF::String>& paramValues, const WTF::String& mimeType, bool loadManually);
79
WTF::PassRefPtr<WebCore::Widget> ewk_frame_plugin_create(Evas_Object* ewkFrame, const WebCore::IntSize& pluginSize, WebCore::HTMLPlugInElement* element, const WebCore::URL& url, const WTF::Vector<WTF::String>& paramNames, const WTF::Vector<WTF::String>& paramValues, const WTF::String& mimeType, bool loadManually);
80
80
81
void ewk_frame_editor_client_contents_changed(Evas_Object* ewkFrame);
81
void ewk_frame_editor_client_contents_changed(Evas_Object* ewkFrame);
82
void ewk_frame_editor_client_selection_changed(Evas_Object* ewkFrame);
82
void ewk_frame_editor_client_selection_changed(Evas_Object* ewkFrame);
- a/Source/WebKit/efl/ewk/ewk_security_policy.cpp -3 / +3 lines
Lines 20-26 a/Source/WebKit/efl/ewk/ewk_security_policy.cpp_sec1
20
#include "config.h"
20
#include "config.h"
21
#include "ewk_security_policy.h"
21
#include "ewk_security_policy.h"
22
22
23
#include "KURL.h"
23
#include "URL.h"
24
#include "SecurityOrigin.h"
24
#include "SecurityOrigin.h"
25
#include "SecurityPolicy.h"
25
#include "SecurityPolicy.h"
26
26
Lines 29-35 using namespace WebCore; a/Source/WebKit/efl/ewk/ewk_security_policy.cpp_sec2
29
void ewk_security_policy_whitelist_origin_add(const char* sourceUrl, const char* destinationUrl, Eina_Bool allowSubdomains)
29
void ewk_security_policy_whitelist_origin_add(const char* sourceUrl, const char* destinationUrl, Eina_Bool allowSubdomains)
30
{
30
{
31
    const RefPtr<SecurityOrigin> source = SecurityOrigin::createFromString(sourceUrl);
31
    const RefPtr<SecurityOrigin> source = SecurityOrigin::createFromString(sourceUrl);
32
    const KURL destination(KURL(), destinationUrl);
32
    const URL destination(URL(), destinationUrl);
33
33
34
    SecurityPolicy::addOriginAccessWhitelistEntry(*source, destination.protocol(), destination.host(), allowSubdomains);
34
    SecurityPolicy::addOriginAccessWhitelistEntry(*source, destination.protocol(), destination.host(), allowSubdomains);
35
}
35
}
Lines 37-43 void ewk_security_policy_whitelist_origin_add(const char* sourceUrl, const char* a/Source/WebKit/efl/ewk/ewk_security_policy.cpp_sec3
37
void ewk_security_policy_whitelist_origin_del(const char* sourceUrl, const char* destinationUrl, Eina_Bool allowSubdomains)
37
void ewk_security_policy_whitelist_origin_del(const char* sourceUrl, const char* destinationUrl, Eina_Bool allowSubdomains)
38
{
38
{
39
    const RefPtr<SecurityOrigin> source = SecurityOrigin::createFromString(sourceUrl);
39
    const RefPtr<SecurityOrigin> source = SecurityOrigin::createFromString(sourceUrl);
40
    const KURL destination(KURL(), destinationUrl);
40
    const URL destination(URL(), destinationUrl);
41
41
42
    SecurityPolicy::removeOriginAccessWhitelistEntry(*source, destination.protocol(), destination.host(), allowSubdomains);
42
    SecurityPolicy::removeOriginAccessWhitelistEntry(*source, destination.protocol(), destination.host(), allowSubdomains);
43
}
43
}
- a/Source/WebKit/efl/ewk/ewk_settings.cpp -4 / +4 lines
Lines 33-39 a/Source/WebKit/efl/ewk/ewk_settings.cpp_sec1
33
#include "IconDatabase.h"
33
#include "IconDatabase.h"
34
#include "Image.h"
34
#include "Image.h"
35
#include "IntSize.h"
35
#include "IntSize.h"
36
#include "KURL.h"
36
#include "URL.h"
37
#include "LocalFileSystem.h"
37
#include "LocalFileSystem.h"
38
#include "MemoryCache.h"
38
#include "MemoryCache.h"
39
#include "PageCache.h"
39
#include "PageCache.h"
Lines 135-141 void ewk_settings_local_storage_database_origin_clear(const char* url) a/Source/WebKit/efl/ewk/ewk_settings.cpp_sec2
135
{
135
{
136
    EINA_SAFETY_ON_NULL_RETURN(url);
136
    EINA_SAFETY_ON_NULL_RETURN(url);
137
137
138
    const WebCore::KURL kurl(WebCore::KURL(), WTF::String::fromUTF8(url));
138
    const WebCore::URL kurl(WebCore::URL(), WTF::String::fromUTF8(url));
139
    WebCore::StorageTracker::tracker().deleteOrigin(WebCore::SecurityOrigin::create(kurl).get());
139
    WebCore::StorageTracker::tracker().deleteOrigin(WebCore::SecurityOrigin::create(kurl).get());
140
}
140
}
141
141
Lines 214-220 cairo_surface_t* ewk_settings_icon_database_icon_surface_get(const char* url) a/Source/WebKit/efl/ewk/ewk_settings.cpp_sec3
214
{
214
{
215
    EINA_SAFETY_ON_NULL_RETURN_VAL(url, 0);
215
    EINA_SAFETY_ON_NULL_RETURN_VAL(url, 0);
216
216
217
    WebCore::KURL kurl(WebCore::KURL(), WTF::String::fromUTF8(url));
217
    WebCore::URL kurl(WebCore::URL(), WTF::String::fromUTF8(url));
218
    RefPtr<cairo_surface_t> icon = WebCore::iconDatabase().synchronousNativeIconForPageURL(kurl.string(), WebCore::IntSize(16, 16));
218
    RefPtr<cairo_surface_t> icon = WebCore::iconDatabase().synchronousNativeIconForPageURL(kurl.string(), WebCore::IntSize(16, 16));
219
    if (!icon)
219
    if (!icon)
220
        ERR("no icon for url %s", url);
220
        ERR("no icon for url %s", url);
Lines 227-233 Evas_Object* ewk_settings_icon_database_icon_object_get(const char* url, Evas* c a/Source/WebKit/efl/ewk/ewk_settings.cpp_sec4
227
    EINA_SAFETY_ON_NULL_RETURN_VAL(url, 0);
227
    EINA_SAFETY_ON_NULL_RETURN_VAL(url, 0);
228
    EINA_SAFETY_ON_NULL_RETURN_VAL(canvas, 0);
228
    EINA_SAFETY_ON_NULL_RETURN_VAL(canvas, 0);
229
229
230
    WebCore::KURL kurl(WebCore::KURL(), WTF::String::fromUTF8(url));
230
    WebCore::URL kurl(WebCore::URL(), WTF::String::fromUTF8(url));
231
    RefPtr<cairo_surface_t> surface = WebCore::iconDatabase().synchronousNativeIconForPageURL(kurl.string(), WebCore::IntSize(16, 16));
231
    RefPtr<cairo_surface_t> surface = WebCore::iconDatabase().synchronousNativeIconForPageURL(kurl.string(), WebCore::IntSize(16, 16));
232
232
233
    if (!surface) {
233
    if (!surface) {
- a/Source/WebKit/efl/ewk/ewk_view.cpp -4 / +4 lines
Lines 670-676 static Ewk_View_Private_Data* _ewk_view_priv_new(Ewk_View_Smart_Data* smartData) a/Source/WebKit/efl/ewk/ewk_view.cpp_sec1
670
    Ewk_View_Private_Data* priv = new Ewk_View_Private_Data;
670
    Ewk_View_Private_Data* priv = new Ewk_View_Private_Data;
671
    memset(priv, 0, sizeof(Ewk_View_Private_Data));
671
    memset(priv, 0, sizeof(Ewk_View_Private_Data));
672
    AtomicString string;
672
    AtomicString string;
673
    WebCore::KURL url;
673
    WebCore::URL url;
674
674
675
    WebCore::Page::PageClients pageClients;
675
    WebCore::Page::PageClients pageClients;
676
    pageClients.chromeClient = new WebCore::ChromeClientEfl(smartData->self);
676
    pageClients.chromeClient = new WebCore::ChromeClientEfl(smartData->self);
Lines 1728-1734 Eina_Bool ewk_view_visited_link_add(Evas_Object* ewkView, const char* visitedUrl a/Source/WebKit/efl/ewk/ewk_view.cpp_sec2
1728
    EINA_SAFETY_ON_NULL_RETURN_VAL(priv->page, false);
1728
    EINA_SAFETY_ON_NULL_RETURN_VAL(priv->page, false);
1729
    EINA_SAFETY_ON_NULL_RETURN_VAL(priv->page->groupPtr(), false);
1729
    EINA_SAFETY_ON_NULL_RETURN_VAL(priv->page->groupPtr(), false);
1730
1730
1731
    WebCore::KURL kurl(WebCore::KURL(), WTF::String::fromUTF8(visitedUrl));
1731
    WebCore::URL kurl(WebCore::URL(), WTF::String::fromUTF8(visitedUrl));
1732
    priv->page->groupPtr()->addVisitedLink(kurl);
1732
    priv->page->groupPtr()->addVisitedLink(kurl);
1733
    return true;
1733
    return true;
1734
}
1734
}
Lines 2055-2061 Eina_Bool ewk_view_setting_user_stylesheet_set(Evas_Object* ewkView, const char* a/Source/WebKit/efl/ewk/ewk_view.cpp_sec3
2055
    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
2055
    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
2056
    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
2056
    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
2057
    if (eina_stringshare_replace(&priv->settings.userStylesheet, uri)) {
2057
    if (eina_stringshare_replace(&priv->settings.userStylesheet, uri)) {
2058
        WebCore::KURL kurl(WebCore::KURL(), String::fromUTF8(uri));
2058
        WebCore::URL kurl(WebCore::URL(), String::fromUTF8(uri));
2059
        priv->pageSettings->setUserStyleSheetLocation(kurl);
2059
        priv->pageSettings->setUserStyleSheetLocation(kurl);
2060
    }
2060
    }
2061
    return true;
2061
    return true;
Lines 3662-3668 void ewk_view_frame_rect_changed(Evas_Object* ewkView) a/Source/WebKit/efl/ewk/ewk_view.cpp_sec4
3662
    _ewk_view_smart_changed(smartData);
3662
    _ewk_view_smart_changed(smartData);
3663
}
3663
}
3664
3664
3665
WTF::PassRefPtr<WebCore::Widget> ewk_view_plugin_create(Evas_Object* ewkView, Evas_Object* frame, const WebCore::IntSize& pluginSize, WebCore::HTMLPlugInElement* element, const WebCore::KURL& url, const WTF::Vector<WTF::String>& paramNames, const WTF::Vector<WTF::String>& paramValues, const WTF::String& mimeType, bool loadManually)
3665
WTF::PassRefPtr<WebCore::Widget> ewk_view_plugin_create(Evas_Object* ewkView, Evas_Object* frame, const WebCore::IntSize& pluginSize, WebCore::HTMLPlugInElement* element, const WebCore::URL& url, const WTF::Vector<WTF::String>& paramNames, const WTF::Vector<WTF::String>& paramValues, const WTF::String& mimeType, bool loadManually)
3666
{
3666
{
3667
    DBG("ewkView=%p, frame=%p, size=%dx%d, element=%p, url=%s, mimeType=%s",
3667
    DBG("ewkView=%p, frame=%p, size=%dx%d, element=%p, url=%s, mimeType=%s",
3668
        ewkView, frame, pluginSize.width(), pluginSize.height(), element,
3668
        ewkView, frame, pluginSize.width(), pluginSize.height(), element,
- a/Source/WebKit/efl/ewk/ewk_view_private.h -1 / +1 lines
Lines 114-120 WebCore::Page* ewk_view_core_page_get(const Evas_Object* ewkView); a/Source/WebKit/efl/ewk/ewk_view_private.h_sec1
114
114
115
void ewk_view_frame_rect_changed(Evas_Object* ewkView);
115
void ewk_view_frame_rect_changed(Evas_Object* ewkView);
116
116
117
WTF::PassRefPtr<WebCore::Widget> ewk_view_plugin_create(Evas_Object* ewkView, Evas_Object* frame, const WebCore::IntSize& pluginSize, WebCore::HTMLPlugInElement* element, const WebCore::KURL& url, const WTF::Vector<WTF::String>& paramNames, const WTF::Vector<WTF::String>& paramValues, const WTF::String& mimeType, bool loadManually);
117
WTF::PassRefPtr<WebCore::Widget> ewk_view_plugin_create(Evas_Object* ewkView, Evas_Object* frame, const WebCore::IntSize& pluginSize, WebCore::HTMLPlugInElement* element, const WebCore::URL& url, const WTF::Vector<WTF::String>& paramNames, const WTF::Vector<WTF::String>& paramValues, const WTF::String& mimeType, bool loadManually);
118
118
119
#if ENABLE(INPUT_TYPE_COLOR)
119
#if ENABLE(INPUT_TYPE_COLOR)
120
void ewk_view_color_chooser_new(Evas_Object* ewkView, WebCore::ColorChooserClient* client, const WebCore::Color& initialColor);
120
void ewk_view_color_chooser_new(Evas_Object* ewkView, WebCore::ColorChooserClient* client, const WebCore::Color& initialColor);
- a/Source/WebKit/gtk/ChangeLog +9 lines
Lines 1-3 a/Source/WebKit/gtk/ChangeLog_sec1
1
2013-09-26  Darin Adler  <darin@apple.com>
2
3
        rename KURL to URL
4
        https://bugs.webkit.org/show_bug.cgi?id=16214
5
6
        Reviewed by Andreas Kling.
7
8
        * many files: Renamed, using script.
9
1
2013-09-25  Brent Fulgham  <bfulgham@apple.com>
10
2013-09-25  Brent Fulgham  <bfulgham@apple.com>
2
11
3
        Refactor RuntimeEnabledFeatures as a Singleton.
12
        Refactor RuntimeEnabledFeatures as a Singleton.
- a/Source/WebKit/gtk/NEWS -1 / +1 lines
Lines 344-350 What's new in WebKitGTK+ 1.9.3? a/Source/WebKit/gtk/NEWS_sec1
344
  - Fix cursor used for ne-resize.
344
  - Fix cursor used for ne-resize.
345
  - Fix contractions recognition by the spell checker.
345
  - Fix contractions recognition by the spell checker.
346
  - Fix a crash rendering scrollbars on GTK wxWebkit.
346
  - Fix a crash rendering scrollbars on GTK wxWebkit.
347
  - Fix KURL::fileSystemPath() implementation to strip the query part
347
  - Fix URL::fileSystemPath() implementation to strip the query part
348
    of the uri.
348
    of the uri.
349
  - Check for GTK2/GTK3 symbol mismatch earlier to fix plugins run
349
  - Check for GTK2/GTK3 symbol mismatch earlier to fix plugins run
350
    with nspluginwrapper.
350
    with nspluginwrapper.
- a/Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp -3 / +3 lines
Lines 45-51 a/Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp_sec1
45
#include "Icon.h"
45
#include "Icon.h"
46
#include "InspectorController.h"
46
#include "InspectorController.h"
47
#include "IntRect.h"
47
#include "IntRect.h"
48
#include "KURL.h"
48
#include "URL.h"
49
#include "NavigationAction.h"
49
#include "NavigationAction.h"
50
#include "NotImplemented.h"
50
#include "NotImplemented.h"
51
#include "PopupMenuClient.h"
51
#include "PopupMenuClient.h"
Lines 798-804 void ChromeClient::mouseDidMoveOverElement(const HitTestResult& hit, unsigned mo a/Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp_sec2
798
    // check if the element is a link...
798
    // check if the element is a link...
799
    bool isLink = hit.isLiveLink();
799
    bool isLink = hit.isLiveLink();
800
    if (isLink) {
800
    if (isLink) {
801
        KURL url = hit.absoluteLinkURL();
801
        URL url = hit.absoluteLinkURL();
802
        if (!url.isEmpty() && url != m_hoveredLinkURL) {
802
        if (!url.isEmpty() && url != m_hoveredLinkURL) {
803
            TextDirection dir;
803
            TextDirection dir;
804
            CString titleString = hit.title(dir).utf8();
804
            CString titleString = hit.title(dir).utf8();
Lines 808-814 void ChromeClient::mouseDidMoveOverElement(const HitTestResult& hit, unsigned mo a/Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp_sec3
808
        }
808
        }
809
    } else if (!isLink && !m_hoveredLinkURL.isEmpty()) {
809
    } else if (!isLink && !m_hoveredLinkURL.isEmpty()) {
810
        g_signal_emit_by_name(m_webView, "hovering-over-link", 0, 0);
810
        g_signal_emit_by_name(m_webView, "hovering-over-link", 0, 0);
811
        m_hoveredLinkURL = KURL();
811
        m_hoveredLinkURL = URL();
812
    }
812
    }
813
813
814
    if (Node* node = hit.innerNonSharedNode()) {
814
    if (Node* node = hit.innerNonSharedNode()) {
- a/Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h -2 / +2 lines
Lines 25-31 a/Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h_sec1
25
#include "GtkAdjustmentWatcher.h"
25
#include "GtkAdjustmentWatcher.h"
26
#include "IntRect.h"
26
#include "IntRect.h"
27
#include "IntSize.h"
27
#include "IntSize.h"
28
#include "KURL.h"
28
#include "URL.h"
29
#include "PopupMenu.h"
29
#include "PopupMenu.h"
30
#include "Region.h"
30
#include "Region.h"
31
#include "SearchPopupMenu.h"
31
#include "SearchPopupMenu.h"
Lines 167-173 namespace WebKit { a/Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h_sec2
167
    private:
167
    private:
168
        WebKitWebView* m_webView;
168
        WebKitWebView* m_webView;
169
        GtkAdjustmentWatcher m_adjustmentWatcher;
169
        GtkAdjustmentWatcher m_adjustmentWatcher;
170
        KURL m_hoveredLinkURL;
170
        URL m_hoveredLinkURL;
171
        unsigned int m_closeSoonTimer;
171
        unsigned int m_closeSoonTimer;
172
172
173
        Timer <ChromeClient> m_displayTimer;
173
        Timer <ChromeClient> m_displayTimer;
- a/Source/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp -2 / +2 lines
Lines 26-32 a/Source/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp_sec1
26
#include "ContextMenu.h"
26
#include "ContextMenu.h"
27
#include "ContextMenuController.h"
27
#include "ContextMenuController.h"
28
#include "HitTestResult.h"
28
#include "HitTestResult.h"
29
#include "KURL.h"
29
#include "URL.h"
30
#include "LocalizedStrings.h"
30
#include "LocalizedStrings.h"
31
#include "NotImplemented.h"
31
#include "NotImplemented.h"
32
#include "Page.h"
32
#include "Page.h"
Lines 123-129 void ContextMenuClient::contextMenuItemSelected(ContextMenuItem*, const ContextM a/Source/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp_sec2
123
    notImplemented();
123
    notImplemented();
124
}
124
}
125
125
126
void ContextMenuClient::downloadURL(const KURL& url)
126
void ContextMenuClient::downloadURL(const URL& url)
127
{
127
{
128
    WebKitNetworkRequest* networkRequest = webkit_network_request_new(url.string().utf8().data());
128
    WebKitNetworkRequest* networkRequest = webkit_network_request_new(url.string().utf8().data());
129
129
- a/Source/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.h -1 / +1 lines
Lines 48-54 namespace WebKit { a/Source/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.h_sec1
48
        virtual WebCore::PlatformMenuDescription getCustomMenuFromDefaultItems(WebCore::ContextMenu*);
48
        virtual WebCore::PlatformMenuDescription getCustomMenuFromDefaultItems(WebCore::ContextMenu*);
49
        virtual void contextMenuItemSelected(WebCore::ContextMenuItem*, const WebCore::ContextMenu*);
49
        virtual void contextMenuItemSelected(WebCore::ContextMenuItem*, const WebCore::ContextMenu*);
50
50
51
        virtual void downloadURL(const WebCore::KURL& url);
51
        virtual void downloadURL(const WebCore::URL& url);
52
        virtual void copyImageToClipboard(const WebCore::HitTestResult&);
52
        virtual void copyImageToClipboard(const WebCore::HitTestResult&);
53
        virtual void searchWithGoogle(const WebCore::Frame*);
53
        virtual void searchWithGoogle(const WebCore::Frame*);
54
        virtual void lookUpInDictionary(WebCore::Frame*);
54
        virtual void lookUpInDictionary(WebCore::Frame*);
- a/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp -2 / +2 lines
Lines 192-198 void DumpRenderTreeSupportGtk::addUserScript(WebKitWebFrame* frame, const char* a/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp_sec1
192
192
193
    WebKitWebView* webView = getViewFromFrame(frame);
193
    WebKitWebView* webView = getViewFromFrame(frame);
194
    Page* page = core(webView);
194
    Page* page = core(webView);
195
    page->group().addUserScriptToWorld(mainThreadNormalWorld(), sourceCode, KURL(), Vector<String>(), Vector<String>(),
195
    page->group().addUserScriptToWorld(mainThreadNormalWorld(), sourceCode, URL(), Vector<String>(), Vector<String>(),
196
        runAtStart ? InjectAtDocumentStart : InjectAtDocumentEnd, allFrames ? InjectInAllFrames : InjectInTopFrameOnly);
196
        runAtStart ? InjectAtDocumentStart : InjectAtDocumentEnd, allFrames ? InjectInAllFrames : InjectInTopFrameOnly);
197
}
197
}
198
198
Lines 212-218 void DumpRenderTreeSupportGtk::addUserStyleSheet(WebKitWebFrame* frame, const ch a/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp_sec2
212
212
213
    WebKitWebView* webView = getViewFromFrame(frame);
213
    WebKitWebView* webView = getViewFromFrame(frame);
214
    Page* page = core(webView);
214
    Page* page = core(webView);
215
    page->group().addUserStyleSheetToWorld(mainThreadNormalWorld(), sourceCode, KURL(), Vector<String>(), Vector<String>(), allFrames ? InjectInAllFrames : InjectInTopFrameOnly); 
215
    page->group().addUserStyleSheetToWorld(mainThreadNormalWorld(), sourceCode, URL(), Vector<String>(), Vector<String>(), allFrames ? InjectInAllFrames : InjectInTopFrameOnly); 
216
}
216
}
217
217
218
/**
218
/**
- a/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp -11 / +11 lines
Lines 120-126 FrameLoaderClient::~FrameLoaderClient() a/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp_sec1
120
}
120
}
121
121
122
122
123
String FrameLoaderClient::userAgent(const KURL& url)
123
String FrameLoaderClient::userAgent(const URL& url)
124
{
124
{
125
    WebKitWebSettings* settings = webkit_web_view_get_settings(getViewFromFrame(m_frame));
125
    WebKitWebSettings* settings = webkit_web_view_get_settings(getViewFromFrame(m_frame));
126
    GOwnPtr<gchar> userAgentString(webkitWebSettingsUserAgentForURI(settings, url.string().utf8().data()));
126
    GOwnPtr<gchar> userAgentString(webkitWebSettingsUserAgentForURI(settings, url.string().utf8().data()));
Lines 261-267 void FrameLoaderClient::dispatchWillSendRequest(WebCore::DocumentLoader* loader, a/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp_sec2
261
    // Feed any changes back into the ResourceRequest object.
261
    // Feed any changes back into the ResourceRequest object.
262
    SoupMessage* message = webkit_network_request_get_message(networkRequest.get());
262
    SoupMessage* message = webkit_network_request_get_message(networkRequest.get());
263
    if (!message) {
263
    if (!message) {
264
        request.setURL(KURL(KURL(), String::fromUTF8(webkit_network_request_get_uri(networkRequest.get()))));
264
        request.setURL(URL(URL(), String::fromUTF8(webkit_network_request_get_uri(networkRequest.get()))));
265
        return;
265
        return;
266
    }
266
    }
267
267
Lines 486-492 void FrameLoaderClient::dispatchDecidePolicyForNavigationAction(FramePolicyFunct a/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp_sec3
486
        webkit_web_policy_decision_use(m_policyDecision);
486
        webkit_web_policy_decision_use(m_policyDecision);
487
}
487
}
488
488
489
PassRefPtr<Widget> FrameLoaderClient::createPlugin(const IntSize& pluginSize, HTMLPlugInElement* element, const KURL& url, const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType, bool loadManually)
489
PassRefPtr<Widget> FrameLoaderClient::createPlugin(const IntSize& pluginSize, HTMLPlugInElement* element, const URL& url, const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType, bool loadManually)
490
{
490
{
491
    /* Check if we want to embed a GtkWidget, fallback to plugins later */
491
    /* Check if we want to embed a GtkWidget, fallback to plugins later */
492
    CString urlString = url.string().utf8();
492
    CString urlString = url.string().utf8();
Lines 516-522 PassRefPtr<Widget> FrameLoaderClient::createPlugin(const IntSize& pluginSize, HT a/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp_sec4
516
    return 0;
516
    return 0;
517
}
517
}
518
518
519
PassRefPtr<Frame> FrameLoaderClient::createFrame(const KURL& url, const String& name, HTMLFrameOwnerElement* ownerElement,
519
PassRefPtr<Frame> FrameLoaderClient::createFrame(const URL& url, const String& name, HTMLFrameOwnerElement* ownerElement,
520
                                                 const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight)
520
                                                 const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight)
521
{
521
{
522
    ASSERT(m_frame);
522
    ASSERT(m_frame);
Lines 558-569 void FrameLoaderClient::redirectDataToPlugin(Widget* pluginWidget) a/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp_sec5
558
        m_hasSentResponseToPlugin = false;
558
        m_hasSentResponseToPlugin = false;
559
}
559
}
560
560
561
PassRefPtr<Widget> FrameLoaderClient::createJavaAppletWidget(const IntSize& pluginSize, HTMLAppletElement* element, const KURL& baseURL, const Vector<String>& paramNames, const Vector<String>& paramValues)
561
PassRefPtr<Widget> FrameLoaderClient::createJavaAppletWidget(const IntSize& pluginSize, HTMLAppletElement* element, const URL& baseURL, const Vector<String>& paramNames, const Vector<String>& paramValues)
562
{
562
{
563
    return FrameLoaderClient::createPlugin(pluginSize, element, baseURL, paramNames, paramValues, "application/x-java-applet", false);
563
    return FrameLoaderClient::createPlugin(pluginSize, element, baseURL, paramNames, paramValues, "application/x-java-applet", false);
564
}
564
}
565
565
566
ObjectContentType FrameLoaderClient::objectContentType(const KURL& url, const String& mimeType, bool shouldPreferPlugInsForImages)
566
ObjectContentType FrameLoaderClient::objectContentType(const URL& url, const String& mimeType, bool shouldPreferPlugInsForImages)
567
{
567
{
568
    return FrameLoader::defaultObjectContentType(url, mimeType, shouldPreferPlugInsForImages);
568
    return FrameLoader::defaultObjectContentType(url, mimeType, shouldPreferPlugInsForImages);
569
}
569
}
Lines 673-684 void FrameLoaderClient::didDisplayInsecureContent() a/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp_sec6
673
    DumpRenderTreeSupportGtk::s_frameLoadEventCallback(m_frame, DumpRenderTreeSupportGtk::DidDisplayInsecureContent, 0);
673
    DumpRenderTreeSupportGtk::s_frameLoadEventCallback(m_frame, DumpRenderTreeSupportGtk::DidDisplayInsecureContent, 0);
674
}
674
}
675
675
676
void FrameLoaderClient::didRunInsecureContent(SecurityOrigin* coreOrigin, const KURL& url)
676
void FrameLoaderClient::didRunInsecureContent(SecurityOrigin* coreOrigin, const URL& url)
677
{
677
{
678
    g_signal_emit_by_name(m_frame, "insecure-content-run", kit(coreOrigin), url.string().utf8().data());
678
    g_signal_emit_by_name(m_frame, "insecure-content-run", kit(coreOrigin), url.string().utf8().data());
679
}
679
}
680
680
681
void FrameLoaderClient::didDetectXSS(const KURL&, bool)
681
void FrameLoaderClient::didDetectXSS(const URL&, bool)
682
{
682
{
683
    if (!DumpRenderTreeSupportGtk::dumpRenderTreeModeEnabled() || !DumpRenderTreeSupportGtk::s_frameLoadEventCallback)
683
    if (!DumpRenderTreeSupportGtk::dumpRenderTreeModeEnabled() || !DumpRenderTreeSupportGtk::s_frameLoadEventCallback)
684
        return;
684
        return;
Lines 731-737 void FrameLoaderClient::dispatchDidCancelClientRedirect() a/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp_sec7
731
    DumpRenderTreeSupportGtk::s_frameLoadEventCallback(m_frame, DumpRenderTreeSupportGtk::DidCancelClientRedirect, 0);
731
    DumpRenderTreeSupportGtk::s_frameLoadEventCallback(m_frame, DumpRenderTreeSupportGtk::DidCancelClientRedirect, 0);
732
}
732
}
733
733
734
void FrameLoaderClient::dispatchWillPerformClientRedirect(const KURL& url, double, double)
734
void FrameLoaderClient::dispatchWillPerformClientRedirect(const URL& url, double, double)
735
{
735
{
736
    if (!DumpRenderTreeSupportGtk::dumpRenderTreeModeEnabled() || !DumpRenderTreeSupportGtk::s_frameLoadEventCallback)
736
    if (!DumpRenderTreeSupportGtk::dumpRenderTreeModeEnabled() || !DumpRenderTreeSupportGtk::s_frameLoadEventCallback)
737
        return;
737
        return;
Lines 972-978 void FrameLoaderClient::prepareForDataSourceReplacement() a/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp_sec8
972
    notImplemented();
972
    notImplemented();
973
}
973
}
974
974
975
void FrameLoaderClient::setTitle(const StringWithDirection& title, const KURL& url)
975
void FrameLoaderClient::setTitle(const StringWithDirection& title, const URL& url)
976
{
976
{
977
    WebKitWebFramePrivate* frameData = m_frame->priv;
977
    WebKitWebFramePrivate* frameData = m_frame->priv;
978
    g_free(frameData->title);
978
    g_free(frameData->title);
Lines 1005-1011 void FrameLoaderClient::dispatchDidFinishLoading(WebCore::DocumentLoader* loader a/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp_sec9
1005
        return;
1005
        return;
1006
1006
1007
    const char* uri = webkit_web_resource_get_uri(webResource);
1007
    const char* uri = webkit_web_resource_get_uri(webResource);
1008
    RefPtr<ArchiveResource> coreResource(loader->subresource(KURL(KURL(), uri)));
1008
    RefPtr<ArchiveResource> coreResource(loader->subresource(URL(URL(), uri)));
1009
1009
1010
    // If coreResource is NULL here, the resource failed to load,
1010
    // If coreResource is NULL here, the resource failed to load,
1011
    // unless it's the main resource.
1011
    // unless it's the main resource.
- a/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h -9 / +9 lines
Lines 77-83 namespace WebKit { a/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h_sec1
77
        virtual void dispatchDidHandleOnloadEvents();
77
        virtual void dispatchDidHandleOnloadEvents();
78
        virtual void dispatchDidReceiveServerRedirectForProvisionalLoad();
78
        virtual void dispatchDidReceiveServerRedirectForProvisionalLoad();
79
        virtual void dispatchDidCancelClientRedirect();
79
        virtual void dispatchDidCancelClientRedirect();
80
        virtual void dispatchWillPerformClientRedirect(const WebCore::KURL&, double, double);
80
        virtual void dispatchWillPerformClientRedirect(const WebCore::URL&, double, double);
81
        virtual void dispatchDidChangeLocationWithinPage();
81
        virtual void dispatchDidChangeLocationWithinPage();
82
        virtual void dispatchDidNavigateWithinPage();
82
        virtual void dispatchDidNavigateWithinPage();
83
        virtual void dispatchDidPushStateWithinPage();
83
        virtual void dispatchDidPushStateWithinPage();
Lines 115-126 namespace WebKit { a/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h_sec2
115
        virtual void postProgressEstimateChangedNotification();
115
        virtual void postProgressEstimateChangedNotification();
116
        virtual void postProgressFinishedNotification();
116
        virtual void postProgressFinishedNotification();
117
117
118
        virtual PassRefPtr<WebCore::Frame> createFrame(const WebCore::KURL& url, const WTF::String& name, WebCore::HTMLFrameOwnerElement* ownerElement,
118
        virtual PassRefPtr<WebCore::Frame> createFrame(const WebCore::URL& url, const WTF::String& name, WebCore::HTMLFrameOwnerElement* ownerElement,
119
                                   const WTF::String& referrer, bool allowsScrolling, int marginWidth, int marginHeight);
119
                                   const WTF::String& referrer, bool allowsScrolling, int marginWidth, int marginHeight);
120
        virtual PassRefPtr<WebCore::Widget> createPlugin(const WebCore::IntSize&, WebCore::HTMLPlugInElement*, const WebCore::KURL&, const WTF::Vector<WTF::String>&, const WTF::Vector<WTF::String>&, const WTF::String&, bool);
120
        virtual PassRefPtr<WebCore::Widget> createPlugin(const WebCore::IntSize&, WebCore::HTMLPlugInElement*, const WebCore::URL&, const WTF::Vector<WTF::String>&, const WTF::Vector<WTF::String>&, const WTF::String&, bool);
121
        virtual void recreatePlugin(WebCore::Widget*) { }
121
        virtual void recreatePlugin(WebCore::Widget*) { }
122
        virtual void redirectDataToPlugin(WebCore::Widget* pluginWidget);
122
        virtual void redirectDataToPlugin(WebCore::Widget* pluginWidget);
123
        virtual PassRefPtr<WebCore::Widget> createJavaAppletWidget(const WebCore::IntSize&, WebCore::HTMLAppletElement*, const WebCore::KURL& baseURL, const WTF::Vector<WTF::String>& paramNames, const WTF::Vector<WTF::String>& paramValues);
123
        virtual PassRefPtr<WebCore::Widget> createJavaAppletWidget(const WebCore::IntSize&, WebCore::HTMLAppletElement*, const WebCore::URL& baseURL, const WTF::Vector<WTF::String>& paramNames, const WTF::Vector<WTF::String>& paramValues);
124
        virtual WTF::String overrideMediaType() const;
124
        virtual WTF::String overrideMediaType() const;
125
        virtual void dispatchDidClearWindowObjectInWorld(WebCore::DOMWrapperWorld*);
125
        virtual void dispatchDidClearWindowObjectInWorld(WebCore::DOMWrapperWorld*);
126
        virtual void documentElementAvailable();
126
        virtual void documentElementAvailable();
Lines 128-134 namespace WebKit { a/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h_sec3
128
128
129
        virtual void registerForIconNotification(bool);
129
        virtual void registerForIconNotification(bool);
130
130
131
        virtual WebCore::ObjectContentType objectContentType(const WebCore::KURL&, const WTF::String& mimeType, bool shouldPreferPlugInsForImages);
131
        virtual WebCore::ObjectContentType objectContentType(const WebCore::URL&, const WTF::String& mimeType, bool shouldPreferPlugInsForImages);
132
132
133
        virtual void setMainFrameDocumentReady(bool);
133
        virtual void setMainFrameDocumentReady(bool);
134
134
Lines 146-153 namespace WebKit { a/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h_sec4
146
        virtual bool shouldStopLoadingForHistoryItem(WebCore::HistoryItem*) const;
146
        virtual bool shouldStopLoadingForHistoryItem(WebCore::HistoryItem*) const;
147
147
148
        virtual void didDisplayInsecureContent();
148
        virtual void didDisplayInsecureContent();
149
        virtual void didRunInsecureContent(WebCore::SecurityOrigin*, const WebCore::KURL&);
149
        virtual void didRunInsecureContent(WebCore::SecurityOrigin*, const WebCore::URL&);
150
        virtual void didDetectXSS(const WebCore::KURL&, bool didBlockEntirePage);
150
        virtual void didDetectXSS(const WebCore::URL&, bool didBlockEntirePage);
151
151
152
        virtual WebCore::ResourceError cancelledError(const WebCore::ResourceRequest&);
152
        virtual WebCore::ResourceError cancelledError(const WebCore::ResourceRequest&);
153
        virtual WebCore::ResourceError blockedError(const WebCore::ResourceRequest&);
153
        virtual WebCore::ResourceError blockedError(const WebCore::ResourceRequest&);
Lines 174-182 namespace WebKit { a/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h_sec5
174
        virtual void prepareForDataSourceReplacement();
174
        virtual void prepareForDataSourceReplacement();
175
175
176
        virtual WTF::PassRefPtr<WebCore::DocumentLoader> createDocumentLoader(const WebCore::ResourceRequest&, const WebCore::SubstituteData&);
176
        virtual WTF::PassRefPtr<WebCore::DocumentLoader> createDocumentLoader(const WebCore::ResourceRequest&, const WebCore::SubstituteData&);
177
        virtual void setTitle(const WebCore::StringWithDirection& title, const WebCore::KURL&);
177
        virtual void setTitle(const WebCore::StringWithDirection& title, const WebCore::URL&);
178
178
179
        virtual WTF::String userAgent(const WebCore::KURL&);
179
        virtual WTF::String userAgent(const WebCore::URL&);
180
180
181
        virtual void savePlatformDataToCachedFrame(WebCore::CachedFrame*);
181
        virtual void savePlatformDataToCachedFrame(WebCore::CachedFrame*);
182
        virtual void transitionToCommittedFromCachedFrame(WebCore::CachedFrame*);
182
        virtual void transitionToCommittedFromCachedFrame(WebCore::CachedFrame*);
- a/Source/WebKit/gtk/WebCoreSupport/PlatformStrategiesGtk.cpp -7 / +7 lines
Lines 81-112 VisitedLinkStrategy* PlatformStrategiesGtk::createVisitedLinkStrategy() a/Source/WebKit/gtk/WebCoreSupport/PlatformStrategiesGtk.cpp_sec1
81
}
81
}
82
82
83
// CookiesStrategy
83
// CookiesStrategy
84
String PlatformStrategiesGtk::cookiesForDOM(const NetworkStorageSession& session, const KURL& firstParty, const KURL& url)
84
String PlatformStrategiesGtk::cookiesForDOM(const NetworkStorageSession& session, const URL& firstParty, const URL& url)
85
{
85
{
86
    return WebCore::cookiesForDOM(session, firstParty, url);
86
    return WebCore::cookiesForDOM(session, firstParty, url);
87
}
87
}
88
88
89
void PlatformStrategiesGtk::setCookiesFromDOM(const NetworkStorageSession& session, const KURL& firstParty, const KURL& url, const String& cookieString)
89
void PlatformStrategiesGtk::setCookiesFromDOM(const NetworkStorageSession& session, const URL& firstParty, const URL& url, const String& cookieString)
90
{
90
{
91
    WebCore::setCookiesFromDOM(session, firstParty, url, cookieString);
91
    WebCore::setCookiesFromDOM(session, firstParty, url, cookieString);
92
}
92
}
93
93
94
bool PlatformStrategiesGtk::cookiesEnabled(const NetworkStorageSession& session, const KURL& firstParty, const KURL& url)
94
bool PlatformStrategiesGtk::cookiesEnabled(const NetworkStorageSession& session, const URL& firstParty, const URL& url)
95
{
95
{
96
    return WebCore::cookiesEnabled(session, firstParty, url);
96
    return WebCore::cookiesEnabled(session, firstParty, url);
97
}
97
}
98
98
99
String PlatformStrategiesGtk::cookieRequestHeaderFieldValue(const NetworkStorageSession& session, const KURL& firstParty, const KURL& url)
99
String PlatformStrategiesGtk::cookieRequestHeaderFieldValue(const NetworkStorageSession& session, const URL& firstParty, const URL& url)
100
{
100
{
101
    return WebCore::cookieRequestHeaderFieldValue(session, firstParty, url);
101
    return WebCore::cookieRequestHeaderFieldValue(session, firstParty, url);
102
}
102
}
103
103
104
bool PlatformStrategiesGtk::getRawCookies(const NetworkStorageSession& session, const KURL& firstParty, const KURL& url, Vector<Cookie>& rawCookies)
104
bool PlatformStrategiesGtk::getRawCookies(const NetworkStorageSession& session, const URL& firstParty, const URL& url, Vector<Cookie>& rawCookies)
105
{
105
{
106
    return WebCore::getRawCookies(session, firstParty, url, rawCookies);
106
    return WebCore::getRawCookies(session, firstParty, url, rawCookies);
107
}
107
}
108
108
109
void PlatformStrategiesGtk::deleteCookie(const NetworkStorageSession& session, const KURL& url, const String& cookieName)
109
void PlatformStrategiesGtk::deleteCookie(const NetworkStorageSession& session, const URL& url, const String& cookieName)
110
{
110
{
111
    WebCore::deleteCookie(session, url, cookieName);
111
    WebCore::deleteCookie(session, url, cookieName);
112
}
112
}
Lines 145-151 void PlatformStrategiesGtk::getPluginInfo(const Page* page, Vector<PluginInfo>& a/Source/WebKit/gtk/WebCoreSupport/PlatformStrategiesGtk.cpp_sec2
145
}
145
}
146
146
147
// VisitedLinkStrategy
147
// VisitedLinkStrategy
148
bool PlatformStrategiesGtk::isLinkVisited(Page* page, LinkHash hash, const KURL&, const AtomicString&)
148
bool PlatformStrategiesGtk::isLinkVisited(Page* page, LinkHash hash, const URL&, const AtomicString&)
149
{
149
{
150
    return page->group().isLinkVisited(hash);
150
    return page->group().isLinkVisited(hash);
151
}
151
}
- a/Source/WebKit/gtk/WebCoreSupport/PlatformStrategiesGtk.h -7 / +7 lines
Lines 47-58 private: a/Source/WebKit/gtk/WebCoreSupport/PlatformStrategiesGtk.h_sec1
47
    virtual WebCore::VisitedLinkStrategy* createVisitedLinkStrategy();
47
    virtual WebCore::VisitedLinkStrategy* createVisitedLinkStrategy();
48
48
49
    // WebCore::CookiesStrategy
49
    // WebCore::CookiesStrategy
50
    virtual String cookiesForDOM(const WebCore::NetworkStorageSession&, const WebCore::KURL& firstParty, const WebCore::KURL&);
50
    virtual String cookiesForDOM(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&);
51
    virtual void setCookiesFromDOM(const WebCore::NetworkStorageSession&, const WebCore::KURL& firstParty, const WebCore::KURL&, const String&);
51
    virtual void setCookiesFromDOM(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&, const String&);
52
    virtual bool cookiesEnabled(const WebCore::NetworkStorageSession&, const WebCore::KURL& firstParty, const WebCore::KURL&);
52
    virtual bool cookiesEnabled(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&);
53
    virtual String cookieRequestHeaderFieldValue(const WebCore::NetworkStorageSession&, const WebCore::KURL& firstParty, const WebCore::KURL&);
53
    virtual String cookieRequestHeaderFieldValue(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&);
54
    virtual bool getRawCookies(const WebCore::NetworkStorageSession&, const WebCore::KURL& firstParty, const WebCore::KURL&, Vector<WebCore::Cookie>&);
54
    virtual bool getRawCookies(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&, Vector<WebCore::Cookie>&);
55
    virtual void deleteCookie(const WebCore::NetworkStorageSession&, const WebCore::KURL&, const String&);
55
    virtual void deleteCookie(const WebCore::NetworkStorageSession&, const WebCore::URL&, const String&);
56
56
57
    // WebCore::DatabaseStrategy
57
    // WebCore::DatabaseStrategy
58
    // - Using default implementation.
58
    // - Using default implementation.
Lines 62-68 private: a/Source/WebKit/gtk/WebCoreSupport/PlatformStrategiesGtk.h_sec2
62
    virtual void getPluginInfo(const WebCore::Page*, Vector<WebCore::PluginInfo>&);
62
    virtual void getPluginInfo(const WebCore::Page*, Vector<WebCore::PluginInfo>&);
63
63
64
    // WebCore::VisitedLinkStrategy
64
    // WebCore::VisitedLinkStrategy
65
    virtual bool isLinkVisited(WebCore::Page*, WebCore::LinkHash, const WebCore::KURL& baseURL, const WTF::AtomicString& attributeURL);
65
    virtual bool isLinkVisited(WebCore::Page*, WebCore::LinkHash, const WebCore::URL& baseURL, const WTF::AtomicString& attributeURL);
66
    virtual void addVisitedLink(WebCore::Page*, WebCore::LinkHash);
66
    virtual void addVisitedLink(WebCore::Page*, WebCore::LinkHash);
67
};
67
};
68
68
- a/Source/WebKit/gtk/gdom/ConvertToGCharPrivate.h -2 / +2 lines
Lines 20-26 a/Source/WebKit/gtk/gdom/ConvertToGCharPrivate.h_sec1
20
#ifndef ConvertToGCharPrivate_h
20
#ifndef ConvertToGCharPrivate_h
21
#define ConvertToGCharPrivate_h
21
#define ConvertToGCharPrivate_h
22
22
23
#include "KURL.h"
23
#include "URL.h"
24
#include <wtf/text/CString.h>
24
#include <wtf/text/CString.h>
25
#include <wtf/text/AtomicString.h>
25
#include <wtf/text/AtomicString.h>
26
#include <wtf/text/WTFString.h>
26
#include <wtf/text/WTFString.h>
Lines 30-36 inline gchar* copyAsGchar(WTF::String const& s) a/Source/WebKit/gtk/gdom/ConvertToGCharPrivate.h_sec2
30
    return g_strdup(s.utf8().data());
30
    return g_strdup(s.utf8().data());
31
}
31
}
32
32
33
inline gchar* copyAsGchar(WebCore::KURL const& s)
33
inline gchar* copyAsGchar(WebCore::URL const& s)
34
{
34
{
35
    return copyAsGchar(s.string());
35
    return copyAsGchar(s.string());
36
}
36
}
- a/Source/WebKit/gtk/webkit/webkitdownload.cpp -1 / +1 lines
Lines 635-641 const gchar* webkit_download_get_suggested_filename(WebKitDownload* download) a/Source/WebKit/gtk/webkit/webkitdownload.cpp_sec1
635
    if (priv->suggestedFilename)
635
    if (priv->suggestedFilename)
636
        return priv->suggestedFilename;
636
        return priv->suggestedFilename;
637
637
638
    KURL url = KURL(KURL(), webkit_network_request_get_uri(priv->networkRequest));
638
    URL url = URL(URL(), webkit_network_request_get_uri(priv->networkRequest));
639
    url.setQuery(String());
639
    url.setQuery(String());
640
    url.removeFragmentIdentifier();
640
    url.removeFragmentIdentifier();
641
    priv->suggestedFilename = g_strdup(decodeURLEscapeSequences(url.lastPathComponent()).utf8().data());
641
    priv->suggestedFilename = g_strdup(decodeURLEscapeSequences(url.lastPathComponent()).utf8().data());
- a/Source/WebKit/gtk/webkit/webkithittestresult.cpp -1 / +1 lines
Lines 24-30 a/Source/WebKit/gtk/webkit/webkithittestresult.cpp_sec1
24
#include "Frame.h"
24
#include "Frame.h"
25
#include "FrameView.h"
25
#include "FrameView.h"
26
#include "HitTestResult.h"
26
#include "HitTestResult.h"
27
#include "KURL.h"
27
#include "URL.h"
28
#include "WebKitDOMNodePrivate.h"
28
#include "WebKitDOMNodePrivate.h"
29
#include "webkitenumtypes.h"
29
#include "webkitenumtypes.h"
30
#include "webkitglobals.h"
30
#include "webkitglobals.h"
- a/Source/WebKit/gtk/webkit/webkitnetworkrequest.cpp -1 / +1 lines
Lines 266-272 WebCore::ResourceRequest core(WebKitNetworkRequest* request) a/Source/WebKit/gtk/webkit/webkitnetworkrequest.cpp_sec1
266
    if (soupMessage)
266
    if (soupMessage)
267
        return WebCore::ResourceRequest(soupMessage);
267
        return WebCore::ResourceRequest(soupMessage);
268
268
269
    WebCore::KURL url = WebCore::KURL(WebCore::KURL(), String::fromUTF8(webkit_network_request_get_uri(request)));
269
    WebCore::URL url = WebCore::URL(WebCore::URL(), String::fromUTF8(webkit_network_request_get_uri(request)));
270
    return WebCore::ResourceRequest(url);
270
    return WebCore::ResourceRequest(url);
271
}
271
}
272
272
- a/Source/WebKit/gtk/webkit/webkitwebdatasource.cpp -3 / +3 lines
Lines 24-30 a/Source/WebKit/gtk/webkit/webkitwebdatasource.cpp_sec1
24
#include "DocumentLoaderGtk.h"
24
#include "DocumentLoaderGtk.h"
25
#include "FrameLoader.h"
25
#include "FrameLoader.h"
26
#include "FrameLoaderClientGtk.h"
26
#include "FrameLoaderClientGtk.h"
27
#include "KURL.h"
27
#include "URL.h"
28
#include "ResourceBuffer.h"
28
#include "ResourceBuffer.h"
29
#include "ResourceRequest.h"
29
#include "ResourceRequest.h"
30
#include "SharedBuffer.h"
30
#include "SharedBuffer.h"
Lines 175-181 WebKitWebDataSource* webkit_web_data_source_new_with_request(WebKitNetworkReques a/Source/WebKit/gtk/webkit/webkitwebdatasource.cpp_sec2
175
175
176
    const gchar* uri = webkit_network_request_get_uri(request);
176
    const gchar* uri = webkit_network_request_get_uri(request);
177
177
178
    ResourceRequest resourceRequest(ResourceRequest(KURL(KURL(), String::fromUTF8(uri))));
178
    ResourceRequest resourceRequest(ResourceRequest(URL(URL(), String::fromUTF8(uri))));
179
    WebKitWebDataSource* datasource = kitNew(WebKit::DocumentLoader::create(resourceRequest, SubstituteData()));
179
    WebKitWebDataSource* datasource = kitNew(WebKit::DocumentLoader::create(resourceRequest, SubstituteData()));
180
180
181
    WebKitWebDataSourcePrivate* priv = datasource->priv;
181
    WebKitWebDataSourcePrivate* priv = datasource->priv;
Lines 396-402 const gchar* webkit_web_data_source_get_unreachable_uri(WebKitWebDataSource* web a/Source/WebKit/gtk/webkit/webkitwebdatasource.cpp_sec3
396
    g_return_val_if_fail(WEBKIT_IS_WEB_DATA_SOURCE(webDataSource), NULL);
396
    g_return_val_if_fail(WEBKIT_IS_WEB_DATA_SOURCE(webDataSource), NULL);
397
397
398
    WebKitWebDataSourcePrivate* priv = webDataSource->priv;
398
    WebKitWebDataSourcePrivate* priv = webDataSource->priv;
399
    const KURL& unreachableURL = priv->loader->unreachableURL();
399
    const URL& unreachableURL = priv->loader->unreachableURL();
400
400
401
    if (unreachableURL.isEmpty())
401
    if (unreachableURL.isEmpty())
402
        return NULL;
402
        return NULL;
- a/Source/WebKit/gtk/webkit/webkitwebframe.cpp -4 / +4 lines
Lines 676-682 void webkit_web_frame_load_uri(WebKitWebFrame* frame, const gchar* uri) a/Source/WebKit/gtk/webkit/webkitwebframe.cpp_sec1
676
    if (!coreFrame)
676
    if (!coreFrame)
677
        return;
677
        return;
678
678
679
    coreFrame->loader().load(FrameLoadRequest(coreFrame, ResourceRequest(KURL(KURL(), String::fromUTF8(uri)))));
679
    coreFrame->loader().load(FrameLoadRequest(coreFrame, ResourceRequest(URL(URL(), String::fromUTF8(uri)))));
680
}
680
}
681
681
682
static void webkit_web_frame_load_data(WebKitWebFrame* frame, const gchar* content, const gchar* mimeType, const gchar* encoding, const gchar* baseURL, const gchar* unreachableURL)
682
static void webkit_web_frame_load_data(WebKitWebFrame* frame, const gchar* content, const gchar* mimeType, const gchar* encoding, const gchar* baseURL, const gchar* unreachableURL)
Lines 684-690 static void webkit_web_frame_load_data(WebKitWebFrame* frame, const gchar* conte a/Source/WebKit/gtk/webkit/webkitwebframe.cpp_sec2
684
    Frame* coreFrame = core(frame);
684
    Frame* coreFrame = core(frame);
685
    ASSERT(coreFrame);
685
    ASSERT(coreFrame);
686
686
687
    KURL baseKURL = baseURL ? KURL(KURL(), String::fromUTF8(baseURL)) : blankURL();
687
    URL baseKURL = baseURL ? URL(URL(), String::fromUTF8(baseURL)) : blankURL();
688
688
689
    ResourceRequest request(baseKURL);
689
    ResourceRequest request(baseKURL);
690
690
Lines 692-699 static void webkit_web_frame_load_data(WebKitWebFrame* frame, const gchar* conte a/Source/WebKit/gtk/webkit/webkitwebframe.cpp_sec3
692
    SubstituteData substituteData(sharedBuffer.release(),
692
    SubstituteData substituteData(sharedBuffer.release(),
693
                                  mimeType ? String::fromUTF8(mimeType) : String::fromUTF8("text/html"),
693
                                  mimeType ? String::fromUTF8(mimeType) : String::fromUTF8("text/html"),
694
                                  encoding ? String::fromUTF8(encoding) : String::fromUTF8("UTF-8"),
694
                                  encoding ? String::fromUTF8(encoding) : String::fromUTF8("UTF-8"),
695
                                  KURL(KURL(), String::fromUTF8(unreachableURL)),
695
                                  URL(URL(), String::fromUTF8(unreachableURL)),
696
                                  KURL(KURL(), String::fromUTF8(unreachableURL)));
696
                                  URL(URL(), String::fromUTF8(unreachableURL)));
697
697
698
    coreFrame->loader().load(FrameLoadRequest(coreFrame, request, substituteData));
698
    coreFrame->loader().load(FrameLoadRequest(coreFrame, request, substituteData));
699
}
699
}
- a/Source/WebKit/gtk/webkit/webkitwebhistoryitem.cpp -2 / +2 lines
Lines 22-28 a/Source/WebKit/gtk/webkit/webkitwebhistoryitem.cpp_sec1
22
#include "webkitwebhistoryitem.h"
22
#include "webkitwebhistoryitem.h"
23
23
24
#include "HistoryItem.h"
24
#include "HistoryItem.h"
25
#include "KURL.h"
25
#include "URL.h"
26
#include "webkitglobalsprivate.h"
26
#include "webkitglobalsprivate.h"
27
#include "webkitwebhistoryitemprivate.h"
27
#include "webkitwebhistoryitemprivate.h"
28
#include <glib.h>
28
#include <glib.h>
Lines 298-304 WebKitWebHistoryItem* webkit_web_history_item_new_with_data(const gchar* uri, co a/Source/WebKit/gtk/webkit/webkitwebhistoryitem.cpp_sec2
298
    WebKitWebHistoryItem* webHistoryItem = WEBKIT_WEB_HISTORY_ITEM(g_object_new(WEBKIT_TYPE_WEB_HISTORY_ITEM, NULL));
298
    WebKitWebHistoryItem* webHistoryItem = WEBKIT_WEB_HISTORY_ITEM(g_object_new(WEBKIT_TYPE_WEB_HISTORY_ITEM, NULL));
299
    WebKitWebHistoryItemPrivate* priv = webHistoryItem->priv;
299
    WebKitWebHistoryItemPrivate* priv = webHistoryItem->priv;
300
300
301
    WebCore::KURL historyUri(WebCore::KURL(), uri);
301
    WebCore::URL historyUri(WebCore::URL(), uri);
302
    WTF::String historyTitle = WTF::String::fromUTF8(title);
302
    WTF::String historyTitle = WTF::String::fromUTF8(title);
303
    RefPtr<WebCore::HistoryItem> item = WebCore::HistoryItem::create(historyUri, historyTitle, 0);
303
    RefPtr<WebCore::HistoryItem> item = WebCore::HistoryItem::create(historyUri, historyTitle, 0);
304
    priv->historyItem = item.release().leakRef();
304
    priv->historyItem = item.release().leakRef();
- a/Source/WebKit/gtk/webkit/webkitwebresource.cpp -2 / +2 lines
Lines 21-27 a/Source/WebKit/gtk/webkit/webkitwebresource.cpp_sec1
21
#include "webkitwebresource.h"
21
#include "webkitwebresource.h"
22
22
23
#include "ArchiveResource.h"
23
#include "ArchiveResource.h"
24
#include "KURL.h"
24
#include "URL.h"
25
#include "SharedBuffer.h"
25
#include "SharedBuffer.h"
26
#include "webkitenumtypes.h"
26
#include "webkitenumtypes.h"
27
#include "webkitglobalsprivate.h"
27
#include "webkitglobalsprivate.h"
Lines 357-363 WebKitWebResource* webkit_web_resource_new(const gchar* data, a/Source/WebKit/gtk/webkit/webkitwebresource.cpp_sec2
357
        size = strlen(data);
357
        size = strlen(data);
358
358
359
    RefPtr<SharedBuffer> buffer = SharedBuffer::create(data, size);
359
    RefPtr<SharedBuffer> buffer = SharedBuffer::create(data, size);
360
    WebKitWebResource* webResource = webkit_web_resource_new_with_core_resource(ArchiveResource::create(buffer, KURL(KURL(), String::fromUTF8(uri)), String::fromUTF8(mimeType), String::fromUTF8(encoding), String::fromUTF8(frameName)));
360
    WebKitWebResource* webResource = webkit_web_resource_new_with_core_resource(ArchiveResource::create(buffer, URL(URL(), String::fromUTF8(uri)), String::fromUTF8(mimeType), String::fromUTF8(encoding), String::fromUTF8(frameName)));
361
361
362
    return webResource;
362
    return webResource;
363
}
363
}
- a/Source/WebKit/gtk/webkit/webkitwebsettings.cpp -3 / +3 lines
Lines 28-34 a/Source/WebKit/gtk/webkit/webkitwebsettings.cpp_sec1
28
28
29
#include "EditingBehavior.h"
29
#include "EditingBehavior.h"
30
#include "FileSystem.h"
30
#include "FileSystem.h"
31
#include "KURL.h"
31
#include "URL.h"
32
#include "PluginDatabase.h"
32
#include "PluginDatabase.h"
33
#include "UserAgentGtk.h"
33
#include "UserAgentGtk.h"
34
#include "webkitenumtypes.h"
34
#include "webkitenumtypes.h"
Lines 1597-1603 static bool isGoogleDomain(String host) a/Source/WebKit/gtk/webkit/webkitwebsettings.cpp_sec2
1597
    return false;
1597
    return false;
1598
}
1598
}
1599
1599
1600
static String userAgentForURL(const KURL& url)
1600
static String userAgentForURL(const URL& url)
1601
{
1601
{
1602
    // For Google domains, drop the browser's custom User Agent string, and use the
1602
    // For Google domains, drop the browser's custom User Agent string, and use the
1603
    // standard Chrome one, so they don't give us a broken experience.
1603
    // standard Chrome one, so they don't give us a broken experience.
Lines 1635-1641 static String userAgentForURL(const KURL& url) a/Source/WebKit/gtk/webkit/webkitwebsettings.cpp_sec3
1635
char* webkitWebSettingsUserAgentForURI(WebKitWebSettings* webSettings, const char* uri)
1635
char* webkitWebSettingsUserAgentForURI(WebKitWebSettings* webSettings, const char* uri)
1636
{
1636
{
1637
    if (webSettings->priv->enableSiteSpecificQuirks) {
1637
    if (webSettings->priv->enableSiteSpecificQuirks) {
1638
        String userAgentString = userAgentForURL(WebCore::KURL(WebCore::KURL(), String::fromUTF8(uri)));
1638
        String userAgentString = userAgentForURL(WebCore::URL(WebCore::URL(), String::fromUTF8(uri)));
1639
        if (!userAgentString.isEmpty())
1639
        if (!userAgentString.isEmpty())
1640
            return g_strdup(userAgentString.utf8().data());
1640
            return g_strdup(userAgentString.utf8().data());
1641
    }
1641
    }
- a/Source/WebKit/gtk/webkit/webkitwebview.cpp -2 / +2 lines
Lines 3538-3544 static void webkit_web_view_update_settings(WebKitWebView* webView) a/Source/WebKit/gtk/webkit/webkitwebview.cpp_sec1
3538
    coreSettings.setScriptEnabled(settingsPrivate->enableScripts);
3538
    coreSettings.setScriptEnabled(settingsPrivate->enableScripts);
3539
    coreSettings.setPluginsEnabled(settingsPrivate->enablePlugins);
3539
    coreSettings.setPluginsEnabled(settingsPrivate->enablePlugins);
3540
    coreSettings.setTextAreasAreResizable(settingsPrivate->resizableTextAreas);
3540
    coreSettings.setTextAreasAreResizable(settingsPrivate->resizableTextAreas);
3541
    coreSettings.setUserStyleSheetLocation(KURL(KURL(), settingsPrivate->userStylesheetURI.data()));
3541
    coreSettings.setUserStyleSheetLocation(URL(URL(), settingsPrivate->userStylesheetURI.data()));
3542
    coreSettings.setDeveloperExtrasEnabled(settingsPrivate->enableDeveloperExtras);
3542
    coreSettings.setDeveloperExtrasEnabled(settingsPrivate->enableDeveloperExtras);
3543
    coreSettings.setPrivateBrowsingEnabled(settingsPrivate->enablePrivateBrowsing);
3543
    coreSettings.setPrivateBrowsingEnabled(settingsPrivate->enablePrivateBrowsing);
3544
    coreSettings.setCaretBrowsingEnabled(settingsPrivate->enableCaretBrowsing);
3544
    coreSettings.setCaretBrowsingEnabled(settingsPrivate->enableCaretBrowsing);
Lines 3666-3672 static void webkit_web_view_settings_notify(WebKitWebSettings* webSettings, GPar a/Source/WebKit/gtk/webkit/webkitwebview.cpp_sec2
3666
    else if (name == g_intern_string("resizable-text-areas"))
3666
    else if (name == g_intern_string("resizable-text-areas"))
3667
        settings.setTextAreasAreResizable(g_value_get_boolean(&value));
3667
        settings.setTextAreasAreResizable(g_value_get_boolean(&value));
3668
    else if (name == g_intern_string("user-stylesheet-uri"))
3668
    else if (name == g_intern_string("user-stylesheet-uri"))
3669
        settings.setUserStyleSheetLocation(KURL(KURL(), g_value_get_string(&value)));
3669
        settings.setUserStyleSheetLocation(URL(URL(), g_value_get_string(&value)));
3670
    else if (name == g_intern_string("enable-developer-extras"))
3670
    else if (name == g_intern_string("enable-developer-extras"))
3671
        settings.setDeveloperExtrasEnabled(g_value_get_boolean(&value));
3671
        settings.setDeveloperExtrasEnabled(g_value_get_boolean(&value));
3672
    else if (name == g_intern_string("enable-private-browsing"))
3672
    else if (name == g_intern_string("enable-private-browsing"))
- a/Source/WebKit/mac/ChangeLog +9 lines
Lines 1-3 a/Source/WebKit/mac/ChangeLog_sec1
1
2013-09-26  Darin Adler  <darin@apple.com>
2
3
        rename KURL to URL
4
        https://bugs.webkit.org/show_bug.cgi?id=16214
5
6
        Reviewed by Andreas Kling.
7
8
        * many files: Renamed, using script.
9
1
2013-09-26  Eric Carlson  <eric.carlson@apple.com>
10
2013-09-26  Eric Carlson  <eric.carlson@apple.com>
2
11
3
        [MediaStream] make MediaStream testable
12
        [MediaStream] make MediaStream testable
- a/Source/WebKit/mac/History/WebHistoryItem.mm -2 / +2 lines
Lines 45-51 a/Source/WebKit/mac/History/WebHistoryItem.mm_sec1
45
#import "WebTypesInternal.h"
45
#import "WebTypesInternal.h"
46
#import <WebCore/HistoryItem.h>
46
#import <WebCore/HistoryItem.h>
47
#import <WebCore/Image.h>
47
#import <WebCore/Image.h>
48
#import <WebCore/KURL.h>
48
#import <WebCore/URL.h>
49
#import <WebCore/PageCache.h>
49
#import <WebCore/PageCache.h>
50
#import <WebCore/RunLoop.h>
50
#import <WebCore/RunLoop.h>
51
#import <WebCore/ThreadCheck.h>
51
#import <WebCore/ThreadCheck.h>
Lines 535-541 WebHistoryItem *kit(HistoryItem* item) a/Source/WebKit/mac/History/WebHistoryItem.mm_sec2
535
- (NSURL *)URL
535
- (NSURL *)URL
536
{
536
{
537
    ASSERT_MAIN_THREAD();
537
    ASSERT_MAIN_THREAD();
538
    const KURL& url = core(_private)->url();
538
    const URL& url = core(_private)->url();
539
    if (url.isEmpty())
539
    if (url.isEmpty())
540
        return nil;
540
        return nil;
541
    return url;
541
    return url;
- a/Source/WebKit/mac/Misc/WebNSURLExtras.mm -3 / +3 lines
Lines 34-40 a/Source/WebKit/mac/Misc/WebNSURLExtras.mm_sec1
34
#import "WebNSDataExtras.h"
34
#import "WebNSDataExtras.h"
35
#import "WebSystemInterface.h"
35
#import "WebSystemInterface.h"
36
#import <Foundation/NSURLRequest.h>
36
#import <Foundation/NSURLRequest.h>
37
#import <WebCore/KURL.h>
37
#import <WebCore/URL.h>
38
#import <WebCore/LoaderNSURLExtras.h>
38
#import <WebCore/LoaderNSURLExtras.h>
39
#import <WebCore/WebCoreNSURLExtras.h>
39
#import <WebCore/WebCoreNSURLExtras.h>
40
#import <WebKitSystemInterface.h>
40
#import <WebKitSystemInterface.h>
Lines 127-135 using namespace WTF; a/Source/WebKit/mac/Misc/WebNSURLExtras.mm_sec2
127
        return self;
127
        return self;
128
    }
128
    }
129
    
129
    
130
    // This applies NSURL's concept of canonicalization, but not KURL's concept. It would
130
    // This applies NSURL's concept of canonicalization, but not URL's concept. It would
131
    // make sense to apply both, but when we tried that it caused a performance degradation
131
    // make sense to apply both, but when we tried that it caused a performance degradation
132
    // (see 5315926). It might make sense to apply only the KURL concept and not the NSURL
132
    // (see 5315926). It might make sense to apply only the URL concept and not the NSURL
133
    // concept, but it's too risky to make that change for WebKit 3.0.
133
    // concept, but it's too risky to make that change for WebKit 3.0.
134
    NSURLRequest *newRequest = [concreteClass canonicalRequestForRequest:request];
134
    NSURLRequest *newRequest = [concreteClass canonicalRequestForRequest:request];
135
    NSURL *newURL = [newRequest URL]; 
135
    NSURL *newURL = [newRequest URL]; 
- a/Source/WebKit/mac/Misc/WebUserContentURLPattern.mm -1 / +1 lines
Lines 24-30 a/Source/WebKit/mac/Misc/WebUserContentURLPattern.mm_sec1
24
24
25
#import "WebUserContentURLPattern.h"
25
#import "WebUserContentURLPattern.h"
26
26
27
#import <WebCore/KURL.h>
27
#import <WebCore/URL.h>
28
#import <WebCore/UserContentURLPattern.h>
28
#import <WebCore/UserContentURLPattern.h>
29
29
30
using namespace WebCore;
30
using namespace WebCore;
- a/Source/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm -1 / +1 lines
Lines 53-59 a/Source/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm_sec1
53
#import <WebCore/Frame.h>
53
#import <WebCore/Frame.h>
54
#import <WebCore/FrameLoader.h>
54
#import <WebCore/FrameLoader.h>
55
#import <WebCore/FrameTree.h>
55
#import <WebCore/FrameTree.h>
56
#import <WebCore/KURL.h>
56
#import <WebCore/URL.h>
57
#import <WebCore/ProxyServer.h>
57
#import <WebCore/ProxyServer.h>
58
#import <WebCore/SecurityOrigin.h>
58
#import <WebCore/SecurityOrigin.h>
59
#import <WebCore/ScriptController.h>
59
#import <WebCore/ScriptController.h>
- a/Source/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm -1 / +1 lines
Lines 847-853 using namespace WebCore; a/Source/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm_sec1
847
    if (!frame->document()->securityOrigin()->canAccess(targetFrame->document()->securityOrigin()))
847
    if (!frame->document()->securityOrigin()->canAccess(targetFrame->document()->securityOrigin()))
848
        return CString();
848
        return CString();
849
  
849
  
850
    KURL absoluteURL = targetFrame->document()->completeURL(relativeURLString);
850
    URL absoluteURL = targetFrame->document()->completeURL(relativeURLString);
851
    return absoluteURL.string().utf8();
851
    return absoluteURL.string().utf8();
852
}
852
}
853
853
- a/Source/WebKit/mac/Plugins/WebNetscapePluginStream.h -2 / +2 lines
Lines 72-78 public: a/Source/WebKit/mac/Plugins/WebNetscapePluginStream.h_sec1
72
72
73
    void cancelLoadAndDestroyStreamWithError(NSError *);
73
    void cancelLoadAndDestroyStreamWithError(NSError *);
74
74
75
    void setRequestURL(const WebCore::KURL& requestURL) { m_requestURL = requestURL; }
75
    void setRequestURL(const WebCore::URL& requestURL) { m_requestURL = requestURL; }
76
76
77
    void start();
77
    void start();
78
    void stop();
78
    void stop();
Lines 100-106 private: a/Source/WebKit/mac/Plugins/WebNetscapePluginStream.h_sec2
100
    bool wantsAllStreams() const;
100
    bool wantsAllStreams() const;
101
101
102
    RetainPtr<NSMutableData> m_deliveryData;
102
    RetainPtr<NSMutableData> m_deliveryData;
103
    WebCore::KURL m_requestURL;
103
    WebCore::URL m_requestURL;
104
    RetainPtr<NSURL> m_responseURL;
104
    RetainPtr<NSURL> m_responseURL;
105
    CString m_mimeType;
105
    CString m_mimeType;
106
106
- a/Source/WebKit/mac/WebCoreSupport/WebContextMenuClient.h -1 / +1 lines
Lines 39-45 public: a/Source/WebKit/mac/WebCoreSupport/WebContextMenuClient.h_sec1
39
    virtual NSMutableArray* getCustomMenuFromDefaultItems(WebCore::ContextMenu*) OVERRIDE;
39
    virtual NSMutableArray* getCustomMenuFromDefaultItems(WebCore::ContextMenu*) OVERRIDE;
40
    virtual void contextMenuItemSelected(WebCore::ContextMenuItem*, const WebCore::ContextMenu*) OVERRIDE;
40
    virtual void contextMenuItemSelected(WebCore::ContextMenuItem*, const WebCore::ContextMenu*) OVERRIDE;
41
    
41
    
42
    virtual void downloadURL(const WebCore::KURL&) OVERRIDE;
42
    virtual void downloadURL(const WebCore::URL&) OVERRIDE;
43
    virtual void searchWithGoogle(const WebCore::Frame*) OVERRIDE;
43
    virtual void searchWithGoogle(const WebCore::Frame*) OVERRIDE;
44
    virtual void lookUpInDictionary(WebCore::Frame*) OVERRIDE;
44
    virtual void lookUpInDictionary(WebCore::Frame*) OVERRIDE;
45
    virtual bool isSpeaking() OVERRIDE;
45
    virtual bool isSpeaking() OVERRIDE;
- a/Source/WebKit/mac/WebCoreSupport/WebContextMenuClient.mm -2 / +2 lines
Lines 43-49 a/Source/WebKit/mac/WebCoreSupport/WebContextMenuClient.mm_sec1
43
#import <WebCore/ContextMenu.h>
43
#import <WebCore/ContextMenu.h>
44
#import <WebCore/ContextMenuController.h>
44
#import <WebCore/ContextMenuController.h>
45
#import <WebCore/Document.h>
45
#import <WebCore/Document.h>
46
#import <WebCore/KURL.h>
46
#import <WebCore/URL.h>
47
#import <WebCore/LocalizedStrings.h>
47
#import <WebCore/LocalizedStrings.h>
48
#import <WebCore/Page.h>
48
#import <WebCore/Page.h>
49
#import <WebCore/Frame.h>
49
#import <WebCore/Frame.h>
Lines 312-318 void WebContextMenuClient::contextMenuItemSelected(ContextMenuItem* item, const a/Source/WebKit/mac/WebCoreSupport/WebContextMenuClient.mm_sec2
312
    }
312
    }
313
}
313
}
314
314
315
void WebContextMenuClient::downloadURL(const KURL& url)
315
void WebContextMenuClient::downloadURL(const URL& url)
316
{
316
{
317
    [m_webView _downloadURL:url];
317
    [m_webView _downloadURL:url];
318
}
318
}
- a/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h -11 / +11 lines
Lines 91-97 private: a/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h_sec1
91
    virtual void dispatchDidHandleOnloadEvents() OVERRIDE;
91
    virtual void dispatchDidHandleOnloadEvents() OVERRIDE;
92
    virtual void dispatchDidReceiveServerRedirectForProvisionalLoad() OVERRIDE;
92
    virtual void dispatchDidReceiveServerRedirectForProvisionalLoad() OVERRIDE;
93
    virtual void dispatchDidCancelClientRedirect() OVERRIDE;
93
    virtual void dispatchDidCancelClientRedirect() OVERRIDE;
94
    virtual void dispatchWillPerformClientRedirect(const WebCore::KURL&, double interval, double fireDate) OVERRIDE;
94
    virtual void dispatchWillPerformClientRedirect(const WebCore::URL&, double interval, double fireDate) OVERRIDE;
95
    virtual void dispatchDidChangeLocationWithinPage() OVERRIDE;
95
    virtual void dispatchDidChangeLocationWithinPage() OVERRIDE;
96
    virtual void dispatchDidPushStateWithinPage() OVERRIDE;
96
    virtual void dispatchDidPushStateWithinPage() OVERRIDE;
97
    virtual void dispatchDidReplaceStateWithinPage() OVERRIDE;
97
    virtual void dispatchDidReplaceStateWithinPage() OVERRIDE;
Lines 152-159 private: a/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h_sec2
152
    virtual void updateGlobalHistoryItemForPage() OVERRIDE;
152
    virtual void updateGlobalHistoryItemForPage() OVERRIDE;
153
153
154
    virtual void didDisplayInsecureContent() OVERRIDE;
154
    virtual void didDisplayInsecureContent() OVERRIDE;
155
    virtual void didRunInsecureContent(WebCore::SecurityOrigin*, const WebCore::KURL&) OVERRIDE;
155
    virtual void didRunInsecureContent(WebCore::SecurityOrigin*, const WebCore::URL&) OVERRIDE;
156
    virtual void didDetectXSS(const WebCore::KURL&, bool didBlockEntirePage) OVERRIDE;
156
    virtual void didDetectXSS(const WebCore::URL&, bool didBlockEntirePage) OVERRIDE;
157
157
158
    virtual WebCore::ResourceError cancelledError(const WebCore::ResourceRequest&) OVERRIDE;
158
    virtual WebCore::ResourceError cancelledError(const WebCore::ResourceRequest&) OVERRIDE;
159
    virtual WebCore::ResourceError blockedError(const WebCore::ResourceRequest&) OVERRIDE;
159
    virtual WebCore::ResourceError blockedError(const WebCore::ResourceRequest&) OVERRIDE;
Lines 166-172 private: a/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h_sec3
166
166
167
    virtual bool shouldFallBack(const WebCore::ResourceError&) OVERRIDE;
167
    virtual bool shouldFallBack(const WebCore::ResourceError&) OVERRIDE;
168
168
169
    virtual WTF::String userAgent(const WebCore::KURL&) OVERRIDE;
169
    virtual WTF::String userAgent(const WebCore::URL&) OVERRIDE;
170
    
170
    
171
    virtual void savePlatformDataToCachedFrame(WebCore::CachedFrame*) OVERRIDE;
171
    virtual void savePlatformDataToCachedFrame(WebCore::CachedFrame*) OVERRIDE;
172
    virtual void transitionToCommittedFromCachedFrame(WebCore::CachedFrame*) OVERRIDE;
172
    virtual void transitionToCommittedFromCachedFrame(WebCore::CachedFrame*) OVERRIDE;
Lines 191-216 private: a/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h_sec4
191
    virtual void prepareForDataSourceReplacement() OVERRIDE;
191
    virtual void prepareForDataSourceReplacement() OVERRIDE;
192
    virtual PassRefPtr<WebCore::DocumentLoader> createDocumentLoader(const WebCore::ResourceRequest&, const WebCore::SubstituteData&) OVERRIDE;
192
    virtual PassRefPtr<WebCore::DocumentLoader> createDocumentLoader(const WebCore::ResourceRequest&, const WebCore::SubstituteData&) OVERRIDE;
193
193
194
    virtual void setTitle(const WebCore::StringWithDirection&, const WebCore::KURL&) OVERRIDE;
194
    virtual void setTitle(const WebCore::StringWithDirection&, const WebCore::URL&) OVERRIDE;
195
195
196
    virtual PassRefPtr<WebCore::Frame> createFrame(const WebCore::KURL& url, const WTF::String& name, WebCore::HTMLFrameOwnerElement*,
196
    virtual PassRefPtr<WebCore::Frame> createFrame(const WebCore::URL& url, const WTF::String& name, WebCore::HTMLFrameOwnerElement*,
197
                                        const WTF::String& referrer, bool allowsScrolling, int marginWidth, int marginHeight) OVERRIDE;
197
                                        const WTF::String& referrer, bool allowsScrolling, int marginWidth, int marginHeight) OVERRIDE;
198
    virtual PassRefPtr<WebCore::Widget> createPlugin(const WebCore::IntSize&, WebCore::HTMLPlugInElement*, const WebCore::KURL&, const Vector<WTF::String>&,
198
    virtual PassRefPtr<WebCore::Widget> createPlugin(const WebCore::IntSize&, WebCore::HTMLPlugInElement*, const WebCore::URL&, const Vector<WTF::String>&,
199
                                          const Vector<WTF::String>&, const WTF::String&, bool) OVERRIDE;
199
                                          const Vector<WTF::String>&, const WTF::String&, bool) OVERRIDE;
200
    virtual void recreatePlugin(WebCore::Widget*) OVERRIDE;
200
    virtual void recreatePlugin(WebCore::Widget*) OVERRIDE;
201
    virtual void redirectDataToPlugin(WebCore::Widget* pluginWidget) OVERRIDE;
201
    virtual void redirectDataToPlugin(WebCore::Widget* pluginWidget) OVERRIDE;
202
    
202
    
203
    virtual PassRefPtr<WebCore::Widget> createJavaAppletWidget(const WebCore::IntSize&, WebCore::HTMLAppletElement*, const WebCore::KURL& baseURL,
203
    virtual PassRefPtr<WebCore::Widget> createJavaAppletWidget(const WebCore::IntSize&, WebCore::HTMLAppletElement*, const WebCore::URL& baseURL,
204
                                                    const Vector<WTF::String>& paramNames, const Vector<WTF::String>& paramValues) OVERRIDE;
204
                                                    const Vector<WTF::String>& paramNames, const Vector<WTF::String>& paramValues) OVERRIDE;
205
    
205
    
206
#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
206
#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
207
    virtual PassRefPtr<WebCore::Widget> createMediaPlayerProxyPlugin(const WebCore::IntSize&, WebCore::HTMLMediaElement*, const WebCore::KURL&, 
207
    virtual PassRefPtr<WebCore::Widget> createMediaPlayerProxyPlugin(const WebCore::IntSize&, WebCore::HTMLMediaElement*, const WebCore::URL&, 
208
                                        const Vector<WTF::String>&, const Vector<WTF::String>&, const WTF::String&) OVERRIDE;
208
                                        const Vector<WTF::String>&, const Vector<WTF::String>&, const WTF::String&) OVERRIDE;
209
    virtual void hideMediaPlayerProxyPlugin(WebCore::Widget*) OVERRIDE;
209
    virtual void hideMediaPlayerProxyPlugin(WebCore::Widget*) OVERRIDE;
210
    virtual void showMediaPlayerProxyPlugin(WebCore::Widget*) OVERRIDE;
210
    virtual void showMediaPlayerProxyPlugin(WebCore::Widget*) OVERRIDE;
211
#endif
211
#endif
212
    
212
    
213
    virtual WebCore::ObjectContentType objectContentType(const WebCore::KURL&, const WTF::String& mimeType, bool shouldPreferPlugInsForImages) OVERRIDE;
213
    virtual WebCore::ObjectContentType objectContentType(const WebCore::URL&, const WTF::String& mimeType, bool shouldPreferPlugInsForImages) OVERRIDE;
214
    virtual WTF::String overrideMediaType() const OVERRIDE;
214
    virtual WTF::String overrideMediaType() const OVERRIDE;
215
    
215
    
216
    virtual void dispatchDidClearWindowObjectInWorld(WebCore::DOMWrapperWorld*) OVERRIDE;
216
    virtual void dispatchDidClearWindowObjectInWorld(WebCore::DOMWrapperWorld*) OVERRIDE;
Lines 231-237 private: a/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h_sec5
231
231
232
    virtual PassRefPtr<WebCore::FrameNetworkingContext> createNetworkingContext();
232
    virtual PassRefPtr<WebCore::FrameNetworkingContext> createNetworkingContext();
233
233
234
    virtual bool shouldPaintBrokenImage(const WebCore::KURL&) const;
234
    virtual bool shouldPaintBrokenImage(const WebCore::URL&) const;
235
235
236
    RetainPtr<WebFrame> m_webFrame;
236
    RetainPtr<WebFrame> m_webFrame;
237
237
- a/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm -14 / +14 lines
Lines 413-419 bool WebFrameLoaderClient::canAuthenticateAgainstProtectionSpace(DocumentLoader* a/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm_sec1
413
}
413
}
414
#endif
414
#endif
415
415
416
bool WebFrameLoaderClient::shouldPaintBrokenImage(const KURL& imageURL) const
416
bool WebFrameLoaderClient::shouldPaintBrokenImage(const URL& imageURL) const
417
{
417
{
418
    WebView *webView = getWebView(m_webFrame.get());
418
    WebView *webView = getWebView(m_webFrame.get());
419
    WebResourceDelegateImplementationCache* implementations = WebViewGetResourceLoadDelegateImplementations(webView);
419
    WebResourceDelegateImplementationCache* implementations = WebViewGetResourceLoadDelegateImplementations(webView);
Lines 530-536 void WebFrameLoaderClient::dispatchDidCancelClientRedirect() a/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm_sec2
530
        CallFrameLoadDelegate(implementations->didCancelClientRedirectForFrameFunc, webView, @selector(webView:didCancelClientRedirectForFrame:), m_webFrame.get());
530
        CallFrameLoadDelegate(implementations->didCancelClientRedirectForFrameFunc, webView, @selector(webView:didCancelClientRedirectForFrame:), m_webFrame.get());
531
}
531
}
532
532
533
void WebFrameLoaderClient::dispatchWillPerformClientRedirect(const KURL& url, double delay, double fireDate)
533
void WebFrameLoaderClient::dispatchWillPerformClientRedirect(const URL& url, double delay, double fireDate)
534
{
534
{
535
    WebView *webView = getWebView(m_webFrame.get());
535
    WebView *webView = getWebView(m_webFrame.get());
536
    WebFrameLoadDelegateImplementationCache* implementations = WebViewGetFrameLoadDelegateImplementations(webView);
536
    WebFrameLoadDelegateImplementationCache* implementations = WebViewGetFrameLoadDelegateImplementations(webView);
Lines 992-998 void WebFrameLoaderClient::didDisplayInsecureContent() a/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm_sec3
992
        CallFrameLoadDelegate(implementations->didDisplayInsecureContentFunc, webView, @selector(webViewDidDisplayInsecureContent:));
992
        CallFrameLoadDelegate(implementations->didDisplayInsecureContentFunc, webView, @selector(webViewDidDisplayInsecureContent:));
993
}
993
}
994
994
995
void WebFrameLoaderClient::didRunInsecureContent(SecurityOrigin* origin, const KURL& insecureURL)
995
void WebFrameLoaderClient::didRunInsecureContent(SecurityOrigin* origin, const URL& insecureURL)
996
{
996
{
997
    WebView *webView = getWebView(m_webFrame.get());   
997
    WebView *webView = getWebView(m_webFrame.get());   
998
    WebFrameLoadDelegateImplementationCache* implementations = WebViewGetFrameLoadDelegateImplementations(webView);
998
    WebFrameLoadDelegateImplementationCache* implementations = WebViewGetFrameLoadDelegateImplementations(webView);
Lines 1002-1008 void WebFrameLoaderClient::didRunInsecureContent(SecurityOrigin* origin, const K a/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm_sec4
1002
    }
1002
    }
1003
}
1003
}
1004
1004
1005
void WebFrameLoaderClient::didDetectXSS(const KURL& insecureURL, bool didBlockEntirePage)
1005
void WebFrameLoaderClient::didDetectXSS(const URL& insecureURL, bool didBlockEntirePage)
1006
{
1006
{
1007
    WebView *webView = getWebView(m_webFrame.get());   
1007
    WebView *webView = getWebView(m_webFrame.get());   
1008
    WebFrameLoadDelegateImplementationCache* implementations = WebViewGetFrameLoadDelegateImplementations(webView);
1008
    WebFrameLoadDelegateImplementationCache* implementations = WebViewGetFrameLoadDelegateImplementations(webView);
Lines 1192-1198 PassRefPtr<DocumentLoader> WebFrameLoaderClient::createDocumentLoader(const Reso a/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm_sec5
1192
    return loader.release();
1192
    return loader.release();
1193
}
1193
}
1194
1194
1195
void WebFrameLoaderClient::setTitle(const StringWithDirection& title, const KURL& url)
1195
void WebFrameLoaderClient::setTitle(const StringWithDirection& title, const URL& url)
1196
{
1196
{
1197
    WebView* view = getWebView(m_webFrame.get());
1197
    WebView* view = getWebView(m_webFrame.get());
1198
    
1198
    
Lines 1320-1326 RetainPtr<WebFramePolicyListener> WebFrameLoaderClient::setUpPolicyListener(Fram a/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm_sec6
1320
    return m_policyListener;
1320
    return m_policyListener;
1321
}
1321
}
1322
1322
1323
String WebFrameLoaderClient::userAgent(const KURL& url)
1323
String WebFrameLoaderClient::userAgent(const URL& url)
1324
{
1324
{
1325
    WebView *webView = getWebView(m_webFrame.get());
1325
    WebView *webView = getWebView(m_webFrame.get());
1326
    ASSERT(webView);
1326
    ASSERT(webView);
Lines 1328-1334 String WebFrameLoaderClient::userAgent(const KURL& url) a/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm_sec7
1328
    // We should never get here with nil for the WebView unless there is a bug somewhere else.
1328
    // We should never get here with nil for the WebView unless there is a bug somewhere else.
1329
    // But if we do, it's better to return the empty string than just crashing on the spot.
1329
    // But if we do, it's better to return the empty string than just crashing on the spot.
1330
    // Most other call sites are tolerant of nil because of Objective-C behavior, but this one
1330
    // Most other call sites are tolerant of nil because of Objective-C behavior, but this one
1331
    // is not because the return value of _userAgentForURL is a const KURL&.
1331
    // is not because the return value of _userAgentForURL is a const URL&.
1332
    if (!webView)
1332
    if (!webView)
1333
        return emptyString();
1333
        return emptyString();
1334
1334
Lines 1389-1395 bool WebFrameLoaderClient::canCachePage() const a/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm_sec8
1389
    return [[[m_webFrame.get() _dataSource] representation] isKindOfClass:[WebHTMLRepresentation class]];
1389
    return [[[m_webFrame.get() _dataSource] representation] isKindOfClass:[WebHTMLRepresentation class]];
1390
}
1390
}
1391
1391
1392
PassRefPtr<Frame> WebFrameLoaderClient::createFrame(const KURL& url, const String& name, HTMLFrameOwnerElement* ownerElement,
1392
PassRefPtr<Frame> WebFrameLoaderClient::createFrame(const URL& url, const String& name, HTMLFrameOwnerElement* ownerElement,
1393
    const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight)
1393
    const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight)
1394
{
1394
{
1395
    BEGIN_BLOCK_OBJC_EXCEPTIONS;
1395
    BEGIN_BLOCK_OBJC_EXCEPTIONS;
Lines 1423-1429 PassRefPtr<Frame> WebFrameLoaderClient::createFrame(const KURL& url, const Strin a/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm_sec9
1423
    return 0;
1423
    return 0;
1424
}
1424
}
1425
1425
1426
ObjectContentType WebFrameLoaderClient::objectContentType(const KURL& url, const String& mimeType, bool shouldPreferPlugInsForImages)
1426
ObjectContentType WebFrameLoaderClient::objectContentType(const URL& url, const String& mimeType, bool shouldPreferPlugInsForImages)
1427
{
1427
{
1428
    BEGIN_BLOCK_OBJC_EXCEPTIONS;
1428
    BEGIN_BLOCK_OBJC_EXCEPTIONS;
1429
1429
Lines 1641-1647 private: a/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm_sec10
1641
1641
1642
#endif // ENABLE(NETSCAPE_PLUGIN_API)
1642
#endif // ENABLE(NETSCAPE_PLUGIN_API)
1643
1643
1644
PassRefPtr<Widget> WebFrameLoaderClient::createPlugin(const IntSize& size, HTMLPlugInElement* element, const KURL& url,
1644
PassRefPtr<Widget> WebFrameLoaderClient::createPlugin(const IntSize& size, HTMLPlugInElement* element, const URL& url,
1645
    const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType, bool loadManually)
1645
    const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType, bool loadManually)
1646
{
1646
{
1647
    BEGIN_BLOCK_OBJC_EXCEPTIONS;
1647
    BEGIN_BLOCK_OBJC_EXCEPTIONS;
Lines 1746-1754 PassRefPtr<Widget> WebFrameLoaderClient::createPlugin(const IntSize& size, HTMLP a/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm_sec11
1746
    if (errorCode && m_webFrame) {
1746
    if (errorCode && m_webFrame) {
1747
        WebResourceDelegateImplementationCache* implementations = WebViewGetResourceLoadDelegateImplementations(webView);
1747
        WebResourceDelegateImplementationCache* implementations = WebViewGetResourceLoadDelegateImplementations(webView);
1748
        if (implementations->plugInFailedWithErrorFunc) {
1748
        if (implementations->plugInFailedWithErrorFunc) {
1749
            KURL pluginPageURL = document->completeURL(stripLeadingAndTrailingHTMLSpaces(parameterValue(paramNames, paramValues, "pluginspage")));
1749
            URL pluginPageURL = document->completeURL(stripLeadingAndTrailingHTMLSpaces(parameterValue(paramNames, paramValues, "pluginspage")));
1750
            if (!pluginPageURL.protocolIsInHTTPFamily())
1750
            if (!pluginPageURL.protocolIsInHTTPFamily())
1751
                pluginPageURL = KURL();
1751
                pluginPageURL = URL();
1752
            NSString *pluginName = pluginPackage ? (NSString *)[pluginPackage pluginInfo].name : nil;
1752
            NSString *pluginName = pluginPackage ? (NSString *)[pluginPackage pluginInfo].name : nil;
1753
1753
1754
            NSError *error = [[NSError alloc] _initWithPluginErrorCode:errorCode
1754
            NSError *error = [[NSError alloc] _initWithPluginErrorCode:errorCode
Lines 1799-1805 void WebFrameLoaderClient::redirectDataToPlugin(Widget* pluginWidget) a/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm_sec12
1799
    END_BLOCK_OBJC_EXCEPTIONS;
1799
    END_BLOCK_OBJC_EXCEPTIONS;
1800
}
1800
}
1801
    
1801
    
1802
PassRefPtr<Widget> WebFrameLoaderClient::createJavaAppletWidget(const IntSize& size, HTMLAppletElement* element, const KURL& baseURL, 
1802
PassRefPtr<Widget> WebFrameLoaderClient::createJavaAppletWidget(const IntSize& size, HTMLAppletElement* element, const URL& baseURL, 
1803
    const Vector<String>& paramNames, const Vector<String>& paramValues)
1803
    const Vector<String>& paramNames, const Vector<String>& paramValues)
1804
{
1804
{
1805
    BEGIN_BLOCK_OBJC_EXCEPTIONS;
1805
    BEGIN_BLOCK_OBJC_EXCEPTIONS;
Lines 1855-1861 PassRefPtr<Widget> WebFrameLoaderClient::createJavaAppletWidget(const IntSize& s a/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm_sec13
1855
}
1855
}
1856
1856
1857
#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
1857
#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
1858
PassRefPtr<Widget> WebFrameLoaderClient::createMediaPlayerProxyPlugin(const IntSize& size, HTMLMediaElement* element, const KURL& url,
1858
PassRefPtr<Widget> WebFrameLoaderClient::createMediaPlayerProxyPlugin(const IntSize& size, HTMLMediaElement* element, const URL& url,
1859
    const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType)
1859
    const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType)
1860
{
1860
{
1861
    BEGIN_BLOCK_OBJC_EXCEPTIONS;
1861
    BEGIN_BLOCK_OBJC_EXCEPTIONS;
- a/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.h -8 / +8 lines
Lines 57-68 private: a/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.h_sec1
57
    virtual WebCore::VisitedLinkStrategy* createVisitedLinkStrategy() OVERRIDE;
57
    virtual WebCore::VisitedLinkStrategy* createVisitedLinkStrategy() OVERRIDE;
58
58
59
    // WebCore::CookiesStrategy
59
    // WebCore::CookiesStrategy
60
    virtual String cookiesForDOM(const WebCore::NetworkStorageSession&, const WebCore::KURL& firstParty, const WebCore::KURL&) OVERRIDE;
60
    virtual String cookiesForDOM(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&) OVERRIDE;
61
    virtual void setCookiesFromDOM(const WebCore::NetworkStorageSession&, const WebCore::KURL& firstParty, const WebCore::KURL&, const String&) OVERRIDE;
61
    virtual void setCookiesFromDOM(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&, const String&) OVERRIDE;
62
    virtual bool cookiesEnabled(const WebCore::NetworkStorageSession&, const WebCore::KURL& firstParty, const WebCore::KURL&) OVERRIDE;
62
    virtual bool cookiesEnabled(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&) OVERRIDE;
63
    virtual String cookieRequestHeaderFieldValue(const WebCore::NetworkStorageSession&, const WebCore::KURL& firstParty, const WebCore::KURL&) OVERRIDE;
63
    virtual String cookieRequestHeaderFieldValue(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&) OVERRIDE;
64
    virtual bool getRawCookies(const WebCore::NetworkStorageSession&, const WebCore::KURL& firstParty, const WebCore::KURL&, Vector<WebCore::Cookie>&) OVERRIDE;
64
    virtual bool getRawCookies(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&, Vector<WebCore::Cookie>&) OVERRIDE;
65
    virtual void deleteCookie(const WebCore::NetworkStorageSession&, const WebCore::KURL&, const String&) OVERRIDE;
65
    virtual void deleteCookie(const WebCore::NetworkStorageSession&, const WebCore::URL&, const String&) OVERRIDE;
66
66
67
    // WebCore::DatabaseStrategy
67
    // WebCore::DatabaseStrategy
68
    // - Using default implementation.
68
    // - Using default implementation.
Lines 78-84 private: a/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.h_sec2
78
    // - Using default implementation.
78
    // - Using default implementation.
79
79
80
    // WebCore::VisitedLinkStrategy
80
    // WebCore::VisitedLinkStrategy
81
    virtual bool isLinkVisited(WebCore::Page*, WebCore::LinkHash, const WebCore::KURL& baseURL, const WTF::AtomicString& attributeURL) OVERRIDE;
81
    virtual bool isLinkVisited(WebCore::Page*, WebCore::LinkHash, const WebCore::URL& baseURL, const WTF::AtomicString& attributeURL) OVERRIDE;
82
    virtual void addVisitedLink(WebCore::Page*, WebCore::LinkHash) OVERRIDE;
82
    virtual void addVisitedLink(WebCore::Page*, WebCore::LinkHash) OVERRIDE;
83
    
83
    
84
    // WebCore::PasteboardStrategy
84
    // WebCore::PasteboardStrategy
Lines 94-100 private: a/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.h_sec3
94
    virtual long changeCount(const String& pasteboardName) OVERRIDE;
94
    virtual long changeCount(const String& pasteboardName) OVERRIDE;
95
    virtual String uniqueName() OVERRIDE;
95
    virtual String uniqueName() OVERRIDE;
96
    virtual WebCore::Color color(const String& pasteboardName) OVERRIDE;
96
    virtual WebCore::Color color(const String& pasteboardName) OVERRIDE;
97
    virtual WebCore::KURL url(const String& pasteboardName) OVERRIDE;
97
    virtual WebCore::URL url(const String& pasteboardName) OVERRIDE;
98
98
99
    virtual long addTypes(const Vector<String>& pasteboardTypes, const String& pasteboardName) OVERRIDE;
99
    virtual long addTypes(const Vector<String>& pasteboardTypes, const String& pasteboardName) OVERRIDE;
100
    virtual long setTypes(const Vector<String>& pasteboardTypes, const String& pasteboardName) OVERRIDE;
100
    virtual long setTypes(const Vector<String>& pasteboardTypes, const String& pasteboardName) OVERRIDE;
- a/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm -8 / +8 lines
Lines 92-123 VisitedLinkStrategy* WebPlatformStrategies::createVisitedLinkStrategy() a/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm_sec1
92
    return this;
92
    return this;
93
}
93
}
94
94
95
String WebPlatformStrategies::cookiesForDOM(const NetworkStorageSession& session, const KURL& firstParty, const KURL& url)
95
String WebPlatformStrategies::cookiesForDOM(const NetworkStorageSession& session, const URL& firstParty, const URL& url)
96
{
96
{
97
    return WebCore::cookiesForDOM(session, firstParty, url);
97
    return WebCore::cookiesForDOM(session, firstParty, url);
98
}
98
}
99
99
100
void WebPlatformStrategies::setCookiesFromDOM(const NetworkStorageSession& session, const KURL& firstParty, const KURL& url, const String& cookieString)
100
void WebPlatformStrategies::setCookiesFromDOM(const NetworkStorageSession& session, const URL& firstParty, const URL& url, const String& cookieString)
101
{
101
{
102
    WebCore::setCookiesFromDOM(session, firstParty, url, cookieString);
102
    WebCore::setCookiesFromDOM(session, firstParty, url, cookieString);
103
}
103
}
104
104
105
bool WebPlatformStrategies::cookiesEnabled(const NetworkStorageSession& session, const KURL& firstParty, const KURL& url)
105
bool WebPlatformStrategies::cookiesEnabled(const NetworkStorageSession& session, const URL& firstParty, const URL& url)
106
{
106
{
107
    return WebCore::cookiesEnabled(session, firstParty, url);
107
    return WebCore::cookiesEnabled(session, firstParty, url);
108
}
108
}
109
109
110
String WebPlatformStrategies::cookieRequestHeaderFieldValue(const NetworkStorageSession& session, const KURL& firstParty, const KURL& url)
110
String WebPlatformStrategies::cookieRequestHeaderFieldValue(const NetworkStorageSession& session, const URL& firstParty, const URL& url)
111
{
111
{
112
    return WebCore::cookieRequestHeaderFieldValue(session, firstParty, url);
112
    return WebCore::cookieRequestHeaderFieldValue(session, firstParty, url);
113
}
113
}
114
114
115
bool WebPlatformStrategies::getRawCookies(const NetworkStorageSession& session, const KURL& firstParty, const KURL& url, Vector<Cookie>& rawCookies)
115
bool WebPlatformStrategies::getRawCookies(const NetworkStorageSession& session, const URL& firstParty, const URL& url, Vector<Cookie>& rawCookies)
116
{
116
{
117
    return WebCore::getRawCookies(session, firstParty, url, rawCookies);
117
    return WebCore::getRawCookies(session, firstParty, url, rawCookies);
118
}
118
}
119
119
120
void WebPlatformStrategies::deleteCookie(const NetworkStorageSession& session, const KURL& url, const String& cookieName)
120
void WebPlatformStrategies::deleteCookie(const NetworkStorageSession& session, const URL& url, const String& cookieName)
121
{
121
{
122
    WebCore::deleteCookie(session, url, cookieName);
122
    WebCore::deleteCookie(session, url, cookieName);
123
}
123
}
Lines 145-151 void WebPlatformStrategies::getPluginInfo(const Page* page, Vector<PluginInfo>& a/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm_sec2
145
    END_BLOCK_OBJC_EXCEPTIONS;
145
    END_BLOCK_OBJC_EXCEPTIONS;
146
}
146
}
147
147
148
bool WebPlatformStrategies::isLinkVisited(Page* page, LinkHash hash, const KURL&, const AtomicString&)
148
bool WebPlatformStrategies::isLinkVisited(Page* page, LinkHash hash, const URL&, const AtomicString&)
149
{
149
{
150
    return page->group().isLinkVisited(hash);
150
    return page->group().isLinkVisited(hash);
151
}
151
}
Lines 195-201 Color WebPlatformStrategies::color(const String& pasteboardName) a/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm_sec3
195
    return PlatformPasteboard(pasteboardName).color();    
195
    return PlatformPasteboard(pasteboardName).color();    
196
}
196
}
197
197
198
KURL WebPlatformStrategies::url(const String& pasteboardName)
198
URL WebPlatformStrategies::url(const String& pasteboardName)
199
{
199
{
200
    return PlatformPasteboard(pasteboardName).url();
200
    return PlatformPasteboard(pasteboardName).url();
201
}
201
}
- a/Source/WebKit/mac/WebCoreSupport/WebSecurityOrigin.mm -2 / +2 lines
Lines 31-37 a/Source/WebKit/mac/WebCoreSupport/WebSecurityOrigin.mm_sec1
31
#import "WebApplicationCacheQuotaManager.h"
31
#import "WebApplicationCacheQuotaManager.h"
32
#import "WebDatabaseQuotaManager.h"
32
#import "WebDatabaseQuotaManager.h"
33
#import "WebQuotaManager.h"
33
#import "WebQuotaManager.h"
34
#import <WebCore/KURL.h>
34
#import <WebCore/URL.h>
35
#import <WebCore/DatabaseManager.h>
35
#import <WebCore/DatabaseManager.h>
36
#import <WebCore/SecurityOrigin.h>
36
#import <WebCore/SecurityOrigin.h>
37
37
Lines 44-50 using namespace WebCore; a/Source/WebKit/mac/WebCoreSupport/WebSecurityOrigin.mm_sec2
44
    if (!self)
44
    if (!self)
45
        return nil;
45
        return nil;
46
46
47
    RefPtr<SecurityOrigin> origin = SecurityOrigin::create(KURL([url absoluteURL]));
47
    RefPtr<SecurityOrigin> origin = SecurityOrigin::create(URL([url absoluteURL]));
48
    origin->ref();
48
    origin->ref();
49
    _private = reinterpret_cast<WebSecurityOriginPrivate *>(origin.get());
49
    _private = reinterpret_cast<WebSecurityOriginPrivate *>(origin.get());
50
50
- a/Source/WebKit/mac/WebView/WebDataSource.mm -3 / +3 lines
Lines 49-55 a/Source/WebKit/mac/WebView/WebDataSource.mm_sec1
49
#import "WebViewInternal.h"
49
#import "WebViewInternal.h"
50
#import <WebCore/ApplicationCacheStorage.h>
50
#import <WebCore/ApplicationCacheStorage.h>
51
#import <WebCore/FrameLoader.h>
51
#import <WebCore/FrameLoader.h>
52
#import <WebCore/KURL.h>
52
#import <WebCore/URL.h>
53
#import <WebCore/LegacyWebArchive.h>
53
#import <WebCore/LegacyWebArchive.h>
54
#import <WebCore/MIMETypeRegistry.h>
54
#import <WebCore/MIMETypeRegistry.h>
55
#import <WebCore/ResourceBuffer.h>
55
#import <WebCore/ResourceBuffer.h>
Lines 312-318 static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl a/Source/WebKit/mac/WebView/WebDataSource.mm_sec2
312
// May return nil if not initialized with a URL.
312
// May return nil if not initialized with a URL.
313
- (NSURL *)_URL
313
- (NSURL *)_URL
314
{
314
{
315
    const KURL& url = toPrivate(_private)->loader->url();
315
    const URL& url = toPrivate(_private)->loader->url();
316
    if (url.isEmpty())
316
    if (url.isEmpty())
317
        return nil;
317
        return nil;
318
    return url;
318
    return url;
Lines 462-468 static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl a/Source/WebKit/mac/WebView/WebDataSource.mm_sec3
462
462
463
- (NSURL *)unreachableURL
463
- (NSURL *)unreachableURL
464
{
464
{
465
    const KURL& unreachableURL = toPrivate(_private)->loader->unreachableURL();
465
    const URL& unreachableURL = toPrivate(_private)->loader->unreachableURL();
466
    if (unreachableURL.isEmpty())
466
    if (unreachableURL.isEmpty())
467
        return nil;
467
        return nil;
468
    return unreachableURL;
468
    return unreachableURL;
- a/Source/WebKit/mac/WebView/WebFrame.mm -1 / +1 lines
Lines 1417-1423 static NSURL *createUniqueWebDataURL() a/Source/WebKit/mac/WebView/WebFrame.mm_sec1
1417
    if (!pthread_main_np())
1417
    if (!pthread_main_np())
1418
        return [[self _webkit_invokeOnMainThread] _loadData:data MIMEType:MIMEType textEncodingName:encodingName baseURL:baseURL unreachableURL:unreachableURL];
1418
        return [[self _webkit_invokeOnMainThread] _loadData:data MIMEType:MIMEType textEncodingName:encodingName baseURL:baseURL unreachableURL:unreachableURL];
1419
    
1419
    
1420
    KURL responseURL;
1420
    URL responseURL;
1421
    if (!baseURL) {
1421
    if (!baseURL) {
1422
        baseURL = blankURL();
1422
        baseURL = blankURL();
1423
        responseURL = createUniqueWebDataURL();
1423
        responseURL = createUniqueWebDataURL();
- a/Source/WebKit/mac/WebView/WebHTMLView.mm -1 / +1 lines
Lines 3673-3679 static bool matchesExtensionOrEquivalent(NSString *filename, NSString *extension a/Source/WebKit/mac/WebView/WebHTMLView.mm_sec1
3673
        if (!page) 
3673
        if (!page) 
3674
            return nil; 
3674
            return nil; 
3675
        
3675
        
3676
        const KURL& imageURL = page->dragController().draggingImageURL();
3676
        const URL& imageURL = page->dragController().draggingImageURL();
3677
        ASSERT(!imageURL.isEmpty());
3677
        ASSERT(!imageURL.isEmpty());
3678
        draggingImageURL = imageURL;
3678
        draggingImageURL = imageURL;
3679
3679
- a/Source/WebKit/mac/WebView/WebPDFView.mm -1 / +1 lines
Lines 56-62 a/Source/WebKit/mac/WebView/WebPDFView.mm_sec1
56
#import <WebCore/FrameLoader.h>
56
#import <WebCore/FrameLoader.h>
57
#import <WebCore/HTMLFormElement.h>
57
#import <WebCore/HTMLFormElement.h>
58
#import <WebCore/HTMLFrameOwnerElement.h>
58
#import <WebCore/HTMLFrameOwnerElement.h>
59
#import <WebCore/KURL.h>
59
#import <WebCore/URL.h>
60
#import <WebCore/KeyboardEvent.h>
60
#import <WebCore/KeyboardEvent.h>
61
#import <WebCore/MouseEvent.h>
61
#import <WebCore/MouseEvent.h>
62
#import <WebCore/PlatformEventFactoryMac.h>
62
#import <WebCore/PlatformEventFactoryMac.h>
- a/Source/WebKit/mac/WebView/WebScriptDebugger.mm -2 / +2 lines
Lines 39-45 a/Source/WebKit/mac/WebView/WebScriptDebugger.mm_sec1
39
#import <WebCore/DOMWindow.h>
39
#import <WebCore/DOMWindow.h>
40
#import <WebCore/Frame.h>
40
#import <WebCore/Frame.h>
41
#import <WebCore/JSDOMWindow.h>
41
#import <WebCore/JSDOMWindow.h>
42
#import <WebCore/KURL.h>
42
#import <WebCore/URL.h>
43
#import <WebCore/ScriptController.h>
43
#import <WebCore/ScriptController.h>
44
44
45
using namespace JSC;
45
using namespace JSC;
Lines 62-68 static NSURL *toNSURL(const String& s) a/Source/WebKit/mac/WebView/WebScriptDebugger.mm_sec2
62
{
62
{
63
    if (s.isEmpty())
63
    if (s.isEmpty())
64
        return nil;
64
        return nil;
65
    return KURL(ParsedURLString, s);
65
    return URL(ParsedURLString, s);
66
}
66
}
67
67
68
static WebFrame *toWebFrame(JSGlobalObject* globalObject)
68
static WebFrame *toWebFrame(JSGlobalObject* globalObject)
- a/Source/WebKit/mac/WebView/WebView.mm -1 / +1 lines
Lines 682-688 static NSString *leakOutlookQuirksUserScriptContents() a/Source/WebKit/mac/WebView/WebView.mm_sec1
682
{
682
{
683
    static NSString *outlookQuirksScriptContents = leakOutlookQuirksUserScriptContents();
683
    static NSString *outlookQuirksScriptContents = leakOutlookQuirksUserScriptContents();
684
    core(self)->group().addUserScriptToWorld(core([WebScriptWorld world]),
684
    core(self)->group().addUserScriptToWorld(core([WebScriptWorld world]),
685
        outlookQuirksScriptContents, KURL(), Vector<String>(), Vector<String>(), InjectAtDocumentEnd, InjectInAllFrames);
685
        outlookQuirksScriptContents, URL(), Vector<String>(), Vector<String>(), InjectAtDocumentEnd, InjectInAllFrames);
686
}
686
}
687
687
688
static bool shouldRespectPriorityInCSSAttributeSetters()
688
static bool shouldRespectPriorityInCSSAttributeSetters()
- a/Source/WebKit/mac/WebView/WebViewInternal.h -1 / +1 lines
Lines 49-55 class Element; a/Source/WebKit/mac/WebView/WebViewInternal.h_sec1
49
class Event;
49
class Event;
50
class Frame;
50
class Frame;
51
class HistoryItem;
51
class HistoryItem;
52
class KURL;
52
class URL;
53
class KeyboardEvent;
53
class KeyboardEvent;
54
class Page;
54
class Page;
55
class RenderBox;
55
class RenderBox;
- a/Source/WebKit/qt/Api/qwebhistory.cpp -1 / +1 lines
Lines 26-32 a/Source/WebKit/qt/Api/qwebhistory.cpp_sec1
26
#include "IconDatabaseBase.h"
26
#include "IconDatabaseBase.h"
27
#include "Image.h"
27
#include "Image.h"
28
#include "IntSize.h"
28
#include "IntSize.h"
29
#include "KURL.h"
29
#include "URL.h"
30
#include "Page.h"
30
#include "Page.h"
31
#include "PageGroup.h"
31
#include "PageGroup.h"
32
#include <QWebPageAdapter.h>
32
#include <QWebPageAdapter.h>
- a/Source/WebKit/qt/Api/qwebscriptworld.cpp -1 / +1 lines
Lines 21-27 a/Source/WebKit/qt/Api/qwebscriptworld.cpp_sec1
21
#include "qwebscriptworld.h"
21
#include "qwebscriptworld.h"
22
#include "qwebscriptworld_p.h"
22
#include "qwebscriptworld_p.h"
23
23
24
#include "KURL.h"
24
#include "URL.h"
25
#include "ScriptController.h"
25
#include "ScriptController.h"
26
#include <QStringList>
26
#include <QStringList>
27
27
- a/Source/WebKit/qt/Api/qwebsecurityorigin.cpp -2 / +2 lines
Lines 22-28 a/Source/WebKit/qt/Api/qwebsecurityorigin.cpp_sec1
22
22
23
#include "ApplicationCacheStorage.h"
23
#include "ApplicationCacheStorage.h"
24
#include "DatabaseManager.h"
24
#include "DatabaseManager.h"
25
#include "KURL.h"
25
#include "URL.h"
26
#include "SchemeRegistry.h"
26
#include "SchemeRegistry.h"
27
#include "SecurityOrigin.h"
27
#include "SecurityOrigin.h"
28
#include "SecurityPolicy.h"
28
#include "SecurityPolicy.h"
Lines 273-279 QStringList QWebSecurityOrigin::localSchemes() a/Source/WebKit/qt/Api/qwebsecurityorigin.cpp_sec2
273
*/
273
*/
274
QWebSecurityOrigin::QWebSecurityOrigin(const QUrl& url)
274
QWebSecurityOrigin::QWebSecurityOrigin(const QUrl& url)
275
{
275
{
276
    d = new QWebSecurityOriginPrivate(SecurityOrigin::create(KURL(url)));
276
    d = new QWebSecurityOriginPrivate(SecurityOrigin::create(URL(url)));
277
}
277
}
278
278
279
/*!
279
/*!
- a/Source/WebKit/qt/Api/qwebsettings.cpp -3 / +3 lines
Lines 36-42 a/Source/WebKit/qt/Api/qwebsettings.cpp_sec1
36
#endif
36
#endif
37
#include "InitWebCoreQt.h"
37
#include "InitWebCoreQt.h"
38
#include "IntSize.h"
38
#include "IntSize.h"
39
#include "KURL.h"
39
#include "URL.h"
40
#include "MemoryCache.h"
40
#include "MemoryCache.h"
41
#include "NetworkStateNotifier.h"
41
#include "NetworkStateNotifier.h"
42
#include "Page.h"
42
#include "Page.h"
Lines 225-231 void QWebSettingsPrivate::apply() a/Source/WebKit/qt/Api/qwebsettings.cpp_sec2
225
        settings->setFrameFlatteningEnabled(value);
225
        settings->setFrameFlatteningEnabled(value);
226
226
227
        QUrl location = !userStyleSheetLocation.isEmpty() ? userStyleSheetLocation : global->userStyleSheetLocation;
227
        QUrl location = !userStyleSheetLocation.isEmpty() ? userStyleSheetLocation : global->userStyleSheetLocation;
228
        settings->setUserStyleSheetLocation(WebCore::KURL(location));
228
        settings->setUserStyleSheetLocation(WebCore::URL(location));
229
229
230
        QString encoding = !defaultTextEncoding.isEmpty() ? defaultTextEncoding: global->defaultTextEncoding;
230
        QString encoding = !defaultTextEncoding.isEmpty() ? defaultTextEncoding: global->defaultTextEncoding;
231
        settings->setDefaultTextEncodingName(encoding);
231
        settings->setDefaultTextEncodingName(encoding);
Lines 749-755 void QWebSettings::clearIconDatabase() a/Source/WebKit/qt/Api/qwebsettings.cpp_sec3
749
QIcon QWebSettings::iconForUrl(const QUrl& url)
749
QIcon QWebSettings::iconForUrl(const QUrl& url)
750
{
750
{
751
    WebCore::initializeWebCoreQt();
751
    WebCore::initializeWebCoreQt();
752
    QPixmap* icon = WebCore::iconDatabase().synchronousNativeIconForPageURL(WebCore::KURL(url).string(),
752
    QPixmap* icon = WebCore::iconDatabase().synchronousNativeIconForPageURL(WebCore::URL(url).string(),
753
                                WebCore::IntSize(16, 16));
753
                                WebCore::IntSize(16, 16));
754
    if (!icon)
754
    if (!icon)
755
        return QIcon();
755
        return QIcon();
- a/Source/WebKit/qt/ChangeLog +9 lines
Lines 1-3 a/Source/WebKit/qt/ChangeLog_sec1
1
2013-09-26  Darin Adler  <darin@apple.com>
2
3
        rename KURL to URL
4
        https://bugs.webkit.org/show_bug.cgi?id=16214
5
6
        Reviewed by Andreas Kling.
7
8
        * many files: Renamed, using script.
9
1
2013-09-27  Allan Sandfeld Jensen  <allan.jensen@digia.com>
10
2013-09-27  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2
11
3
        [Qt] Fix force_static_libs_as_shared in WebKit2
12
        [Qt] Fix force_static_libs_as_shared in WebKit2
- a/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.h -2 / +2 lines
Lines 31-37 a/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.h_sec1
31
31
32
#include "ChromeClient.h"
32
#include "ChromeClient.h"
33
#include "FloatRect.h"
33
#include "FloatRect.h"
34
#include "KURL.h"
34
#include "URL.h"
35
#include "QtPlatformPlugin.h"
35
#include "QtPlatformPlugin.h"
36
#include <wtf/PassOwnPtr.h>
36
#include <wtf/PassOwnPtr.h>
37
#include <wtf/RefCounted.h>
37
#include <wtf/RefCounted.h>
Lines 203-209 public: a/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.h_sec2
203
    QWebFullScreenVideoHandler* createFullScreenVideoHandler();
203
    QWebFullScreenVideoHandler* createFullScreenVideoHandler();
204
204
205
    QWebPageAdapter* m_webPage;
205
    QWebPageAdapter* m_webPage;
206
    KURL lastHoverURL;
206
    URL lastHoverURL;
207
    String lastHoverTitle;
207
    String lastHoverTitle;
208
    String lastHoverContent;
208
    String lastHoverContent;
209
209
- a/Source/WebKit/qt/WebCoreSupport/ContextMenuClientQt.cpp -2 / +2 lines
Lines 28-34 a/Source/WebKit/qt/WebCoreSupport/ContextMenuClientQt.cpp_sec1
28
28
29
#include "ContextMenu.h"
29
#include "ContextMenu.h"
30
#include "HitTestResult.h"
30
#include "HitTestResult.h"
31
#include "KURL.h"
31
#include "URL.h"
32
#include "NotImplemented.h"
32
#include "NotImplemented.h"
33
33
34
#include <wtf/RefCounted.h>
34
#include <wtf/RefCounted.h>
Lines 50-56 void ContextMenuClientQt::contextMenuItemSelected(ContextMenuItem*, const Contex a/Source/WebKit/qt/WebCoreSupport/ContextMenuClientQt.cpp_sec2
50
    notImplemented();
50
    notImplemented();
51
}
51
}
52
52
53
void ContextMenuClientQt::downloadURL(const KURL&)
53
void ContextMenuClientQt::downloadURL(const URL&)
54
{
54
{
55
    notImplemented();
55
    notImplemented();
56
}
56
}
- a/Source/WebKit/qt/WebCoreSupport/ContextMenuClientQt.h -1 / +1 lines
Lines 40-46 public: a/Source/WebKit/qt/WebCoreSupport/ContextMenuClientQt.h_sec1
40
    virtual PassOwnPtr<ContextMenu> customizeMenu(PassOwnPtr<ContextMenu>);
40
    virtual PassOwnPtr<ContextMenu> customizeMenu(PassOwnPtr<ContextMenu>);
41
    virtual void contextMenuItemSelected(ContextMenuItem*, const ContextMenu*);
41
    virtual void contextMenuItemSelected(ContextMenuItem*, const ContextMenu*);
42
42
43
    virtual void downloadURL(const KURL&);
43
    virtual void downloadURL(const URL&);
44
    virtual void lookUpInDictionary(Frame*);
44
    virtual void lookUpInDictionary(Frame*);
45
    virtual void speak(const String&);
45
    virtual void speak(const String&);
46
    virtual bool isSpeaking();
46
    virtual bool isSpeaking();
- a/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp -1 / +1 lines
Lines 733-739 QUrl DumpRenderTreeSupportQt::mediaContentUrlByElementId(QWebFrameAdapter* adapt a/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp_sec1
733
// API Candidate?
733
// API Candidate?
734
void DumpRenderTreeSupportQt::setAlternateHtml(QWebFrameAdapter* adapter, const QString& html, const QUrl& baseUrl, const QUrl& failingUrl)
734
void DumpRenderTreeSupportQt::setAlternateHtml(QWebFrameAdapter* adapter, const QString& html, const QUrl& baseUrl, const QUrl& failingUrl)
735
{
735
{
736
    KURL kurl(baseUrl);
736
    URL kurl(baseUrl);
737
    WebCore::Frame* coreFrame = adapter->frame;
737
    WebCore::Frame* coreFrame = adapter->frame;
738
    WebCore::ResourceRequest request(kurl);
738
    WebCore::ResourceRequest request(kurl);
739
    const QByteArray utf8 = html.toUtf8();
739
    const QByteArray utf8 = html.toUtf8();
- a/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp -13 / +13 lines
Lines 119-125 static QString drtPrintFrameUserGestureStatus(WebCore::Frame* frame) a/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp_sec1
119
    return QString::fromLatin1("Frame with user gesture \"%1\"").arg(QLatin1String("false"));
119
    return QString::fromLatin1("Frame with user gesture \"%1\"").arg(QLatin1String("false"));
120
}
120
}
121
121
122
static QString drtDescriptionSuitableForTestResult(const WebCore::KURL& kurl)
122
static QString drtDescriptionSuitableForTestResult(const WebCore::URL& kurl)
123
{
123
{
124
    if (kurl.isEmpty() || !kurl.isLocalFile())
124
    if (kurl.isEmpty() || !kurl.isLocalFile())
125
        return kurl.string();
125
        return kurl.string();
Lines 364-370 void FrameLoaderClientQt::dispatchDidCancelClientRedirect() a/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp_sec2
364
}
364
}
365
365
366
366
367
void FrameLoaderClientQt::dispatchWillPerformClientRedirect(const KURL& url, double, double)
367
void FrameLoaderClientQt::dispatchWillPerformClientRedirect(const URL& url, double, double)
368
{
368
{
369
    if (dumpFrameLoaderCallbacks)
369
    if (dumpFrameLoaderCallbacks)
370
        printf("%s - willPerformClientRedirectToURL: %s \n", qPrintable(drtDescriptionSuitableForTestResult(m_frame)), qPrintable(drtDescriptionSuitableForTestResult(url)));
370
        printf("%s - willPerformClientRedirectToURL: %s \n", qPrintable(drtDescriptionSuitableForTestResult(m_frame)), qPrintable(drtDescriptionSuitableForTestResult(url)));
Lines 685-691 void FrameLoaderClientQt::prepareForDataSourceReplacement() a/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp_sec3
685
{
685
{
686
}
686
}
687
687
688
void FrameLoaderClientQt::setTitle(const StringWithDirection& title, const KURL& url)
688
void FrameLoaderClientQt::setTitle(const StringWithDirection& title, const URL& url)
689
{
689
{
690
    // Used by Apple WebKit to update the title of an existing history item.
690
    // Used by Apple WebKit to update the title of an existing history item.
691
    // QtWebKit doesn't accomodate this on history items. If it ever does,
691
    // QtWebKit doesn't accomodate this on history items. If it ever does,
Lines 700-706 void FrameLoaderClientQt::setTitle(const StringWithDirection& title, const KURL& a/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp_sec4
700
}
700
}
701
701
702
702
703
String FrameLoaderClientQt::userAgent(const KURL& url)
703
String FrameLoaderClientQt::userAgent(const URL& url)
704
{
704
{
705
    if (m_webFrame)
705
    if (m_webFrame)
706
        return m_webFrame->pageAdapter->userAgentForUrl(url).remove(QLatin1Char('\n')).remove(QLatin1Char('\r'));
706
        return m_webFrame->pageAdapter->userAgentForUrl(url).remove(QLatin1Char('\n')).remove(QLatin1Char('\r'));
Lines 835-841 void FrameLoaderClientQt::didDisplayInsecureContent() a/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp_sec5
835
    notImplemented();
835
    notImplemented();
836
}
836
}
837
837
838
void FrameLoaderClientQt::didRunInsecureContent(WebCore::SecurityOrigin*, const KURL&)
838
void FrameLoaderClientQt::didRunInsecureContent(WebCore::SecurityOrigin*, const URL&)
839
{
839
{
840
    if (dumpFrameLoaderCallbacks)
840
    if (dumpFrameLoaderCallbacks)
841
        printf("didRunInsecureContent\n");
841
        printf("didRunInsecureContent\n");
Lines 843-849 void FrameLoaderClientQt::didRunInsecureContent(WebCore::SecurityOrigin*, const a/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp_sec6
843
    notImplemented();
843
    notImplemented();
844
}
844
}
845
845
846
void FrameLoaderClientQt::didDetectXSS(const KURL&, bool)
846
void FrameLoaderClientQt::didDetectXSS(const URL&, bool)
847
{
847
{
848
    if (dumpFrameLoaderCallbacks)
848
    if (dumpFrameLoaderCallbacks)
849
        printf("didDetectXSS\n");
849
        printf("didDetectXSS\n");
Lines 1153-1160 bool FrameLoaderClientQt::callErrorPageExtension(const WebCore::ResourceError& e a/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp_sec7
1153
    if (!page->errorPageExtension(&option, &output))
1153
    if (!page->errorPageExtension(&option, &output))
1154
        return false;
1154
        return false;
1155
1155
1156
    KURL baseUrl(output.baseUrl);
1156
    URL baseUrl(output.baseUrl);
1157
    KURL failingUrl(option.url);
1157
    URL failingUrl(option.url);
1158
1158
1159
    WebCore::ResourceRequest request(baseUrl);
1159
    WebCore::ResourceRequest request(baseUrl);
1160
    WTF::RefPtr<WebCore::SharedBuffer> buffer = WebCore::SharedBuffer::create(output.content.constData(), output.content.length());
1160
    WTF::RefPtr<WebCore::SharedBuffer> buffer = WebCore::SharedBuffer::create(output.content.constData(), output.content.length());
Lines 1300-1306 void FrameLoaderClientQt::startDownload(const WebCore::ResourceRequest& request, a/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp_sec8
1300
    m_webFrame->pageAdapter->emitDownloadRequested(request.toNetworkRequest(m_frame->loader().networkingContext()));
1300
    m_webFrame->pageAdapter->emitDownloadRequested(request.toNetworkRequest(m_frame->loader().networkingContext()));
1301
}
1301
}
1302
1302
1303
PassRefPtr<Frame> FrameLoaderClientQt::createFrame(const KURL& url, const String& name, HTMLFrameOwnerElement* ownerElement, const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight)
1303
PassRefPtr<Frame> FrameLoaderClientQt::createFrame(const URL& url, const String& name, HTMLFrameOwnerElement* ownerElement, const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight)
1304
{
1304
{
1305
    if (!m_webFrame)
1305
    if (!m_webFrame)
1306
        return 0;
1306
        return 0;
Lines 1325-1331 PassRefPtr<Frame> FrameLoaderClientQt::createFrame(const KURL& url, const String a/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp_sec9
1325
1325
1326
    // FIXME: Set override encoding if we have one.
1326
    // FIXME: Set override encoding if we have one.
1327
1327
1328
    KURL urlToLoad = url;
1328
    URL urlToLoad = url;
1329
    if (urlToLoad.isEmpty())
1329
    if (urlToLoad.isEmpty())
1330
        urlToLoad = blankURL();
1330
        urlToLoad = blankURL();
1331
1331
Lines 1338-1344 PassRefPtr<Frame> FrameLoaderClientQt::createFrame(const KURL& url, const String a/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp_sec10
1338
    return frameData.frame.release();
1338
    return frameData.frame.release();
1339
}
1339
}
1340
1340
1341
ObjectContentType FrameLoaderClientQt::objectContentType(const KURL& url, const String& mimeTypeIn, bool shouldPreferPlugInsForImages)
1341
ObjectContentType FrameLoaderClientQt::objectContentType(const URL& url, const String& mimeTypeIn, bool shouldPreferPlugInsForImages)
1342
{
1342
{
1343
    // qDebug()<<" ++++++++++++++++ url is "<<url.string()<<", mime = "<<mimeTypeIn;
1343
    // qDebug()<<" ++++++++++++++++ url is "<<url.string()<<", mime = "<<mimeTypeIn;
1344
    QFileInfo fi(url.path());
1344
    QFileInfo fi(url.path());
Lines 1460-1466 private: a/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp_sec11
1460
};
1460
};
1461
1461
1462
1462
1463
PassRefPtr<Widget> FrameLoaderClientQt::createPlugin(const IntSize& pluginSize, HTMLPlugInElement* element, const KURL& url, const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType, bool loadManually)
1463
PassRefPtr<Widget> FrameLoaderClientQt::createPlugin(const IntSize& pluginSize, HTMLPlugInElement* element, const URL& url, const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType, bool loadManually)
1464
{
1464
{
1465
    // qDebug()<<"------ Creating plugin in FrameLoaderClientQt::createPlugin for "<<url.string() << mimeType;
1465
    // qDebug()<<"------ Creating plugin in FrameLoaderClientQt::createPlugin for "<<url.string() << mimeType;
1466
    // qDebug()<<"------\t url = "<<url.string();
1466
    // qDebug()<<"------\t url = "<<url.string();
Lines 1563-1569 void FrameLoaderClientQt::redirectDataToPlugin(Widget* pluginWidget) a/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp_sec12
1563
        m_hasSentResponseToPlugin = false;
1563
        m_hasSentResponseToPlugin = false;
1564
}
1564
}
1565
1565
1566
PassRefPtr<Widget> FrameLoaderClientQt::createJavaAppletWidget(const IntSize& pluginSize, HTMLAppletElement* element, const KURL& url, const Vector<String>& paramNames, const Vector<String>& paramValues)
1566
PassRefPtr<Widget> FrameLoaderClientQt::createJavaAppletWidget(const IntSize& pluginSize, HTMLAppletElement* element, const URL& url, const Vector<String>& paramNames, const Vector<String>& paramValues)
1567
{
1567
{
1568
    return createPlugin(pluginSize, element, url, paramNames, paramValues, "application/x-java-applet", true);
1568
    return createPlugin(pluginSize, element, url, paramNames, paramValues, "application/x-java-applet", true);
1569
}
1569
}
- a/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h -12 / +12 lines
Lines 35-41 a/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h_sec1
35
#include "FrameLoader.h"
35
#include "FrameLoader.h"
36
#include "FrameLoaderClient.h"
36
#include "FrameLoaderClient.h"
37
#include "HTMLFormElement.h"
37
#include "HTMLFormElement.h"
38
#include "KURL.h"
38
#include "URL.h"
39
#include "ResourceError.h"
39
#include "ResourceError.h"
40
#include "ResourceResponse.h"
40
#include "ResourceResponse.h"
41
#include "WebCore/plugins/PluginView.h"
41
#include "WebCore/plugins/PluginView.h"
Lines 109-115 public: a/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h_sec2
109
    virtual void dispatchDidHandleOnloadEvents();
109
    virtual void dispatchDidHandleOnloadEvents();
110
    virtual void dispatchDidReceiveServerRedirectForProvisionalLoad();
110
    virtual void dispatchDidReceiveServerRedirectForProvisionalLoad();
111
    virtual void dispatchDidCancelClientRedirect();
111
    virtual void dispatchDidCancelClientRedirect();
112
    virtual void dispatchWillPerformClientRedirect(const KURL&, double interval, double fireDate);
112
    virtual void dispatchWillPerformClientRedirect(const URL&, double interval, double fireDate);
113
    virtual void dispatchDidNavigateWithinPage() OVERRIDE;
113
    virtual void dispatchDidNavigateWithinPage() OVERRIDE;
114
    virtual void dispatchDidChangeLocationWithinPage();
114
    virtual void dispatchDidChangeLocationWithinPage();
115
    virtual void dispatchDidPushStateWithinPage();
115
    virtual void dispatchDidPushStateWithinPage();
Lines 162-169 public: a/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h_sec3
162
    virtual bool shouldGoToHistoryItem(HistoryItem*) const;
162
    virtual bool shouldGoToHistoryItem(HistoryItem*) const;
163
    virtual bool shouldStopLoadingForHistoryItem(HistoryItem*) const;
163
    virtual bool shouldStopLoadingForHistoryItem(HistoryItem*) const;
164
    virtual void didDisplayInsecureContent();
164
    virtual void didDisplayInsecureContent();
165
    virtual void didRunInsecureContent(SecurityOrigin*, const KURL&);
165
    virtual void didRunInsecureContent(SecurityOrigin*, const URL&);
166
    virtual void didDetectXSS(const KURL&, bool didBlockEntirePage);
166
    virtual void didDetectXSS(const URL&, bool didBlockEntirePage);
167
167
168
    virtual ResourceError cancelledError(const ResourceRequest&);
168
    virtual ResourceError cancelledError(const ResourceRequest&);
169
    virtual ResourceError blockedError(const ResourceRequest&);
169
    virtual ResourceError blockedError(const ResourceRequest&);
Lines 190-198 public: a/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h_sec4
190
    virtual void prepareForDataSourceReplacement();
190
    virtual void prepareForDataSourceReplacement();
191
191
192
    virtual WTF::PassRefPtr<WebCore::DocumentLoader> createDocumentLoader(const WebCore::ResourceRequest&, const WebCore::SubstituteData&);
192
    virtual WTF::PassRefPtr<WebCore::DocumentLoader> createDocumentLoader(const WebCore::ResourceRequest&, const WebCore::SubstituteData&);
193
    virtual void setTitle(const StringWithDirection&, const KURL&);
193
    virtual void setTitle(const StringWithDirection&, const URL&);
194
194
195
    virtual String userAgent(const WebCore::KURL&);
195
    virtual String userAgent(const WebCore::URL&);
196
196
197
    virtual void savePlatformDataToCachedFrame(WebCore::CachedFrame*);
197
    virtual void savePlatformDataToCachedFrame(WebCore::CachedFrame*);
198
    virtual void transitionToCommittedFromCachedFrame(WebCore::CachedFrame*);
198
    virtual void transitionToCommittedFromCachedFrame(WebCore::CachedFrame*);
Lines 206-219 public: a/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h_sec5
206
    virtual bool canCachePage() const;
206
    virtual bool canCachePage() const;
207
    virtual void convertMainResourceLoadToDownload(WebCore::DocumentLoader*, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&);
207
    virtual void convertMainResourceLoadToDownload(WebCore::DocumentLoader*, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&);
208
208
209
    virtual PassRefPtr<Frame> createFrame(const KURL&, const String& name, HTMLFrameOwnerElement*, const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight);
209
    virtual PassRefPtr<Frame> createFrame(const URL&, const String& name, HTMLFrameOwnerElement*, const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight);
210
    virtual PassRefPtr<Widget> createPlugin(const IntSize&, HTMLPlugInElement*, const KURL&, const Vector<String>&, const Vector<String>&, const String&, bool);
210
    virtual PassRefPtr<Widget> createPlugin(const IntSize&, HTMLPlugInElement*, const URL&, const Vector<String>&, const Vector<String>&, const String&, bool);
211
    virtual void recreatePlugin(Widget*) { }
211
    virtual void recreatePlugin(Widget*) { }
212
    virtual void redirectDataToPlugin(Widget* pluginWidget);
212
    virtual void redirectDataToPlugin(Widget* pluginWidget);
213
213
214
    virtual PassRefPtr<Widget> createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const KURL& baseURL, const Vector<String>& paramNames, const Vector<String>& paramValues);
214
    virtual PassRefPtr<Widget> createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const URL& baseURL, const Vector<String>& paramNames, const Vector<String>& paramValues);
215
215
216
    virtual ObjectContentType objectContentType(const KURL&, const String& mimeTypeIn, bool shouldPreferPlugInsForImages);
216
    virtual ObjectContentType objectContentType(const URL&, const String& mimeTypeIn, bool shouldPreferPlugInsForImages);
217
    virtual String overrideMediaType() const;
217
    virtual String overrideMediaType() const;
218
218
219
    virtual void dispatchDidClearWindowObjectInWorld(DOMWrapperWorld*);
219
    virtual void dispatchDidClearWindowObjectInWorld(DOMWrapperWorld*);
Lines 226-232 public: a/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h_sec6
226
226
227
    virtual PassRefPtr<FrameNetworkingContext> createNetworkingContext();
227
    virtual PassRefPtr<FrameNetworkingContext> createNetworkingContext();
228
228
229
    const KURL& lastRequestedUrl() const { return m_lastRequestedUrl; }
229
    const URL& lastRequestedUrl() const { return m_lastRequestedUrl; }
230
230
231
    QWebFrameAdapter* webFrame() const;
231
    QWebFrameAdapter* webFrame() const;
232
232
Lines 261-267 private: a/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h_sec7
261
    WebCore::PluginView* m_pluginView;
261
    WebCore::PluginView* m_pluginView;
262
    bool m_hasSentResponseToPlugin;
262
    bool m_hasSentResponseToPlugin;
263
263
264
    KURL m_lastRequestedUrl;
264
    URL m_lastRequestedUrl;
265
    bool m_isOriginatingLoad;
265
    bool m_isOriginatingLoad;
266
};
266
};
267
267
- a/Source/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp -1 / +1 lines
Lines 35-47 a/Source/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp_sec1
35
#include "Document.h"
35
#include "Document.h"
36
#include "Event.h"
36
#include "Event.h"
37
#include "EventNames.h"
37
#include "EventNames.h"
38
#include "KURL.h"
39
#include "Page.h"
38
#include "Page.h"
40
#include "QWebFrameAdapter.h"
39
#include "QWebFrameAdapter.h"
41
#include "QWebPageAdapter.h"
40
#include "QWebPageAdapter.h"
42
#include "QtPlatformPlugin.h"
41
#include "QtPlatformPlugin.h"
43
#include "ScriptExecutionContext.h"
42
#include "ScriptExecutionContext.h"
44
#include "SecurityOrigin.h"
43
#include "SecurityOrigin.h"
44
#include "URL.h"
45
#include "UserGestureIndicator.h"
45
#include "UserGestureIndicator.h"
46
#include "qwebkitglobal.h"
46
#include "qwebkitglobal.h"
47
47
- a/Source/WebKit/qt/WebCoreSupport/PlatformStrategiesQt.cpp -7 / +7 lines
Lines 100-131 VisitedLinkStrategy* PlatformStrategiesQt::createVisitedLinkStrategy() a/Source/WebKit/qt/WebCoreSupport/PlatformStrategiesQt.cpp_sec1
100
    return this;
100
    return this;
101
}
101
}
102
102
103
String PlatformStrategiesQt::cookiesForDOM(const NetworkStorageSession& session, const KURL& firstParty, const KURL& url)
103
String PlatformStrategiesQt::cookiesForDOM(const NetworkStorageSession& session, const URL& firstParty, const URL& url)
104
{
104
{
105
    return WebCore::cookiesForDOM(session, firstParty, url);
105
    return WebCore::cookiesForDOM(session, firstParty, url);
106
}
106
}
107
107
108
void PlatformStrategiesQt::setCookiesFromDOM(const NetworkStorageSession& session, const KURL& firstParty, const KURL& url, const String& cookieString)
108
void PlatformStrategiesQt::setCookiesFromDOM(const NetworkStorageSession& session, const URL& firstParty, const URL& url, const String& cookieString)
109
{
109
{
110
    WebCore::setCookiesFromDOM(session, firstParty, url, cookieString);
110
    WebCore::setCookiesFromDOM(session, firstParty, url, cookieString);
111
}
111
}
112
112
113
bool PlatformStrategiesQt::cookiesEnabled(const NetworkStorageSession& session, const KURL& firstParty, const KURL& url)
113
bool PlatformStrategiesQt::cookiesEnabled(const NetworkStorageSession& session, const URL& firstParty, const URL& url)
114
{
114
{
115
    return WebCore::cookiesEnabled(session, firstParty, url);
115
    return WebCore::cookiesEnabled(session, firstParty, url);
116
}
116
}
117
117
118
String PlatformStrategiesQt::cookieRequestHeaderFieldValue(const NetworkStorageSession& session, const KURL& firstParty, const KURL& url)
118
String PlatformStrategiesQt::cookieRequestHeaderFieldValue(const NetworkStorageSession& session, const URL& firstParty, const URL& url)
119
{
119
{
120
    return WebCore::cookieRequestHeaderFieldValue(session, firstParty, url);
120
    return WebCore::cookieRequestHeaderFieldValue(session, firstParty, url);
121
}
121
}
122
122
123
bool PlatformStrategiesQt::getRawCookies(const NetworkStorageSession& session, const KURL& firstParty, const KURL& url, Vector<Cookie>& rawCookies)
123
bool PlatformStrategiesQt::getRawCookies(const NetworkStorageSession& session, const URL& firstParty, const URL& url, Vector<Cookie>& rawCookies)
124
{
124
{
125
    return WebCore::getRawCookies(session, firstParty, url, rawCookies);
125
    return WebCore::getRawCookies(session, firstParty, url, rawCookies);
126
}
126
}
127
127
128
void PlatformStrategiesQt::deleteCookie(const NetworkStorageSession& session, const KURL& url, const String& cookieName)
128
void PlatformStrategiesQt::deleteCookie(const NetworkStorageSession& session, const URL& url, const String& cookieName)
129
{
129
{
130
    WebCore::deleteCookie(session, url, cookieName);
130
    WebCore::deleteCookie(session, url, cookieName);
131
}
131
}
Lines 196-202 void PlatformStrategiesQt::getPluginInfo(const WebCore::Page* page, Vector<WebCo a/Source/WebKit/qt/WebCoreSupport/PlatformStrategiesQt.cpp_sec2
196
196
197
// VisitedLinkStrategy
197
// VisitedLinkStrategy
198
198
199
bool PlatformStrategiesQt::isLinkVisited(Page* page, LinkHash hash, const KURL& baseURL, const AtomicString& attributeURL)
199
bool PlatformStrategiesQt::isLinkVisited(Page* page, LinkHash hash, const URL& baseURL, const AtomicString& attributeURL)
200
{
200
{
201
    ASSERT(hash);
201
    ASSERT(hash);
202
202
- a/Source/WebKit/qt/WebCoreSupport/PlatformStrategiesQt.h -7 / +7 lines
Lines 59-70 private: a/Source/WebKit/qt/WebCoreSupport/PlatformStrategiesQt.h_sec1
59
    virtual WebCore::VisitedLinkStrategy* createVisitedLinkStrategy();
59
    virtual WebCore::VisitedLinkStrategy* createVisitedLinkStrategy();
60
    
60
    
61
    // WebCore::CookiesStrategy
61
    // WebCore::CookiesStrategy
62
    virtual String cookiesForDOM(const WebCore::NetworkStorageSession&, const WebCore::KURL& firstParty, const WebCore::KURL&);
62
    virtual String cookiesForDOM(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&);
63
    virtual void setCookiesFromDOM(const WebCore::NetworkStorageSession&, const WebCore::KURL& firstParty, const WebCore::KURL&, const String&);
63
    virtual void setCookiesFromDOM(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&, const String&);
64
    virtual bool cookiesEnabled(const WebCore::NetworkStorageSession&, const WebCore::KURL& firstParty, const WebCore::KURL&);
64
    virtual bool cookiesEnabled(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&);
65
    virtual String cookieRequestHeaderFieldValue(const WebCore::NetworkStorageSession&, const WebCore::KURL& firstParty, const WebCore::KURL&);
65
    virtual String cookieRequestHeaderFieldValue(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&);
66
    virtual bool getRawCookies(const WebCore::NetworkStorageSession&, const WebCore::KURL& firstParty, const WebCore::KURL&, Vector<WebCore::Cookie>&);
66
    virtual bool getRawCookies(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&, Vector<WebCore::Cookie>&);
67
    virtual void deleteCookie(const WebCore::NetworkStorageSession&, const WebCore::KURL&, const String&);
67
    virtual void deleteCookie(const WebCore::NetworkStorageSession&, const WebCore::URL&, const String&);
68
68
69
    // WebCore::DatabaseStrategy
69
    // WebCore::DatabaseStrategy
70
    // - Using default implementation.
70
    // - Using default implementation.
Lines 74-80 private: a/Source/WebKit/qt/WebCoreSupport/PlatformStrategiesQt.h_sec2
74
    virtual void getPluginInfo(const WebCore::Page*, Vector<WebCore::PluginInfo>&);
74
    virtual void getPluginInfo(const WebCore::Page*, Vector<WebCore::PluginInfo>&);
75
75
76
    // WebCore::VisitedLinkStrategy
76
    // WebCore::VisitedLinkStrategy
77
    virtual bool isLinkVisited(WebCore::Page*, WebCore::LinkHash, const WebCore::KURL& baseURL, const WTF::AtomicString& attributeURL);
77
    virtual bool isLinkVisited(WebCore::Page*, WebCore::LinkHash, const WebCore::URL& baseURL, const WTF::AtomicString& attributeURL);
78
    virtual void addVisitedLink(WebCore::Page*, WebCore::LinkHash);
78
    virtual void addVisitedLink(WebCore::Page*, WebCore::LinkHash);
79
};
79
};
80
80
- a/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp -7 / +7 lines
Lines 36-42 a/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp_sec1
36
#include "HitTestResult.h"
36
#include "HitTestResult.h"
37
#include "InspectorController.h"
37
#include "InspectorController.h"
38
#include "JSDOMWindowBase.h"
38
#include "JSDOMWindowBase.h"
39
#include "KURL.h"
39
#include "URL.h"
40
#include "NavigationScheduler.h"
40
#include "NavigationScheduler.h"
41
#include "NetworkingContext.h"
41
#include "NetworkingContext.h"
42
#include "NodeList.h"
42
#include "NodeList.h"
Lines 266-272 QString QWebFrameAdapter::toPlainText() const a/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp_sec2
266
266
267
void QWebFrameAdapter::setContent(const QByteArray &data, const QString &mimeType, const QUrl &baseUrl)
267
void QWebFrameAdapter::setContent(const QByteArray &data, const QString &mimeType, const QUrl &baseUrl)
268
{
268
{
269
    KURL kurl(baseUrl);
269
    URL kurl(baseUrl);
270
    WebCore::ResourceRequest request(kurl);
270
    WebCore::ResourceRequest request(kurl);
271
    WTF::RefPtr<WebCore::SharedBuffer> buffer = WebCore::SharedBuffer::create(data.constData(), data.length());
271
    WTF::RefPtr<WebCore::SharedBuffer> buffer = WebCore::SharedBuffer::create(data.constData(), data.length());
272
    QString actualMimeType;
272
    QString actualMimeType;
Lines 277-293 void QWebFrameAdapter::setContent(const QByteArray &data, const QString &mimeTyp a/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp_sec3
277
        actualMimeType = extractMIMETypeFromMediaType(mimeType);
277
        actualMimeType = extractMIMETypeFromMediaType(mimeType);
278
        encoding = extractCharsetFromMediaType(mimeType);
278
        encoding = extractCharsetFromMediaType(mimeType);
279
    }
279
    }
280
    WebCore::SubstituteData substituteData(buffer, WTF::String(actualMimeType), encoding, KURL());
280
    WebCore::SubstituteData substituteData(buffer, WTF::String(actualMimeType), encoding, URL());
281
    frame->loader().load(WebCore::FrameLoadRequest(frame, request, substituteData));
281
    frame->loader().load(WebCore::FrameLoadRequest(frame, request, substituteData));
282
}
282
}
283
283
284
void QWebFrameAdapter::setHtml(const QString &html, const QUrl &baseUrl)
284
void QWebFrameAdapter::setHtml(const QString &html, const QUrl &baseUrl)
285
{
285
{
286
    KURL kurl(baseUrl);
286
    URL kurl(baseUrl);
287
    WebCore::ResourceRequest request(kurl);
287
    WebCore::ResourceRequest request(kurl);
288
    const QByteArray utf8 = html.toUtf8();
288
    const QByteArray utf8 = html.toUtf8();
289
    WTF::RefPtr<WebCore::SharedBuffer> data = WebCore::SharedBuffer::create(utf8.constData(), utf8.length());
289
    WTF::RefPtr<WebCore::SharedBuffer> data = WebCore::SharedBuffer::create(utf8.constData(), utf8.length());
290
    WebCore::SubstituteData substituteData(data, WTF::String("text/html"), WTF::String("utf-8"), KURL());
290
    WebCore::SubstituteData substituteData(data, WTF::String("text/html"), WTF::String("utf-8"), URL());
291
    frame->loader().load(WebCore::FrameLoadRequest(frame, request, substituteData));
291
    frame->loader().load(WebCore::FrameLoadRequest(frame, request, substituteData));
292
}
292
}
293
293
Lines 376-383 QWebFrameAdapter* QWebFrameAdapter::kit(const Frame* frame) a/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp_sec4
376
QUrl QWebFrameAdapter::ensureAbsoluteUrl(const QUrl& url)
376
QUrl QWebFrameAdapter::ensureAbsoluteUrl(const QUrl& url)
377
{
377
{
378
    // FIXME: it would be nice if we could avoid doing this.
378
    // FIXME: it would be nice if we could avoid doing this.
379
    // Convert to KURL and back to preserve the old behavior (e.g. fixup of single slash in 'http:/')
379
    // Convert to URL and back to preserve the old behavior (e.g. fixup of single slash in 'http:/')
380
    QUrl validatedUrl = KURL(url);
380
    QUrl validatedUrl = URL(url);
381
381
382
    if (!validatedUrl.isValid() || !validatedUrl.isRelative())
382
    if (!validatedUrl.isValid() || !validatedUrl.isRelative())
383
        return validatedUrl;
383
        return validatedUrl;
- a/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp -1 / +1 lines
Lines 1068-1074 void QWebPageAdapter::triggerAction(QWebPageAdapter::MenuAction action, QWebHitT a/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp_sec1
1068
        frame.loader().loadFrameRequest(frameLoadRequest(hitTestResult->linkUrl, &frame), /*lockHistory*/ false, /*lockBackForwardList*/ false, /*event*/ 0, /*FormState*/ 0, MaybeSendReferrer);
1068
        frame.loader().loadFrameRequest(frameLoadRequest(hitTestResult->linkUrl, &frame), /*lockHistory*/ false, /*lockBackForwardList*/ false, /*event*/ 0, /*FormState*/ 0, MaybeSendReferrer);
1069
        break;
1069
        break;
1070
    case OpenFrameInNewWindow: {
1070
    case OpenFrameInNewWindow: {
1071
        KURL url = frame.loader().documentLoader()->unreachableURL();
1071
        URL url = frame.loader().documentLoader()->unreachableURL();
1072
        if (url.isEmpty())
1072
        if (url.isEmpty())
1073
            url = frame.loader().documentLoader()->url();
1073
            url = frame.loader().documentLoader()->url();
1074
        openNewWindow(url, &frame);
1074
        openNewWindow(url, &frame);
- a/Source/WebKit/win/ChangeLog +9 lines
Lines 1-3 a/Source/WebKit/win/ChangeLog_sec1
1
2013-09-26  Darin Adler  <darin@apple.com>
2
3
        rename KURL to URL
4
        https://bugs.webkit.org/show_bug.cgi?id=16214
5
6
        Reviewed by Andreas Kling.
7
8
        * many files: Renamed, using script.
9
1
2013-09-25  Roger Fong  <roger_fong@apple.com>
10
2013-09-25  Roger Fong  <roger_fong@apple.com>
2
11
3
        [Windows] Attempting to scroll from a non-scrollable layer results the main document getting scrolled.
12
        [Windows] Attempting to scroll from a non-scrollable layer results the main document getting scrolled.
- a/Source/WebKit/win/MarshallingHelpers.cpp -4 / +4 lines
Lines 29-35 a/Source/WebKit/win/MarshallingHelpers.cpp_sec1
29
29
30
#include <WebCore/BString.h>
30
#include <WebCore/BString.h>
31
#include <WebCore/IntRect.h>
31
#include <WebCore/IntRect.h>
32
#include <WebCore/KURL.h>
32
#include <WebCore/URL.h>
33
#include <wtf/DateMath.h>
33
#include <wtf/DateMath.h>
34
#include <wtf/MathExtras.h>
34
#include <wtf/MathExtras.h>
35
#include <wtf/text/WTFString.h>
35
#include <wtf/text/WTFString.h>
Lines 39-50 using namespace WebCore; a/Source/WebKit/win/MarshallingHelpers.cpp_sec2
39
CFArrayCallBacks MarshallingHelpers::kIUnknownArrayCallBacks = {0, IUnknownRetainCallback, IUnknownReleaseCallback, 0, 0};
39
CFArrayCallBacks MarshallingHelpers::kIUnknownArrayCallBacks = {0, IUnknownRetainCallback, IUnknownReleaseCallback, 0, 0};
40
CFDictionaryValueCallBacks MarshallingHelpers::kIUnknownDictionaryValueCallBacks = {0, IUnknownRetainCallback, IUnknownReleaseCallback, 0, 0};
40
CFDictionaryValueCallBacks MarshallingHelpers::kIUnknownDictionaryValueCallBacks = {0, IUnknownRetainCallback, IUnknownReleaseCallback, 0, 0};
41
41
42
KURL MarshallingHelpers::BSTRToKURL(BSTR urlStr)
42
URL MarshallingHelpers::BSTRToKURL(BSTR urlStr)
43
{
43
{
44
    return KURL(KURL(), String(urlStr, SysStringLen(urlStr)));
44
    return URL(URL(), String(urlStr, SysStringLen(urlStr)));
45
}
45
}
46
46
47
BSTR MarshallingHelpers::KURLToBSTR(const KURL& url)
47
BSTR MarshallingHelpers::URLToBSTR(const URL& url)
48
{
48
{
49
    return BString(url.string()).release();
49
    return BString(url.string()).release();
50
}
50
}
- a/Source/WebKit/win/MarshallingHelpers.h -3 / +3 lines
Lines 31-44 a/Source/WebKit/win/MarshallingHelpers.h_sec1
31
31
32
namespace WebCore {
32
namespace WebCore {
33
    class IntRect;
33
    class IntRect;
34
    class KURL;
34
    class URL;
35
}
35
}
36
36
37
class MarshallingHelpers
37
class MarshallingHelpers
38
{
38
{
39
public:
39
public:
40
    static WebCore::KURL BSTRToKURL(BSTR);
40
    static WebCore::URL BSTRToKURL(BSTR);
41
    static BSTR KURLToBSTR(const WebCore::KURL&);
41
    static BSTR URLToBSTR(const WebCore::URL&);
42
    static CFURLRef PathStringToFileCFURLRef(const WTF::String&);
42
    static CFURLRef PathStringToFileCFURLRef(const WTF::String&);
43
    static WTF::String FileCFURLRefToPathString(CFURLRef fileURL);
43
    static WTF::String FileCFURLRefToPathString(CFURLRef fileURL);
44
    static CFURLRef BSTRToCFURLRef(BSTR);
44
    static CFURLRef BSTRToCFURLRef(BSTR);
- a/Source/WebKit/win/WebCoreSupport/WebContextMenuClient.cpp -2 / +2 lines
Lines 104-110 void WebContextMenuClient::contextMenuItemSelected(ContextMenuItem* item, const a/Source/WebKit/win/WebCoreSupport/WebContextMenuClient.cpp_sec1
104
    uiDelegate->contextMenuItemSelected(m_webView, &selectedItem, propertyBag.get());
104
    uiDelegate->contextMenuItemSelected(m_webView, &selectedItem, propertyBag.get());
105
}
105
}
106
106
107
void WebContextMenuClient::downloadURL(const KURL& url)
107
void WebContextMenuClient::downloadURL(const URL& url)
108
{
108
{
109
    m_webView->downloadURL(url);
109
    m_webView->downloadURL(url);
110
}
110
}
Lines 122-128 void WebContextMenuClient::searchWithGoogle(const Frame* frame) a/Source/WebKit/win/WebCoreSupport/WebContextMenuClient.cpp_sec2
122
122
123
    if (Page* page = frame->page()) {
123
    if (Page* page = frame->page()) {
124
        UserGestureIndicator indicator(DefinitelyProcessingUserGesture);
124
        UserGestureIndicator indicator(DefinitelyProcessingUserGesture);
125
        page->mainFrame().loader().urlSelected(KURL(ParsedURLString, url), String(), 0, false, false, MaybeSendReferrer);
125
        page->mainFrame().loader().urlSelected(URL(ParsedURLString, url), String(), 0, false, false, MaybeSendReferrer);
126
    }
126
    }
127
}
127
}
128
128
- a/Source/WebKit/win/WebCoreSupport/WebContextMenuClient.h -1 / +1 lines
Lines 39-45 public: a/Source/WebKit/win/WebCoreSupport/WebContextMenuClient.h_sec1
39
    virtual PassOwnPtr<WebCore::ContextMenu> customizeMenu(PassOwnPtr<WebCore::ContextMenu>);
39
    virtual PassOwnPtr<WebCore::ContextMenu> customizeMenu(PassOwnPtr<WebCore::ContextMenu>);
40
    virtual void contextMenuItemSelected(WebCore::ContextMenuItem*, const WebCore::ContextMenu*);
40
    virtual void contextMenuItemSelected(WebCore::ContextMenuItem*, const WebCore::ContextMenu*);
41
    
41
    
42
    virtual void downloadURL(const WebCore::KURL&);
42
    virtual void downloadURL(const WebCore::URL&);
43
    virtual void searchWithGoogle(const WebCore::Frame*);
43
    virtual void searchWithGoogle(const WebCore::Frame*);
44
    virtual void lookUpInDictionary(WebCore::Frame*);
44
    virtual void lookUpInDictionary(WebCore::Frame*);
45
    virtual void speak(const WTF::String&);
45
    virtual void speak(const WTF::String&);
- a/Source/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.cpp -2 / +2 lines
Lines 34-40 a/Source/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.cpp_sec1
34
#include "WebView.h"
34
#include "WebView.h"
35
#include <WebCore/BString.h>
35
#include <WebCore/BString.h>
36
#include <WebCore/Document.h>
36
#include <WebCore/Document.h>
37
#include <WebCore/KURL.h>
37
#include <WebCore/URL.h>
38
38
39
#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
39
#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
40
40
Lines 184-190 void WebDesktopNotificationsDelegate::cancelRequestsForPermission(ScriptExecutio a/Source/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.cpp_sec2
184
{
184
{
185
}
185
}
186
186
187
NotificationClient::Permission WebDesktopNotificationsDelegate::checkPermission(const KURL& url)
187
NotificationClient::Permission WebDesktopNotificationsDelegate::checkPermission(const URL& url)
188
{
188
{
189
    int out = 0;
189
    int out = 0;
190
    BString org(SecurityOrigin::create(url)->toString());
190
    BString org(SecurityOrigin::create(url)->toString());
- a/Source/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.h -2 / +2 lines
Lines 38-44 interface IWebDesktopNotificationPresenter; a/Source/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.h_sec1
38
38
39
namespace WebCore {
39
namespace WebCore {
40
class Document;
40
class Document;
41
class KURL;
41
class URL;
42
}
42
}
43
43
44
class WebDesktopNotificationsDelegate : public WebCore::NotificationClient {
44
class WebDesktopNotificationsDelegate : public WebCore::NotificationClient {
Lines 57-63 public: a/Source/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.h_sec2
57
    virtual void requestPermission(WebCore::SecurityOrigin*, PassRefPtr<WebCore::NotificationPermissionCallback>);
57
    virtual void requestPermission(WebCore::SecurityOrigin*, PassRefPtr<WebCore::NotificationPermissionCallback>);
58
#endif
58
#endif
59
    virtual void cancelRequestsForPermission(WebCore::ScriptExecutionContext*);
59
    virtual void cancelRequestsForPermission(WebCore::ScriptExecutionContext*);
60
    virtual WebCore::NotificationClient::Permission checkPermission(const KURL&);
60
    virtual WebCore::NotificationClient::Permission checkPermission(const URL&);
61
61
62
private:
62
private:
63
    bool hasNotificationDelegate();
63
    bool hasNotificationDelegate();
- a/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp -12 / +12 lines
Lines 362-368 void WebFrameLoaderClient::dispatchDidCancelClientRedirect() a/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp_sec1
362
        frameLoadDelegate->didCancelClientRedirectForFrame(webView, m_webFrame);
362
        frameLoadDelegate->didCancelClientRedirectForFrame(webView, m_webFrame);
363
}
363
}
364
364
365
void WebFrameLoaderClient::dispatchWillPerformClientRedirect(const KURL& url, double delay, double fireDate)
365
void WebFrameLoaderClient::dispatchWillPerformClientRedirect(const URL& url, double delay, double fireDate)
366
{
366
{
367
    WebView* webView = m_webFrame->webView();
367
    WebView* webView = m_webFrame->webView();
368
    COMPtr<IWebFrameLoadDelegate> frameLoadDelegate;
368
    COMPtr<IWebFrameLoadDelegate> frameLoadDelegate;
Lines 845-851 void WebFrameLoaderClient::didDisplayInsecureContent() a/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp_sec2
845
    frameLoadDelegatePriv2->didDisplayInsecureContent(webView);
845
    frameLoadDelegatePriv2->didDisplayInsecureContent(webView);
846
}
846
}
847
847
848
void WebFrameLoaderClient::didRunInsecureContent(SecurityOrigin* origin, const KURL& insecureURL)
848
void WebFrameLoaderClient::didRunInsecureContent(SecurityOrigin* origin, const URL& insecureURL)
849
{
849
{
850
    COMPtr<IWebSecurityOrigin> webSecurityOrigin = WebSecurityOrigin::createInstance(origin);
850
    COMPtr<IWebSecurityOrigin> webSecurityOrigin = WebSecurityOrigin::createInstance(origin);
851
851
Lines 861-867 void WebFrameLoaderClient::didRunInsecureContent(SecurityOrigin* origin, const K a/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp_sec3
861
    frameLoadDelegatePriv2->didRunInsecureContent(webView, webSecurityOrigin.get());
861
    frameLoadDelegatePriv2->didRunInsecureContent(webView, webSecurityOrigin.get());
862
}
862
}
863
863
864
void WebFrameLoaderClient::didDetectXSS(const KURL&, bool)
864
void WebFrameLoaderClient::didDetectXSS(const URL&, bool)
865
{
865
{
866
    // FIXME: propogate call into the private delegate.
866
    // FIXME: propogate call into the private delegate.
867
}
867
}
Lines 979-985 PassRefPtr<DocumentLoader> WebFrameLoaderClient::createDocumentLoader(const Reso a/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp_sec4
979
    return loader.release();
979
    return loader.release();
980
}
980
}
981
981
982
void WebFrameLoaderClient::setTitle(const StringWithDirection& title, const KURL& url)
982
void WebFrameLoaderClient::setTitle(const StringWithDirection& title, const URL& url)
983
{
983
{
984
    WebView* webView = m_webFrame->webView();
984
    WebView* webView = m_webFrame->webView();
985
    COMPtr<IWebHistoryDelegate> historyDelegate;
985
    COMPtr<IWebHistoryDelegate> historyDelegate;
Lines 1056-1062 void WebFrameLoaderClient::dispatchDidBecomeFrameset(bool) a/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp_sec5
1056
{
1056
{
1057
}
1057
}
1058
1058
1059
String WebFrameLoaderClient::userAgent(const KURL& url)
1059
String WebFrameLoaderClient::userAgent(const URL& url)
1060
{
1060
{
1061
    return m_webFrame->webView()->userAgentForKURL(url);
1061
    return m_webFrame->webView()->userAgentForKURL(url);
1062
}
1062
}
Lines 1066-1072 bool WebFrameLoaderClient::canCachePage() const a/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp_sec6
1066
    return true;
1066
    return true;
1067
}
1067
}
1068
1068
1069
PassRefPtr<Frame> WebFrameLoaderClient::createFrame(const KURL& url, const String& name, HTMLFrameOwnerElement* ownerElement,
1069
PassRefPtr<Frame> WebFrameLoaderClient::createFrame(const URL& url, const String& name, HTMLFrameOwnerElement* ownerElement,
1070
                            const String& referrer, bool /*allowsScrolling*/, int /*marginWidth*/, int /*marginHeight*/)
1070
                            const String& referrer, bool /*allowsScrolling*/, int /*marginWidth*/, int /*marginHeight*/)
1071
{
1071
{
1072
    RefPtr<Frame> result = createFrame(url, name, ownerElement, referrer);
1072
    RefPtr<Frame> result = createFrame(url, name, ownerElement, referrer);
Lines 1075-1081 PassRefPtr<Frame> WebFrameLoaderClient::createFrame(const KURL& url, const Strin a/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp_sec7
1075
    return result.release();
1075
    return result.release();
1076
}
1076
}
1077
1077
1078
PassRefPtr<Frame> WebFrameLoaderClient::createFrame(const KURL& URL, const String& name, HTMLFrameOwnerElement* ownerElement, const String& referrer)
1078
PassRefPtr<Frame> WebFrameLoaderClient::createFrame(const URL& URL, const String& name, HTMLFrameOwnerElement* ownerElement, const String& referrer)
1079
{
1079
{
1080
    Frame* coreFrame = core(m_webFrame);
1080
    Frame* coreFrame = core(m_webFrame);
1081
    ASSERT(coreFrame);
1081
    ASSERT(coreFrame);
Lines 1097-1103 PassRefPtr<Frame> WebFrameLoaderClient::createFrame(const KURL& URL, const Strin a/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp_sec8
1097
    return childFrame.release();
1097
    return childFrame.release();
1098
}
1098
}
1099
1099
1100
ObjectContentType WebFrameLoaderClient::objectContentType(const KURL& url, const String& mimeType, bool shouldPreferPlugInsForImages)
1100
ObjectContentType WebFrameLoaderClient::objectContentType(const URL& url, const String& mimeType, bool shouldPreferPlugInsForImages)
1101
{
1101
{
1102
    return WebCore::FrameLoader::defaultObjectContentType(url, mimeType, shouldPreferPlugInsForImages);
1102
    return WebCore::FrameLoader::defaultObjectContentType(url, mimeType, shouldPreferPlugInsForImages);
1103
}
1103
}
Lines 1116-1122 void WebFrameLoaderClient::dispatchDidFailToStartPlugin(const PluginView* plugin a/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp_sec9
1116
    ASSERT(frame == pluginView->parentFrame());
1116
    ASSERT(frame == pluginView->parentFrame());
1117
1117
1118
    if (!pluginView->pluginsPage().isNull()) {
1118
    if (!pluginView->pluginsPage().isNull()) {
1119
        KURL pluginPageURL = frame->document()->completeURL(stripLeadingAndTrailingHTMLSpaces(pluginView->pluginsPage()));
1119
        URL pluginPageURL = frame->document()->completeURL(stripLeadingAndTrailingHTMLSpaces(pluginView->pluginsPage()));
1120
        if (pluginPageURL.protocolIsInHTTPFamily()) {
1120
        if (pluginPageURL.protocolIsInHTTPFamily()) {
1121
            static CFStringRef key = MarshallingHelpers::LPCOLESTRToCFStringRef(WebKitErrorPlugInPageURLStringKey);
1121
            static CFStringRef key = MarshallingHelpers::LPCOLESTRToCFStringRef(WebKitErrorPlugInPageURLStringKey);
1122
            CFDictionarySetValue(userInfo.get(), key, pluginPageURL.string().createCFString().get());
1122
            CFDictionarySetValue(userInfo.get(), key, pluginPageURL.string().createCFString().get());
Lines 1160-1166 void WebFrameLoaderClient::dispatchDidFailToStartPlugin(const PluginView* plugin a/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp_sec10
1160
    resourceLoadDelegate->plugInFailedWithError(webView, error.get(), getWebDataSource(frame->loader().documentLoader()));
1160
    resourceLoadDelegate->plugInFailedWithError(webView, error.get(), getWebDataSource(frame->loader().documentLoader()));
1161
}
1161
}
1162
1162
1163
PassRefPtr<Widget> WebFrameLoaderClient::createPlugin(const IntSize& pluginSize, HTMLPlugInElement* element, const KURL& url, const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType, bool loadManually)
1163
PassRefPtr<Widget> WebFrameLoaderClient::createPlugin(const IntSize& pluginSize, HTMLPlugInElement* element, const URL& url, const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType, bool loadManually)
1164
{
1164
{
1165
    WebView* webView = m_webFrame->webView();
1165
    WebView* webView = m_webFrame->webView();
1166
1166
Lines 1217-1225 void WebFrameLoaderClient::redirectDataToPlugin(Widget* pluginWidget) a/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp_sec11
1217
        m_manualLoader = static_cast<EmbeddedWidget*>(pluginWidget);
1217
        m_manualLoader = static_cast<EmbeddedWidget*>(pluginWidget);
1218
}
1218
}
1219
1219
1220
PassRefPtr<Widget> WebFrameLoaderClient::createJavaAppletWidget(const IntSize& pluginSize, HTMLAppletElement* element, const KURL& /*baseURL*/, const Vector<String>& paramNames, const Vector<String>& paramValues)
1220
PassRefPtr<Widget> WebFrameLoaderClient::createJavaAppletWidget(const IntSize& pluginSize, HTMLAppletElement* element, const URL& /*baseURL*/, const Vector<String>& paramNames, const Vector<String>& paramValues)
1221
{
1221
{
1222
    RefPtr<PluginView> pluginView = PluginView::create(core(m_webFrame), pluginSize, element, KURL(), paramNames, paramValues, "application/x-java-applet", false);
1222
    RefPtr<PluginView> pluginView = PluginView::create(core(m_webFrame), pluginSize, element, URL(), paramNames, paramValues, "application/x-java-applet", false);
1223
1223
1224
    // Check if the plugin can be loaded successfully
1224
    // Check if the plugin can be loaded successfully
1225
    if (pluginView->plugin() && pluginView->plugin()->load())
1225
    if (pluginView->plugin() && pluginView->plugin()->load())
- a/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h -10 / +10 lines
Lines 80-86 public: a/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h_sec1
80
    virtual void dispatchDidHandleOnloadEvents() OVERRIDE;
80
    virtual void dispatchDidHandleOnloadEvents() OVERRIDE;
81
    virtual void dispatchDidReceiveServerRedirectForProvisionalLoad() OVERRIDE;
81
    virtual void dispatchDidReceiveServerRedirectForProvisionalLoad() OVERRIDE;
82
    virtual void dispatchDidCancelClientRedirect() OVERRIDE;
82
    virtual void dispatchDidCancelClientRedirect() OVERRIDE;
83
    virtual void dispatchWillPerformClientRedirect(const WebCore::KURL&, double interval, double fireDate) OVERRIDE;
83
    virtual void dispatchWillPerformClientRedirect(const WebCore::URL&, double interval, double fireDate) OVERRIDE;
84
    virtual void dispatchDidChangeLocationWithinPage() OVERRIDE;
84
    virtual void dispatchDidChangeLocationWithinPage() OVERRIDE;
85
    virtual void dispatchDidPushStateWithinPage() OVERRIDE;
85
    virtual void dispatchDidPushStateWithinPage() OVERRIDE;
86
    virtual void dispatchDidReplaceStateWithinPage() OVERRIDE;
86
    virtual void dispatchDidReplaceStateWithinPage() OVERRIDE;
Lines 135-142 public: a/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h_sec2
135
    virtual void updateGlobalHistoryItemForPage() OVERRIDE;
135
    virtual void updateGlobalHistoryItemForPage() OVERRIDE;
136
136
137
    virtual void didDisplayInsecureContent() OVERRIDE;
137
    virtual void didDisplayInsecureContent() OVERRIDE;
138
    virtual void didRunInsecureContent(WebCore::SecurityOrigin*, const WebCore::KURL&) OVERRIDE;
138
    virtual void didRunInsecureContent(WebCore::SecurityOrigin*, const WebCore::URL&) OVERRIDE;
139
    virtual void didDetectXSS(const WebCore::KURL&, bool didBlockEntirePage) OVERRIDE;
139
    virtual void didDetectXSS(const WebCore::URL&, bool didBlockEntirePage) OVERRIDE;
140
140
141
    virtual WebCore::ResourceError cancelledError(const WebCore::ResourceRequest&) OVERRIDE;
141
    virtual WebCore::ResourceError cancelledError(const WebCore::ResourceRequest&) OVERRIDE;
142
    virtual WebCore::ResourceError blockedError(const WebCore::ResourceRequest&) OVERRIDE;
142
    virtual WebCore::ResourceError blockedError(const WebCore::ResourceRequest&) OVERRIDE;
Lines 148-157 public: a/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h_sec3
148
148
149
    virtual bool shouldFallBack(const WebCore::ResourceError&) OVERRIDE;
149
    virtual bool shouldFallBack(const WebCore::ResourceError&) OVERRIDE;
150
150
151
    virtual WTF::String userAgent(const WebCore::KURL&) OVERRIDE;
151
    virtual WTF::String userAgent(const WebCore::URL&) OVERRIDE;
152
152
153
    virtual PassRefPtr<WebCore::DocumentLoader> createDocumentLoader(const WebCore::ResourceRequest&, const WebCore::SubstituteData&);
153
    virtual PassRefPtr<WebCore::DocumentLoader> createDocumentLoader(const WebCore::ResourceRequest&, const WebCore::SubstituteData&);
154
    virtual void setTitle(const WebCore::StringWithDirection&, const WebCore::KURL&);
154
    virtual void setTitle(const WebCore::StringWithDirection&, const WebCore::URL&);
155
155
156
    virtual void savePlatformDataToCachedFrame(WebCore::CachedFrame*) OVERRIDE;
156
    virtual void savePlatformDataToCachedFrame(WebCore::CachedFrame*) OVERRIDE;
157
    virtual void transitionToCommittedFromCachedFrame(WebCore::CachedFrame*) OVERRIDE;
157
    virtual void transitionToCommittedFromCachedFrame(WebCore::CachedFrame*) OVERRIDE;
Lines 177-191 public: a/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h_sec4
177
177
178
    virtual bool canCachePage() const;
178
    virtual bool canCachePage() const;
179
179
180
    virtual PassRefPtr<WebCore::Frame> createFrame(const WebCore::KURL& url, const WTF::String& name, WebCore::HTMLFrameOwnerElement* ownerElement,
180
    virtual PassRefPtr<WebCore::Frame> createFrame(const WebCore::URL& url, const WTF::String& name, WebCore::HTMLFrameOwnerElement* ownerElement,
181
        const WTF::String& referrer, bool allowsScrolling, int marginWidth, int marginHeight) OVERRIDE;
181
        const WTF::String& referrer, bool allowsScrolling, int marginWidth, int marginHeight) OVERRIDE;
182
    virtual PassRefPtr<WebCore::Widget> createPlugin(const WebCore::IntSize&, WebCore::HTMLPlugInElement*, const WebCore::KURL&, const Vector<WTF::String>&, const Vector<WTF::String>&, const WTF::String&, bool loadManually) OVERRIDE;
182
    virtual PassRefPtr<WebCore::Widget> createPlugin(const WebCore::IntSize&, WebCore::HTMLPlugInElement*, const WebCore::URL&, const Vector<WTF::String>&, const Vector<WTF::String>&, const WTF::String&, bool loadManually) OVERRIDE;
183
    virtual void recreatePlugin(WebCore::Widget*) OVERRIDE { }
183
    virtual void recreatePlugin(WebCore::Widget*) OVERRIDE { }
184
    virtual void redirectDataToPlugin(WebCore::Widget* pluginWidget) OVERRIDE;
184
    virtual void redirectDataToPlugin(WebCore::Widget* pluginWidget) OVERRIDE;
185
185
186
    virtual PassRefPtr<WebCore::Widget> createJavaAppletWidget(const WebCore::IntSize&, WebCore::HTMLAppletElement*, const WebCore::KURL& baseURL, const Vector<WTF::String>& paramNames, const Vector<WTF::String>& paramValues) OVERRIDE;
186
    virtual PassRefPtr<WebCore::Widget> createJavaAppletWidget(const WebCore::IntSize&, WebCore::HTMLAppletElement*, const WebCore::URL& baseURL, const Vector<WTF::String>& paramNames, const Vector<WTF::String>& paramValues) OVERRIDE;
187
187
188
    virtual WebCore::ObjectContentType objectContentType(const WebCore::KURL&, const WTF::String& mimeType, bool shouldPreferPlugInsForImages) OVERRIDE;
188
    virtual WebCore::ObjectContentType objectContentType(const WebCore::URL&, const WTF::String& mimeType, bool shouldPreferPlugInsForImages) OVERRIDE;
189
    virtual WTF::String overrideMediaType() const OVERRIDE;
189
    virtual WTF::String overrideMediaType() const OVERRIDE;
190
190
191
    virtual void dispatchDidClearWindowObjectInWorld(WebCore::DOMWrapperWorld*) OVERRIDE;
191
    virtual void dispatchDidClearWindowObjectInWorld(WebCore::DOMWrapperWorld*) OVERRIDE;
Lines 206-212 protected: a/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h_sec5
206
    OwnPtr<WebFramePolicyListenerPrivate> m_policyListenerPrivate;
206
    OwnPtr<WebFramePolicyListenerPrivate> m_policyListenerPrivate;
207
207
208
private:
208
private:
209
    PassRefPtr<WebCore::Frame> createFrame(const WebCore::KURL&, const WTF::String& name, WebCore::HTMLFrameOwnerElement*, const WTF::String& referrer);
209
    PassRefPtr<WebCore::Frame> createFrame(const WebCore::URL&, const WTF::String& name, WebCore::HTMLFrameOwnerElement*, const WTF::String& referrer);
210
    WebHistory* webHistory() const;
210
    WebHistory* webHistory() const;
211
211
212
    WebFrame* m_webFrame;
212
    WebFrame* m_webFrame;
- a/Source/WebKit/win/WebCoreSupport/WebPlatformStrategies.cpp -7 / +7 lines
Lines 88-119 VisitedLinkStrategy* WebPlatformStrategies::createVisitedLinkStrategy() a/Source/WebKit/win/WebCoreSupport/WebPlatformStrategies.cpp_sec1
88
    return this;
88
    return this;
89
}
89
}
90
90
91
String WebPlatformStrategies::cookiesForDOM(const NetworkStorageSession& session, const KURL& firstParty, const KURL& url)
91
String WebPlatformStrategies::cookiesForDOM(const NetworkStorageSession& session, const URL& firstParty, const URL& url)
92
{
92
{
93
    return WebCore::cookiesForDOM(session, firstParty, url);
93
    return WebCore::cookiesForDOM(session, firstParty, url);
94
}
94
}
95
95
96
void WebPlatformStrategies::setCookiesFromDOM(const NetworkStorageSession& session, const KURL& firstParty, const KURL& url, const String& cookieString)
96
void WebPlatformStrategies::setCookiesFromDOM(const NetworkStorageSession& session, const URL& firstParty, const URL& url, const String& cookieString)
97
{
97
{
98
    WebCore::setCookiesFromDOM(session, firstParty, url, cookieString);
98
    WebCore::setCookiesFromDOM(session, firstParty, url, cookieString);
99
}
99
}
100
100
101
bool WebPlatformStrategies::cookiesEnabled(const NetworkStorageSession& session, const KURL& firstParty, const KURL& url)
101
bool WebPlatformStrategies::cookiesEnabled(const NetworkStorageSession& session, const URL& firstParty, const URL& url)
102
{
102
{
103
    return WebCore::cookiesEnabled(session, firstParty, url);
103
    return WebCore::cookiesEnabled(session, firstParty, url);
104
}
104
}
105
105
106
String WebPlatformStrategies::cookieRequestHeaderFieldValue(const NetworkStorageSession& session, const KURL& firstParty, const KURL& url)
106
String WebPlatformStrategies::cookieRequestHeaderFieldValue(const NetworkStorageSession& session, const URL& firstParty, const URL& url)
107
{
107
{
108
    return WebCore::cookieRequestHeaderFieldValue(session, firstParty, url);
108
    return WebCore::cookieRequestHeaderFieldValue(session, firstParty, url);
109
}
109
}
110
110
111
bool WebPlatformStrategies::getRawCookies(const NetworkStorageSession& session, const KURL& firstParty, const KURL& url, Vector<Cookie>& rawCookies)
111
bool WebPlatformStrategies::getRawCookies(const NetworkStorageSession& session, const URL& firstParty, const URL& url, Vector<Cookie>& rawCookies)
112
{
112
{
113
    return WebCore::getRawCookies(session, firstParty, url, rawCookies);
113
    return WebCore::getRawCookies(session, firstParty, url, rawCookies);
114
}
114
}
115
115
116
void WebPlatformStrategies::deleteCookie(const NetworkStorageSession& session, const KURL& url, const String& cookieName)
116
void WebPlatformStrategies::deleteCookie(const NetworkStorageSession& session, const URL& url, const String& cookieName)
117
{
117
{
118
    WebCore::deleteCookie(session, url, cookieName);
118
    WebCore::deleteCookie(session, url, cookieName);
119
}
119
}
Lines 156-162 void WebPlatformStrategies::getPluginInfo(const WebCore::Page*, Vector<WebCore:: a/Source/WebKit/win/WebCoreSupport/WebPlatformStrategies.cpp_sec2
156
    }
156
    }
157
}
157
}
158
158
159
bool WebPlatformStrategies::isLinkVisited(Page* page, LinkHash hash, const KURL&, const AtomicString&)
159
bool WebPlatformStrategies::isLinkVisited(Page* page, LinkHash hash, const URL&, const AtomicString&)
160
{
160
{
161
    return page->group().isLinkVisited(hash);
161
    return page->group().isLinkVisited(hash);
162
}
162
}
- a/Source/WebKit/win/WebCoreSupport/WebPlatformStrategies.h -7 / +7 lines
Lines 53-64 private: a/Source/WebKit/win/WebCoreSupport/WebPlatformStrategies.h_sec1
53
    virtual WebCore::VisitedLinkStrategy* createVisitedLinkStrategy();
53
    virtual WebCore::VisitedLinkStrategy* createVisitedLinkStrategy();
54
54
55
    // WebCore::CookiesStrategy
55
    // WebCore::CookiesStrategy
56
    virtual String cookiesForDOM(const WebCore::NetworkStorageSession&, const WebCore::KURL& firstParty, const WebCore::KURL&);
56
    virtual String cookiesForDOM(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&);
57
    virtual void setCookiesFromDOM(const WebCore::NetworkStorageSession&, const WebCore::KURL& firstParty, const WebCore::KURL&, const String&);
57
    virtual void setCookiesFromDOM(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&, const String&);
58
    virtual bool cookiesEnabled(const WebCore::NetworkStorageSession&, const WebCore::KURL& firstParty, const WebCore::KURL&);
58
    virtual bool cookiesEnabled(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&);
59
    virtual String cookieRequestHeaderFieldValue(const WebCore::NetworkStorageSession&, const WebCore::KURL& firstParty, const WebCore::KURL&);
59
    virtual String cookieRequestHeaderFieldValue(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&);
60
    virtual bool getRawCookies(const WebCore::NetworkStorageSession&, const WebCore::KURL& firstParty, const WebCore::KURL&, Vector<WebCore::Cookie>&);
60
    virtual bool getRawCookies(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&, Vector<WebCore::Cookie>&);
61
    virtual void deleteCookie(const WebCore::NetworkStorageSession&, const WebCore::KURL&, const String&);
61
    virtual void deleteCookie(const WebCore::NetworkStorageSession&, const WebCore::URL&, const String&);
62
62
63
    // WebCore::DatabaseStrategy
63
    // WebCore::DatabaseStrategy
64
    // - Using default implementation.
64
    // - Using default implementation.
Lines 68-74 private: a/Source/WebKit/win/WebCoreSupport/WebPlatformStrategies.h_sec2
68
    virtual void getPluginInfo(const WebCore::Page*, Vector<WebCore::PluginInfo>&);
68
    virtual void getPluginInfo(const WebCore::Page*, Vector<WebCore::PluginInfo>&);
69
69
70
    // WebCore::VisitedLinkStrategy
70
    // WebCore::VisitedLinkStrategy
71
    virtual bool isLinkVisited(WebCore::Page*, WebCore::LinkHash, const WebCore::KURL& baseURL, const WTF::AtomicString& attributeURL);
71
    virtual bool isLinkVisited(WebCore::Page*, WebCore::LinkHash, const WebCore::URL& baseURL, const WTF::AtomicString& attributeURL);
72
    virtual void addVisitedLink(WebCore::Page*, WebCore::LinkHash);
72
    virtual void addVisitedLink(WebCore::Page*, WebCore::LinkHash);
73
};
73
};
74
74
- a/Source/WebKit/win/WebDataSource.cpp -2 / +2 lines
Lines 44-50 a/Source/WebKit/win/WebDataSource.cpp_sec1
44
#include <WebCore/Document.h>
44
#include <WebCore/Document.h>
45
#include <WebCore/Frame.h>
45
#include <WebCore/Frame.h>
46
#include <WebCore/FrameLoader.h>
46
#include <WebCore/FrameLoader.h>
47
#include <WebCore/KURL.h>
47
#include <WebCore/URL.h>
48
#include <WebCore/ResourceBuffer.h>
48
#include <WebCore/ResourceBuffer.h>
49
49
50
using namespace WebCore;
50
using namespace WebCore;
Lines 254-260 HRESULT STDMETHODCALLTYPE WebDataSource::pageTitle( a/Source/WebKit/win/WebDataSource.cpp_sec2
254
HRESULT STDMETHODCALLTYPE WebDataSource::unreachableURL( 
254
HRESULT STDMETHODCALLTYPE WebDataSource::unreachableURL( 
255
    /* [retval][out] */ BSTR* url)
255
    /* [retval][out] */ BSTR* url)
256
{
256
{
257
    KURL unreachableURL = m_loader->unreachableURL();
257
    URL unreachableURL = m_loader->unreachableURL();
258
    BString urlString((LPOLESTR)unreachableURL.string().characters(), unreachableURL.string().length());
258
    BString urlString((LPOLESTR)unreachableURL.string().characters(), unreachableURL.string().length());
259
259
260
    *url = urlString.release();
260
    *url = urlString.release();
- a/Source/WebKit/win/WebDownload.cpp -1 / +1 lines
Lines 82-88 WebDownload* WebDownload::createInstance(ResourceHandle* handle, const ResourceR a/Source/WebKit/win/WebDownload.cpp_sec1
82
    return instance;
82
    return instance;
83
}
83
}
84
84
85
WebDownload* WebDownload::createInstance(const KURL& url, IWebDownloadDelegate* delegate)
85
WebDownload* WebDownload::createInstance(const URL& url, IWebDownloadDelegate* delegate)
86
{
86
{
87
    WebDownload* instance = new WebDownload();
87
    WebDownload* instance = new WebDownload();
88
    instance->AddRef();
88
    instance->AddRef();
- a/Source/WebKit/win/WebDownload.h -3 / +3 lines
Lines 38-44 a/Source/WebKit/win/WebDownload.h_sec1
38
#endif
38
#endif
39
39
40
namespace WebCore {
40
namespace WebCore {
41
    class KURL;
41
    class URL;
42
    class ResourceHandle;
42
    class ResourceHandle;
43
    class ResourceRequest;
43
    class ResourceRequest;
44
    class ResourceResponse;
44
    class ResourceResponse;
Lines 52-64 class WebDownload a/Source/WebKit/win/WebDownload.h_sec2
52
#endif
52
#endif
53
{
53
{
54
public:
54
public:
55
    static WebDownload* createInstance(const WebCore::KURL&, IWebDownloadDelegate*);
55
    static WebDownload* createInstance(const WebCore::URL&, IWebDownloadDelegate*);
56
    static WebDownload* createInstance(WebCore::ResourceHandle*, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&, IWebDownloadDelegate*);
56
    static WebDownload* createInstance(WebCore::ResourceHandle*, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&, IWebDownloadDelegate*);
57
    static WebDownload* createInstance();
57
    static WebDownload* createInstance();
58
private:
58
private:
59
    WebDownload();
59
    WebDownload();
60
    void init(WebCore::ResourceHandle*, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&, IWebDownloadDelegate*);
60
    void init(WebCore::ResourceHandle*, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&, IWebDownloadDelegate*);
61
    void init(const WebCore::KURL&, IWebDownloadDelegate*);
61
    void init(const WebCore::URL&, IWebDownloadDelegate*);
62
    ~WebDownload();
62
    ~WebDownload();
63
public:
63
public:
64
    // IUnknown
64
    // IUnknown
- a/Source/WebKit/win/WebDownloadCFNet.cpp -1 / +1 lines
Lines 101-107 void WebDownload::init(ResourceHandle* handle, const ResourceRequest& request, c a/Source/WebKit/win/WebDownloadCFNet.cpp_sec1
101
    CFRelease(connection);
101
    CFRelease(connection);
102
}
102
}
103
103
104
void WebDownload::init(const KURL& url, IWebDownloadDelegate* delegate)
104
void WebDownload::init(const URL& url, IWebDownloadDelegate* delegate)
105
{
105
{
106
    m_delegate = delegate ? delegate : DefaultDownloadDelegate::sharedInstance();
106
    m_delegate = delegate ? delegate : DefaultDownloadDelegate::sharedInstance();
107
    LOG_ERROR("Delegate is %p", m_delegate.get());
107
    LOG_ERROR("Delegate is %p", m_delegate.get());
- a/Source/WebKit/win/WebDownloadCurl.cpp -1 / +1 lines
Lines 72-78 void WebDownload::init(ResourceHandle* handle, const ResourceRequest& request, c a/Source/WebKit/win/WebDownloadCurl.cpp_sec1
72
    start();
72
    start();
73
}
73
}
74
74
75
void WebDownload::init(const KURL& url, IWebDownloadDelegate* delegate)
75
void WebDownload::init(const URL& url, IWebDownloadDelegate* delegate)
76
{
76
{
77
    m_delegate = delegate;
77
    m_delegate = delegate;
78
78
- a/Source/WebKit/win/WebElementPropertyBag.cpp -1 / +1 lines
Lines 36-42 a/Source/WebKit/win/WebElementPropertyBag.cpp_sec1
36
#include <WebCore/HitTestResult.h>
36
#include <WebCore/HitTestResult.h>
37
#include <WebCore/FrameLoader.h>
37
#include <WebCore/FrameLoader.h>
38
#include <WebCore/Image.h>
38
#include <WebCore/Image.h>
39
#include <WebCore/KURL.h>
39
#include <WebCore/URL.h>
40
#include <WebCore/RenderObject.h>
40
#include <WebCore/RenderObject.h>
41
41
42
using namespace WebCore;
42
using namespace WebCore;
- a/Source/WebKit/win/WebFrame.cpp -6 / +6 lines
Lines 567-577 void WebFrame::loadData(PassRefPtr<WebCore::SharedBuffer> data, BSTR mimeType, B a/Source/WebKit/win/WebFrame.cpp_sec1
567
    String encodingString(textEncodingName, SysStringLen(textEncodingName));
567
    String encodingString(textEncodingName, SysStringLen(textEncodingName));
568
568
569
    // FIXME: We should really be using MarshallingHelpers::BSTRToKURL here,
569
    // FIXME: We should really be using MarshallingHelpers::BSTRToKURL here,
570
    // but that would turn a null BSTR into a null KURL, and we crash inside of
570
    // but that would turn a null BSTR into a null URL, and we crash inside of
571
    // WebCore if we use a null KURL in constructing the ResourceRequest.
571
    // WebCore if we use a null URL in constructing the ResourceRequest.
572
    KURL baseKURL = KURL(KURL(), String(baseURL ? baseURL : L"", SysStringLen(baseURL)));
572
    URL baseKURL = URL(URL(), String(baseURL ? baseURL : L"", SysStringLen(baseURL)));
573
573
574
    KURL failingKURL = MarshallingHelpers::BSTRToKURL(failingURL);
574
    URL failingKURL = MarshallingHelpers::BSTRToKURL(failingURL);
575
575
576
    ResourceRequest request(baseKURL);
576
    ResourceRequest request(baseKURL);
577
    SubstituteData substituteData(data, mimeTypeString, encodingString, failingKURL);
577
    SubstituteData substituteData(data, mimeTypeString, encodingString, failingKURL);
Lines 701-711 HRESULT STDMETHODCALLTYPE WebFrame::provisionalDataSource( a/Source/WebKit/win/WebFrame.cpp_sec2
701
    return *source ? S_OK : E_FAIL;
701
    return *source ? S_OK : E_FAIL;
702
}
702
}
703
703
704
KURL WebFrame::url() const
704
URL WebFrame::url() const
705
{
705
{
706
    Frame* coreFrame = core(this);
706
    Frame* coreFrame = core(this);
707
    if (!coreFrame)
707
    if (!coreFrame)
708
        return KURL();
708
        return URL();
709
709
710
    return coreFrame->document()->url();
710
    return coreFrame->document()->url();
711
}
711
}
- a/Source/WebKit/win/WebFrame.h -3 / +3 lines
Lines 34-40 a/Source/WebKit/win/WebFrame.h_sec1
34
#include <WebCore/AdjustViewSizeOrNot.h>
34
#include <WebCore/AdjustViewSizeOrNot.h>
35
#include <WebCore/FrameWin.h>
35
#include <WebCore/FrameWin.h>
36
#include <WebCore/GraphicsContext.h>
36
#include <WebCore/GraphicsContext.h>
37
#include <WebCore/KURL.h>
37
#include <WebCore/URL.h>
38
#include <WebCore/ResourceHandleClient.h>
38
#include <WebCore/ResourceHandleClient.h>
39
39
40
#include <WTF/RefPtr.h>
40
#include <WTF/RefPtr.h>
Lines 318-324 public: a/Source/WebKit/win/WebFrame.h_sec2
318
    HRESULT matchLabelsAgainstElement(const BSTR* labels, int cLabels, IDOMElement* againstElement, BSTR* result);
318
    HRESULT matchLabelsAgainstElement(const BSTR* labels, int cLabels, IDOMElement* againstElement, BSTR* result);
319
    HRESULT canProvideDocumentSource(bool* result);
319
    HRESULT canProvideDocumentSource(bool* result);
320
320
321
    WebCore::KURL url() const;
321
    WebCore::URL url() const;
322
322
323
    WebView* webView() const;
323
    WebView* webView() const;
324
    void setWebView(WebView*);
324
    void setWebView(WebView*);
Lines 341-347 protected: a/Source/WebKit/win/WebFrame.h_sec3
341
    class WebFramePrivate;
341
    class WebFramePrivate;
342
    WebFramePrivate*    d;
342
    WebFramePrivate*    d;
343
    bool                m_quickRedirectComing;
343
    bool                m_quickRedirectComing;
344
    WebCore::KURL       m_originalRequestURL;
344
    WebCore::URL       m_originalRequestURL;
345
    bool                m_inPrintingMode;
345
    bool                m_inPrintingMode;
346
    Vector<WebCore::IntRect> m_pageRects;
346
    Vector<WebCore::IntRect> m_pageRects;
347
    int m_pageHeight;   // height of the page adjusted by margins
347
    int m_pageHeight;   // height of the page adjusted by margins
- a/Source/WebKit/win/WebHistory.cpp -2 / +2 lines
Lines 38-44 a/Source/WebKit/win/WebHistory.cpp_sec1
38
#include <CoreFoundation/CoreFoundation.h>
38
#include <CoreFoundation/CoreFoundation.h>
39
#include <WebCore/BString.h>
39
#include <WebCore/BString.h>
40
#include <WebCore/HistoryItem.h>
40
#include <WebCore/HistoryItem.h>
41
#include <WebCore/KURL.h>
41
#include <WebCore/URL.h>
42
#include <WebCore/PageGroup.h>
42
#include <WebCore/PageGroup.h>
43
#include <WebCore/SharedBuffer.h>
43
#include <WebCore/SharedBuffer.h>
44
#include <functional>
44
#include <functional>
Lines 530-536 HRESULT WebHistory::addItem(IWebHistoryItem* entry, bool discardDuplicate, bool* a/Source/WebKit/win/WebHistory.cpp_sec2
530
    return hr;
530
    return hr;
531
}
531
}
532
532
533
void WebHistory::visitedURL(const KURL& url, const String& title, const String& httpMethod, bool wasFailure, bool increaseVisitCount)
533
void WebHistory::visitedURL(const URL& url, const String& title, const String& httpMethod, bool wasFailure, bool increaseVisitCount)
534
{
534
{
535
    IWebHistoryItem* entry = m_entriesByURL.get(url.string()).get();
535
    IWebHistoryItem* entry = m_entriesByURL.get(url.string()).get();
536
    if (entry) {
536
    if (entry) {
- a/Source/WebKit/win/WebHistory.h -2 / +2 lines
Lines 34-40 a/Source/WebKit/win/WebHistory.h_sec1
34
#include <wtf/RetainPtr.h>
34
#include <wtf/RetainPtr.h>
35
35
36
namespace WebCore {
36
namespace WebCore {
37
    class KURL;
37
    class URL;
38
    class PageGroup;
38
    class PageGroup;
39
}
39
}
40
40
Lines 111-117 public: a/Source/WebKit/win/WebHistory.h_sec2
111
111
112
    // WebHistory
112
    // WebHistory
113
    static WebHistory* sharedHistory();
113
    static WebHistory* sharedHistory();
114
    void visitedURL(const WebCore::KURL&, const WTF::String& title, const WTF::String& httpMethod, bool wasFailure, bool increaseVisitCount);
114
    void visitedURL(const WebCore::URL&, const WTF::String& title, const WTF::String& httpMethod, bool wasFailure, bool increaseVisitCount);
115
    void addVisitedLinksToPageGroup(WebCore::PageGroup&);
115
    void addVisitedLinksToPageGroup(WebCore::PageGroup&);
116
116
117
    COMPtr<IWebHistoryItem> itemForURLString(const WTF::String&) const;
117
    COMPtr<IWebHistoryItem> itemForURLString(const WTF::String&) const;
- a/Source/WebKit/win/WebHistoryItem.cpp -1 / +1 lines
Lines 33-39 a/Source/WebKit/win/WebHistoryItem.cpp_sec1
33
#include <WebCore/BString.h>
33
#include <WebCore/BString.h>
34
#include <WebCore/COMPtr.h>
34
#include <WebCore/COMPtr.h>
35
#include <WebCore/HistoryItem.h>
35
#include <WebCore/HistoryItem.h>
36
#include <WebCore/KURL.h>
36
#include <WebCore/URL.h>
37
#include <wtf/PassOwnPtr.h>
37
#include <wtf/PassOwnPtr.h>
38
#include <wtf/RetainPtr.h>
38
#include <wtf/RetainPtr.h>
39
#include <wtf/text/CString.h>
39
#include <wtf/text/CString.h>
- a/Source/WebKit/win/WebMutableURLRequest.cpp -2 / +2 lines
Lines 208-214 HRESULT STDMETHODCALLTYPE WebMutableURLRequest::initWithURL( a/Source/WebKit/win/WebMutableURLRequest.cpp_sec1
208
HRESULT STDMETHODCALLTYPE WebMutableURLRequest::mainDocumentURL( 
208
HRESULT STDMETHODCALLTYPE WebMutableURLRequest::mainDocumentURL( 
209
    /* [retval][out] */ BSTR* result)
209
    /* [retval][out] */ BSTR* result)
210
{
210
{
211
    *result = MarshallingHelpers::KURLToBSTR(m_request.firstPartyForCookies());
211
    *result = MarshallingHelpers::URLToBSTR(m_request.firstPartyForCookies());
212
    return S_OK;
212
    return S_OK;
213
}
213
}
214
214
Lines 222-228 HRESULT STDMETHODCALLTYPE WebMutableURLRequest::timeoutInterval( a/Source/WebKit/win/WebMutableURLRequest.cpp_sec2
222
HRESULT STDMETHODCALLTYPE WebMutableURLRequest::URL( 
222
HRESULT STDMETHODCALLTYPE WebMutableURLRequest::URL( 
223
    /* [retval][out] */ BSTR* result)
223
    /* [retval][out] */ BSTR* result)
224
{
224
{
225
    *result = MarshallingHelpers::KURLToBSTR(m_request.url());
225
    *result = MarshallingHelpers::URLToBSTR(m_request.url());
226
    return S_OK;
226
    return S_OK;
227
}
227
}
228
228
- a/Source/WebKit/win/WebResource.cpp -1 / +1 lines
Lines 35-41 using namespace WebCore; a/Source/WebKit/win/WebResource.cpp_sec1
35
35
36
// WebResource ---------------------------------------------------------------------
36
// WebResource ---------------------------------------------------------------------
37
37
38
WebResource::WebResource(IStream* data, const WebCore::KURL& url, const WTF::String& mimeType, const WTF::String& textEncodingName, const WTF::String& frameName)
38
WebResource::WebResource(IStream* data, const WebCore::URL& url, const WTF::String& mimeType, const WTF::String& textEncodingName, const WTF::String& frameName)
39
    : m_refCount(0)
39
    : m_refCount(0)
40
    , m_data(data)
40
    , m_data(data)
41
    , m_url(url)
41
    , m_url(url)
- a/Source/WebKit/win/WebResource.h -3 / +3 lines
Lines 28-36 a/Source/WebKit/win/WebResource.h_sec1
28
28
29
#include "WebKit.h"
29
#include "WebKit.h"
30
#include <WebCore/COMPtr.h>
30
#include <WebCore/COMPtr.h>
31
#include <WebCore/KURL.h>
32
#include <WebCore/ResourceResponse.h>
31
#include <WebCore/ResourceResponse.h>
33
#include <WebCore/SharedBuffer.h>
32
#include <WebCore/SharedBuffer.h>
33
#include <WebCore/URL.h>
34
#include <wtf/PassRefPtr.h>
34
#include <wtf/PassRefPtr.h>
35
#include <wtf/text/WTFString.h>
35
#include <wtf/text/WTFString.h>
36
36
Lines 38-44 class WebResource : public IWebResource { a/Source/WebKit/win/WebResource.h_sec2
38
public:
38
public:
39
    static WebResource* createInstance(PassRefPtr<WebCore::SharedBuffer> data, const WebCore::ResourceResponse& response);
39
    static WebResource* createInstance(PassRefPtr<WebCore::SharedBuffer> data, const WebCore::ResourceResponse& response);
40
protected:
40
protected:
41
    WebResource(IStream* data, const WebCore::KURL& url, const WTF::String& mimeType, const WTF::String& textEncodingName, const WTF::String& frameName);
41
    WebResource(IStream* data, const WebCore::URL&, const WTF::String& mimeType, const WTF::String& textEncodingName, const WTF::String& frameName);
42
    ~WebResource();
42
    ~WebResource();
43
43
44
public:
44
public:
Lines 73-79 public: a/Source/WebKit/win/WebResource.h_sec3
73
private:
73
private:
74
    ULONG m_refCount;
74
    ULONG m_refCount;
75
    COMPtr<IStream> m_data;
75
    COMPtr<IStream> m_data;
76
    WebCore::KURL m_url;
76
    WebCore::URL m_url;
77
    WTF::String m_mimeType;
77
    WTF::String m_mimeType;
78
    WTF::String m_textEncodingName;
78
    WTF::String m_textEncodingName;
79
    WTF::String m_frameName;
79
    WTF::String m_frameName;
- a/Source/WebKit/win/WebURLResponse.cpp -2 / +2 lines
Lines 38-44 a/Source/WebKit/win/WebURLResponse.cpp_sec1
38
38
39
#include <wtf/platform.h>
39
#include <wtf/platform.h>
40
#include <WebCore/BString.h>
40
#include <WebCore/BString.h>
41
#include <WebCore/KURL.h>
41
#include <WebCore/URL.h>
42
#include <WebCore/LocalizedStrings.h>
42
#include <WebCore/LocalizedStrings.h>
43
#include <WebCore/ResourceHandle.h>
43
#include <WebCore/ResourceHandle.h>
44
#include <shlobj.h>
44
#include <shlobj.h>
Lines 226-232 WebURLResponse* WebURLResponse::createInstance() a/Source/WebKit/win/WebURLResponse.cpp_sec2
226
{
226
{
227
    WebURLResponse* instance = new WebURLResponse();
227
    WebURLResponse* instance = new WebURLResponse();
228
    // fake an http response - so it has the IWebHTTPURLResponse interface
228
    // fake an http response - so it has the IWebHTTPURLResponse interface
229
    instance->m_response = ResourceResponse(KURL(ParsedURLString, "http://"), String(), 0, String(), String());
229
    instance->m_response = ResourceResponse(WebCore::URL(ParsedURLString, "http://"), String(), 0, String(), String());
230
    instance->AddRef();
230
    instance->AddRef();
231
    return instance;
231
    return instance;
232
}
232
}
- a/Source/WebKit/win/WebUserContentURLPattern.cpp -1 / +1 lines
Lines 29-35 a/Source/WebKit/win/WebUserContentURLPattern.cpp_sec1
29
#include "WebKitDLL.h"
29
#include "WebKitDLL.h"
30
30
31
#include <WebCore/BString.h>
31
#include <WebCore/BString.h>
32
#include <WebCore/KURL.h>
32
#include <WebCore/URL.h>
33
33
34
using namespace WebCore;
34
using namespace WebCore;
35
35
- a/Source/WebKit/win/WebView.cpp -9 / +9 lines
Lines 224-232 static inline String toString(BSTR bstr) a/Source/WebKit/win/WebView.cpp_sec1
224
    return String(bstr, SysStringLen(bstr));
224
    return String(bstr, SysStringLen(bstr));
225
}
225
}
226
226
227
static inline KURL toKURL(BSTR bstr)
227
static inline URL toURL(BSTR bstr)
228
{
228
{
229
    return KURL(KURL(), toString(bstr));
229
    return URL(URL(), toString(bstr));
230
}
230
}
231
231
232
class PreferencesChangedOrRemovedObserver : public IWebNotificationObserver {
232
class PreferencesChangedOrRemovedObserver : public IWebNotificationObserver {
Lines 2498-2504 static String webKitVersionString() a/Source/WebKit/win/WebView.cpp_sec2
2498
    return buildNumberStringPtr;
2498
    return buildNumberStringPtr;
2499
}
2499
}
2500
2500
2501
const String& WebView::userAgentForKURL(const KURL&)
2501
const String& WebView::userAgentForKURL(const URL&)
2502
{
2502
{
2503
    if (m_userAgentOverridden)
2503
    if (m_userAgentOverridden)
2504
        return m_userAgentCustom;
2504
        return m_userAgentCustom;
Lines 4855-4861 HRESULT WebView::notifyPreferencesChanged(IWebNotification* notification) a/Source/WebKit/win/WebView.cpp_sec3
4855
        settings.setUserStyleSheetLocation(url.get());
4855
        settings.setUserStyleSheetLocation(url.get());
4856
        str.clear();
4856
        str.clear();
4857
    } else
4857
    } else
4858
        settings.setUserStyleSheetLocation(KURL());
4858
        settings.setUserStyleSheetLocation(URL());
4859
4859
4860
    hr = preferences->shouldPrintBackgrounds(&enabled);
4860
    hr = preferences->shouldPrintBackgrounds(&enabled);
4861
    if (FAILED(hr))
4861
    if (FAILED(hr))
Lines 6360-6366 HRESULT WebView::addUserScriptToGroup(BSTR groupName, IWebScriptWorld* iWorld, B a/Source/WebKit/win/WebView.cpp_sec4
6360
    if (!pageGroup)
6360
    if (!pageGroup)
6361
        return E_FAIL;
6361
        return E_FAIL;
6362
6362
6363
    pageGroup->addUserScriptToWorld(world->world(), toString(source), toKURL(url),
6363
    pageGroup->addUserScriptToWorld(world->world(), toString(source), toURL(url),
6364
                                    toStringVector(whitelistCount, whitelist), toStringVector(blacklistCount, blacklist),
6364
                                    toStringVector(whitelistCount, whitelist), toStringVector(blacklistCount, blacklist),
6365
                                    injectionTime == WebInjectAtDocumentStart ? InjectAtDocumentStart : InjectAtDocumentEnd,
6365
                                    injectionTime == WebInjectAtDocumentStart ? InjectAtDocumentStart : InjectAtDocumentEnd,
6366
                                    InjectInAllFrames);
6366
                                    InjectInAllFrames);
Lines 6385-6391 HRESULT WebView::addUserStyleSheetToGroup(BSTR groupName, IWebScriptWorld* iWorl a/Source/WebKit/win/WebView.cpp_sec5
6385
    if (!pageGroup)
6385
    if (!pageGroup)
6386
        return E_FAIL;
6386
        return E_FAIL;
6387
6387
6388
    pageGroup->addUserStyleSheetToWorld(world->world(), toString(source), toKURL(url),
6388
    pageGroup->addUserStyleSheetToWorld(world->world(), toString(source), toURL(url),
6389
                                        toStringVector(whitelistCount, whitelist), toStringVector(blacklistCount, blacklist),
6389
                                        toStringVector(whitelistCount, whitelist), toStringVector(blacklistCount, blacklist),
6390
                                        InjectInAllFrames);
6390
                                        InjectInAllFrames);
6391
6391
Lines 6407-6413 HRESULT WebView::removeUserScriptFromGroup(BSTR groupName, IWebScriptWorld* iWor a/Source/WebKit/win/WebView.cpp_sec6
6407
    if (!pageGroup)
6407
    if (!pageGroup)
6408
        return E_FAIL;
6408
        return E_FAIL;
6409
6409
6410
    pageGroup->removeUserScriptFromWorld(world->world(), toKURL(url));
6410
    pageGroup->removeUserScriptFromWorld(world->world(), toURL(url));
6411
6411
6412
    return S_OK;
6412
    return S_OK;
6413
}
6413
}
Lines 6427-6433 HRESULT WebView::removeUserStyleSheetFromGroup(BSTR groupName, IWebScriptWorld* a/Source/WebKit/win/WebView.cpp_sec7
6427
    if (!pageGroup)
6427
    if (!pageGroup)
6428
        return E_FAIL;
6428
        return E_FAIL;
6429
6429
6430
    pageGroup->removeUserStyleSheetFromWorld(world->world(), toKURL(url));
6430
    pageGroup->removeUserStyleSheetFromWorld(world->world(), toURL(url));
6431
6431
6432
    return S_OK;
6432
    return S_OK;
6433
}
6433
}
Lines 6549-6555 HRESULT WebView::addVisitedLinks(BSTR* visitedURLs, unsigned visitedURLCount) a/Source/WebKit/win/WebView.cpp_sec8
6549
    return S_OK;
6549
    return S_OK;
6550
}
6550
}
6551
6551
6552
void WebView::downloadURL(const KURL& url)
6552
void WebView::downloadURL(const URL& url)
6553
{
6553
{
6554
    // It's the delegate's job to ref the WebDownload to keep it alive - otherwise it will be
6554
    // It's the delegate's job to ref the WebDownload to keep it alive - otherwise it will be
6555
    // destroyed when this function returns.
6555
    // destroyed when this function returns.
- a/Source/WebKit/win/WebView.h -2 / +2 lines
Lines 908-914 public: a/Source/WebKit/win/WebView.h_sec1
908
908
909
    // Convenient to be able to violate the rules of COM here for easy movement to the frame.
909
    // Convenient to be able to violate the rules of COM here for easy movement to the frame.
910
    WebFrame* topLevelFrame() const { return m_mainFrame; }
910
    WebFrame* topLevelFrame() const { return m_mainFrame; }
911
    const WTF::String& userAgentForKURL(const WebCore::KURL& url);
911
    const WTF::String& userAgentForKURL(const WebCore::URL& url);
912
912
913
    static bool canHandleRequest(const WebCore::ResourceRequest&);
913
    static bool canHandleRequest(const WebCore::ResourceRequest&);
914
914
Lines 947-953 public: a/Source/WebKit/win/WebView.h_sec2
947
    bool onGetObject(WPARAM, LPARAM, LRESULT&) const;
947
    bool onGetObject(WPARAM, LPARAM, LRESULT&) const;
948
    static STDMETHODIMP AccessibleObjectFromWindow(HWND, DWORD objectID, REFIID, void** ppObject);
948
    static STDMETHODIMP AccessibleObjectFromWindow(HWND, DWORD objectID, REFIID, void** ppObject);
949
949
950
    void downloadURL(const WebCore::KURL&);
950
    void downloadURL(const WebCore::URL&);
951
951
952
#if USE(ACCELERATED_COMPOSITING)
952
#if USE(ACCELERATED_COMPOSITING)
953
    void flushPendingGraphicsLayerChangesSoon();
953
    void flushPendingGraphicsLayerChangesSoon();
- a/Source/WebKit/wince/ChangeLog +9 lines
Lines 1-3 a/Source/WebKit/wince/ChangeLog_sec1
1
2013-09-26  Darin Adler  <darin@apple.com>
2
3
        rename KURL to URL
4
        https://bugs.webkit.org/show_bug.cgi?id=16214
5
6
        Reviewed by Andreas Kling.
7
8
        * many files: Renamed, using script.
9
1
2013-09-16  Enrica Casucci  <enrica@apple.com>
10
2013-09-16  Enrica Casucci  <enrica@apple.com>
2
11
3
        Remove unused function didSetSelectionTypesForPasteboard from EditorClient.
12
        Remove unused function didSetSelectionTypesForPasteboard from EditorClient.
- a/Source/WebKit/wince/WebCoreSupport/ContextMenuClientWinCE.cpp -1 / +1 lines
Lines 52-58 void ContextMenuClientWinCE::contextMenuItemSelected(ContextMenuItem*, const Con a/Source/WebKit/wince/WebCoreSupport/ContextMenuClientWinCE.cpp_sec1
52
    notImplemented();
52
    notImplemented();
53
}
53
}
54
54
55
void ContextMenuClientWinCE::downloadURL(const KURL& url)
55
void ContextMenuClientWinCE::downloadURL(const URL& url)
56
{
56
{
57
    notImplemented();
57
    notImplemented();
58
}
58
}
- a/Source/WebKit/wince/WebCoreSupport/ContextMenuClientWinCE.h -1 / +1 lines
Lines 40-46 public: a/Source/WebKit/wince/WebCoreSupport/ContextMenuClientWinCE.h_sec1
40
    virtual PassOwnPtr<WebCore::ContextMenu> customizeMenu(PassOwnPtr<WebCore::ContextMenu>);
40
    virtual PassOwnPtr<WebCore::ContextMenu> customizeMenu(PassOwnPtr<WebCore::ContextMenu>);
41
    virtual void contextMenuItemSelected(WebCore::ContextMenuItem*, const WebCore::ContextMenu*);
41
    virtual void contextMenuItemSelected(WebCore::ContextMenuItem*, const WebCore::ContextMenu*);
42
42
43
    virtual void downloadURL(const WebCore::KURL&);
43
    virtual void downloadURL(const WebCore::URL&);
44
    virtual void copyImageToClipboard(const WebCore::HitTestResult&);
44
    virtual void copyImageToClipboard(const WebCore::HitTestResult&);
45
    virtual void searchWithGoogle(const WebCore::Frame*);
45
    virtual void searchWithGoogle(const WebCore::Frame*);
46
    virtual void lookUpInDictionary(WebCore::Frame*);
46
    virtual void lookUpInDictionary(WebCore::Frame*);
- a/Source/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.cpp -10 / +10 lines
Lines 57-63 FrameLoaderClientWinCE::~FrameLoaderClientWinCE() a/Source/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.cpp_sec1
57
{
57
{
58
}
58
}
59
59
60
String FrameLoaderClientWinCE::userAgent(const KURL&)
60
String FrameLoaderClientWinCE::userAgent(const URL&)
61
{
61
{
62
    DEFINE_STATIC_LOCAL(String, userAgentString, ());
62
    DEFINE_STATIC_LOCAL(String, userAgentString, ());
63
63
Lines 162-173 void FrameLoaderClientWinCE::dispatchWillSubmitForm(FramePolicyFunction policyFu a/Source/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.cpp_sec2
162
    (m_frame->loader().policyChecker()->*policyFunction)(PolicyUse);
162
    (m_frame->loader().policyChecker()->*policyFunction)(PolicyUse);
163
}
163
}
164
164
165
PassRefPtr<Widget> FrameLoaderClientWinCE::createPlugin(const IntSize&, HTMLPlugInElement*, const KURL&, const Vector<String>&, const Vector<String>&, const String&, bool)
165
PassRefPtr<Widget> FrameLoaderClientWinCE::createPlugin(const IntSize&, HTMLPlugInElement*, const URL&, const Vector<String>&, const Vector<String>&, const String&, bool)
166
{
166
{
167
    return 0;
167
    return 0;
168
}
168
}
169
169
170
PassRefPtr<Frame> FrameLoaderClientWinCE::createFrame(const KURL& url, const String& name, HTMLFrameOwnerElement* ownerElement,
170
PassRefPtr<Frame> FrameLoaderClientWinCE::createFrame(const URL& url, const String& name, HTMLFrameOwnerElement* ownerElement,
171
                                                 const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight)
171
                                                 const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight)
172
{
172
{
173
    return m_webView->createFrame(url, name, ownerElement, referrer, allowsScrolling, marginWidth, marginHeight);
173
    return m_webView->createFrame(url, name, ownerElement, referrer, allowsScrolling, marginWidth, marginHeight);
Lines 180-192 void FrameLoaderClientWinCE::redirectDataToPlugin(Widget* pluginWidget) a/Source/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.cpp_sec3
180
        m_hasSentResponseToPlugin = false;
180
        m_hasSentResponseToPlugin = false;
181
}
181
}
182
182
183
PassRefPtr<Widget> FrameLoaderClientWinCE::createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const KURL&, const Vector<String>&, const Vector<String>&)
183
PassRefPtr<Widget> FrameLoaderClientWinCE::createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const URL&, const Vector<String>&, const Vector<String>&)
184
{
184
{
185
    notImplemented();
185
    notImplemented();
186
    return 0;
186
    return 0;
187
}
187
}
188
188
189
ObjectContentType FrameLoaderClientWinCE::objectContentType(const KURL& url, const String& mimeType, bool shouldPreferPlugInsForImages)
189
ObjectContentType FrameLoaderClientWinCE::objectContentType(const URL& url, const String& mimeType, bool shouldPreferPlugInsForImages)
190
{
190
{
191
    return FrameLoader::defaultObjectContentType(url, mimeType, shouldPreferPlugInsForImages);
191
    return FrameLoader::defaultObjectContentType(url, mimeType, shouldPreferPlugInsForImages);
192
}
192
}
Lines 262-273 void FrameLoaderClientWinCE::didDisplayInsecureContent() a/Source/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.cpp_sec4
262
    notImplemented();
262
    notImplemented();
263
}
263
}
264
264
265
void FrameLoaderClientWinCE::didRunInsecureContent(SecurityOrigin*, const KURL&)
265
void FrameLoaderClientWinCE::didRunInsecureContent(SecurityOrigin*, const URL&)
266
{
266
{
267
    notImplemented();
267
    notImplemented();
268
}
268
}
269
269
270
void FrameLoaderClientWinCE::didDetectXSS(const KURL&, bool)
270
void FrameLoaderClientWinCE::didDetectXSS(const URL&, bool)
271
{
271
{
272
    notImplemented();
272
    notImplemented();
273
}
273
}
Lines 317-323 void FrameLoaderClientWinCE::dispatchDidCancelClientRedirect() a/Source/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.cpp_sec5
317
    notImplemented();
317
    notImplemented();
318
}
318
}
319
319
320
void FrameLoaderClientWinCE::dispatchWillPerformClientRedirect(const KURL&, double, double)
320
void FrameLoaderClientWinCE::dispatchWillPerformClientRedirect(const URL&, double, double)
321
{
321
{
322
    notImplemented();
322
    notImplemented();
323
}
323
}
Lines 462-468 void FrameLoaderClientWinCE::prepareForDataSourceReplacement() a/Source/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.cpp_sec6
462
    notImplemented();
462
    notImplemented();
463
}
463
}
464
464
465
void FrameLoaderClientWinCE::setTitle(const StringWithDirection&, const KURL&)
465
void FrameLoaderClientWinCE::setTitle(const StringWithDirection&, const URL&)
466
{
466
{
467
    notImplemented();
467
    notImplemented();
468
}
468
}
Lines 631-637 void FrameLoaderClientWinCE::dispatchDidBecomeFrameset(bool) a/Source/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.cpp_sec7
631
631
632
PassRefPtr<WebCore::FrameNetworkingContext> FrameLoaderClientWinCE::createNetworkingContext()
632
PassRefPtr<WebCore::FrameNetworkingContext> FrameLoaderClientWinCE::createNetworkingContext()
633
{
633
{
634
    return FrameNetworkingContextWinCE::create(m_frame, userAgent(KURL()));
634
    return FrameNetworkingContextWinCE::create(m_frame, userAgent(URL()));
635
}
635
}
636
636
637
} // namespace WebKit
637
} // namespace WebKit
- a/Source/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.h -10 / +9 lines
Lines 68-74 public: a/Source/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.h_sec1
68
    virtual void dispatchDidHandleOnloadEvents();
68
    virtual void dispatchDidHandleOnloadEvents();
69
    virtual void dispatchDidReceiveServerRedirectForProvisionalLoad();
69
    virtual void dispatchDidReceiveServerRedirectForProvisionalLoad();
70
    virtual void dispatchDidCancelClientRedirect();
70
    virtual void dispatchDidCancelClientRedirect();
71
    virtual void dispatchWillPerformClientRedirect(const WebCore::KURL&, double, double);
71
    virtual void dispatchWillPerformClientRedirect(const WebCore::URL&, double, double);
72
    virtual void dispatchDidChangeLocationWithinPage();
72
    virtual void dispatchDidChangeLocationWithinPage();
73
    virtual void dispatchDidPushStateWithinPage();
73
    virtual void dispatchDidPushStateWithinPage();
74
    virtual void dispatchDidReplaceStateWithinPage();
74
    virtual void dispatchDidReplaceStateWithinPage();
Lines 105-116 public: a/Source/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.h_sec2
105
    virtual void postProgressEstimateChangedNotification();
105
    virtual void postProgressEstimateChangedNotification();
106
    virtual void postProgressFinishedNotification();
106
    virtual void postProgressFinishedNotification();
107
107
108
    virtual PassRefPtr<WebCore::Frame> createFrame(const WebCore::KURL& url, const WTF::String& name, WebCore::HTMLFrameOwnerElement* ownerElement,
108
    virtual PassRefPtr<WebCore::Frame> createFrame(const WebCore::URL&, const WTF::String& name, WebCore::HTMLFrameOwnerElement*, const WTF::String& referrer, bool allowsScrolling, int marginWidth, int marginHeight);
109
                               const WTF::String& referrer, bool allowsScrolling, int marginWidth, int marginHeight);
109
    virtual PassRefPtr<WebCore::Widget> createPlugin(const WebCore::IntSize&, WebCore::HTMLPlugInElement*, const WebCore::URL&, const WTF::Vector<WTF::String>&, const WTF::Vector<WTF::String>&, const WTF::String&, bool);
110
    virtual PassRefPtr<WebCore::Widget> createPlugin(const WebCore::IntSize&, WebCore::HTMLPlugInElement*, const WebCore::KURL&, const WTF::Vector<WTF::String>&, const WTF::Vector<WTF::String>&, const WTF::String&, bool);
111
    virtual void recreatePlugin(WebCore::Widget*) { }
110
    virtual void recreatePlugin(WebCore::Widget*) { }
112
    virtual void redirectDataToPlugin(WebCore::Widget* pluginWidget);
111
    virtual void redirectDataToPlugin(WebCore::Widget* pluginWidget);
113
    virtual PassRefPtr<WebCore::Widget> createJavaAppletWidget(const WebCore::IntSize&, WebCore::HTMLAppletElement*, const WebCore::KURL& baseURL, const WTF::Vector<WTF::String>& paramNames, const WTF::Vector<WTF::String>& paramValues);
112
    virtual PassRefPtr<WebCore::Widget> createJavaAppletWidget(const WebCore::IntSize&, WebCore::HTMLAppletElement*, const WebCore::URL& baseURL, const WTF::Vector<WTF::String>& paramNames, const WTF::Vector<WTF::String>& paramValues);
114
    virtual WTF::String overrideMediaType() const;
113
    virtual WTF::String overrideMediaType() const;
115
    virtual void dispatchDidClearWindowObjectInWorld(WebCore::DOMWrapperWorld*);
114
    virtual void dispatchDidClearWindowObjectInWorld(WebCore::DOMWrapperWorld*);
116
    virtual void documentElementAvailable();
115
    virtual void documentElementAvailable();
Lines 118-124 public: a/Source/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.h_sec3
118
117
119
    virtual void registerForIconNotification(bool);
118
    virtual void registerForIconNotification(bool);
120
119
121
    virtual WebCore::ObjectContentType objectContentType(const WebCore::KURL&, const WTF::String& mimeType, bool shouldPreferPlugInsForImages);
120
    virtual WebCore::ObjectContentType objectContentType(const WebCore::URL&, const WTF::String& mimeType, bool shouldPreferPlugInsForImages);
122
121
123
    virtual void setMainFrameDocumentReady(bool);
122
    virtual void setMainFrameDocumentReady(bool);
124
123
Lines 136-143 public: a/Source/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.h_sec4
136
    virtual bool shouldStopLoadingForHistoryItem(WebCore::HistoryItem*) const;
135
    virtual bool shouldStopLoadingForHistoryItem(WebCore::HistoryItem*) const;
137
136
138
    virtual void didDisplayInsecureContent();
137
    virtual void didDisplayInsecureContent();
139
    virtual void didRunInsecureContent(WebCore::SecurityOrigin*, const WebCore::KURL&);
138
    virtual void didRunInsecureContent(WebCore::SecurityOrigin*, const WebCore::URL&);
140
    virtual void didDetectXSS(const WebCore::KURL&, bool didBlockEntirePage);
139
    virtual void didDetectXSS(const WebCore::URL&, bool didBlockEntirePage);
141
140
142
    virtual WebCore::ResourceError cancelledError(const WebCore::ResourceRequest&);
141
    virtual WebCore::ResourceError cancelledError(const WebCore::ResourceRequest&);
143
    virtual WebCore::ResourceError blockedError(const WebCore::ResourceRequest&);
142
    virtual WebCore::ResourceError blockedError(const WebCore::ResourceRequest&);
Lines 164-172 public: a/Source/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.h_sec5
164
    virtual void prepareForDataSourceReplacement();
163
    virtual void prepareForDataSourceReplacement();
165
164
166
    virtual WTF::PassRefPtr<WebCore::DocumentLoader> createDocumentLoader(const WebCore::ResourceRequest&, const WebCore::SubstituteData&);
165
    virtual WTF::PassRefPtr<WebCore::DocumentLoader> createDocumentLoader(const WebCore::ResourceRequest&, const WebCore::SubstituteData&);
167
    virtual void setTitle(const WebCore::StringWithDirection&, const WebCore::KURL&);
166
    virtual void setTitle(const WebCore::StringWithDirection&, const WebCore::URL&);
168
167
169
    virtual WTF::String userAgent(const WebCore::KURL&);
168
    virtual WTF::String userAgent(const WebCore::URL&);
170
169
171
    virtual void savePlatformDataToCachedFrame(WebCore::CachedFrame*);
170
    virtual void savePlatformDataToCachedFrame(WebCore::CachedFrame*);
172
    virtual void transitionToCommittedFromCachedFrame(WebCore::CachedFrame*);
171
    virtual void transitionToCommittedFromCachedFrame(WebCore::CachedFrame*);
- a/Source/WebKit/wince/WebCoreSupport/PlatformStrategiesWinCE.cpp -7 / +7 lines
Lines 84-115 VisitedLinkStrategy* PlatformStrategiesWinCE::createVisitedLinkStrategy() a/Source/WebKit/wince/WebCoreSupport/PlatformStrategiesWinCE.cpp_sec1
84
    return this;
84
    return this;
85
}
85
}
86
86
87
String PlatformStrategiesWinCE::cookiesForDOM(const NetworkStorageSession& session, const KURL& firstParty, const KURL& url)
87
String PlatformStrategiesWinCE::cookiesForDOM(const NetworkStorageSession& session, const URL& firstParty, const URL& url)
88
{
88
{
89
    return WebCore::cookiesForDOM(session, firstParty, url);
89
    return WebCore::cookiesForDOM(session, firstParty, url);
90
}
90
}
91
91
92
void PlatformStrategiesWinCE::setCookiesFromDOM(const NetworkStorageSession& session, const KURL& firstParty, const KURL& url, const String& cookieString)
92
void PlatformStrategiesWinCE::setCookiesFromDOM(const NetworkStorageSession& session, const URL& firstParty, const URL& url, const String& cookieString)
93
{
93
{
94
    WebCore::setCookiesFromDOM(session, firstParty, url, cookieString);
94
    WebCore::setCookiesFromDOM(session, firstParty, url, cookieString);
95
}
95
}
96
96
97
bool PlatformStrategiesWinCE::cookiesEnabled(const NetworkStorageSession& session, const KURL& firstParty, const KURL& url)
97
bool PlatformStrategiesWinCE::cookiesEnabled(const NetworkStorageSession& session, const URL& firstParty, const URL& url)
98
{
98
{
99
    return WebCore::cookiesEnabled(session, firstParty, url);
99
    return WebCore::cookiesEnabled(session, firstParty, url);
100
}
100
}
101
101
102
String PlatformStrategiesWinCE::cookieRequestHeaderFieldValue(const NetworkStorageSession& session, const KURL& firstParty, const KURL& url)
102
String PlatformStrategiesWinCE::cookieRequestHeaderFieldValue(const NetworkStorageSession& session, const URL& firstParty, const URL& url)
103
{
103
{
104
    return WebCore::cookieRequestHeaderFieldValue(session, firstParty, url);
104
    return WebCore::cookieRequestHeaderFieldValue(session, firstParty, url);
105
}
105
}
106
106
107
bool PlatformStrategiesWinCE::getRawCookies(const NetworkStorageSession& session, const KURL& firstParty, const KURL& url, Vector<Cookie>& rawCookies)
107
bool PlatformStrategiesWinCE::getRawCookies(const NetworkStorageSession& session, const URL& firstParty, const URL& url, Vector<Cookie>& rawCookies)
108
{
108
{
109
    return WebCore::getRawCookies(session, firstParty, url, rawCookies);
109
    return WebCore::getRawCookies(session, firstParty, url, rawCookies);
110
}
110
}
111
111
112
void PlatformStrategiesWinCE::deleteCookie(const NetworkStorageSession& session, const KURL& url, const String& cookieName)
112
void PlatformStrategiesWinCE::deleteCookie(const NetworkStorageSession& session, const URL& url, const String& cookieName)
113
{
113
{
114
    WebCore::deleteCookie(session, url, cookieName);
114
    WebCore::deleteCookie(session, url, cookieName);
115
}
115
}
Lines 152-158 void PlatformStrategiesWinCE::getPluginInfo(const Page*, Vector<PluginInfo>& out a/Source/WebKit/wince/WebCoreSupport/PlatformStrategiesWinCE.cpp_sec2
152
    }
152
    }
153
}
153
}
154
154
155
bool PlatformStrategiesWinCE::isLinkVisited(Page* page, LinkHash hash, const KURL&, const AtomicString&)
155
bool PlatformStrategiesWinCE::isLinkVisited(Page* page, LinkHash hash, const URL&, const AtomicString&)
156
{
156
{
157
    return page->group().isLinkVisited(hash);
157
    return page->group().isLinkVisited(hash);
158
}
158
}
- a/Source/WebKit/wince/WebCoreSupport/PlatformStrategiesWinCE.h -7 / +7 lines
Lines 52-63 private: a/Source/WebKit/wince/WebCoreSupport/PlatformStrategiesWinCE.h_sec1
52
    virtual WebCore::VisitedLinkStrategy* createVisitedLinkStrategy();
52
    virtual WebCore::VisitedLinkStrategy* createVisitedLinkStrategy();
53
53
54
    // WebCore::CookiesStrategy
54
    // WebCore::CookiesStrategy
55
    virtual String cookiesForDOM(const WebCore::NetworkStorageSession&, const WebCore::KURL& firstParty, const WebCore::KURL&);
55
    virtual String cookiesForDOM(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&);
56
    virtual void setCookiesFromDOM(const WebCore::NetworkStorageSession&, const WebCore::KURL& firstParty, const WebCore::KURL&, const String&);
56
    virtual void setCookiesFromDOM(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&, const String&);
57
    virtual bool cookiesEnabled(const WebCore::NetworkStorageSession&, const WebCore::KURL& firstParty, const WebCore::KURL&);
57
    virtual bool cookiesEnabled(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&);
58
    virtual String cookieRequestHeaderFieldValue(const WebCore::NetworkStorageSession&, const WebCore::KURL& firstParty, const WebCore::KURL&);
58
    virtual String cookieRequestHeaderFieldValue(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&);
59
    virtual bool getRawCookies(const WebCore::NetworkStorageSession&, const WebCore::KURL& firstParty, const WebCore::KURL&, Vector<WebCore::Cookie>&);
59
    virtual bool getRawCookies(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&, Vector<WebCore::Cookie>&);
60
    virtual void deleteCookie(const WebCore::NetworkStorageSession&, const WebCore::KURL&, const String&);
60
    virtual void deleteCookie(const WebCore::NetworkStorageSession&, const WebCore::URL&, const String&);
61
61
62
    // WebCore::DatabaseStrategy
62
    // WebCore::DatabaseStrategy
63
    // - Using default implementation.
63
    // - Using default implementation.
Lines 67-73 private: a/Source/WebKit/wince/WebCoreSupport/PlatformStrategiesWinCE.h_sec2
67
    virtual void getPluginInfo(const WebCore::Page*, Vector<WebCore::PluginInfo>&);
67
    virtual void getPluginInfo(const WebCore::Page*, Vector<WebCore::PluginInfo>&);
68
68
69
    // WebCore::VisitedLinkStrategy
69
    // WebCore::VisitedLinkStrategy
70
    virtual bool isLinkVisited(WebCore::Page*, WebCore::LinkHash, const WebCore::KURL&, const WTF::AtomicString&);
70
    virtual bool isLinkVisited(WebCore::Page*, WebCore::LinkHash, const WebCore::URL&, const WTF::AtomicString&);
71
    virtual void addVisitedLink(WebCore::Page*, WebCore::LinkHash);
71
    virtual void addVisitedLink(WebCore::Page*, WebCore::LinkHash);
72
};
72
};
73
73
- a/Source/WebKit/wince/WebView.cpp -1 / +1 lines
Lines 155-161 void WebView::cleanup() a/Source/WebKit/wince/WebView.cpp_sec1
155
    UnregisterClass(kWebViewWindowClassName, WebCore::instanceHandle());
155
    UnregisterClass(kWebViewWindowClassName, WebCore::instanceHandle());
156
}
156
}
157
157
158
PassRefPtr<Frame> WebView::createFrame(const KURL& url, const String& name, HTMLFrameOwnerElement* ownerElement, const String& referrer,
158
PassRefPtr<Frame> WebView::createFrame(const URL& url, const String& name, HTMLFrameOwnerElement* ownerElement, const String& referrer,
159
                                       bool /*allowsScrolling*/, int /*marginWidth*/, int /*marginHeight*/)
159
                                       bool /*allowsScrolling*/, int /*marginWidth*/, int /*marginHeight*/)
160
{
160
{
161
    Frame* coreFrame = m_frame;
161
    Frame* coreFrame = m_frame;
- a/Source/WebKit/wince/WebView.h -2 / +2 lines
Lines 39-45 class Frame; a/Source/WebKit/wince/WebView.h_sec1
39
class Page;
39
class Page;
40
class FrameView;
40
class FrameView;
41
class HTMLFrameOwnerElement;
41
class HTMLFrameOwnerElement;
42
class KURL;
42
class URL;
43
class ResourceRequest;
43
class ResourceRequest;
44
}
44
}
45
45
Lines 69-75 public: a/Source/WebKit/wince/WebView.h_sec2
69
69
70
    void frameRect(RECT* rect) const;
70
    void frameRect(RECT* rect) const;
71
71
72
    PassRefPtr<WebCore::Frame> createFrame(const WebCore::KURL&, const WTF::String&, WebCore::HTMLFrameOwnerElement*, const WTF::String&, bool, int, int);
72
    PassRefPtr<WebCore::Frame> createFrame(const WebCore::URL&, const WTF::String&, WebCore::HTMLFrameOwnerElement*, const WTF::String&, bool, int, int);
73
73
74
    // JavaScript Dialog
74
    // JavaScript Dialog
75
    void runJavaScriptAlert(const WTF::String& message);
75
    void runJavaScriptAlert(const WTF::String& message);
- a/Source/WebKit2/ChangeLog +9 lines
Lines 1-3 a/Source/WebKit2/ChangeLog_sec1
1
2013-09-26  Darin Adler  <darin@apple.com>
2
3
        rename KURL to URL
4
        https://bugs.webkit.org/show_bug.cgi?id=16214
5
6
        Reviewed by Andreas Kling.
7
8
        * many files: Renamed, using script.
9
1
2013-09-27  Allan Sandfeld Jensen  <allan.jensen@digia.com>
10
2013-09-27  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2
11
3
        [Qt] Fix force_static_libs_as_shared in WebKit2
12
        [Qt] Fix force_static_libs_as_shared in WebKit2
- a/Source/WebKit2/NetworkProcess/FileAPI/NetworkBlobRegistry.cpp -7 / +7 lines
Lines 47-53 NetworkBlobRegistry::NetworkBlobRegistry() a/Source/WebKit2/NetworkProcess/FileAPI/NetworkBlobRegistry.cpp_sec1
47
{
47
{
48
}
48
}
49
49
50
void NetworkBlobRegistry::registerBlobURL(NetworkConnectionToWebProcess* connection, const KURL& url, PassOwnPtr<BlobData> data, const Vector<RefPtr<SandboxExtension>>& newSandboxExtensions)
50
void NetworkBlobRegistry::registerBlobURL(NetworkConnectionToWebProcess* connection, const URL& url, PassOwnPtr<BlobData> data, const Vector<RefPtr<SandboxExtension>>& newSandboxExtensions)
51
{
51
{
52
    ASSERT(!m_sandboxExtensions.contains(url.string()));
52
    ASSERT(!m_sandboxExtensions.contains(url.string()));
53
53
Lines 67-77 void NetworkBlobRegistry::registerBlobURL(NetworkConnectionToWebProcess* connect a/Source/WebKit2/NetworkProcess/FileAPI/NetworkBlobRegistry.cpp_sec2
67
    ASSERT(!m_blobsForConnection.get(connection).contains(url));
67
    ASSERT(!m_blobsForConnection.get(connection).contains(url));
68
    BlobForConnectionMap::iterator mapIterator = m_blobsForConnection.find(connection);
68
    BlobForConnectionMap::iterator mapIterator = m_blobsForConnection.find(connection);
69
    if (mapIterator == m_blobsForConnection.end())
69
    if (mapIterator == m_blobsForConnection.end())
70
        mapIterator = m_blobsForConnection.add(connection, HashSet<KURL>()).iterator;
70
        mapIterator = m_blobsForConnection.add(connection, HashSet<URL>()).iterator;
71
    mapIterator->value.add(url);
71
    mapIterator->value.add(url);
72
}
72
}
73
73
74
void NetworkBlobRegistry::registerBlobURL(NetworkConnectionToWebProcess* connection, const WebCore::KURL& url, const WebCore::KURL& srcURL)
74
void NetworkBlobRegistry::registerBlobURL(NetworkConnectionToWebProcess* connection, const WebCore::URL& url, const WebCore::URL& srcURL)
75
{
75
{
76
    blobRegistry().registerBlobURL(url, srcURL);
76
    blobRegistry().registerBlobURL(url, srcURL);
77
    SandboxExtensionMap::iterator iter = m_sandboxExtensions.find(srcURL.string());
77
    SandboxExtensionMap::iterator iter = m_sandboxExtensions.find(srcURL.string());
Lines 83-89 void NetworkBlobRegistry::registerBlobURL(NetworkConnectionToWebProcess* connect a/Source/WebKit2/NetworkProcess/FileAPI/NetworkBlobRegistry.cpp_sec3
83
    m_blobsForConnection.find(connection)->value.add(url);
83
    m_blobsForConnection.find(connection)->value.add(url);
84
}
84
}
85
85
86
void NetworkBlobRegistry::unregisterBlobURL(NetworkConnectionToWebProcess* connection, const WebCore::KURL& url)
86
void NetworkBlobRegistry::unregisterBlobURL(NetworkConnectionToWebProcess* connection, const WebCore::URL& url)
87
{
87
{
88
    blobRegistry().unregisterBlobURL(url);
88
    blobRegistry().unregisterBlobURL(url);
89
    m_sandboxExtensions.remove(url.string());
89
    m_sandboxExtensions.remove(url.string());
Lines 98-105 void NetworkBlobRegistry::connectionToWebProcessDidClose(NetworkConnectionToWebP a/Source/WebKit2/NetworkProcess/FileAPI/NetworkBlobRegistry.cpp_sec4
98
    if (!m_blobsForConnection.contains(connection))
98
    if (!m_blobsForConnection.contains(connection))
99
        return;
99
        return;
100
100
101
    HashSet<KURL>& blobsForConnection = m_blobsForConnection.find(connection)->value;
101
    HashSet<URL>& blobsForConnection = m_blobsForConnection.find(connection)->value;
102
    for (HashSet<KURL>::iterator iter = blobsForConnection.begin(), end = blobsForConnection.end(); iter != end; ++iter) {
102
    for (HashSet<URL>::iterator iter = blobsForConnection.begin(), end = blobsForConnection.end(); iter != end; ++iter) {
103
        blobRegistry().unregisterBlobURL(*iter);
103
        blobRegistry().unregisterBlobURL(*iter);
104
        m_sandboxExtensions.remove(*iter);
104
        m_sandboxExtensions.remove(*iter);
105
    }
105
    }
Lines 107-113 void NetworkBlobRegistry::connectionToWebProcessDidClose(NetworkConnectionToWebP a/Source/WebKit2/NetworkProcess/FileAPI/NetworkBlobRegistry.cpp_sec5
107
    m_blobsForConnection.remove(connection);
107
    m_blobsForConnection.remove(connection);
108
}
108
}
109
109
110
const Vector<RefPtr<SandboxExtension>> NetworkBlobRegistry::sandboxExtensions(const WebCore::KURL& url)
110
const Vector<RefPtr<SandboxExtension>> NetworkBlobRegistry::sandboxExtensions(const WebCore::URL& url)
111
{
111
{
112
    return m_sandboxExtensions.get(url.string());
112
    return m_sandboxExtensions.get(url.string());
113
}
113
}
- a/Source/WebKit2/NetworkProcess/FileAPI/NetworkBlobRegistry.h -6 / +6 lines
Lines 28-34 a/Source/WebKit2/NetworkProcess/FileAPI/NetworkBlobRegistry.h_sec1
28
28
29
#if ENABLE(BLOB) && ENABLE(NETWORK_PROCESS)
29
#if ENABLE(BLOB) && ENABLE(NETWORK_PROCESS)
30
30
31
#include <WebCore/KURLHash.h>
31
#include <WebCore/URLHash.h>
32
#include <wtf/HashMap.h>
32
#include <wtf/HashMap.h>
33
#include <wtf/HashSet.h>
33
#include <wtf/HashSet.h>
34
34
Lines 47-59 public: a/Source/WebKit2/NetworkProcess/FileAPI/NetworkBlobRegistry.h_sec2
47
    NetworkBlobRegistry();
47
    NetworkBlobRegistry();
48
    static NetworkBlobRegistry& shared();
48
    static NetworkBlobRegistry& shared();
49
49
50
    void registerBlobURL(NetworkConnectionToWebProcess*, const WebCore::KURL&, PassOwnPtr<WebCore::BlobData>, const Vector<RefPtr<SandboxExtension>>&);
50
    void registerBlobURL(NetworkConnectionToWebProcess*, const WebCore::URL&, PassOwnPtr<WebCore::BlobData>, const Vector<RefPtr<SandboxExtension>>&);
51
    void registerBlobURL(NetworkConnectionToWebProcess*, const WebCore::KURL&, const WebCore::KURL& srcURL);
51
    void registerBlobURL(NetworkConnectionToWebProcess*, const WebCore::URL&, const WebCore::URL& srcURL);
52
    void unregisterBlobURL(NetworkConnectionToWebProcess*, const WebCore::KURL&);
52
    void unregisterBlobURL(NetworkConnectionToWebProcess*, const WebCore::URL&);
53
53
54
    void connectionToWebProcessDidClose(NetworkConnectionToWebProcess*);
54
    void connectionToWebProcessDidClose(NetworkConnectionToWebProcess*);
55
55
56
    const Vector<RefPtr<SandboxExtension>> sandboxExtensions(const WebCore::KURL&);
56
    const Vector<RefPtr<SandboxExtension>> sandboxExtensions(const WebCore::URL&);
57
57
58
private:
58
private:
59
    ~NetworkBlobRegistry();
59
    ~NetworkBlobRegistry();
Lines 61-67 private: a/Source/WebKit2/NetworkProcess/FileAPI/NetworkBlobRegistry.h_sec3
61
    typedef HashMap<String, Vector<RefPtr<SandboxExtension>>> SandboxExtensionMap;
61
    typedef HashMap<String, Vector<RefPtr<SandboxExtension>>> SandboxExtensionMap;
62
    SandboxExtensionMap m_sandboxExtensions;
62
    SandboxExtensionMap m_sandboxExtensions;
63
63
64
    typedef HashMap<NetworkConnectionToWebProcess*, HashSet<WebCore::KURL>> BlobForConnectionMap;
64
    typedef HashMap<NetworkConnectionToWebProcess*, HashSet<WebCore::URL>> BlobForConnectionMap;
65
    BlobForConnectionMap m_blobsForConnection;
65
    BlobForConnectionMap m_blobsForConnection;
66
};
66
};
67
67
- a/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.cpp -9 / +9 lines
Lines 182-218 void NetworkConnectionToWebProcess::convertMainResourceLoadToDownload(uint64_t m a/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.cpp_sec1
182
    loader->didConvertHandleToDownload();
182
    loader->didConvertHandleToDownload();
183
}
183
}
184
184
185
void NetworkConnectionToWebProcess::cookiesForDOM(bool privateBrowsingEnabled, const KURL& firstParty, const KURL& url, String& result)
185
void NetworkConnectionToWebProcess::cookiesForDOM(bool privateBrowsingEnabled, const URL& firstParty, const URL& url, String& result)
186
{
186
{
187
    result = WebCore::cookiesForDOM(storageSession(privateBrowsingEnabled), firstParty, url);
187
    result = WebCore::cookiesForDOM(storageSession(privateBrowsingEnabled), firstParty, url);
188
}
188
}
189
189
190
void NetworkConnectionToWebProcess::setCookiesFromDOM(bool privateBrowsingEnabled, const KURL& firstParty, const KURL& url, const String& cookieString)
190
void NetworkConnectionToWebProcess::setCookiesFromDOM(bool privateBrowsingEnabled, const URL& firstParty, const URL& url, const String& cookieString)
191
{
191
{
192
    WebCore::setCookiesFromDOM(storageSession(privateBrowsingEnabled), firstParty, url, cookieString);
192
    WebCore::setCookiesFromDOM(storageSession(privateBrowsingEnabled), firstParty, url, cookieString);
193
}
193
}
194
194
195
void NetworkConnectionToWebProcess::cookiesEnabled(bool privateBrowsingEnabled, const KURL& firstParty, const KURL& url, bool& result)
195
void NetworkConnectionToWebProcess::cookiesEnabled(bool privateBrowsingEnabled, const URL& firstParty, const URL& url, bool& result)
196
{
196
{
197
    result = WebCore::cookiesEnabled(storageSession(privateBrowsingEnabled), firstParty, url);
197
    result = WebCore::cookiesEnabled(storageSession(privateBrowsingEnabled), firstParty, url);
198
}
198
}
199
199
200
void NetworkConnectionToWebProcess::cookieRequestHeaderFieldValue(bool privateBrowsingEnabled, const KURL& firstParty, const KURL& url, String& result)
200
void NetworkConnectionToWebProcess::cookieRequestHeaderFieldValue(bool privateBrowsingEnabled, const URL& firstParty, const URL& url, String& result)
201
{
201
{
202
    result = WebCore::cookieRequestHeaderFieldValue(storageSession(privateBrowsingEnabled), firstParty, url);
202
    result = WebCore::cookieRequestHeaderFieldValue(storageSession(privateBrowsingEnabled), firstParty, url);
203
}
203
}
204
204
205
void NetworkConnectionToWebProcess::getRawCookies(bool privateBrowsingEnabled, const KURL& firstParty, const KURL& url, Vector<Cookie>& result)
205
void NetworkConnectionToWebProcess::getRawCookies(bool privateBrowsingEnabled, const URL& firstParty, const URL& url, Vector<Cookie>& result)
206
{
206
{
207
    WebCore::getRawCookies(storageSession(privateBrowsingEnabled), firstParty, url, result);
207
    WebCore::getRawCookies(storageSession(privateBrowsingEnabled), firstParty, url, result);
208
}
208
}
209
209
210
void NetworkConnectionToWebProcess::deleteCookie(bool privateBrowsingEnabled, const KURL& url, const String& cookieName)
210
void NetworkConnectionToWebProcess::deleteCookie(bool privateBrowsingEnabled, const URL& url, const String& cookieName)
211
{
211
{
212
    WebCore::deleteCookie(storageSession(privateBrowsingEnabled), url, cookieName);
212
    WebCore::deleteCookie(storageSession(privateBrowsingEnabled), url, cookieName);
213
}
213
}
214
214
215
void NetworkConnectionToWebProcess::registerBlobURL(const KURL& url, const BlobRegistrationData& data)
215
void NetworkConnectionToWebProcess::registerBlobURL(const URL& url, const BlobRegistrationData& data)
216
{
216
{
217
    Vector<RefPtr<SandboxExtension>> extensions;
217
    Vector<RefPtr<SandboxExtension>> extensions;
218
    for (size_t i = 0, count = data.sandboxExtensions().size(); i < count; ++i) {
218
    for (size_t i = 0, count = data.sandboxExtensions().size(); i < count; ++i) {
Lines 223-234 void NetworkConnectionToWebProcess::registerBlobURL(const KURL& url, const BlobR a/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.cpp_sec2
223
    NetworkBlobRegistry::shared().registerBlobURL(this, url, data.releaseData(), extensions);
223
    NetworkBlobRegistry::shared().registerBlobURL(this, url, data.releaseData(), extensions);
224
}
224
}
225
225
226
void NetworkConnectionToWebProcess::registerBlobURLFromURL(const KURL& url, const KURL& srcURL)
226
void NetworkConnectionToWebProcess::registerBlobURLFromURL(const URL& url, const URL& srcURL)
227
{
227
{
228
    NetworkBlobRegistry::shared().registerBlobURL(this, url, srcURL);
228
    NetworkBlobRegistry::shared().registerBlobURL(this, url, srcURL);
229
}
229
}
230
230
231
void NetworkConnectionToWebProcess::unregisterBlobURL(const KURL& url)
231
void NetworkConnectionToWebProcess::unregisterBlobURL(const URL& url)
232
{
232
{
233
    NetworkBlobRegistry::shared().unregisterBlobURL(this, url);
233
    NetworkBlobRegistry::shared().unregisterBlobURL(this, url);
234
}
234
}
- a/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.h -10 / +10 lines
Lines 73-94 private: a/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.h_sec1
73
    void performSynchronousLoad(const NetworkResourceLoadParameters&, PassRefPtr<Messages::NetworkConnectionToWebProcess::PerformSynchronousLoad::DelayedReply>);
73
    void performSynchronousLoad(const NetworkResourceLoadParameters&, PassRefPtr<Messages::NetworkConnectionToWebProcess::PerformSynchronousLoad::DelayedReply>);
74
74
75
    void removeLoadIdentifier(ResourceLoadIdentifier);
75
    void removeLoadIdentifier(ResourceLoadIdentifier);
76
    void crossOriginRedirectReceived(ResourceLoadIdentifier, const WebCore::KURL& redirectURL);
76
    void crossOriginRedirectReceived(ResourceLoadIdentifier, const WebCore::URL& redirectURL);
77
    void servePendingRequests(uint32_t resourceLoadPriority);
77
    void servePendingRequests(uint32_t resourceLoadPriority);
78
    void setSerialLoadingEnabled(bool);
78
    void setSerialLoadingEnabled(bool);
79
    void startDownload(bool privateBrowsingEnabled, uint64_t downloadID, const WebCore::ResourceRequest&);
79
    void startDownload(bool privateBrowsingEnabled, uint64_t downloadID, const WebCore::ResourceRequest&);
80
    void convertMainResourceLoadToDownload(uint64_t mainResourceLoadIdentifier, uint64_t downloadID, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&);
80
    void convertMainResourceLoadToDownload(uint64_t mainResourceLoadIdentifier, uint64_t downloadID, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&);
81
81
82
    void cookiesForDOM(bool privateBrowsingEnabled, const WebCore::KURL& firstParty, const WebCore::KURL&, String& result);
82
    void cookiesForDOM(bool privateBrowsingEnabled, const WebCore::URL& firstParty, const WebCore::URL&, String& result);
83
    void setCookiesFromDOM(bool privateBrowsingEnabled, const WebCore::KURL& firstParty, const WebCore::KURL&, const String&);
83
    void setCookiesFromDOM(bool privateBrowsingEnabled, const WebCore::URL& firstParty, const WebCore::URL&, const String&);
84
    void cookiesEnabled(bool privateBrowsingEnabled, const WebCore::KURL& firstParty, const WebCore::KURL&, bool& result);
84
    void cookiesEnabled(bool privateBrowsingEnabled, const WebCore::URL& firstParty, const WebCore::URL&, bool& result);
85
    void cookieRequestHeaderFieldValue(bool privateBrowsingEnabled, const WebCore::KURL& firstParty, const WebCore::KURL&, String& result);
85
    void cookieRequestHeaderFieldValue(bool privateBrowsingEnabled, const WebCore::URL& firstParty, const WebCore::URL&, String& result);
86
    void getRawCookies(bool privateBrowsingEnabled, const WebCore::KURL& firstParty, const WebCore::KURL&, Vector<WebCore::Cookie>&);
86
    void getRawCookies(bool privateBrowsingEnabled, const WebCore::URL& firstParty, const WebCore::URL&, Vector<WebCore::Cookie>&);
87
    void deleteCookie(bool privateBrowsingEnabled, const WebCore::KURL&, const String& cookieName);
87
    void deleteCookie(bool privateBrowsingEnabled, const WebCore::URL&, const String& cookieName);
88
88
89
    void registerBlobURL(const WebCore::KURL&, const BlobRegistrationData&);
89
    void registerBlobURL(const WebCore::URL&, const BlobRegistrationData&);
90
    void registerBlobURLFromURL(const WebCore::KURL&, const WebCore::KURL& srcURL);
90
    void registerBlobURLFromURL(const WebCore::URL&, const WebCore::URL& srcURL);
91
    void unregisterBlobURL(const WebCore::KURL&);
91
    void unregisterBlobURL(const WebCore::URL&);
92
92
93
    RefPtr<CoreIPC::Connection> m_connection;
93
    RefPtr<CoreIPC::Connection> m_connection;
94
94
- a/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.messages.in -9 / +9 lines
Lines 35-50 messages -> NetworkConnectionToWebProcess LegacyReceiver { a/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.messages.in_sec1
35
    StartDownload(bool privateBrowsingEnabled, uint64_t downloadID, WebCore::ResourceRequest request)
35
    StartDownload(bool privateBrowsingEnabled, uint64_t downloadID, WebCore::ResourceRequest request)
36
    ConvertMainResourceLoadToDownload(uint64_t mainResourceLoadIdentifier, uint64_t downloadID, WebCore::ResourceRequest request, WebCore::ResourceResponse response)
36
    ConvertMainResourceLoadToDownload(uint64_t mainResourceLoadIdentifier, uint64_t downloadID, WebCore::ResourceRequest request, WebCore::ResourceResponse response)
37
37
38
    CookiesForDOM(bool privateBrowsingEnabled, WebCore::KURL firstParty, WebCore::KURL url) -> (WTF::String result)
38
    CookiesForDOM(bool privateBrowsingEnabled, WebCore::URL firstParty, WebCore::URL url) -> (WTF::String result)
39
    SetCookiesFromDOM(bool privateBrowsingEnabled, WebCore::KURL firstParty, WebCore::KURL url, WTF::String cookieString)
39
    SetCookiesFromDOM(bool privateBrowsingEnabled, WebCore::URL firstParty, WebCore::URL url, WTF::String cookieString)
40
    CookiesEnabled(bool privateBrowsingEnabled, WebCore::KURL firstParty, WebCore::KURL url) -> (bool enabled)
40
    CookiesEnabled(bool privateBrowsingEnabled, WebCore::URL firstParty, WebCore::URL url) -> (bool enabled)
41
    CookieRequestHeaderFieldValue(bool privateBrowsingEnabled, WebCore::KURL firstParty, WebCore::KURL url) -> (WTF::String result)
41
    CookieRequestHeaderFieldValue(bool privateBrowsingEnabled, WebCore::URL firstParty, WebCore::URL url) -> (WTF::String result)
42
    GetRawCookies(bool privateBrowsingEnabled, WebCore::KURL firstParty, WebCore::KURL url) -> (WTF::Vector<WebCore::Cookie> cookies)
42
    GetRawCookies(bool privateBrowsingEnabled, WebCore::URL firstParty, WebCore::URL url) -> (WTF::Vector<WebCore::Cookie> cookies)
43
    DeleteCookie(bool privateBrowsingEnabled, WebCore::KURL url, WTF::String cookieName)
43
    DeleteCookie(bool privateBrowsingEnabled, WebCore::URL url, WTF::String cookieName)
44
44
45
    RegisterBlobURL(WebCore::KURL url, WebKit::BlobRegistrationData data)
45
    RegisterBlobURL(WebCore::URL url, WebKit::BlobRegistrationData data)
46
    RegisterBlobURLFromURL(WebCore::KURL url, WebCore::KURL srcURL)
46
    RegisterBlobURLFromURL(WebCore::URL url, WebCore::URL srcURL)
47
    UnregisterBlobURL(WebCore::KURL url)
47
    UnregisterBlobURL(WebCore::URL url)
48
}
48
}
49
49
50
#endif // ENABLE(NETWORK_PROCESS)
50
#endif // ENABLE(NETWORK_PROCESS)
- a/Source/WebKit2/NetworkProcess/NetworkResourceLoadScheduler.cpp -2 / +2 lines
Lines 57-63 void NetworkResourceLoadScheduler::scheduleLoader(PassRefPtr<NetworkResourceLoad a/Source/WebKit2/NetworkProcess/NetworkResourceLoadScheduler.cpp_sec1
57
    scheduleServePendingRequests();
57
    scheduleServePendingRequests();
58
}
58
}
59
59
60
HostRecord* NetworkResourceLoadScheduler::hostForURL(const WebCore::KURL& url, CreateHostPolicy createHostPolicy)
60
HostRecord* NetworkResourceLoadScheduler::hostForURL(const WebCore::URL& url, CreateHostPolicy createHostPolicy)
61
{
61
{
62
    if (!url.protocolIsInHTTPFamily())
62
    if (!url.protocolIsInHTTPFamily())
63
        return m_nonHTTPProtocolHost.get();
63
        return m_nonHTTPProtocolHost.get();
Lines 92-98 void NetworkResourceLoadScheduler::removeLoader(NetworkResourceLoader* loader) a/Source/WebKit2/NetworkProcess/NetworkResourceLoadScheduler.cpp_sec2
92
    scheduleServePendingRequests();
92
    scheduleServePendingRequests();
93
}
93
}
94
94
95
void NetworkResourceLoadScheduler::receivedRedirect(NetworkResourceLoader* loader, const WebCore::KURL& redirectURL)
95
void NetworkResourceLoadScheduler::receivedRedirect(NetworkResourceLoader* loader, const WebCore::URL& redirectURL)
96
{
96
{
97
    ASSERT(isMainThread());
97
    ASSERT(isMainThread());
98
    LOG(NetworkScheduling, "(NetworkProcess) NetworkResourceLoadScheduler::receivedRedirect loader originally for '%s' redirected to '%s'", loader->request().url().string().utf8().data(), redirectURL.string().utf8().data());
98
    LOG(NetworkScheduling, "(NetworkProcess) NetworkResourceLoadScheduler::receivedRedirect loader originally for '%s' redirected to '%s'", loader->request().url().string().utf8().data(), redirectURL.string().utf8().data());
- a/Source/WebKit2/NetworkProcess/NetworkResourceLoadScheduler.h -3 / +3 lines
Lines 35-41 a/Source/WebKit2/NetworkProcess/NetworkResourceLoadScheduler.h_sec1
35
#if ENABLE(NETWORK_PROCESS)
35
#if ENABLE(NETWORK_PROCESS)
36
36
37
namespace WebCore {
37
namespace WebCore {
38
class KURL;
38
class URL;
39
}
39
}
40
40
41
namespace WebKit {
41
namespace WebKit {
Lines 58-64 public: a/Source/WebKit2/NetworkProcess/NetworkResourceLoadScheduler.h_sec2
58
    // Called within the NetworkProcess on a background thread when a resource load has finished.
58
    // Called within the NetworkProcess on a background thread when a resource load has finished.
59
    void scheduleRemoveLoader(NetworkResourceLoader*);
59
    void scheduleRemoveLoader(NetworkResourceLoader*);
60
60
61
    void receivedRedirect(NetworkResourceLoader*, const WebCore::KURL& redirectURL);
61
    void receivedRedirect(NetworkResourceLoader*, const WebCore::URL& redirectURL);
62
    void servePendingRequests(WebCore::ResourceLoadPriority = WebCore::ResourceLoadPriorityVeryLow);
62
    void servePendingRequests(WebCore::ResourceLoadPriority = WebCore::ResourceLoadPriorityVeryLow);
63
63
64
    // For NetworkProcess statistics reporting.
64
    // For NetworkProcess statistics reporting.
Lines 73-79 private: a/Source/WebKit2/NetworkProcess/NetworkResourceLoadScheduler.h_sec3
73
        FindOnly
73
        FindOnly
74
    };
74
    };
75
    
75
    
76
    HostRecord* hostForURL(const WebCore::KURL&, CreateHostPolicy = FindOnly);
76
    HostRecord* hostForURL(const WebCore::URL&, CreateHostPolicy = FindOnly);
77
    
77
    
78
    void scheduleServePendingRequests();
78
    void scheduleServePendingRequests();
79
    void requestTimerFired(WebCore::Timer<NetworkResourceLoadScheduler>*);
79
    void requestTimerFired(WebCore::Timer<NetworkResourceLoadScheduler>*);
- a/Source/WebKit2/NetworkProcess/mac/NetworkProcessMac.mm -2 / +2 lines
Lines 79-85 static void overrideSystemProxies(const String& httpProxy, const String& httpsPr a/Source/WebKit2/NetworkProcess/mac/NetworkProcessMac.mm_sec1
79
    NSMutableDictionary *proxySettings = [NSMutableDictionary dictionary];
79
    NSMutableDictionary *proxySettings = [NSMutableDictionary dictionary];
80
80
81
    if (!httpProxy.isNull()) {
81
    if (!httpProxy.isNull()) {
82
        KURL httpProxyURL(KURL(), httpProxy);
82
        URL httpProxyURL(URL(), httpProxy);
83
        if (httpProxyURL.isValid()) {
83
        if (httpProxyURL.isValid()) {
84
            [proxySettings setObject:nsStringFromWebCoreString(httpProxyURL.host()) forKey:(NSString *)kCFNetworkProxiesHTTPProxy];
84
            [proxySettings setObject:nsStringFromWebCoreString(httpProxyURL.host()) forKey:(NSString *)kCFNetworkProxiesHTTPProxy];
85
            if (httpProxyURL.hasPort()) {
85
            if (httpProxyURL.hasPort()) {
Lines 92-98 static void overrideSystemProxies(const String& httpProxy, const String& httpsPr a/Source/WebKit2/NetworkProcess/mac/NetworkProcessMac.mm_sec2
92
    }
92
    }
93
93
94
    if (!httpsProxy.isNull()) {
94
    if (!httpsProxy.isNull()) {
95
        KURL httpsProxyURL(KURL(), httpsProxy);
95
        URL httpsProxyURL(URL(), httpsProxy);
96
        if (httpsProxyURL.isValid()) {
96
        if (httpsProxyURL.isValid()) {
97
            [proxySettings setObject:nsStringFromWebCoreString(httpsProxyURL.host()) forKey:(NSString *)kCFNetworkProxiesHTTPSProxy];
97
            [proxySettings setObject:nsStringFromWebCoreString(httpsProxyURL.host()) forKey:(NSString *)kCFNetworkProxiesHTTPSProxy];
98
            if (httpsProxyURL.hasPort()) {
98
            if (httpsProxyURL.hasPort()) {
- a/Source/WebKit2/PluginProcess/PluginControllerProxy.cpp -2 / +2 lines
Lines 439-445 void PluginControllerProxy::didEvaluateJavaScript(uint64_t requestID, const Stri a/Source/WebKit2/PluginProcess/PluginControllerProxy.cpp_sec1
439
439
440
void PluginControllerProxy::streamDidReceiveResponse(uint64_t streamID, const String& responseURLString, uint32_t streamLength, uint32_t lastModifiedTime, const String& mimeType, const String& headers)
440
void PluginControllerProxy::streamDidReceiveResponse(uint64_t streamID, const String& responseURLString, uint32_t streamLength, uint32_t lastModifiedTime, const String& mimeType, const String& headers)
441
{
441
{
442
    m_plugin->streamDidReceiveResponse(streamID, KURL(ParsedURLString, responseURLString), streamLength, lastModifiedTime, mimeType, headers, String());
442
    m_plugin->streamDidReceiveResponse(streamID, URL(ParsedURLString, responseURLString), streamLength, lastModifiedTime, mimeType, headers, String());
443
}
443
}
444
444
445
void PluginControllerProxy::streamDidReceiveData(uint64_t streamID, const CoreIPC::DataReference& data)
445
void PluginControllerProxy::streamDidReceiveData(uint64_t streamID, const CoreIPC::DataReference& data)
Lines 462-468 void PluginControllerProxy::manualStreamDidReceiveResponse(const String& respons a/Source/WebKit2/PluginProcess/PluginControllerProxy.cpp_sec2
462
    if (m_pluginCanceledManualStreamLoad)
462
    if (m_pluginCanceledManualStreamLoad)
463
        return;
463
        return;
464
464
465
    m_plugin->manualStreamDidReceiveResponse(KURL(ParsedURLString, responseURLString), streamLength, lastModifiedTime, mimeType, headers, String());
465
    m_plugin->manualStreamDidReceiveResponse(URL(ParsedURLString, responseURLString), streamLength, lastModifiedTime, mimeType, headers, String());
466
}
466
}
467
467
468
void PluginControllerProxy::manualStreamDidReceiveData(const CoreIPC::DataReference& data)
468
void PluginControllerProxy::manualStreamDidReceiveData(const CoreIPC::DataReference& data)
- a/Source/WebKit2/PluginProcess/mac/PluginProcessMac.mm -3 / +3 lines
Lines 189-199 static void carbonWindowHidden(WindowRef window) a/Source/WebKit2/PluginProcess/mac/PluginProcessMac.mm_sec1
189
static bool openCFURLRef(CFURLRef url, int32_t& status, CFURLRef* launchedURL)
189
static bool openCFURLRef(CFURLRef url, int32_t& status, CFURLRef* launchedURL)
190
{
190
{
191
    String launchedURLString;
191
    String launchedURLString;
192
    if (!PluginProcess::shared().openURL(KURL(url).string(), status, launchedURLString))
192
    if (!PluginProcess::shared().openURL(URL(url).string(), status, launchedURLString))
193
        return false;
193
        return false;
194
194
195
    if (!launchedURLString.isNull() && launchedURL)
195
    if (!launchedURLString.isNull() && launchedURL)
196
        *launchedURL = KURL(ParsedURLString, launchedURLString).createCFURL().leakRef();
196
        *launchedURL = URL(ParsedURLString, launchedURLString).createCFURL().leakRef();
197
    return true;
197
    return true;
198
}
198
}
199
199
Lines 293-299 static NSRunningApplication *replacedNSWorkspace_launchApplicationAtURL_options_ a/Source/WebKit2/PluginProcess/mac/PluginProcessMac.mm_sec2
293
        }
293
        }
294
    }
294
    }
295
295
296
    if (PluginProcess::shared().launchApplicationAtURL(KURL(url).string(), arguments)) {
296
    if (PluginProcess::shared().launchApplicationAtURL(URL(url).string(), arguments)) {
297
        if (error)
297
        if (error)
298
            *error = nil;
298
            *error = nil;
299
        return nil;
299
        return nil;
- a/Source/WebKit2/Shared/API/c/WKURLRequest.cpp -2 / +2 lines
Lines 28-34 a/Source/WebKit2/Shared/API/c/WKURLRequest.cpp_sec1
28
28
29
#include "WKAPICast.h"
29
#include "WKAPICast.h"
30
#include "WebURLRequest.h"
30
#include "WebURLRequest.h"
31
#include <WebCore/KURL.h>
31
#include <WebCore/URL.h>
32
32
33
using namespace WebCore;
33
using namespace WebCore;
34
using namespace WebKit;
34
using namespace WebKit;
Lines 40-46 WKTypeID WKURLRequestGetTypeID() a/Source/WebKit2/Shared/API/c/WKURLRequest.cpp_sec2
40
40
41
WKURLRequestRef WKURLRequestCreateWithWKURL(WKURLRef url)
41
WKURLRequestRef WKURLRequestCreateWithWKURL(WKURLRef url)
42
{
42
{
43
    return toAPI(WebURLRequest::create(KURL(KURL(), toImpl(url)->string())).leakRef());
43
    return toAPI(WebURLRequest::create(URL(URL(), toImpl(url)->string())).leakRef());
44
}
44
}
45
45
46
WKURLRef WKURLRequestCopyURL(WKURLRequestRef requestRef)
46
WKURLRef WKURLRequestCopyURL(WKURLRequestRef requestRef)
- a/Source/WebKit2/Shared/API/c/WKURLResponse.cpp -1 / +1 lines
Lines 28-34 a/Source/WebKit2/Shared/API/c/WKURLResponse.cpp_sec1
28
28
29
#include "WKAPICast.h"
29
#include "WKAPICast.h"
30
#include "WebURLResponse.h"
30
#include "WebURLResponse.h"
31
#include <WebCore/KURL.h>
31
#include <WebCore/URL.h>
32
32
33
using namespace WebKit;
33
using namespace WebKit;
34
34
- a/Source/WebKit2/Shared/API/c/cf/WKURLCF.cpp -2 / +2 lines
Lines 54-61 CFURLRef WKURLCopyCFURL(CFAllocatorRef allocatorRef, WKURLRef URLRef) a/Source/WebKit2/Shared/API/c/cf/WKURLCF.cpp_sec1
54
    // We first create a CString and then create the CFURL from it. This will ensure that the CFURL is stored in 
54
    // We first create a CString and then create the CFURL from it. This will ensure that the CFURL is stored in 
55
    // UTF-8 which uses less memory and is what WebKit clients might expect.
55
    // UTF-8 which uses less memory and is what WebKit clients might expect.
56
56
57
    // This pattern of using UTF-8 and then falling back to Latin1 on failure matches KURL::createCFString with the
57
    // This pattern of using UTF-8 and then falling back to Latin1 on failure matches URL::createCFString with the
58
    // major differnce being that KURL does not do a UTF-8 conversion and instead chops off the high bits of the UTF-16
58
    // major differnce being that URL does not do a UTF-8 conversion and instead chops off the high bits of the UTF-16
59
    // character sequence.
59
    // character sequence.
60
60
61
    CString buffer = toImpl(URLRef)->string().utf8();
61
    CString buffer = toImpl(URLRef)->string().utf8();
- a/Source/WebKit2/Shared/Downloads/qt/QtFileDownloader.cpp -1 / +1 lines
Lines 66-72 QString QtFileDownloader::determineFilename() a/Source/WebKit2/Shared/Downloads/qt/QtFileDownloader.cpp_sec1
66
66
67
    QString filenameCandidate = filenameFromHTTPContentDisposition(QString::fromLatin1(m_reply->rawHeader("Content-Disposition")));
67
    QString filenameCandidate = filenameFromHTTPContentDisposition(QString::fromLatin1(m_reply->rawHeader("Content-Disposition")));
68
    if (filenameCandidate.isEmpty()) {
68
    if (filenameCandidate.isEmpty()) {
69
        KURL kurl = m_reply->url();
69
        URL kurl = m_reply->url();
70
        filenameCandidate = decodeURLEscapeSequences(kurl.lastPathComponent());
70
        filenameCandidate = decodeURLEscapeSequences(kurl.lastPathComponent());
71
    }
71
    }
72
72
- a/Source/WebKit2/Shared/Downloads/soup/DownloadSoup.cpp -1 / +1 lines
Lines 76-82 public: a/Source/WebKit2/Shared/Downloads/soup/DownloadSoup.cpp_sec1
76
76
77
        String suggestedFilename = response.suggestedFilename();
77
        String suggestedFilename = response.suggestedFilename();
78
        if (suggestedFilename.isEmpty()) {
78
        if (suggestedFilename.isEmpty()) {
79
            KURL url = response.url();
79
            URL url = response.url();
80
            url.setQuery(String());
80
            url.setQuery(String());
81
            url.removeFragmentIdentifier();
81
            url.removeFragmentIdentifier();
82
            suggestedFilename = decodeURLEscapeSequences(url.lastPathComponent());
82
            suggestedFilename = decodeURLEscapeSequences(url.lastPathComponent());
- a/Source/WebKit2/Shared/FileAPI/BlobRegistrationData.cpp -1 / +1 lines
Lines 163-169 bool BlobRegistrationData::decode(CoreIPC::ArgumentDecoder& decoder, BlobRegistr a/Source/WebKit2/Shared/FileAPI/BlobRegistrationData.cpp_sec1
163
            String url;
163
            String url;
164
            if (!decoder.decode(url))
164
            if (!decoder.decode(url))
165
                return false;
165
                return false;
166
            result.m_data->appendBlob(KURL(KURL(), url), offset, length);
166
            result.m_data->appendBlob(URL(URL(), url), offset, length);
167
            break;
167
            break;
168
        }
168
        }
169
        default:
169
        default:
- a/Source/WebKit2/Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm -1 / +1 lines
Lines 34-40 a/Source/WebKit2/Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm_sec1
34
#import "DataReference.h"
34
#import "DataReference.h"
35
#import "WebCoreArgumentCoders.h"
35
#import "WebCoreArgumentCoders.h"
36
#import "WebProcessCreationParameters.h"
36
#import "WebProcessCreationParameters.h"
37
#import <WebCore/KURL.h>
37
#import <WebCore/URL.h>
38
#import <WebCore/ResourceError.h>
38
#import <WebCore/ResourceError.h>
39
#import <WebCore/ResourceRequest.h>
39
#import <WebCore/ResourceRequest.h>
40
#import <WebCore/ResourceResponse.h>
40
#import <WebCore/ResourceResponse.h>
- a/Source/WebKit2/Shared/WebArchiveResource.cpp -2 / +2 lines
Lines 30-36 a/Source/WebKit2/Shared/WebArchiveResource.cpp_sec1
30
30
31
#include "WebData.h"
31
#include "WebData.h"
32
#include <WebCore/ArchiveResource.h>
32
#include <WebCore/ArchiveResource.h>
33
#include <WebCore/KURL.h>
33
#include <WebCore/URL.h>
34
#include <wtf/RetainPtr.h>
34
#include <wtf/RetainPtr.h>
35
35
36
using namespace WebCore;
36
using namespace WebCore;
Lines 48-54 PassRefPtr<WebArchiveResource> WebArchiveResource::create(PassRefPtr<ArchiveReso a/Source/WebKit2/Shared/WebArchiveResource.cpp_sec2
48
}
48
}
49
49
50
WebArchiveResource::WebArchiveResource(WebData* data, const String& URL, const String& MIMEType, const String& textEncoding)
50
WebArchiveResource::WebArchiveResource(WebData* data, const String& URL, const String& MIMEType, const String& textEncoding)
51
    : m_archiveResource(ArchiveResource::create(SharedBuffer::create(data->bytes(), data->size()), KURL(KURL(), URL), MIMEType, textEncoding, String()))
51
    : m_archiveResource(ArchiveResource::create(SharedBuffer::create(data->bytes(), data->size()), WebCore::URL(WebCore::URL(), URL), MIMEType, textEncoding, String()))
52
{
52
{
53
}
53
}
54
54
- a/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp -9 / +9 lines
Lines 39-45 a/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp_sec1
39
#include <WebCore/GraphicsContext.h>
39
#include <WebCore/GraphicsContext.h>
40
#include <WebCore/GraphicsLayer.h>
40
#include <WebCore/GraphicsLayer.h>
41
#include <WebCore/Image.h>
41
#include <WebCore/Image.h>
42
#include <WebCore/KURL.h>
42
#include <WebCore/URL.h>
43
#include <WebCore/PluginData.h>
43
#include <WebCore/PluginData.h>
44
#include <WebCore/ProtectionSpace.h>
44
#include <WebCore/ProtectionSpace.h>
45
#include <WebCore/ResourceError.h>
45
#include <WebCore/ResourceError.h>
Lines 407-413 bool ArgumentCoder<ResourceRequest>::decode(ArgumentDecoder& decoder, ResourceRe a/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp_sec2
407
        String url;
407
        String url;
408
        if (!decoder.decode(url))
408
        if (!decoder.decode(url))
409
            return false;
409
            return false;
410
        request.setURL(KURL(KURL(), url));
410
        request.setURL(URL(URL(), url));
411
411
412
        String httpMethod;
412
        String httpMethod;
413
        if (!decoder.decode(httpMethod))
413
        if (!decoder.decode(httpMethod))
Lines 432-438 bool ArgumentCoder<ResourceRequest>::decode(ArgumentDecoder& decoder, ResourceRe a/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp_sec3
432
        String firstPartyForCookies;
432
        String firstPartyForCookies;
433
        if (!decoder.decode(firstPartyForCookies))
433
        if (!decoder.decode(firstPartyForCookies))
434
            return false;
434
            return false;
435
        request.setFirstPartyForCookies(KURL(KURL(), firstPartyForCookies));
435
        request.setFirstPartyForCookies(URL(URL(), firstPartyForCookies));
436
436
437
        resourceRequest = request;
437
        resourceRequest = request;
438
    }
438
    }
Lines 503-509 bool ArgumentCoder<ResourceResponse>::decode(ArgumentDecoder& decoder, ResourceR a/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp_sec4
503
        String url;
503
        String url;
504
        if (!decoder.decode(url))
504
        if (!decoder.decode(url))
505
            return false;
505
            return false;
506
        response.setURL(KURL(KURL(), url));
506
        response.setURL(URL(URL(), url));
507
507
508
        int32_t httpStatusCode;
508
        int32_t httpStatusCode;
509
        if (!decoder.decode(httpStatusCode))
509
        if (!decoder.decode(httpStatusCode))
Lines 1033-1049 bool ArgumentCoder<DragSession>::decode(ArgumentDecoder& decoder, DragSession& r a/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp_sec5
1033
    return true;
1033
    return true;
1034
}
1034
}
1035
1035
1036
void ArgumentCoder<KURL>::encode(ArgumentEncoder& encoder, const KURL& result)
1036
void ArgumentCoder<URL>::encode(ArgumentEncoder& encoder, const URL& result)
1037
{
1037
{
1038
    encoder << result.string();
1038
    encoder << result.string();
1039
}
1039
}
1040
    
1040
    
1041
bool ArgumentCoder<KURL>::decode(ArgumentDecoder& decoder, KURL& result)
1041
bool ArgumentCoder<URL>::decode(ArgumentDecoder& decoder, URL& result)
1042
{
1042
{
1043
    String urlAsString;
1043
    String urlAsString;
1044
    if (!decoder.decode(urlAsString))
1044
    if (!decoder.decode(urlAsString))
1045
        return false;
1045
        return false;
1046
    result = KURL(WebCore::ParsedURLString, urlAsString);
1046
    result = URL(WebCore::ParsedURLString, urlAsString);
1047
    return true;
1047
    return true;
1048
}
1048
}
1049
1049
Lines 1063-1069 bool ArgumentCoder<WebCore::UserStyleSheet>::decode(ArgumentDecoder& decoder, We a/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp_sec6
1063
    if (!decoder.decode(source))
1063
    if (!decoder.decode(source))
1064
        return false;
1064
        return false;
1065
1065
1066
    KURL url;
1066
    URL url;
1067
    if (!decoder.decode(url))
1067
    if (!decoder.decode(url))
1068
        return false;
1068
        return false;
1069
1069
Lines 1103-1109 bool ArgumentCoder<WebCore::UserScript>::decode(ArgumentDecoder& decoder, WebCor a/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp_sec7
1103
    if (!decoder.decode(source))
1103
    if (!decoder.decode(source))
1104
        return false;
1104
        return false;
1105
1105
1106
    KURL url;
1106
    URL url;
1107
    if (!decoder.decode(url))
1107
    if (!decoder.decode(url))
1108
        return false;
1108
        return false;
1109
1109
- a/Source/WebKit2/Shared/WebCoreArgumentCoders.h -4 / +4 lines
Lines 43-49 namespace WebCore { a/Source/WebKit2/Shared/WebCoreArgumentCoders.h_sec1
43
    class IntRect;
43
    class IntRect;
44
    class IntSize;
44
    class IntSize;
45
    class KeyframeValueList;
45
    class KeyframeValueList;
46
    class KURL;
46
    class URL;
47
    class Notification;
47
    class Notification;
48
    class ProtectionSpace;
48
    class ProtectionSpace;
49
    class ResourceError;
49
    class ResourceError;
Lines 255-263 template<> struct ArgumentCoder<WebCore::DragSession> { a/Source/WebKit2/Shared/WebCoreArgumentCoders.h_sec2
255
    static bool decode(ArgumentDecoder&, WebCore::DragSession&);
255
    static bool decode(ArgumentDecoder&, WebCore::DragSession&);
256
};
256
};
257
257
258
template<> struct ArgumentCoder<WebCore::KURL> {
258
template<> struct ArgumentCoder<WebCore::URL> {
259
    static void encode(ArgumentEncoder&, const WebCore::KURL&);
259
    static void encode(ArgumentEncoder&, const WebCore::URL&);
260
    static bool decode(ArgumentDecoder&, WebCore::KURL&);
260
    static bool decode(ArgumentDecoder&, WebCore::URL&);
261
};
261
};
262
262
263
template<> struct ArgumentCoder<WebCore::UserStyleSheet> {
263
template<> struct ArgumentCoder<WebCore::UserStyleSheet> {
- a/Source/WebKit2/Shared/WebHitTestResult.cpp -1 / +1 lines
Lines 25-31 a/Source/WebKit2/Shared/WebHitTestResult.cpp_sec1
25
#include <WebCore/Frame.h>
25
#include <WebCore/Frame.h>
26
#include <WebCore/FrameView.h>
26
#include <WebCore/FrameView.h>
27
#include <WebCore/HitTestResult.h>
27
#include <WebCore/HitTestResult.h>
28
#include <WebCore/KURL.h>
28
#include <WebCore/URL.h>
29
#include <WebCore/Node.h>
29
#include <WebCore/Node.h>
30
#include <wtf/text/WTFString.h>
30
#include <wtf/text/WTFString.h>
31
31
- a/Source/WebKit2/Shared/WebURL.h -6 / +6 lines
Lines 27-33 a/Source/WebKit2/Shared/WebURL.h_sec1
27
#define WebURL_h
27
#define WebURL_h
28
28
29
#include "APIObject.h"
29
#include "APIObject.h"
30
#include <WebCore/KURL.h>
30
#include <WebCore/URL.h>
31
#include <wtf/OwnPtr.h>
31
#include <wtf/OwnPtr.h>
32
#include <wtf/PassOwnPtr.h>
32
#include <wtf/PassOwnPtr.h>
33
#include <wtf/PassRefPtr.h>
33
#include <wtf/PassRefPtr.h>
Lines 46-56 public: a/Source/WebKit2/Shared/WebURL.h_sec2
46
46
47
    static PassRefPtr<WebURL> create(const WebURL* baseURL, const String& relativeURL)
47
    static PassRefPtr<WebURL> create(const WebURL* baseURL, const String& relativeURL)
48
    {
48
    {
49
        using WebCore::KURL;
49
        using WebCore::URL;
50
50
51
        ASSERT(baseURL);
51
        ASSERT(baseURL);
52
        baseURL->parseURLIfNecessary();
52
        baseURL->parseURLIfNecessary();
53
        KURL* absoluteURL = new KURL(*baseURL->m_parsedURL.get(), relativeURL);
53
        URL* absoluteURL = new URL(*baseURL->m_parsedURL.get(), relativeURL);
54
54
55
        return adoptRef(new WebURL(adoptPtr(absoluteURL), absoluteURL->string()));
55
        return adoptRef(new WebURL(adoptPtr(absoluteURL), absoluteURL->string()));
56
    }
56
    }
Lines 90-96 private: a/Source/WebKit2/Shared/WebURL.h_sec3
90
    {
90
    {
91
    }
91
    }
92
92
93
    WebURL(PassOwnPtr<WebCore::KURL> parsedURL, const String& string)
93
    WebURL(PassOwnPtr<WebCore::URL> parsedURL, const String& string)
94
        : m_string(string)
94
        : m_string(string)
95
        , m_parsedURL(parsedURL)
95
        , m_parsedURL(parsedURL)
96
    {
96
    {
Lines 100-110 private: a/Source/WebKit2/Shared/WebURL.h_sec4
100
    {
100
    {
101
        if (m_parsedURL)
101
        if (m_parsedURL)
102
            return;
102
            return;
103
        m_parsedURL = WTF::adoptPtr(new WebCore::KURL(WebCore::KURL(), m_string));
103
        m_parsedURL = WTF::adoptPtr(new WebCore::URL(WebCore::URL(), m_string));
104
    }
104
    }
105
105
106
    String m_string;
106
    String m_string;
107
    mutable OwnPtr<WebCore::KURL> m_parsedURL;
107
    mutable OwnPtr<WebCore::URL> m_parsedURL;
108
};
108
};
109
109
110
} // namespace WebKit
110
} // namespace WebKit
- a/Source/WebKit2/Shared/WebURLRequest.cpp -1 / +1 lines
Lines 16-22 using namespace WebCore; a/Source/WebKit2/Shared/WebURLRequest.cpp_sec1
16
16
17
namespace WebKit {
17
namespace WebKit {
18
18
19
PassRefPtr<WebURLRequest> WebURLRequest::create(const KURL& url)
19
PassRefPtr<WebURLRequest> WebURLRequest::create(const URL& url)
20
{
20
{
21
    return adoptRef(new WebURLRequest(ResourceRequest(url)));
21
    return adoptRef(new WebURLRequest(ResourceRequest(url)));
22
}
22
}
- a/Source/WebKit2/Shared/WebURLRequest.h -1 / +1 lines
Lines 40-46 namespace WebKit { a/Source/WebKit2/Shared/WebURLRequest.h_sec1
40
40
41
class WebURLRequest : public TypedAPIObject<APIObject::TypeURLRequest> {
41
class WebURLRequest : public TypedAPIObject<APIObject::TypeURLRequest> {
42
public:
42
public:
43
    static PassRefPtr<WebURLRequest> create(const WebCore::KURL&);
43
    static PassRefPtr<WebURLRequest> create(const WebCore::URL&);
44
44
45
    static PassRefPtr<WebURLRequest> create(const WebCore::ResourceRequest& request)
45
    static PassRefPtr<WebURLRequest> create(const WebCore::ResourceRequest& request)
46
    {
46
    {
- a/Source/WebKit2/Shared/WebUserContentURLPattern.h -2 / +2 lines
Lines 28-34 a/Source/WebKit2/Shared/WebUserContentURLPattern.h_sec1
28
28
29
#include "APIObject.h"
29
#include "APIObject.h"
30
30
31
#include <WebCore/KURL.h>
31
#include <WebCore/URL.h>
32
#include <WebCore/UserContentURLPattern.h>
32
#include <WebCore/UserContentURLPattern.h>
33
#include <wtf/RefPtr.h>
33
#include <wtf/RefPtr.h>
34
34
Lines 44-50 public: a/Source/WebKit2/Shared/WebUserContentURLPattern.h_sec2
44
    const String& host() const { return m_pattern.host(); }
44
    const String& host() const { return m_pattern.host(); }
45
    const String& scheme() const { return m_pattern.scheme(); }
45
    const String& scheme() const { return m_pattern.scheme(); }
46
    bool isValid() const { return m_pattern.isValid(); };
46
    bool isValid() const { return m_pattern.isValid(); };
47
    bool matchesURL(const String& url) const { return m_pattern.matches(WebCore::KURL(WebCore::ParsedURLString, url)); }
47
    bool matchesURL(const String& url) const { return m_pattern.matches(WebCore::URL(WebCore::ParsedURLString, url)); }
48
    bool matchesSubdomains() const { return m_pattern.matchSubdomains(); }
48
    bool matchesSubdomains() const { return m_pattern.matchSubdomains(); }
49
49
50
    const String& patternString() const { return m_patternString; }
50
    const String& patternString() const { return m_patternString; }
- a/Source/WebKit2/Shared/gtk/ArgumentCodersGtk.cpp -1 / +1 lines
Lines 141-147 static bool decodeDataObject(ArgumentDecoder& decoder, RefPtr<DataObjectGtk>& da a/Source/WebKit2/Shared/gtk/ArgumentCodersGtk.cpp_sec1
141
        String url;
141
        String url;
142
        if (!decoder.decode(url))
142
        if (!decoder.decode(url))
143
            return false;
143
            return false;
144
        data->setURL(KURL(KURL(), url), String());
144
        data->setURL(URL(URL(), url), String());
145
    }
145
    }
146
146
147
    bool hasURIList;
147
    bool hasURIList;
- a/Source/WebKit2/Shared/mac/CookieStorageShim.cpp -2 / +2 lines
Lines 33-39 a/Source/WebKit2/Shared/mac/CookieStorageShim.cpp_sec1
33
#include "NetworkProcessConnection.h"
33
#include "NetworkProcessConnection.h"
34
#include "WebCoreArgumentCoders.h"
34
#include "WebCoreArgumentCoders.h"
35
#include "WebProcess.h"
35
#include "WebProcess.h"
36
#include <WebCore/KURL.h>
36
#include <WebCore/URL.h>
37
#include <dlfcn.h>
37
#include <dlfcn.h>
38
#include <wtf/MainThread.h>
38
#include <wtf/MainThread.h>
39
#include <wtf/RetainPtr.h>
39
#include <wtf/RetainPtr.h>
Lines 46-52 namespace WebKit { a/Source/WebKit2/Shared/mac/CookieStorageShim.cpp_sec2
46
static CFDictionaryRef webKitCookieStorageCopyRequestHeaderFieldsForURL(CFHTTPCookieStorageRef inCookieStorage, CFURLRef inRequestURL)
46
static CFDictionaryRef webKitCookieStorageCopyRequestHeaderFieldsForURL(CFHTTPCookieStorageRef inCookieStorage, CFURLRef inRequestURL)
47
{
47
{
48
    String cookies;
48
    String cookies;
49
    KURL firstPartyForCookiesURL;
49
    URL firstPartyForCookiesURL;
50
    if (!WebProcess::shared().networkConnection()->connection()->sendSync(Messages::NetworkConnectionToWebProcess::CookieRequestHeaderFieldValue(false, firstPartyForCookiesURL, inRequestURL), Messages::NetworkConnectionToWebProcess::CookiesForDOM::Reply(cookies), 0))
50
    if (!WebProcess::shared().networkConnection()->connection()->sendSync(Messages::NetworkConnectionToWebProcess::CookieRequestHeaderFieldValue(false, firstPartyForCookiesURL, inRequestURL), Messages::NetworkConnectionToWebProcess::CookiesForDOM::Reply(cookies), 0))
51
        return 0;
51
        return 0;
52
52
- a/Source/WebKit2/Shared/qt/QtNetworkReplyData.cpp -1 / +1 lines
Lines 27-33 a/Source/WebKit2/Shared/qt/QtNetworkReplyData.cpp_sec1
27
#include "QtNetworkReplyData.h"
27
#include "QtNetworkReplyData.h"
28
28
29
#include "ArgumentCodersQt.h"
29
#include "ArgumentCodersQt.h"
30
#include "KURL.h"
30
#include "URL.h"
31
#include "SharedMemory.h"
31
#include "SharedMemory.h"
32
#include "WebCoreArgumentCoders.h"
32
#include "WebCoreArgumentCoders.h"
33
#include <QNetworkAccessManager>
33
#include <QNetworkAccessManager>
- a/Source/WebKit2/UIProcess/API/gtk/WebKitURIRequest.cpp -1 / +1 lines
Lines 139-145 void webkit_uri_request_set_uri(WebKitURIRequest* request, const char* uri) a/Source/WebKit2/UIProcess/API/gtk/WebKitURIRequest.cpp_sec1
139
    g_return_if_fail(WEBKIT_IS_URI_REQUEST(request));
139
    g_return_if_fail(WEBKIT_IS_URI_REQUEST(request));
140
    g_return_if_fail(uri);
140
    g_return_if_fail(uri);
141
141
142
    KURL url(KURL(), uri);
142
    URL url(URL(), uri);
143
    if (url == request->priv->resourceRequest.url())
143
    if (url == request->priv->resourceRequest.url())
144
        return;
144
        return;
145
145
- a/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp -1 / +1 lines
Lines 588-594 void QQuickWebViewPrivate::processDidCrash() a/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp_sec1
588
{
588
{
589
    Q_Q(QQuickWebView);
589
    Q_Q(QQuickWebView);
590
590
591
    QUrl url(KURL(WebCore::ParsedURLString, webPageProxy->urlAtProcessExit()));
591
    QUrl url(URL(WebCore::ParsedURLString, webPageProxy->urlAtProcessExit()));
592
    qWarning("WARNING: The web process experienced a crash on '%s'.", qPrintable(url.toString(QUrl::RemoveUserInfo)));
592
    qWarning("WARNING: The web process experienced a crash on '%s'.", qPrintable(url.toString(QUrl::RemoveUserInfo)));
593
593
594
    pageEventHandler->resetGestureRecognizers();
594
    pageEventHandler->resetGestureRecognizers();
- a/Source/WebKit2/UIProcess/InspectorServer/HTTPRequest.cpp -2 / +2 lines
Lines 74-80 size_t HTTPRequest::parseRequestLine(const char* data, size_t length, String& fa a/Source/WebKit2/UIProcess/InspectorServer/HTTPRequest.cpp_sec1
74
{
74
{
75
    String url;
75
    String url;
76
    size_t result = parseHTTPRequestLine(data, length, failureReason, m_requestMethod, url, m_httpVersion);
76
    size_t result = parseHTTPRequestLine(data, length, failureReason, m_requestMethod, url, m_httpVersion);
77
    m_url = KURL(KURL(), url);
77
    m_url = URL(URL(), url);
78
    return result;
78
    return result;
79
}
79
}
80
80
Lines 113-119 HTTPRequest::HTTPRequest() a/Source/WebKit2/UIProcess/InspectorServer/HTTPRequest.cpp_sec2
113
{
113
{
114
}
114
}
115
115
116
HTTPRequest::HTTPRequest(const String& requestMethod, const KURL& url, HTTPVersion version)
116
HTTPRequest::HTTPRequest(const String& requestMethod, const URL& url, HTTPVersion version)
117
    : m_url(url)
117
    : m_url(url)
118
    , m_httpVersion(version)
118
    , m_httpVersion(version)
119
    , m_requestMethod(requestMethod)
119
    , m_requestMethod(requestMethod)
- a/Source/WebKit2/UIProcess/InspectorServer/HTTPRequest.h -6 / +6 lines
Lines 34-40 a/Source/WebKit2/UIProcess/InspectorServer/HTTPRequest.h_sec1
34
34
35
#include <WebCore/HTTPHeaderMap.h>
35
#include <WebCore/HTTPHeaderMap.h>
36
#include <WebCore/HTTPParsers.h>
36
#include <WebCore/HTTPParsers.h>
37
#include <WebCore/KURL.h>
37
#include <WebCore/URL.h>
38
#include <wtf/PassRefPtr.h>
38
#include <wtf/PassRefPtr.h>
39
#include <wtf/RefCounted.h>
39
#include <wtf/RefCounted.h>
40
#include <wtf/text/WTFString.h>
40
#include <wtf/text/WTFString.h>
Lines 44-58 namespace WebKit { a/Source/WebKit2/UIProcess/InspectorServer/HTTPRequest.h_sec2
44
class HTTPRequest : public RefCounted<HTTPRequest> {
44
class HTTPRequest : public RefCounted<HTTPRequest> {
45
public:
45
public:
46
    static PassRefPtr<HTTPRequest> create() { return adoptRef(new HTTPRequest()); }
46
    static PassRefPtr<HTTPRequest> create() { return adoptRef(new HTTPRequest()); }
47
    static PassRefPtr<HTTPRequest> create(const String& requestMethod, const WebCore::KURL& url, WebCore::HTTPVersion version) { return adoptRef(new HTTPRequest(requestMethod, url, version)); }
47
    static PassRefPtr<HTTPRequest> create(const String& requestMethod, const WebCore::URL& url, WebCore::HTTPVersion version) { return adoptRef(new HTTPRequest(requestMethod, url, version)); }
48
    static PassRefPtr<HTTPRequest> parseHTTPRequestFromBuffer(const char* data, size_t length, String& failureReason);
48
    static PassRefPtr<HTTPRequest> parseHTTPRequestFromBuffer(const char* data, size_t length, String& failureReason);
49
    virtual ~HTTPRequest();
49
    virtual ~HTTPRequest();
50
50
51
    String requestMethod() const { return m_requestMethod; }
51
    String requestMethod() const { return m_requestMethod; }
52
    void setRequestMethod(const String& method) { m_requestMethod = method; }
52
    void setRequestMethod(const String& method) { m_requestMethod = method; }
53
53
54
    WebCore::KURL url() const { return m_url; }
54
    WebCore::URL url() const { return m_url; }
55
    void setURL(const WebCore::KURL& url) { m_url = url; }
55
    void setURL(const WebCore::URL& url) { m_url = url; }
56
56
57
    const Vector<unsigned char>& body() const { return m_body; }
57
    const Vector<unsigned char>& body() const { return m_body; }
58
58
Lines 62-75 public: a/Source/WebKit2/UIProcess/InspectorServer/HTTPRequest.h_sec3
62
62
63
protected:
63
protected:
64
    HTTPRequest();
64
    HTTPRequest();
65
    HTTPRequest(const String& requestMethod, const WebCore::KURL&, WebCore::HTTPVersion);
65
    HTTPRequest(const String& requestMethod, const WebCore::URL&, WebCore::HTTPVersion);
66
66
67
    // Parsing helpers.
67
    // Parsing helpers.
68
    size_t parseRequestLine(const char* data, size_t length, String& failureReason);
68
    size_t parseRequestLine(const char* data, size_t length, String& failureReason);
69
    size_t parseHeaders(const char* data, size_t length, String& failureReason);
69
    size_t parseHeaders(const char* data, size_t length, String& failureReason);
70
    size_t parseRequestBody(const char* data, size_t length);
70
    size_t parseRequestBody(const char* data, size_t length);
71
71
72
    WebCore::KURL m_url;
72
    WebCore::URL m_url;
73
    WebCore::HTTPVersion m_httpVersion;
73
    WebCore::HTTPVersion m_httpVersion;
74
    String m_requestMethod;
74
    String m_requestMethod;
75
    WebCore::HTTPHeaderMap m_headerFields;
75
    WebCore::HTTPHeaderMap m_headerFields;
- a/Source/WebKit2/UIProcess/InspectorServer/WebInspectorServer.cpp -1 / +1 lines
Lines 111-117 void WebInspectorServer::sendMessageOverConnection(unsigned pageIdForConnection, a/Source/WebKit2/UIProcess/InspectorServer/WebInspectorServer.cpp_sec1
111
void WebInspectorServer::didReceiveUnrecognizedHTTPRequest(WebSocketServerConnection* connection, PassRefPtr<HTTPRequest> request)
111
void WebInspectorServer::didReceiveUnrecognizedHTTPRequest(WebSocketServerConnection* connection, PassRefPtr<HTTPRequest> request)
112
{
112
{
113
    // request->url() contains only the path extracted from the HTTP request line
113
    // request->url() contains only the path extracted from the HTTP request line
114
    // and KURL is poor at parsing incomplete URLs, so extract the interesting parts manually.
114
    // and URL is poor at parsing incomplete URLs, so extract the interesting parts manually.
115
    String path = request->url();
115
    String path = request->url();
116
    size_t pathEnd = path.find('?');
116
    size_t pathEnd = path.find('?');
117
    if (pathEnd == notFound)
117
    if (pathEnd == notFound)
- a/Source/WebKit2/UIProcess/Plugins/PluginInfoStore.cpp -3 / +3 lines
Lines 29-35 a/Source/WebKit2/UIProcess/Plugins/PluginInfoStore.cpp_sec1
29
#if ENABLE(NETSCAPE_PLUGIN_API)
29
#if ENABLE(NETSCAPE_PLUGIN_API)
30
30
31
#include "PluginModuleInfo.h"
31
#include "PluginModuleInfo.h"
32
#include <WebCore/KURL.h>
32
#include <WebCore/URL.h>
33
#include <WebCore/MIMETypeRegistry.h>
33
#include <WebCore/MIMETypeRegistry.h>
34
#include <algorithm>
34
#include <algorithm>
35
#include <wtf/ListHashSet.h>
35
#include <wtf/ListHashSet.h>
Lines 158-164 PluginModuleInfo PluginInfoStore::findPluginForExtension(const String& extension a/Source/WebKit2/UIProcess/Plugins/PluginInfoStore.cpp_sec2
158
    return PluginModuleInfo();
158
    return PluginModuleInfo();
159
}
159
}
160
160
161
static inline String pathExtension(const KURL& url)
161
static inline String pathExtension(const URL& url)
162
{
162
{
163
    String extension;
163
    String extension;
164
    String filename = url.lastPathComponent();
164
    String filename = url.lastPathComponent();
Lines 190-196 PluginModuleInfo PluginInfoStore::findPluginWithBundleIdentifier(const String&) a/Source/WebKit2/UIProcess/Plugins/PluginInfoStore.cpp_sec3
190
190
191
#endif
191
#endif
192
192
193
PluginModuleInfo PluginInfoStore::findPlugin(String& mimeType, const KURL& url, PluginData::AllowedPluginTypes allowedPluginTypes)
193
PluginModuleInfo PluginInfoStore::findPlugin(String& mimeType, const URL& url, PluginData::AllowedPluginTypes allowedPluginTypes)
194
{
194
{
195
    loadPluginsIfNecessary();
195
    loadPluginsIfNecessary();
196
    
196
    
- a/Source/WebKit2/UIProcess/Plugins/PluginInfoStore.h -2 / +2 lines
Lines 33-39 a/Source/WebKit2/UIProcess/Plugins/PluginInfoStore.h_sec1
33
#include <WebCore/PluginData.h>
33
#include <WebCore/PluginData.h>
34
34
35
namespace WebCore {
35
namespace WebCore {
36
    class KURL;
36
    class URL;
37
}
37
}
38
38
39
namespace WebKit {
39
namespace WebKit {
Lines 63-69 public: a/Source/WebKit2/UIProcess/Plugins/PluginInfoStore.h_sec2
63
    // Returns the info for a plug-in that can handle the given MIME type.
63
    // Returns the info for a plug-in that can handle the given MIME type.
64
    // If the MIME type is null, the file extension of the given url will be used to infer the
64
    // If the MIME type is null, the file extension of the given url will be used to infer the
65
    // plug-in type. In that case, mimeType will be filled in with the right MIME type.
65
    // plug-in type. In that case, mimeType will be filled in with the right MIME type.
66
    PluginModuleInfo findPlugin(String& mimeType, const WebCore::KURL&, WebCore::PluginData::AllowedPluginTypes = WebCore::PluginData::AllPlugins);
66
    PluginModuleInfo findPlugin(String& mimeType, const WebCore::URL&, WebCore::PluginData::AllowedPluginTypes = WebCore::PluginData::AllPlugins);
67
67
68
    // Returns the info for the plug-in with the given bundle identifier.
68
    // Returns the info for the plug-in with the given bundle identifier.
69
    PluginModuleInfo findPluginWithBundleIdentifier(const String& bundleIdentifier);
69
    PluginModuleInfo findPluginWithBundleIdentifier(const String& bundleIdentifier);
- a/Source/WebKit2/UIProcess/Plugins/mac/PluginProcessProxyMac.mm -3 / +3 lines
Lines 34-40 a/Source/WebKit2/UIProcess/Plugins/mac/PluginProcessProxyMac.mm_sec1
34
#import "PluginProcessMessages.h"
34
#import "PluginProcessMessages.h"
35
#import "WebKitSystemInterface.h"
35
#import "WebKitSystemInterface.h"
36
#import <WebCore/FileSystem.h>
36
#import <WebCore/FileSystem.h>
37
#import <WebCore/KURL.h>
37
#import <WebCore/URL.h>
38
#import <WebCore/RuntimeApplicationChecks.h>
38
#import <WebCore/RuntimeApplicationChecks.h>
39
#import <crt_externs.h>
39
#import <crt_externs.h>
40
#import <mach-o/dyld.h>
40
#import <mach-o/dyld.h>
Lines 462-471 void PluginProcessProxy::openURL(const String& urlString, bool& result, int32_t& a/Source/WebKit2/UIProcess/Plugins/mac/PluginProcessProxyMac.mm_sec2
462
462
463
    result = true;
463
    result = true;
464
    CFURLRef launchedURL;
464
    CFURLRef launchedURL;
465
    status = LSOpenCFURLRef(KURL(ParsedURLString, urlString).createCFURL().get(), &launchedURL);
465
    status = LSOpenCFURLRef(URL(ParsedURLString, urlString).createCFURL().get(), &launchedURL);
466
466
467
    if (launchedURL) {
467
    if (launchedURL) {
468
        launchedURLString = KURL(launchedURL).string();
468
        launchedURLString = URL(launchedURL).string();
469
        CFRelease(launchedURL);
469
        CFRelease(launchedURL);
470
    }
470
    }
471
}
471
}
- a/Source/WebKit2/UIProcess/WebInspectorProxy.cpp -3 / +3 lines
Lines 316-324 bool WebInspectorProxy::isInspectorPage(WebPageProxy* page) a/Source/WebKit2/UIProcess/WebInspectorProxy.cpp_sec1
316
316
317
static bool isMainInspectorPage(const WebInspectorProxy* webInspectorProxy, WKURLRequestRef requestRef)
317
static bool isMainInspectorPage(const WebInspectorProxy* webInspectorProxy, WKURLRequestRef requestRef)
318
{
318
{
319
    // Use KURL so we can compare just the paths.
319
    // Use URL so we can compare just the paths.
320
    KURL inspectorURL(KURL(), webInspectorProxy->inspectorPageURL());
320
    URL inspectorURL(URL(), webInspectorProxy->inspectorPageURL());
321
    KURL requestURL(KURL(), toImpl(requestRef)->url());
321
    URL requestURL(URL(), toImpl(requestRef)->url());
322
322
323
    ASSERT(WebCore::SchemeRegistry::shouldTreatURLSchemeAsLocal(inspectorURL.protocol()));
323
    ASSERT(WebCore::SchemeRegistry::shouldTreatURLSchemeAsLocal(inspectorURL.protocol()));
324
324
- a/Source/WebKit2/UIProcess/WebOpenPanelResultListenerProxy.cpp -2 / +2 lines
Lines 28-34 a/Source/WebKit2/UIProcess/WebOpenPanelResultListenerProxy.cpp_sec1
28
28
29
#include "ImmutableArray.h"
29
#include "ImmutableArray.h"
30
#include "WebPageProxy.h"
30
#include "WebPageProxy.h"
31
#include <WebCore/KURL.h>
31
#include <WebCore/URL.h>
32
#include <wtf/Vector.h>
32
#include <wtf/Vector.h>
33
33
34
using namespace WebCore;
34
using namespace WebCore;
Lines 57-63 void WebOpenPanelResultListenerProxy::chooseFiles(ImmutableArray* fileURLsArray) a/Source/WebKit2/UIProcess/WebOpenPanelResultListenerProxy.cpp_sec2
57
    for (size_t i = 0; i < size; ++i) {
57
    for (size_t i = 0; i < size; ++i) {
58
        WebURL* webURL = fileURLsArray->at<WebURL>(i);
58
        WebURL* webURL = fileURLsArray->at<WebURL>(i);
59
        if (webURL) {
59
        if (webURL) {
60
            KURL url(KURL(), webURL->string()); 
60
            URL url(URL(), webURL->string()); 
61
            filePaths.uncheckedAppend(url.fileSystemPath());
61
            filePaths.uncheckedAppend(url.fileSystemPath());
62
        }
62
        }
63
    }
63
    }
- a/Source/WebKit2/UIProcess/WebPageGroup.cpp -2 / +2 lines
Lines 154-160 void WebPageGroup::addUserStyleSheet(const String& source, const String& baseURL a/Source/WebKit2/UIProcess/WebPageGroup.cpp_sec1
154
    if (source.isEmpty())
154
    if (source.isEmpty())
155
        return;
155
        return;
156
156
157
    WebCore::UserStyleSheet userStyleSheet = WebCore::UserStyleSheet(source, (baseURL.isEmpty() ? WebCore::blankURL() : WebCore::KURL(WebCore::KURL(), baseURL)), toStringVector(whitelist), toStringVector(blacklist), injectedFrames, level);
157
    WebCore::UserStyleSheet userStyleSheet = WebCore::UserStyleSheet(source, (baseURL.isEmpty() ? WebCore::blankURL() : WebCore::URL(WebCore::URL(), baseURL)), toStringVector(whitelist), toStringVector(blacklist), injectedFrames, level);
158
158
159
    m_data.userStyleSheets.append(userStyleSheet);
159
    m_data.userStyleSheets.append(userStyleSheet);
160
    sendToAllProcessesInGroup(Messages::WebPageGroupProxy::AddUserStyleSheet(userStyleSheet), m_data.pageGroupID);
160
    sendToAllProcessesInGroup(Messages::WebPageGroupProxy::AddUserStyleSheet(userStyleSheet), m_data.pageGroupID);
Lines 165-171 void WebPageGroup::addUserScript(const String& source, const String& baseURL, Im a/Source/WebKit2/UIProcess/WebPageGroup.cpp_sec2
165
    if (source.isEmpty())
165
    if (source.isEmpty())
166
        return;
166
        return;
167
167
168
    WebCore::UserScript userScript = WebCore::UserScript(source, (baseURL.isEmpty() ? WebCore::blankURL() : WebCore::KURL(WebCore::KURL(), baseURL)), toStringVector(whitelist), toStringVector(blacklist), injectionTime, injectedFrames);
168
    WebCore::UserScript userScript = WebCore::UserScript(source, (baseURL.isEmpty() ? WebCore::blankURL() : WebCore::URL(WebCore::URL(), baseURL)), toStringVector(whitelist), toStringVector(blacklist), injectionTime, injectedFrames);
169
169
170
    m_data.userScripts.append(userScript);
170
    m_data.userScripts.append(userScript);
171
    sendToAllProcessesInGroup(Messages::WebPageGroupProxy::AddUserScript(userScript), m_data.pageGroupID);
171
    sendToAllProcessesInGroup(Messages::WebPageGroupProxy::AddUserScript(userScript), m_data.pageGroupID);
- a/Source/WebKit2/UIProcess/WebPageProxy.cpp -15 / +15 lines
Lines 656-662 bool WebPageProxy::tryClose() a/Source/WebKit2/UIProcess/WebPageProxy.cpp_sec1
656
    return false;
656
    return false;
657
}
657
}
658
658
659
bool WebPageProxy::maybeInitializeSandboxExtensionHandle(const KURL& url, SandboxExtension::Handle& sandboxExtensionHandle)
659
bool WebPageProxy::maybeInitializeSandboxExtensionHandle(const URL& url, SandboxExtension::Handle& sandboxExtensionHandle)
660
{
660
{
661
    if (!url.isLocalFile())
661
    if (!url.isLocalFile())
662
        return false;
662
        return false;
Lines 679-685 void WebPageProxy::loadURL(const String& url, APIObject* userData) a/Source/WebKit2/UIProcess/WebPageProxy.cpp_sec2
679
        reattachToWebProcess();
679
        reattachToWebProcess();
680
680
681
    SandboxExtension::Handle sandboxExtensionHandle;
681
    SandboxExtension::Handle sandboxExtensionHandle;
682
    bool createdExtension = maybeInitializeSandboxExtensionHandle(KURL(KURL(), url), sandboxExtensionHandle);
682
    bool createdExtension = maybeInitializeSandboxExtensionHandle(URL(URL(), url), sandboxExtensionHandle);
683
    if (createdExtension)
683
    if (createdExtension)
684
        m_process->willAcquireUniversalFileReadSandboxExtension();
684
        m_process->willAcquireUniversalFileReadSandboxExtension();
685
    m_process->send(Messages::WebPage::LoadURL(url, sandboxExtensionHandle, WebContextUserMessageEncoder(userData)), m_pageID);
685
    m_process->send(Messages::WebPage::LoadURL(url, sandboxExtensionHandle, WebContextUserMessageEncoder(userData)), m_pageID);
Lines 706-720 void WebPageProxy::loadFile(const String& fileURLString, const String& resourceD a/Source/WebKit2/UIProcess/WebPageProxy.cpp_sec3
706
    if (!isValid())
706
    if (!isValid())
707
        reattachToWebProcess();
707
        reattachToWebProcess();
708
708
709
    KURL fileURL = KURL(KURL(), fileURLString);
709
    URL fileURL = URL(URL(), fileURLString);
710
    if (!fileURL.isLocalFile())
710
    if (!fileURL.isLocalFile())
711
        return;
711
        return;
712
712
713
    KURL resourceDirectoryURL;
713
    URL resourceDirectoryURL;
714
    if (resourceDirectoryURLString.isNull())
714
    if (resourceDirectoryURLString.isNull())
715
        resourceDirectoryURL = KURL(ParsedURLString, ASCIILiteral("file:///"));
715
        resourceDirectoryURL = URL(ParsedURLString, ASCIILiteral("file:///"));
716
    else {
716
    else {
717
        resourceDirectoryURL = KURL(KURL(), resourceDirectoryURLString);
717
        resourceDirectoryURL = URL(URL(), resourceDirectoryURLString);
718
        if (!resourceDirectoryURL.isLocalFile())
718
        if (!resourceDirectoryURL.isLocalFile())
719
            return;
719
            return;
720
    }
720
    }
Lines 797-803 void WebPageProxy::reload(bool reloadFromOrigin) a/Source/WebKit2/UIProcess/WebPageProxy.cpp_sec4
797
        setPendingAPIRequestURL(url);
797
        setPendingAPIRequestURL(url);
798
798
799
        // We may not have an extension yet if back/forward list was reinstated after a WebProcess crash or a browser relaunch
799
        // We may not have an extension yet if back/forward list was reinstated after a WebProcess crash or a browser relaunch
800
        bool createdExtension = maybeInitializeSandboxExtensionHandle(KURL(KURL(), url), sandboxExtensionHandle);
800
        bool createdExtension = maybeInitializeSandboxExtensionHandle(URL(URL(), url), sandboxExtensionHandle);
801
        if (createdExtension)
801
        if (createdExtension)
802
            m_process->willAcquireUniversalFileReadSandboxExtension();
802
            m_process->willAcquireUniversalFileReadSandboxExtension();
803
    }
803
    }
Lines 952-958 bool WebPageProxy::canShowMIMEType(const String& mimeType) const a/Source/WebKit2/UIProcess/WebPageProxy.cpp_sec5
952
952
953
#if ENABLE(NETSCAPE_PLUGIN_API)
953
#if ENABLE(NETSCAPE_PLUGIN_API)
954
    String newMimeType = mimeType;
954
    String newMimeType = mimeType;
955
    PluginModuleInfo plugin = m_process->context()->pluginInfoStore().findPlugin(newMimeType, KURL());
955
    PluginModuleInfo plugin = m_process->context()->pluginInfoStore().findPlugin(newMimeType, URL());
956
    if (!plugin.path.isNull() && m_pageGroup->preferences()->pluginsEnabled())
956
    if (!plugin.path.isNull() && m_pageGroup->preferences()->pluginsEnabled())
957
        return true;
957
        return true;
958
#endif // ENABLE(NETSCAPE_PLUGIN_API)
958
#endif // ENABLE(NETSCAPE_PLUGIN_API)
Lines 1429-1435 void WebPageProxy::findPlugin(const String& mimeType, uint32_t processType, cons a/Source/WebKit2/UIProcess/WebPageProxy.cpp_sec6
1429
    pluginLoadPolicy = PluginModuleLoadNormally;
1429
    pluginLoadPolicy = PluginModuleLoadNormally;
1430
1430
1431
    PluginData::AllowedPluginTypes allowedPluginTypes = allowOnlyApplicationPlugins ? PluginData::OnlyApplicationPlugins : PluginData::AllPlugins;
1431
    PluginData::AllowedPluginTypes allowedPluginTypes = allowOnlyApplicationPlugins ? PluginData::OnlyApplicationPlugins : PluginData::AllPlugins;
1432
    PluginModuleInfo plugin = m_process->context()->pluginInfoStore().findPlugin(newMimeType, KURL(KURL(), urlString), allowedPluginTypes);
1432
    PluginModuleInfo plugin = m_process->context()->pluginInfoStore().findPlugin(newMimeType, URL(URL(), urlString), allowedPluginTypes);
1433
    if (!plugin.path) {
1433
    if (!plugin.path) {
1434
        pluginProcessToken = 0;
1434
        pluginProcessToken = 0;
1435
        return;
1435
        return;
Lines 2710-2716 void WebPageProxy::unavailablePluginButtonClicked(uint32_t opaquePluginUnavailab a/Source/WebKit2/UIProcess/WebPageProxy.cpp_sec7
2710
    RefPtr<ImmutableDictionary> pluginInformation;
2710
    RefPtr<ImmutableDictionary> pluginInformation;
2711
#if ENABLE(NETSCAPE_PLUGIN_API)
2711
#if ENABLE(NETSCAPE_PLUGIN_API)
2712
    String newMimeType = mimeType;
2712
    String newMimeType = mimeType;
2713
    PluginModuleInfo plugin = m_process->context()->pluginInfoStore().findPlugin(newMimeType, KURL(KURL(), pluginURLString));
2713
    PluginModuleInfo plugin = m_process->context()->pluginInfoStore().findPlugin(newMimeType, URL(URL(), pluginURLString));
2714
    pluginInformation = createPluginInformationDictionary(plugin, frameURLString, mimeType, pageURLString, pluginspageAttributeURLString, pluginURLString);
2714
    pluginInformation = createPluginInformationDictionary(plugin, frameURLString, mimeType, pageURLString, pluginspageAttributeURLString, pluginURLString);
2715
#endif
2715
#endif
2716
2716
Lines 3007-3013 void WebPageProxy::backForwardGoToItem(uint64_t itemID, SandboxExtension::Handle a/Source/WebKit2/UIProcess/WebPageProxy.cpp_sec8
3007
    if (!item)
3007
    if (!item)
3008
        return;
3008
        return;
3009
3009
3010
    bool createdExtension = maybeInitializeSandboxExtensionHandle(KURL(KURL(), item->url()), sandboxExtensionHandle);
3010
    bool createdExtension = maybeInitializeSandboxExtensionHandle(URL(URL(), item->url()), sandboxExtensionHandle);
3011
    if (createdExtension)
3011
    if (createdExtension)
3012
        m_process->willAcquireUniversalFileReadSandboxExtension();
3012
        m_process->willAcquireUniversalFileReadSandboxExtension();
3013
    m_backForwardList->goToItem(item);
3013
    m_backForwardList->goToItem(item);
Lines 3289-3303 void WebPageProxy::contextMenuItemSelected(const WebContextMenuItemData& item) a/Source/WebKit2/UIProcess/WebPageProxy.cpp_sec9
3289
    }
3289
    }
3290
#endif
3290
#endif
3291
    if (item.action() == ContextMenuItemTagDownloadImageToDisk) {
3291
    if (item.action() == ContextMenuItemTagDownloadImageToDisk) {
3292
        m_process->context()->download(this, KURL(KURL(), m_activeContextMenuHitTestResultData.absoluteImageURL));
3292
        m_process->context()->download(this, URL(URL(), m_activeContextMenuHitTestResultData.absoluteImageURL));
3293
        return;    
3293
        return;    
3294
    }
3294
    }
3295
    if (item.action() == ContextMenuItemTagDownloadLinkToDisk) {
3295
    if (item.action() == ContextMenuItemTagDownloadLinkToDisk) {
3296
        m_process->context()->download(this, KURL(KURL(), m_activeContextMenuHitTestResultData.absoluteLinkURL));
3296
        m_process->context()->download(this, URL(URL(), m_activeContextMenuHitTestResultData.absoluteLinkURL));
3297
        return;
3297
        return;
3298
    }
3298
    }
3299
    if (item.action() == ContextMenuItemTagDownloadMediaToDisk) {
3299
    if (item.action() == ContextMenuItemTagDownloadMediaToDisk) {
3300
        m_process->context()->download(this, KURL(KURL(), m_activeContextMenuHitTestResultData.absoluteMediaURL));
3300
        m_process->context()->download(this, URL(URL(), m_activeContextMenuHitTestResultData.absoluteMediaURL));
3301
        return;
3301
        return;
3302
    }
3302
    }
3303
    if (item.action() == ContextMenuItemTagCheckSpellingWhileTyping) {
3303
    if (item.action() == ContextMenuItemTagCheckSpellingWhileTyping) {
Lines 4157-4163 void WebPageProxy::didBlockInsecurePluginVersion(const String& mimeType, const S a/Source/WebKit2/UIProcess/WebPageProxy.cpp_sec10
4157
4157
4158
#if PLATFORM(MAC) && ENABLE(NETSCAPE_PLUGIN_API)
4158
#if PLATFORM(MAC) && ENABLE(NETSCAPE_PLUGIN_API)
4159
    String newMimeType = mimeType;
4159
    String newMimeType = mimeType;
4160
    PluginModuleInfo plugin = m_process->context()->pluginInfoStore().findPlugin(newMimeType, KURL(KURL(), pluginURLString));
4160
    PluginModuleInfo plugin = m_process->context()->pluginInfoStore().findPlugin(newMimeType, URL(URL(), pluginURLString));
4161
    pluginInformation = createPluginInformationDictionary(plugin, frameURLString, mimeType, pageURLString, String(), String(), replacementObscured);
4161
    pluginInformation = createPluginInformationDictionary(plugin, frameURLString, mimeType, pageURLString, String(), String(), replacementObscured);
4162
#else
4162
#else
4163
    UNUSED_PARAM(mimeType);
4163
    UNUSED_PARAM(mimeType);
- a/Source/WebKit2/UIProcess/WebPageProxy.h -1 / +1 lines
Lines 1014-1020 private: a/Source/WebKit2/UIProcess/WebPageProxy.h_sec1
1014
    void clearPendingAPIRequestURL() { m_pendingAPIRequestURL = String(); }
1014
    void clearPendingAPIRequestURL() { m_pendingAPIRequestURL = String(); }
1015
    void setPendingAPIRequestURL(const String& pendingAPIRequestURL) { m_pendingAPIRequestURL = pendingAPIRequestURL; }
1015
    void setPendingAPIRequestURL(const String& pendingAPIRequestURL) { m_pendingAPIRequestURL = pendingAPIRequestURL; }
1016
1016
1017
    bool maybeInitializeSandboxExtensionHandle(const WebCore::KURL&, SandboxExtension::Handle&);
1017
    bool maybeInitializeSandboxExtensionHandle(const WebCore::URL&, SandboxExtension::Handle&);
1018
1018
1019
#if PLATFORM(MAC)
1019
#if PLATFORM(MAC)
1020
    void substitutionsPanelIsShowing(bool&);
1020
    void substitutionsPanelIsShowing(bool&);
- a/Source/WebKit2/UIProcess/WebProcessProxy.cpp -8 / +8 lines
Lines 41-47 a/Source/WebKit2/UIProcess/WebProcessProxy.cpp_sec1
41
#include "WebPluginSiteDataManager.h"
41
#include "WebPluginSiteDataManager.h"
42
#include "WebProcessMessages.h"
42
#include "WebProcessMessages.h"
43
#include "WebProcessProxyMessages.h"
43
#include "WebProcessProxyMessages.h"
44
#include <WebCore/KURL.h>
44
#include <WebCore/URL.h>
45
#include <WebCore/RunLoop.h>
45
#include <WebCore/RunLoop.h>
46
#include <WebCore/SuddenTermination.h>
46
#include <WebCore/SuddenTermination.h>
47
#include <stdio.h>
47
#include <stdio.h>
Lines 225-237 void WebProcessProxy::registerNewWebBackForwardListItem(WebBackForwardListItem* a/Source/WebKit2/UIProcess/WebProcessProxy.cpp_sec2
225
225
226
void WebProcessProxy::assumeReadAccessToBaseURL(const String& urlString)
226
void WebProcessProxy::assumeReadAccessToBaseURL(const String& urlString)
227
{
227
{
228
    KURL url(KURL(), urlString);
228
    URL url(URL(), urlString);
229
    if (!url.isLocalFile())
229
    if (!url.isLocalFile())
230
        return;
230
        return;
231
231
232
    // There's a chance that urlString does not point to a directory.
232
    // There's a chance that urlString does not point to a directory.
233
    // Get url's base URL to add to m_localPathsWithAssumedReadAccess.
233
    // Get url's base URL to add to m_localPathsWithAssumedReadAccess.
234
    KURL baseURL(KURL(), url.baseAsString());
234
    URL baseURL(URL(), url.baseAsString());
235
    
235
    
236
    // Client loads an alternate string. This doesn't grant universal file read, but the web process is assumed
236
    // Client loads an alternate string. This doesn't grant universal file read, but the web process is assumed
237
    // to have read access to this directory already.
237
    // to have read access to this directory already.
Lines 240-249 void WebProcessProxy::assumeReadAccessToBaseURL(const String& urlString) a/Source/WebKit2/UIProcess/WebProcessProxy.cpp_sec3
240
240
241
bool WebProcessProxy::checkURLReceivedFromWebProcess(const String& urlString)
241
bool WebProcessProxy::checkURLReceivedFromWebProcess(const String& urlString)
242
{
242
{
243
    return checkURLReceivedFromWebProcess(KURL(KURL(), urlString));
243
    return checkURLReceivedFromWebProcess(URL(URL(), urlString));
244
}
244
}
245
245
246
bool WebProcessProxy::checkURLReceivedFromWebProcess(const KURL& url)
246
bool WebProcessProxy::checkURLReceivedFromWebProcess(const URL& url)
247
{
247
{
248
    // FIXME: Consider checking that the URL is valid. Currently, WebProcess sends invalid URLs in many cases, but it probably doesn't have good reasons to do that.
248
    // FIXME: Consider checking that the URL is valid. Currently, WebProcess sends invalid URLs in many cases, but it probably doesn't have good reasons to do that.
249
249
Lines 256-262 bool WebProcessProxy::checkURLReceivedFromWebProcess(const KURL& url) a/Source/WebKit2/UIProcess/WebProcessProxy.cpp_sec4
256
        return true;
256
        return true;
257
257
258
    // If we loaded a string with a file base URL before, loading resources from that subdirectory is fine.
258
    // If we loaded a string with a file base URL before, loading resources from that subdirectory is fine.
259
    // There are no ".." components, because all URLs received from WebProcess are parsed with KURL, which removes those.
259
    // There are no ".." components, because all URLs received from WebProcess are parsed with URL, which removes those.
260
    String path = url.fileSystemPath();
260
    String path = url.fileSystemPath();
261
    for (HashSet<String>::const_iterator iter = m_localPathsWithAssumedReadAccess.begin(); iter != m_localPathsWithAssumedReadAccess.end(); ++iter) {
261
    for (HashSet<String>::const_iterator iter = m_localPathsWithAssumedReadAccess.begin(); iter != m_localPathsWithAssumedReadAccess.end(); ++iter) {
262
        if (path.startsWith(*iter))
262
        if (path.startsWith(*iter))
Lines 266-274 bool WebProcessProxy::checkURLReceivedFromWebProcess(const KURL& url) a/Source/WebKit2/UIProcess/WebProcessProxy.cpp_sec5
266
    // Items in back/forward list have been already checked.
266
    // Items in back/forward list have been already checked.
267
    // One case where we don't have sandbox extensions for file URLs in b/f list is if the list has been reinstated after a crash or a browser restart.
267
    // One case where we don't have sandbox extensions for file URLs in b/f list is if the list has been reinstated after a crash or a browser restart.
268
    for (WebBackForwardListItemMap::iterator iter = m_backForwardListItemMap.begin(), end = m_backForwardListItemMap.end(); iter != end; ++iter) {
268
    for (WebBackForwardListItemMap::iterator iter = m_backForwardListItemMap.begin(), end = m_backForwardListItemMap.end(); iter != end; ++iter) {
269
        if (KURL(KURL(), iter->value->url()).fileSystemPath() == path)
269
        if (URL(URL(), iter->value->url()).fileSystemPath() == path)
270
            return true;
270
            return true;
271
        if (KURL(KURL(), iter->value->originalURL()).fileSystemPath() == path)
271
        if (URL(URL(), iter->value->originalURL()).fileSystemPath() == path)
272
            return true;
272
            return true;
273
    }
273
    }
274
274
- a/Source/WebKit2/UIProcess/WebProcessProxy.h -2 / +2 lines
Lines 46-52 a/Source/WebKit2/UIProcess/WebProcessProxy.h_sec1
46
#endif
46
#endif
47
47
48
namespace WebCore {
48
namespace WebCore {
49
class KURL;
49
class URL;
50
struct PluginInfo;
50
struct PluginInfo;
51
};
51
};
52
52
Lines 100-106 public: a/Source/WebKit2/UIProcess/WebProcessProxy.h_sec2
100
    void assumeReadAccessToBaseURL(const String&);
100
    void assumeReadAccessToBaseURL(const String&);
101
101
102
    bool checkURLReceivedFromWebProcess(const String&);
102
    bool checkURLReceivedFromWebProcess(const String&);
103
    bool checkURLReceivedFromWebProcess(const WebCore::KURL&);
103
    bool checkURLReceivedFromWebProcess(const WebCore::URL&);
104
104
105
    static bool fullKeyboardAccessEnabled();
105
    static bool fullKeyboardAccessEnabled();
106
106
- a/Source/WebKit2/UIProcess/mac/WebContextMac.mm -1 / +1 lines
Lines 600-606 static CFURLStorageSessionRef privateBrowsingSession() a/Source/WebKit2/UIProcess/mac/WebContextMac.mm_sec1
600
bool WebContext::isURLKnownHSTSHost(const String& urlString, bool privateBrowsingEnabled) const
600
bool WebContext::isURLKnownHSTSHost(const String& urlString, bool privateBrowsingEnabled) const
601
{
601
{
602
#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
602
#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
603
    RetainPtr<CFURLRef> url = KURL(KURL(), urlString).createCFURL();
603
    RetainPtr<CFURLRef> url = URL(URL(), urlString).createCFURL();
604
604
605
    return _CFNetworkIsKnownHSTSHostWithSession(url.get(), privateBrowsingEnabled ? privateBrowsingSession() : nullptr);
605
    return _CFNetworkIsKnownHSTSHostWithSession(url.get(), privateBrowsingEnabled ? privateBrowsingSession() : nullptr);
606
#else
606
#else
- a/Source/WebKit2/WebProcess/FileAPI/BlobRegistryProxy.cpp -3 / +3 lines
Lines 39-59 using namespace WebCore; a/Source/WebKit2/WebProcess/FileAPI/BlobRegistryProxy.cpp_sec1
39
39
40
namespace WebKit {
40
namespace WebKit {
41
41
42
void BlobRegistryProxy::registerBlobURL(const KURL& url, PassOwnPtr<BlobData> blobData)
42
void BlobRegistryProxy::registerBlobURL(const URL& url, PassOwnPtr<BlobData> blobData)
43
{
43
{
44
    ASSERT(WebProcess::shared().usesNetworkProcess());
44
    ASSERT(WebProcess::shared().usesNetworkProcess());
45
45
46
    WebProcess::shared().networkConnection()->connection()->send(Messages::NetworkConnectionToWebProcess::RegisterBlobURL(url, BlobRegistrationData(blobData)), 0);
46
    WebProcess::shared().networkConnection()->connection()->send(Messages::NetworkConnectionToWebProcess::RegisterBlobURL(url, BlobRegistrationData(blobData)), 0);
47
}
47
}
48
48
49
void BlobRegistryProxy::registerBlobURL(const KURL& url, const KURL& srcURL)
49
void BlobRegistryProxy::registerBlobURL(const URL& url, const URL& srcURL)
50
{
50
{
51
    ASSERT(WebProcess::shared().usesNetworkProcess());
51
    ASSERT(WebProcess::shared().usesNetworkProcess());
52
52
53
    WebProcess::shared().networkConnection()->connection()->send(Messages::NetworkConnectionToWebProcess::RegisterBlobURLFromURL(url, srcURL), 0);
53
    WebProcess::shared().networkConnection()->connection()->send(Messages::NetworkConnectionToWebProcess::RegisterBlobURLFromURL(url, srcURL), 0);
54
}
54
}
55
55
56
void BlobRegistryProxy::unregisterBlobURL(const KURL& url)
56
void BlobRegistryProxy::unregisterBlobURL(const URL& url)
57
{
57
{
58
    ASSERT(WebProcess::shared().usesNetworkProcess());
58
    ASSERT(WebProcess::shared().usesNetworkProcess());
59
59
- a/Source/WebKit2/WebProcess/FileAPI/BlobRegistryProxy.h -3 / +3 lines
Lines 34-42 namespace WebKit { a/Source/WebKit2/WebProcess/FileAPI/BlobRegistryProxy.h_sec1
34
34
35
class BlobRegistryProxy : public WebCore::BlobRegistry {
35
class BlobRegistryProxy : public WebCore::BlobRegistry {
36
public:
36
public:
37
    virtual void registerBlobURL(const WebCore::KURL&, PassOwnPtr<WebCore::BlobData>);
37
    virtual void registerBlobURL(const WebCore::URL&, PassOwnPtr<WebCore::BlobData>);
38
    virtual void registerBlobURL(const WebCore::KURL&, const WebCore::KURL& srcURL);
38
    virtual void registerBlobURL(const WebCore::URL&, const WebCore::URL& srcURL);
39
    virtual void unregisterBlobURL(const WebCore::KURL&);
39
    virtual void unregisterBlobURL(const WebCore::URL&);
40
};
40
};
41
41
42
}
42
}
- a/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp -3 / +3 lines
Lines 159-165 WKStringRef WKBundleFrameCopyLayerTreeAsText(WKBundleFrameRef frameRef) a/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp_sec1
159
159
160
bool WKBundleFrameAllowsFollowingLink(WKBundleFrameRef frameRef, WKURLRef urlRef)
160
bool WKBundleFrameAllowsFollowingLink(WKBundleFrameRef frameRef, WKURLRef urlRef)
161
{
161
{
162
    return toImpl(frameRef)->allowsFollowingLink(WebCore::KURL(WebCore::KURL(), toWTFString(urlRef)));
162
    return toImpl(frameRef)->allowsFollowingLink(WebCore::URL(WebCore::URL(), toWTFString(urlRef)));
163
}
163
}
164
164
165
bool WKBundleFrameHandlesPageScaleGesture(WKBundleFrameRef frameRef)
165
bool WKBundleFrameHandlesPageScaleGesture(WKBundleFrameRef frameRef)
Lines 204-215 bool WKBundleFrameGetDocumentBackgroundColor(WKBundleFrameRef frameRef, double* a/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp_sec2
204
204
205
WKStringRef WKBundleFrameCopySuggestedFilenameForResourceWithURL(WKBundleFrameRef frameRef, WKURLRef urlRef)
205
WKStringRef WKBundleFrameCopySuggestedFilenameForResourceWithURL(WKBundleFrameRef frameRef, WKURLRef urlRef)
206
{
206
{
207
    return toCopiedAPI(toImpl(frameRef)->suggestedFilenameForResourceWithURL(WebCore::KURL(WebCore::KURL(), toWTFString(urlRef))));
207
    return toCopiedAPI(toImpl(frameRef)->suggestedFilenameForResourceWithURL(WebCore::URL(WebCore::URL(), toWTFString(urlRef))));
208
}
208
}
209
209
210
WKStringRef WKBundleFrameCopyMIMETypeForResourceWithURL(WKBundleFrameRef frameRef, WKURLRef urlRef)
210
WKStringRef WKBundleFrameCopyMIMETypeForResourceWithURL(WKBundleFrameRef frameRef, WKURLRef urlRef)
211
{
211
{
212
    return toCopiedAPI(toImpl(frameRef)->mimeTypeForResourceWithURL(WebCore::KURL(WebCore::KURL(), toWTFString(urlRef))));
212
    return toCopiedAPI(toImpl(frameRef)->mimeTypeForResourceWithURL(WebCore::URL(WebCore::URL(), toWTFString(urlRef))));
213
}
213
}
214
214
215
bool WKBundleFrameContainsAnyFormElements(WKBundleFrameRef frameRef)
215
bool WKBundleFrameContainsAnyFormElements(WKBundleFrameRef frameRef)
- a/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp -2 / +2 lines
Lines 50-56 a/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp_sec1
50
#include <WebCore/AXObjectCache.h>
50
#include <WebCore/AXObjectCache.h>
51
#include <WebCore/AccessibilityObject.h>
51
#include <WebCore/AccessibilityObject.h>
52
#include <WebCore/Frame.h>
52
#include <WebCore/Frame.h>
53
#include <WebCore/KURL.h>
53
#include <WebCore/URL.h>
54
#include <WebCore/Page.h>
54
#include <WebCore/Page.h>
55
#include <wtf/StdLibExtras.h>
55
#include <wtf/StdLibExtras.h>
56
56
Lines 365-371 void WKBundlePageSetFooterBanner(WKBundlePageRef pageRef, WKBundlePageBannerRef a/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp_sec2
365
365
366
bool WKBundlePageHasLocalDataForURL(WKBundlePageRef pageRef, WKURLRef urlRef)
366
bool WKBundlePageHasLocalDataForURL(WKBundlePageRef pageRef, WKURLRef urlRef)
367
{
367
{
368
    return toImpl(pageRef)->hasLocalDataForURL(WebCore::KURL(WebCore::KURL(), toWTFString(urlRef)));
368
    return toImpl(pageRef)->hasLocalDataForURL(WebCore::URL(WebCore::URL(), toWTFString(urlRef)));
369
}
369
}
370
370
371
bool WKBundlePageCanHandleRequest(WKURLRequestRef requestRef)
371
bool WKBundlePageCanHandleRequest(WKURLRequestRef requestRef)
- a/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp -9 / +9 lines
Lines 492-517 static Vector<String> toStringVector(ImmutableArray* patterns) a/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp_sec1
492
492
493
void InjectedBundle::addUserScript(WebPageGroupProxy* pageGroup, InjectedBundleScriptWorld* scriptWorld, const String& source, const String& url, ImmutableArray* whitelist, ImmutableArray* blacklist, WebCore::UserScriptInjectionTime injectionTime, WebCore::UserContentInjectedFrames injectedFrames)
493
void InjectedBundle::addUserScript(WebPageGroupProxy* pageGroup, InjectedBundleScriptWorld* scriptWorld, const String& source, const String& url, ImmutableArray* whitelist, ImmutableArray* blacklist, WebCore::UserScriptInjectionTime injectionTime, WebCore::UserContentInjectedFrames injectedFrames)
494
{
494
{
495
    // url is not from KURL::string(), i.e. it has not already been parsed by KURL, so we have to use the relative URL constructor for KURL instead of the ParsedURLStringTag version.
495
    // url is not from URL::string(), i.e. it has not already been parsed by URL, so we have to use the relative URL constructor for URL instead of the ParsedURLStringTag version.
496
    PageGroup::pageGroup(pageGroup->identifier())->addUserScriptToWorld(scriptWorld->coreWorld(), source, KURL(KURL(), url), toStringVector(whitelist), toStringVector(blacklist), injectionTime, injectedFrames);
496
    PageGroup::pageGroup(pageGroup->identifier())->addUserScriptToWorld(scriptWorld->coreWorld(), source, URL(URL(), url), toStringVector(whitelist), toStringVector(blacklist), injectionTime, injectedFrames);
497
}
497
}
498
498
499
void InjectedBundle::addUserStyleSheet(WebPageGroupProxy* pageGroup, InjectedBundleScriptWorld* scriptWorld, const String& source, const String& url, ImmutableArray* whitelist, ImmutableArray* blacklist, WebCore::UserContentInjectedFrames injectedFrames)
499
void InjectedBundle::addUserStyleSheet(WebPageGroupProxy* pageGroup, InjectedBundleScriptWorld* scriptWorld, const String& source, const String& url, ImmutableArray* whitelist, ImmutableArray* blacklist, WebCore::UserContentInjectedFrames injectedFrames)
500
{
500
{
501
    // url is not from KURL::string(), i.e. it has not already been parsed by KURL, so we have to use the relative URL constructor for KURL instead of the ParsedURLStringTag version.
501
    // url is not from URL::string(), i.e. it has not already been parsed by URL, so we have to use the relative URL constructor for URL instead of the ParsedURLStringTag version.
502
    PageGroup::pageGroup(pageGroup->identifier())->addUserStyleSheetToWorld(scriptWorld->coreWorld(), source, KURL(KURL(), url), toStringVector(whitelist), toStringVector(blacklist), injectedFrames);
502
    PageGroup::pageGroup(pageGroup->identifier())->addUserStyleSheetToWorld(scriptWorld->coreWorld(), source, URL(URL(), url), toStringVector(whitelist), toStringVector(blacklist), injectedFrames);
503
}
503
}
504
504
505
void InjectedBundle::removeUserScript(WebPageGroupProxy* pageGroup, InjectedBundleScriptWorld* scriptWorld, const String& url)
505
void InjectedBundle::removeUserScript(WebPageGroupProxy* pageGroup, InjectedBundleScriptWorld* scriptWorld, const String& url)
506
{
506
{
507
    // url is not from KURL::string(), i.e. it has not already been parsed by KURL, so we have to use the relative URL constructor for KURL instead of the ParsedURLStringTag version.
507
    // url is not from URL::string(), i.e. it has not already been parsed by URL, so we have to use the relative URL constructor for URL instead of the ParsedURLStringTag version.
508
    PageGroup::pageGroup(pageGroup->identifier())->removeUserScriptFromWorld(scriptWorld->coreWorld(), KURL(KURL(), url));
508
    PageGroup::pageGroup(pageGroup->identifier())->removeUserScriptFromWorld(scriptWorld->coreWorld(), URL(URL(), url));
509
}
509
}
510
510
511
void InjectedBundle::removeUserStyleSheet(WebPageGroupProxy* pageGroup, InjectedBundleScriptWorld* scriptWorld, const String& url)
511
void InjectedBundle::removeUserStyleSheet(WebPageGroupProxy* pageGroup, InjectedBundleScriptWorld* scriptWorld, const String& url)
512
{
512
{
513
    // url is not from KURL::string(), i.e. it has not already been parsed by KURL, so we have to use the relative URL constructor for KURL instead of the ParsedURLStringTag version.
513
    // url is not from URL::string(), i.e. it has not already been parsed by URL, so we have to use the relative URL constructor for URL instead of the ParsedURLStringTag version.
514
    PageGroup::pageGroup(pageGroup->identifier())->removeUserStyleSheetFromWorld(scriptWorld->coreWorld(), KURL(KURL(), url));
514
    PageGroup::pageGroup(pageGroup->identifier())->removeUserStyleSheetFromWorld(scriptWorld->coreWorld(), URL(URL(), url));
515
}
515
}
516
516
517
void InjectedBundle::removeUserScripts(WebPageGroupProxy* pageGroup, InjectedBundleScriptWorld* scriptWorld)
517
void InjectedBundle::removeUserScripts(WebPageGroupProxy* pageGroup, InjectedBundleScriptWorld* scriptWorld)
Lines 589-595 void InjectedBundle::setUserStyleSheetLocation(WebPageGroupProxy* pageGroup, con a/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp_sec2
589
{
589
{
590
    const HashSet<Page*>& pages = PageGroup::pageGroup(pageGroup->identifier())->pages();
590
    const HashSet<Page*>& pages = PageGroup::pageGroup(pageGroup->identifier())->pages();
591
    for (HashSet<Page*>::iterator iter = pages.begin(); iter != pages.end(); ++iter)
591
    for (HashSet<Page*>::iterator iter = pages.begin(); iter != pages.end(); ++iter)
592
        (*iter)->settings().setUserStyleSheetLocation(KURL(KURL(), location));
592
        (*iter)->settings().setUserStyleSheetLocation(URL(URL(), location));
593
}
593
}
594
594
595
void InjectedBundle::setWebNotificationPermission(WebPage* page, const String& originString, bool allowed)
595
void InjectedBundle::setWebNotificationPermission(WebPage* page, const String& originString, bool allowed)
- a/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp -1 / +1 lines
Lines 34-40 a/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp_sec1
34
#include <WebCore/Frame.h>
34
#include <WebCore/Frame.h>
35
#include <WebCore/FrameLoader.h>
35
#include <WebCore/FrameLoader.h>
36
#include <WebCore/FrameView.h>
36
#include <WebCore/FrameView.h>
37
#include <WebCore/KURL.h>
37
#include <WebCore/URL.h>
38
#include <wtf/text/WTFString.h>
38
#include <wtf/text/WTFString.h>
39
39
40
using namespace WebCore;
40
using namespace WebCore;
- a/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp -1 / +1 lines
Lines 55-61 static void releaseSharedBuffer(unsigned char*, const void* data) a/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp_sec1
55
    static_cast<SharedBuffer*>(const_cast<void*>(data))->deref();
55
    static_cast<SharedBuffer*>(const_cast<void*>(data))->deref();
56
}
56
}
57
57
58
void InjectedBundlePageLoaderClient::willLoadDataRequest(WebPage* page, const ResourceRequest& request, const SharedBuffer* data, const String& MIMEType, const String& encodingName, const KURL& unreachableURL, APIObject* userData)
58
void InjectedBundlePageLoaderClient::willLoadDataRequest(WebPage* page, const ResourceRequest& request, const SharedBuffer* data, const String& MIMEType, const String& encodingName, const URL& unreachableURL, APIObject* userData)
59
{
59
{
60
    if (!m_client.willLoadDataRequest)
60
    if (!m_client.willLoadDataRequest)
61
        return;
61
        return;
- a/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h -2 / +2 lines
Lines 37-43 a/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h_sec1
37
namespace WebCore {
37
namespace WebCore {
38
class DOMWindowExtension;
38
class DOMWindowExtension;
39
class DOMWrapperWorld;
39
class DOMWrapperWorld;
40
class KURL;
40
class URL;
41
class ResourceError;
41
class ResourceError;
42
class ResourceRequest;
42
class ResourceRequest;
43
class ResourceResponse;
43
class ResourceResponse;
Lines 54-60 class WebFrame; a/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h_sec2
54
class InjectedBundlePageLoaderClient : public APIClient<WKBundlePageLoaderClient, kWKBundlePageLoaderClientCurrentVersion> {
54
class InjectedBundlePageLoaderClient : public APIClient<WKBundlePageLoaderClient, kWKBundlePageLoaderClientCurrentVersion> {
55
public:
55
public:
56
    void willLoadURLRequest(WebPage*, const WebCore::ResourceRequest&, APIObject*);
56
    void willLoadURLRequest(WebPage*, const WebCore::ResourceRequest&, APIObject*);
57
    void willLoadDataRequest(WebPage*, const WebCore::ResourceRequest&, const WebCore::SharedBuffer*, const String&, const String&, const WebCore::KURL&, APIObject*);
57
    void willLoadDataRequest(WebPage*, const WebCore::ResourceRequest&, const WebCore::SharedBuffer*, const String&, const String&, const WebCore::URL&, APIObject*);
58
58
59
    bool shouldGoToBackForwardListItem(WebPage*, InjectedBundleBackForwardListItem*, RefPtr<APIObject>& userData);
59
    bool shouldGoToBackForwardListItem(WebPage*, InjectedBundleBackForwardListItem*, RefPtr<APIObject>& userData);
60
    void didStartProvisionalLoadForFrame(WebPage*, WebFrame*, RefPtr<APIObject>& userData);
60
    void didStartProvisionalLoadForFrame(WebPage*, WebFrame*, RefPtr<APIObject>& userData);
- a/Source/WebKit2/WebProcess/Network/WebResourceLoadScheduler.cpp -1 / +1 lines
Lines 185-191 void WebResourceLoadScheduler::remove(ResourceLoader* resourceLoader) a/Source/WebKit2/WebProcess/Network/WebResourceLoadScheduler.cpp_sec1
185
    loader->detachFromCoreLoader();
185
    loader->detachFromCoreLoader();
186
}
186
}
187
187
188
void WebResourceLoadScheduler::crossOriginRedirectReceived(ResourceLoader*, const KURL&)
188
void WebResourceLoadScheduler::crossOriginRedirectReceived(ResourceLoader*, const URL&)
189
{
189
{
190
    // We handle cross origin redirects entirely within the NetworkProcess.
190
    // We handle cross origin redirects entirely within the NetworkProcess.
191
    // We override this call in the WebProcess to make it a no-op.
191
    // We override this call in the WebProcess to make it a no-op.
- a/Source/WebKit2/WebProcess/Network/WebResourceLoadScheduler.h -1 / +1 lines
Lines 49-55 public: a/Source/WebKit2/WebProcess/Network/WebResourceLoadScheduler.h_sec1
49
    virtual PassRefPtr<WebCore::NetscapePlugInStreamLoader> schedulePluginStreamLoad(WebCore::Frame*, WebCore::NetscapePlugInStreamLoaderClient*, const WebCore::ResourceRequest&) OVERRIDE;
49
    virtual PassRefPtr<WebCore::NetscapePlugInStreamLoader> schedulePluginStreamLoad(WebCore::Frame*, WebCore::NetscapePlugInStreamLoaderClient*, const WebCore::ResourceRequest&) OVERRIDE;
50
    
50
    
51
    virtual void remove(WebCore::ResourceLoader*) OVERRIDE;
51
    virtual void remove(WebCore::ResourceLoader*) OVERRIDE;
52
    virtual void crossOriginRedirectReceived(WebCore::ResourceLoader*, const WebCore::KURL& redirectURL) OVERRIDE;
52
    virtual void crossOriginRedirectReceived(WebCore::ResourceLoader*, const WebCore::URL& redirectURL) OVERRIDE;
53
    
53
    
54
    virtual void servePendingRequests(WebCore::ResourceLoadPriority minimumPriority = WebCore::ResourceLoadPriorityVeryLow) OVERRIDE;
54
    virtual void servePendingRequests(WebCore::ResourceLoadPriority minimumPriority = WebCore::ResourceLoadPriorityVeryLow) OVERRIDE;
55
55
- a/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp -3 / +3 lines
Lines 36-42 a/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp_sec1
36
#include <WebCore/GraphicsContext.h>
36
#include <WebCore/GraphicsContext.h>
37
#include <WebCore/HTTPHeaderMap.h>
37
#include <WebCore/HTTPHeaderMap.h>
38
#include <WebCore/IntRect.h>
38
#include <WebCore/IntRect.h>
39
#include <WebCore/KURL.h>
39
#include <WebCore/URL.h>
40
#include <WebCore/SharedBuffer.h>
40
#include <WebCore/SharedBuffer.h>
41
#include <runtime/JSObject.h>
41
#include <runtime/JSObject.h>
42
#include <utility>
42
#include <utility>
Lines 790-796 void NetscapePlugin::didEvaluateJavaScript(uint64_t requestID, const String& res a/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp_sec2
790
        pluginStream->sendJavaScriptStream(result);
790
        pluginStream->sendJavaScriptStream(result);
791
}
791
}
792
792
793
void NetscapePlugin::streamDidReceiveResponse(uint64_t streamID, const KURL& responseURL, uint32_t streamLength, 
793
void NetscapePlugin::streamDidReceiveResponse(uint64_t streamID, const URL& responseURL, uint32_t streamLength, 
794
                                              uint32_t lastModifiedTime, const String& mimeType, const String& headers, const String& /* suggestedFileName */)
794
                                              uint32_t lastModifiedTime, const String& mimeType, const String& headers, const String& /* suggestedFileName */)
795
{
795
{
796
    ASSERT(m_isStarted);
796
    ASSERT(m_isStarted);
Lines 823-829 void NetscapePlugin::streamDidFail(uint64_t streamID, bool wasCancelled) a/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp_sec3
823
        pluginStream->didFail(wasCancelled);
823
        pluginStream->didFail(wasCancelled);
824
}
824
}
825
825
826
void NetscapePlugin::manualStreamDidReceiveResponse(const KURL& responseURL, uint32_t streamLength, uint32_t lastModifiedTime, 
826
void NetscapePlugin::manualStreamDidReceiveResponse(const URL& responseURL, uint32_t streamLength, uint32_t lastModifiedTime, 
827
                                                    const String& mimeType, const String& headers, const String& /* suggestedFileName */)
827
                                                    const String& mimeType, const String& headers, const String& /* suggestedFileName */)
828
{
828
{
829
    ASSERT(m_isStarted);
829
    ASSERT(m_isStarted);
- a/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.h -2 / +2 lines
Lines 190-201 private: a/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.h_sec1
190
    virtual void frameDidFinishLoading(uint64_t requestID);
190
    virtual void frameDidFinishLoading(uint64_t requestID);
191
    virtual void frameDidFail(uint64_t requestID, bool wasCancelled);
191
    virtual void frameDidFail(uint64_t requestID, bool wasCancelled);
192
    virtual void didEvaluateJavaScript(uint64_t requestID, const String& result);
192
    virtual void didEvaluateJavaScript(uint64_t requestID, const String& result);
193
    virtual void streamDidReceiveResponse(uint64_t streamID, const WebCore::KURL& responseURL, uint32_t streamLength, 
193
    virtual void streamDidReceiveResponse(uint64_t streamID, const WebCore::URL& responseURL, uint32_t streamLength, 
194
                                          uint32_t lastModifiedTime, const String& mimeType, const String& headers, const String& suggestedFileName);
194
                                          uint32_t lastModifiedTime, const String& mimeType, const String& headers, const String& suggestedFileName);
195
    virtual void streamDidReceiveData(uint64_t streamID, const char* bytes, int length);
195
    virtual void streamDidReceiveData(uint64_t streamID, const char* bytes, int length);
196
    virtual void streamDidFinishLoading(uint64_t streamID);
196
    virtual void streamDidFinishLoading(uint64_t streamID);
197
    virtual void streamDidFail(uint64_t streamID, bool wasCancelled);
197
    virtual void streamDidFail(uint64_t streamID, bool wasCancelled);
198
    virtual void manualStreamDidReceiveResponse(const WebCore::KURL& responseURL, uint32_t streamLength, 
198
    virtual void manualStreamDidReceiveResponse(const WebCore::URL& responseURL, uint32_t streamLength, 
199
                                                uint32_t lastModifiedTime, const String& mimeType, const String& headers, const String& suggestedFileName);
199
                                                uint32_t lastModifiedTime, const String& mimeType, const String& headers, const String& suggestedFileName);
200
    virtual void manualStreamDidReceiveData(const char* bytes, int length);
200
    virtual void manualStreamDidReceiveData(const char* bytes, int length);
201
    virtual void manualStreamDidFinishLoading();
201
    virtual void manualStreamDidFinishLoading();
- a/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePluginStream.cpp -1 / +1 lines
Lines 63-69 NetscapePluginStream::~NetscapePluginStream() a/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePluginStream.cpp_sec1
63
    ASSERT(m_fileHandle == invalidPlatformFileHandle);
63
    ASSERT(m_fileHandle == invalidPlatformFileHandle);
64
}
64
}
65
65
66
void NetscapePluginStream::didReceiveResponse(const KURL& responseURL, uint32_t streamLength, uint32_t lastModifiedTime, const String& mimeType, const String& headers)
66
void NetscapePluginStream::didReceiveResponse(const URL& responseURL, uint32_t streamLength, uint32_t lastModifiedTime, const String& mimeType, const String& headers)
67
{
67
{
68
    // Starting the stream could cause the plug-in stream to go away so we keep a reference to it here.
68
    // Starting the stream could cause the plug-in stream to go away so we keep a reference to it here.
69
    Ref<NetscapePluginStream> protect(*this);
69
    Ref<NetscapePluginStream> protect(*this);
- a/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePluginStream.h -2 / +2 lines
Lines 38-44 a/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePluginStream.h_sec1
38
#include <wtf/text/CString.h>
38
#include <wtf/text/CString.h>
39
39
40
namespace WebCore {
40
namespace WebCore {
41
class KURL;
41
class URL;
42
}
42
}
43
43
44
namespace WebKit {
44
namespace WebKit {
Lines 56-62 public: a/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePluginStream.h_sec2
56
    uint64_t streamID() const { return m_streamID; }
56
    uint64_t streamID() const { return m_streamID; }
57
    const NPStream* npStream() const { return &m_npStream; }
57
    const NPStream* npStream() const { return &m_npStream; }
58
58
59
    void didReceiveResponse(const WebCore::KURL& responseURL, uint32_t streamLength,
59
    void didReceiveResponse(const WebCore::URL& responseURL, uint32_t streamLength,
60
                            uint32_t lastModifiedTime, const String& mimeType, const String& headers);
60
                            uint32_t lastModifiedTime, const String& mimeType, const String& headers);
61
    void didReceiveData(const char* bytes, int length);
61
    void didReceiveData(const char* bytes, int length);
62
    void didFinishLoading();
62
    void didFinishLoading();
- a/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.h -3 / +3 lines
Lines 122-132 private: a/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.h_sec1
122
    virtual void frameDidFinishLoading(uint64_t requestID) OVERRIDE;
122
    virtual void frameDidFinishLoading(uint64_t requestID) OVERRIDE;
123
    virtual void frameDidFail(uint64_t requestID, bool wasCancelled) OVERRIDE;
123
    virtual void frameDidFail(uint64_t requestID, bool wasCancelled) OVERRIDE;
124
    virtual void didEvaluateJavaScript(uint64_t requestID, const String& result) OVERRIDE;
124
    virtual void didEvaluateJavaScript(uint64_t requestID, const String& result) OVERRIDE;
125
    virtual void streamDidReceiveResponse(uint64_t streamID, const WebCore::KURL& responseURL, uint32_t streamLength, uint32_t lastModifiedTime, const String& mimeType, const String& headers, const String& suggestedFileName) OVERRIDE;
125
    virtual void streamDidReceiveResponse(uint64_t streamID, const WebCore::URL& responseURL, uint32_t streamLength, uint32_t lastModifiedTime, const String& mimeType, const String& headers, const String& suggestedFileName) OVERRIDE;
126
    virtual void streamDidReceiveData(uint64_t streamID, const char* bytes, int length) OVERRIDE;
126
    virtual void streamDidReceiveData(uint64_t streamID, const char* bytes, int length) OVERRIDE;
127
    virtual void streamDidFinishLoading(uint64_t streamID) OVERRIDE;
127
    virtual void streamDidFinishLoading(uint64_t streamID) OVERRIDE;
128
    virtual void streamDidFail(uint64_t streamID, bool wasCancelled) OVERRIDE;
128
    virtual void streamDidFail(uint64_t streamID, bool wasCancelled) OVERRIDE;
129
    virtual void manualStreamDidReceiveResponse(const WebCore::KURL& responseURL, uint32_t streamLength, uint32_t lastModifiedTime, const WTF::String& mimeType, const WTF::String& headers, const String& suggestedFileName) OVERRIDE;
129
    virtual void manualStreamDidReceiveResponse(const WebCore::URL& responseURL, uint32_t streamLength, uint32_t lastModifiedTime, const WTF::String& mimeType, const WTF::String& headers, const String& suggestedFileName) OVERRIDE;
130
    virtual void manualStreamDidReceiveData(const char* bytes, int length) OVERRIDE;
130
    virtual void manualStreamDidReceiveData(const char* bytes, int length) OVERRIDE;
131
    virtual void manualStreamDidFinishLoading() OVERRIDE;
131
    virtual void manualStreamDidFinishLoading() OVERRIDE;
132
    virtual void manualStreamDidFail(bool wasCancelled) OVERRIDE;
132
    virtual void manualStreamDidFail(bool wasCancelled) OVERRIDE;
Lines 287-293 private: a/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.h_sec2
287
287
288
    WebCore::IntSize m_size;
288
    WebCore::IntSize m_size;
289
289
290
    WebCore::KURL m_sourceURL;
290
    WebCore::URL m_sourceURL;
291
291
292
    String m_suggestedFilename;
292
    String m_suggestedFilename;
293
    RetainPtr<CFMutableDataRef> m_data;
293
    RetainPtr<CFMutableDataRef> m_data;
- a/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.mm -2 / +2 lines
Lines 917-923 void PDFPlugin::pdfDocumentDidLoad() a/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.mm_sec1
917
        createPasswordEntryForm();
917
        createPasswordEntryForm();
918
}
918
}
919
919
920
void PDFPlugin::streamDidReceiveResponse(uint64_t streamID, const KURL&, uint32_t, uint32_t, const String& mimeType, const String&, const String& suggestedFilename)
920
void PDFPlugin::streamDidReceiveResponse(uint64_t streamID, const URL&, uint32_t, uint32_t, const String& mimeType, const String&, const String& suggestedFilename)
921
{
921
{
922
    ASSERT_UNUSED(streamID, streamID == pdfDocumentRequestID);
922
    ASSERT_UNUSED(streamID, streamID == pdfDocumentRequestID);
923
923
Lines 952-958 void PDFPlugin::streamDidFail(uint64_t streamID, bool wasCancelled) a/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.mm_sec2
952
    m_data.clear();
952
    m_data.clear();
953
}
953
}
954
954
955
void PDFPlugin::manualStreamDidReceiveResponse(const KURL& responseURL, uint32_t streamLength,  uint32_t lastModifiedTime, const String& mimeType, const String& headers, const String& suggestedFilename)
955
void PDFPlugin::manualStreamDidReceiveResponse(const URL& responseURL, uint32_t streamLength,  uint32_t lastModifiedTime, const String& mimeType, const String& headers, const String& suggestedFilename)
956
{
956
{
957
    m_suggestedFilename = suggestedFilename;
957
    m_suggestedFilename = suggestedFilename;
958
958
- a/Source/WebKit2/WebProcess/Plugins/PDF/SimplePDFPlugin.h -3 / +3 lines
Lines 113-123 protected: a/Source/WebKit2/WebProcess/Plugins/PDF/SimplePDFPlugin.h_sec1
113
    virtual void frameDidFinishLoading(uint64_t requestID);
113
    virtual void frameDidFinishLoading(uint64_t requestID);
114
    virtual void frameDidFail(uint64_t requestID, bool wasCancelled);
114
    virtual void frameDidFail(uint64_t requestID, bool wasCancelled);
115
    virtual void didEvaluateJavaScript(uint64_t requestID, const String& result);
115
    virtual void didEvaluateJavaScript(uint64_t requestID, const String& result);
116
    virtual void streamDidReceiveResponse(uint64_t streamID, const WebCore::KURL& responseURL, uint32_t streamLength, uint32_t lastModifiedTime, const String& mimeType, const String& headers, const String& suggestedFileName);
116
    virtual void streamDidReceiveResponse(uint64_t streamID, const WebCore::URL& responseURL, uint32_t streamLength, uint32_t lastModifiedTime, const String& mimeType, const String& headers, const String& suggestedFileName);
117
    virtual void streamDidReceiveData(uint64_t streamID, const char* bytes, int length);
117
    virtual void streamDidReceiveData(uint64_t streamID, const char* bytes, int length);
118
    virtual void streamDidFinishLoading(uint64_t streamID);
118
    virtual void streamDidFinishLoading(uint64_t streamID);
119
    virtual void streamDidFail(uint64_t streamID, bool wasCancelled);
119
    virtual void streamDidFail(uint64_t streamID, bool wasCancelled);
120
    virtual void manualStreamDidReceiveResponse(const WebCore::KURL& responseURL, uint32_t streamLength, uint32_t lastModifiedTime, const WTF::String& mimeType, const WTF::String& headers, const String& suggestedFileName);
120
    virtual void manualStreamDidReceiveResponse(const WebCore::URL& responseURL, uint32_t streamLength, uint32_t lastModifiedTime, const WTF::String& mimeType, const WTF::String& headers, const String& suggestedFileName);
121
    virtual void manualStreamDidReceiveData(const char* bytes, int length);
121
    virtual void manualStreamDidReceiveData(const char* bytes, int length);
122
    virtual void manualStreamDidFinishLoading();
122
    virtual void manualStreamDidFinishLoading();
123
    virtual void manualStreamDidFail(bool wasCancelled);
123
    virtual void manualStreamDidFail(bool wasCancelled);
Lines 204-210 private: a/Source/WebKit2/WebProcess/Plugins/PDF/SimplePDFPlugin.h_sec2
204
204
205
    WebCore::IntSize m_size;
205
    WebCore::IntSize m_size;
206
206
207
    WebCore::KURL m_sourceURL;
207
    WebCore::URL m_sourceURL;
208
208
209
    String m_suggestedFilename;
209
    String m_suggestedFilename;
210
    RetainPtr<CFMutableDataRef> m_data;
210
    RetainPtr<CFMutableDataRef> m_data;
- a/Source/WebKit2/WebProcess/Plugins/PDF/SimplePDFPlugin.mm -2 / +2 lines
Lines 615-621 void SimplePDFPlugin::convertPostScriptDataIfNeeded() a/Source/WebKit2/WebProcess/Plugins/PDF/SimplePDFPlugin.mm_sec1
615
    m_data = convertPostScriptDataToPDF(m_data);
615
    m_data = convertPostScriptDataToPDF(m_data);
616
}
616
}
617
617
618
void SimplePDFPlugin::streamDidReceiveResponse(uint64_t streamID, const KURL&, uint32_t, uint32_t, const String& mimeType, const String&, const String& suggestedFilename)
618
void SimplePDFPlugin::streamDidReceiveResponse(uint64_t streamID, const URL&, uint32_t, uint32_t, const String& mimeType, const String&, const String& suggestedFilename)
619
{
619
{
620
    ASSERT_UNUSED(streamID, streamID == pdfDocumentRequestID);
620
    ASSERT_UNUSED(streamID, streamID == pdfDocumentRequestID);
621
621
Lines 650-656 void SimplePDFPlugin::streamDidFail(uint64_t streamID, bool wasCancelled) a/Source/WebKit2/WebProcess/Plugins/PDF/SimplePDFPlugin.mm_sec2
650
    m_data.clear();
650
    m_data.clear();
651
}
651
}
652
652
653
void SimplePDFPlugin::manualStreamDidReceiveResponse(const KURL& responseURL, uint32_t streamLength,  uint32_t lastModifiedTime, const String& mimeType, const String& headers, const String& suggestedFilename)
653
void SimplePDFPlugin::manualStreamDidReceiveResponse(const URL& responseURL, uint32_t streamLength,  uint32_t lastModifiedTime, const String& mimeType, const String& headers, const String& suggestedFilename)
654
{
654
{
655
    m_suggestedFilename = suggestedFilename;
655
    m_suggestedFilename = suggestedFilename;
656
656
- a/Source/WebKit2/WebProcess/Plugins/Plugin.cpp -1 / +1 lines
Lines 52-58 bool Plugin::Parameters::decode(CoreIPC::ArgumentDecoder& decoder, Parameters& p a/Source/WebKit2/WebProcess/Plugins/Plugin.cpp_sec1
52
    if (!decoder.decode(urlString))
52
    if (!decoder.decode(urlString))
53
        return false;
53
        return false;
54
    // FIXME: We can't assume that the url passed in here is valid.
54
    // FIXME: We can't assume that the url passed in here is valid.
55
    parameters.url = KURL(ParsedURLString, urlString);
55
    parameters.url = URL(ParsedURLString, urlString);
56
56
57
    if (!decoder.decode(parameters.names))
57
    if (!decoder.decode(parameters.names))
58
        return false;
58
        return false;
- a/Source/WebKit2/WebProcess/Plugins/Plugin.h -4 / +4 lines
Lines 28-34 a/Source/WebKit2/WebProcess/Plugins/Plugin.h_sec1
28
28
29
#include <WebCore/FindOptions.h>
29
#include <WebCore/FindOptions.h>
30
#include <WebCore/GraphicsLayer.h>
30
#include <WebCore/GraphicsLayer.h>
31
#include <WebCore/KURL.h>
31
#include <WebCore/URL.h>
32
#include <WebCore/ScrollTypes.h>
32
#include <WebCore/ScrollTypes.h>
33
#include <WebCore/SecurityOrigin.h>
33
#include <WebCore/SecurityOrigin.h>
34
#include <wtf/RefCounted.h>
34
#include <wtf/RefCounted.h>
Lines 73-79 class PluginController; a/Source/WebKit2/WebProcess/Plugins/Plugin.h_sec2
73
class Plugin : public ThreadSafeRefCounted<Plugin> {
73
class Plugin : public ThreadSafeRefCounted<Plugin> {
74
public:
74
public:
75
    struct Parameters {
75
    struct Parameters {
76
        WebCore::KURL url;
76
        WebCore::URL url;
77
        Vector<String> names;
77
        Vector<String> names;
78
        Vector<String> values;
78
        Vector<String> values;
79
        String mimeType;
79
        String mimeType;
Lines 154-160 public: a/Source/WebKit2/WebProcess/Plugins/Plugin.h_sec3
154
    virtual void didEvaluateJavaScript(uint64_t requestID, const String& result) = 0;
154
    virtual void didEvaluateJavaScript(uint64_t requestID, const String& result) = 0;
155
155
156
    // Tells the plug-in that a stream has received its HTTP response.
156
    // Tells the plug-in that a stream has received its HTTP response.
157
    virtual void streamDidReceiveResponse(uint64_t streamID, const WebCore::KURL& responseURL, uint32_t streamLength, 
157
    virtual void streamDidReceiveResponse(uint64_t streamID, const WebCore::URL& responseURL, uint32_t streamLength, 
158
                                          uint32_t lastModifiedTime, const String& mimeType, const String& headers, const String& suggestedFileName) = 0;
158
                                          uint32_t lastModifiedTime, const String& mimeType, const String& headers, const String& suggestedFileName) = 0;
159
159
160
    // Tells the plug-in that a stream did receive data.
160
    // Tells the plug-in that a stream did receive data.
Lines 167-173 public: a/Source/WebKit2/WebProcess/Plugins/Plugin.h_sec4
167
    virtual void streamDidFail(uint64_t streamID, bool wasCancelled) = 0;
167
    virtual void streamDidFail(uint64_t streamID, bool wasCancelled) = 0;
168
168
169
    // Tells the plug-in that the manual stream has received its HTTP response.
169
    // Tells the plug-in that the manual stream has received its HTTP response.
170
    virtual void manualStreamDidReceiveResponse(const WebCore::KURL& responseURL, uint32_t streamLength, 
170
    virtual void manualStreamDidReceiveResponse(const WebCore::URL& responseURL, uint32_t streamLength, 
171
                                                uint32_t lastModifiedTime, const String& mimeType, const String& headers, const String& suggestedFileName) = 0;
171
                                                uint32_t lastModifiedTime, const String& mimeType, const String& headers, const String& suggestedFileName) = 0;
172
172
173
    // Tells the plug-in that the manual stream did receive data.
173
    // Tells the plug-in that the manual stream did receive data.
- a/Source/WebKit2/WebProcess/Plugins/PluginController.h -1 / +1 lines
Lines 39-45 typedef void* NPIdentifier; a/Source/WebKit2/WebProcess/Plugins/PluginController.h_sec1
39
namespace WebCore {
39
namespace WebCore {
40
    class HTTPHeaderMap;
40
    class HTTPHeaderMap;
41
    class IntRect;
41
    class IntRect;
42
    class KURL;
42
    class URL;
43
    class ProtectionSpace;
43
    class ProtectionSpace;
44
}
44
}
45
45
- a/Source/WebKit2/WebProcess/Plugins/PluginProxy.cpp -2 / +2 lines
Lines 324-330 void PluginProxy::didEvaluateJavaScript(uint64_t requestID, const WTF::String& r a/Source/WebKit2/WebProcess/Plugins/PluginProxy.cpp_sec1
324
    m_connection->connection()->send(Messages::PluginControllerProxy::DidEvaluateJavaScript(requestID, result), m_pluginInstanceID);
324
    m_connection->connection()->send(Messages::PluginControllerProxy::DidEvaluateJavaScript(requestID, result), m_pluginInstanceID);
325
}
325
}
326
326
327
void PluginProxy::streamDidReceiveResponse(uint64_t streamID, const KURL& responseURL, uint32_t streamLength, uint32_t lastModifiedTime, const WTF::String& mimeType, const WTF::String& headers, const String& /* suggestedFileName */)
327
void PluginProxy::streamDidReceiveResponse(uint64_t streamID, const URL& responseURL, uint32_t streamLength, uint32_t lastModifiedTime, const WTF::String& mimeType, const WTF::String& headers, const String& /* suggestedFileName */)
328
{
328
{
329
    m_connection->connection()->send(Messages::PluginControllerProxy::StreamDidReceiveResponse(streamID, responseURL.string(), streamLength, lastModifiedTime, mimeType, headers), m_pluginInstanceID);
329
    m_connection->connection()->send(Messages::PluginControllerProxy::StreamDidReceiveResponse(streamID, responseURL.string(), streamLength, lastModifiedTime, mimeType, headers), m_pluginInstanceID);
330
}
330
}
Lines 344-350 void PluginProxy::streamDidFail(uint64_t streamID, bool wasCancelled) a/Source/WebKit2/WebProcess/Plugins/PluginProxy.cpp_sec2
344
    m_connection->connection()->send(Messages::PluginControllerProxy::StreamDidFail(streamID, wasCancelled), m_pluginInstanceID);
344
    m_connection->connection()->send(Messages::PluginControllerProxy::StreamDidFail(streamID, wasCancelled), m_pluginInstanceID);
345
}
345
}
346
346
347
void PluginProxy::manualStreamDidReceiveResponse(const KURL& responseURL, uint32_t streamLength,  uint32_t lastModifiedTime, const WTF::String& mimeType, const WTF::String& headers, const String& /* suggestedFileName */)
347
void PluginProxy::manualStreamDidReceiveResponse(const URL& responseURL, uint32_t streamLength,  uint32_t lastModifiedTime, const WTF::String& mimeType, const WTF::String& headers, const String& /* suggestedFileName */)
348
{
348
{
349
    m_connection->connection()->send(Messages::PluginControllerProxy::ManualStreamDidReceiveResponse(responseURL.string(), streamLength, lastModifiedTime, mimeType, headers), m_pluginInstanceID);
349
    m_connection->connection()->send(Messages::PluginControllerProxy::ManualStreamDidReceiveResponse(responseURL.string(), streamLength, lastModifiedTime, mimeType, headers), m_pluginInstanceID);
350
}
350
}
- a/Source/WebKit2/WebProcess/Plugins/PluginProxy.h -2 / +2 lines
Lines 88-98 private: a/Source/WebKit2/WebProcess/Plugins/PluginProxy.h_sec1
88
    virtual void frameDidFinishLoading(uint64_t requestID);
88
    virtual void frameDidFinishLoading(uint64_t requestID);
89
    virtual void frameDidFail(uint64_t requestID, bool wasCancelled);
89
    virtual void frameDidFail(uint64_t requestID, bool wasCancelled);
90
    virtual void didEvaluateJavaScript(uint64_t requestID, const String& result);
90
    virtual void didEvaluateJavaScript(uint64_t requestID, const String& result);
91
    virtual void streamDidReceiveResponse(uint64_t streamID, const WebCore::KURL& responseURL, uint32_t streamLength, uint32_t lastModifiedTime, const String& mimeType, const String& headers, const String& suggestedFileName);
91
    virtual void streamDidReceiveResponse(uint64_t streamID, const WebCore::URL& responseURL, uint32_t streamLength, uint32_t lastModifiedTime, const String& mimeType, const String& headers, const String& suggestedFileName);
92
    virtual void streamDidReceiveData(uint64_t streamID, const char* bytes, int length);
92
    virtual void streamDidReceiveData(uint64_t streamID, const char* bytes, int length);
93
    virtual void streamDidFinishLoading(uint64_t streamID);
93
    virtual void streamDidFinishLoading(uint64_t streamID);
94
    virtual void streamDidFail(uint64_t streamID, bool wasCancelled);
94
    virtual void streamDidFail(uint64_t streamID, bool wasCancelled);
95
    virtual void manualStreamDidReceiveResponse(const WebCore::KURL& responseURL, uint32_t streamLength, uint32_t lastModifiedTime, const WTF::String& mimeType, const WTF::String& headers, const String& suggestedFileName);
95
    virtual void manualStreamDidReceiveResponse(const WebCore::URL& responseURL, uint32_t streamLength, uint32_t lastModifiedTime, const WTF::String& mimeType, const WTF::String& headers, const String& suggestedFileName);
96
    virtual void manualStreamDidReceiveData(const char* bytes, int length);
96
    virtual void manualStreamDidReceiveData(const char* bytes, int length);
97
    virtual void manualStreamDidFinishLoading();
97
    virtual void manualStreamDidFinishLoading();
98
    virtual void manualStreamDidFail(bool wasCancelled);
98
    virtual void manualStreamDidFail(bool wasCancelled);
- a/Source/WebKit2/WebProcess/Plugins/PluginView.cpp -6 / +6 lines
Lines 212-218 static uint32_t lastModifiedDate(const ResourceResponse& response) a/Source/WebKit2/WebProcess/Plugins/PluginView.cpp_sec1
212
void PluginView::Stream::didReceiveResponse(NetscapePlugInStreamLoader*, const ResourceResponse& response)
212
void PluginView::Stream::didReceiveResponse(NetscapePlugInStreamLoader*, const ResourceResponse& response)
213
{
213
{
214
    // Compute the stream related data from the resource response.
214
    // Compute the stream related data from the resource response.
215
    const KURL& responseURL = response.url();
215
    const URL& responseURL = response.url();
216
    const String& mimeType = response.mimeType();
216
    const String& mimeType = response.mimeType();
217
    long long expectedContentLength = response.expectedContentLength();
217
    long long expectedContentLength = response.expectedContentLength();
218
    
218
    
Lines 383-389 void PluginView::manualLoadDidReceiveResponse(const ResourceResponse& response) a/Source/WebKit2/WebProcess/Plugins/PluginView.cpp_sec2
383
    }
383
    }
384
384
385
    // Compute the stream related data from the resource response.
385
    // Compute the stream related data from the resource response.
386
    const KURL& responseURL = response.url();
386
    const URL& responseURL = response.url();
387
    const String& mimeType = response.mimeType();
387
    const String& mimeType = response.mimeType();
388
    long long expectedContentLength = response.expectedContentLength();
388
    long long expectedContentLength = response.expectedContentLength();
389
    
389
    
Lines 1308-1314 String PluginView::userAgent() a/Source/WebKit2/WebProcess/Plugins/PluginView.cpp_sec3
1308
    if (!frame)
1308
    if (!frame)
1309
        return String();
1309
        return String();
1310
    
1310
    
1311
    return frame->loader().client().userAgent(KURL());
1311
    return frame->loader().client().userAgent(URL());
1312
}
1312
}
1313
1313
1314
void PluginView::loadURL(uint64_t requestID, const String& method, const String& urlString, const String& target, 
1314
void PluginView::loadURL(uint64_t requestID, const String& method, const String& urlString, const String& target, 
Lines 1489-1506 String PluginView::proxiesForURL(const String& urlString) a/Source/WebKit2/WebProcess/Plugins/PluginView.cpp_sec4
1489
{
1489
{
1490
    const FrameLoader* frameLoader = frame() ? &frame()->loader() : 0;
1490
    const FrameLoader* frameLoader = frame() ? &frame()->loader() : 0;
1491
    const NetworkingContext* context = frameLoader ? frameLoader->networkingContext() : 0;
1491
    const NetworkingContext* context = frameLoader ? frameLoader->networkingContext() : 0;
1492
    Vector<ProxyServer> proxyServers = proxyServersForURL(KURL(KURL(), urlString), context);
1492
    Vector<ProxyServer> proxyServers = proxyServersForURL(URL(URL(), urlString), context);
1493
    return toString(proxyServers);
1493
    return toString(proxyServers);
1494
}
1494
}
1495
1495
1496
String PluginView::cookiesForURL(const String& urlString)
1496
String PluginView::cookiesForURL(const String& urlString)
1497
{
1497
{
1498
    return cookies(&m_pluginElement->document(), KURL(KURL(), urlString));
1498
    return cookies(&m_pluginElement->document(), URL(URL(), urlString));
1499
}
1499
}
1500
1500
1501
void PluginView::setCookiesForURL(const String& urlString, const String& cookieString)
1501
void PluginView::setCookiesForURL(const String& urlString, const String& cookieString)
1502
{
1502
{
1503
    setCookies(&m_pluginElement->document(), KURL(KURL(), urlString), cookieString);
1503
    setCookies(&m_pluginElement->document(), URL(URL(), urlString), cookieString);
1504
}
1504
}
1505
1505
1506
bool PluginView::getAuthenticationInfo(const ProtectionSpace& protectionSpace, String& username, String& password)
1506
bool PluginView::getAuthenticationInfo(const ProtectionSpace& protectionSpace, String& username, String& password)
- a/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp -2 / +2 lines
Lines 534-542 void WebChromeClient::unavailablePluginButtonClicked(Element* element, RenderEmb a/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp_sec1
534
    String frameURLString = pluginElement->document().frame()->loader().documentLoader()->responseURL().string();
534
    String frameURLString = pluginElement->document().frame()->loader().documentLoader()->responseURL().string();
535
    String pageURLString = m_page->mainFrame()->loader().documentLoader()->responseURL().string();
535
    String pageURLString = m_page->mainFrame()->loader().documentLoader()->responseURL().string();
536
    String pluginURLString = pluginElement->document().completeURL(pluginElement->url()).string();
536
    String pluginURLString = pluginElement->document().completeURL(pluginElement->url()).string();
537
    KURL pluginspageAttributeURL = element->document().completeURL(stripLeadingAndTrailingHTMLSpaces(pluginElement->getAttribute(pluginspageAttr)));
537
    URL pluginspageAttributeURL = element->document().completeURL(stripLeadingAndTrailingHTMLSpaces(pluginElement->getAttribute(pluginspageAttr)));
538
    if (!pluginspageAttributeURL.protocolIsInHTTPFamily())
538
    if (!pluginspageAttributeURL.protocolIsInHTTPFamily())
539
        pluginspageAttributeURL = KURL();
539
        pluginspageAttributeURL = URL();
540
    m_page->send(Messages::WebPageProxy::UnavailablePluginButtonClicked(pluginUnavailabilityReason, pluginElement->serviceType(), pluginURLString, pluginspageAttributeURL.string(), frameURLString, pageURLString));
540
    m_page->send(Messages::WebPageProxy::UnavailablePluginButtonClicked(pluginUnavailabilityReason, pluginElement->serviceType(), pluginURLString, pluginspageAttributeURL.string(), frameURLString, pageURLString));
541
}
541
}
542
542
- a/Source/WebKit2/WebProcess/WebCoreSupport/WebContextMenuClient.cpp -2 / +2 lines
Lines 68-74 void WebContextMenuClient::contextMenuItemSelected(ContextMenuItem*, const Conte a/Source/WebKit2/WebProcess/WebCoreSupport/WebContextMenuClient.cpp_sec1
68
    notImplemented();
68
    notImplemented();
69
}
69
}
70
70
71
void WebContextMenuClient::downloadURL(const KURL&)
71
void WebContextMenuClient::downloadURL(const URL&)
72
{
72
{
73
    // This is handled in the UI process.
73
    // This is handled in the UI process.
74
    ASSERT_NOT_REACHED();
74
    ASSERT_NOT_REACHED();
Lines 86-92 void WebContextMenuClient::searchWithGoogle(const Frame* frame) a/Source/WebKit2/WebProcess/WebCoreSupport/WebContextMenuClient.cpp_sec2
86
86
87
    if (Page* page = frame->page()) {
87
    if (Page* page = frame->page()) {
88
        UserGestureIndicator indicator(DefinitelyProcessingUserGesture);
88
        UserGestureIndicator indicator(DefinitelyProcessingUserGesture);
89
        page->mainFrame().loader().urlSelected(KURL(ParsedURLString, url), String(), 0, false, false, MaybeSendReferrer);
89
        page->mainFrame().loader().urlSelected(URL(ParsedURLString, url), String(), 0, false, false, MaybeSendReferrer);
90
    }
90
    }
91
}
91
}
92
#endif
92
#endif
- a/Source/WebKit2/WebProcess/WebCoreSupport/WebContextMenuClient.h -1 / +1 lines
Lines 51-57 private: a/Source/WebKit2/WebProcess/WebCoreSupport/WebContextMenuClient.h_sec1
51
#endif
51
#endif
52
    virtual void contextMenuItemSelected(WebCore::ContextMenuItem*, const WebCore::ContextMenu*) OVERRIDE;
52
    virtual void contextMenuItemSelected(WebCore::ContextMenuItem*, const WebCore::ContextMenu*) OVERRIDE;
53
    
53
    
54
    virtual void downloadURL(const WebCore::KURL&) OVERRIDE;
54
    virtual void downloadURL(const WebCore::URL&) OVERRIDE;
55
    virtual void searchWithGoogle(const WebCore::Frame*) OVERRIDE;
55
    virtual void searchWithGoogle(const WebCore::Frame*) OVERRIDE;
56
    virtual void lookUpInDictionary(WebCore::Frame*) OVERRIDE;
56
    virtual void lookUpInDictionary(WebCore::Frame*) OVERRIDE;
57
    virtual bool isSpeaking() OVERRIDE;
57
    virtual bool isSpeaking() OVERRIDE;
- a/Source/WebKit2/WebProcess/WebCoreSupport/WebErrors.h -5 / +5 lines
Lines 27-36 a/Source/WebKit2/WebProcess/WebCoreSupport/WebErrors.h_sec1
27
#define WebErrors_h
27
#define WebErrors_h
28
28
29
namespace WebCore {
29
namespace WebCore {
30
    class KURL;
30
class URL;
31
    class ResourceError;
31
class ResourceError;
32
    class ResourceRequest;
32
class ResourceRequest;
33
    class ResourceResponse;
33
class ResourceResponse;
34
}
34
}
35
35
36
namespace WebKit {
36
namespace WebKit {
Lines 42-48 WebCore::ResourceError interruptedForPolicyChangeError(const WebCore::ResourceRe a/Source/WebKit2/WebProcess/WebCoreSupport/WebErrors.h_sec2
42
WebCore::ResourceError cannotShowMIMETypeError(const WebCore::ResourceResponse&);
42
WebCore::ResourceError cannotShowMIMETypeError(const WebCore::ResourceResponse&);
43
WebCore::ResourceError fileDoesNotExistError(const WebCore::ResourceResponse&);
43
WebCore::ResourceError fileDoesNotExistError(const WebCore::ResourceResponse&);
44
WebCore::ResourceError pluginWillHandleLoadError(const WebCore::ResourceResponse&);
44
WebCore::ResourceError pluginWillHandleLoadError(const WebCore::ResourceResponse&);
45
WebCore::ResourceError internalError(const WebCore::KURL&);
45
WebCore::ResourceError internalError(const WebCore::URL&);
46
46
47
} // namespace WebKit
47
} // namespace WebKit
48
48
- a/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp -12 / +12 lines
Lines 296-302 void WebFrameLoaderClient::dispatchDidCancelClientRedirect() a/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp_sec1
296
    webPage->injectedBundleLoaderClient().didCancelClientRedirectForFrame(webPage, m_frame);
296
    webPage->injectedBundleLoaderClient().didCancelClientRedirectForFrame(webPage, m_frame);
297
}
297
}
298
298
299
void WebFrameLoaderClient::dispatchWillPerformClientRedirect(const KURL& url, double interval, double fireDate)
299
void WebFrameLoaderClient::dispatchWillPerformClientRedirect(const URL& url, double interval, double fireDate)
300
{
300
{
301
    WebPage* webPage = m_frame->page();
301
    WebPage* webPage = m_frame->page();
302
    if (!webPage)
302
    if (!webPage)
Lines 985-991 void WebFrameLoaderClient::didDisplayInsecureContent() a/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp_sec2
985
    webPage->send(Messages::WebPageProxy::DidDisplayInsecureContentForFrame(m_frame->frameID(), InjectedBundleUserMessageEncoder(userData.get())));
985
    webPage->send(Messages::WebPageProxy::DidDisplayInsecureContentForFrame(m_frame->frameID(), InjectedBundleUserMessageEncoder(userData.get())));
986
}
986
}
987
987
988
void WebFrameLoaderClient::didRunInsecureContent(SecurityOrigin*, const KURL&)
988
void WebFrameLoaderClient::didRunInsecureContent(SecurityOrigin*, const URL&)
989
{
989
{
990
    WebPage* webPage = m_frame->page();
990
    WebPage* webPage = m_frame->page();
991
    if (!webPage)
991
    if (!webPage)
Lines 998-1004 void WebFrameLoaderClient::didRunInsecureContent(SecurityOrigin*, const KURL&) a/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp_sec3
998
    webPage->send(Messages::WebPageProxy::DidRunInsecureContentForFrame(m_frame->frameID(), InjectedBundleUserMessageEncoder(userData.get())));
998
    webPage->send(Messages::WebPageProxy::DidRunInsecureContentForFrame(m_frame->frameID(), InjectedBundleUserMessageEncoder(userData.get())));
999
}
999
}
1000
1000
1001
void WebFrameLoaderClient::didDetectXSS(const KURL&, bool)
1001
void WebFrameLoaderClient::didDetectXSS(const URL&, bool)
1002
{
1002
{
1003
    WebPage* webPage = m_frame->page();
1003
    WebPage* webPage = m_frame->page();
1004
    if (!webPage)
1004
    if (!webPage)
Lines 1158-1164 PassRefPtr<DocumentLoader> WebFrameLoaderClient::createDocumentLoader(const Reso a/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp_sec4
1158
    return DocumentLoader::create(request, data);
1158
    return DocumentLoader::create(request, data);
1159
}
1159
}
1160
1160
1161
void WebFrameLoaderClient::setTitle(const StringWithDirection& title, const KURL& url)
1161
void WebFrameLoaderClient::setTitle(const StringWithDirection& title, const URL& url)
1162
{
1162
{
1163
    WebPage* webPage = m_frame->page();
1163
    WebPage* webPage = m_frame->page();
1164
    if (!webPage || !webPage->pageGroup()->isVisibleToHistoryClient())
1164
    if (!webPage || !webPage->pageGroup()->isVisibleToHistoryClient())
Lines 1169-1175 void WebFrameLoaderClient::setTitle(const StringWithDirection& title, const KURL a/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp_sec5
1169
        title.string(), url.string(), m_frame->frameID()), 0);
1169
        title.string(), url.string(), m_frame->frameID()), 0);
1170
}
1170
}
1171
1171
1172
String WebFrameLoaderClient::userAgent(const KURL&)
1172
String WebFrameLoaderClient::userAgent(const URL&)
1173
{
1173
{
1174
    WebPage* webPage = m_frame->page();
1174
    WebPage* webPage = m_frame->page();
1175
    if (!webPage)
1175
    if (!webPage)
Lines 1256-1262 void WebFrameLoaderClient::convertMainResourceLoadToDownload(DocumentLoader *doc a/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp_sec6
1256
    m_frame->convertMainResourceLoadToDownload(documentLoader, request, response);
1256
    m_frame->convertMainResourceLoadToDownload(documentLoader, request, response);
1257
}
1257
}
1258
1258
1259
PassRefPtr<Frame> WebFrameLoaderClient::createFrame(const KURL& url, const String& name, HTMLFrameOwnerElement* ownerElement,
1259
PassRefPtr<Frame> WebFrameLoaderClient::createFrame(const URL& url, const String& name, HTMLFrameOwnerElement* ownerElement,
1260
                                                    const String& referrer, bool /*allowsScrolling*/, int /*marginWidth*/, int /*marginHeight*/)
1260
                                                    const String& referrer, bool /*allowsScrolling*/, int /*marginWidth*/, int /*marginHeight*/)
1261
{
1261
{
1262
    WebPage* webPage = m_frame->page();
1262
    WebPage* webPage = m_frame->page();
Lines 1283-1289 PassRefPtr<Frame> WebFrameLoaderClient::createFrame(const KURL& url, const Strin a/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp_sec7
1283
    return coreSubframe;
1283
    return coreSubframe;
1284
}
1284
}
1285
1285
1286
PassRefPtr<Widget> WebFrameLoaderClient::createPlugin(const IntSize&, HTMLPlugInElement* pluginElement, const KURL& url, const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType, bool loadManually)
1286
PassRefPtr<Widget> WebFrameLoaderClient::createPlugin(const IntSize&, HTMLPlugInElement* pluginElement, const URL& url, const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType, bool loadManually)
1287
{
1287
{
1288
    ASSERT(paramNames.size() == paramValues.size());
1288
    ASSERT(paramNames.size() == paramValues.size());
1289
    ASSERT(m_frame->page());
1289
    ASSERT(m_frame->page());
Lines 1346-1354 void WebFrameLoaderClient::redirectDataToPlugin(Widget* pluginWidget) a/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp_sec8
1346
        m_pluginView = static_cast<PluginView*>(pluginWidget);
1346
        m_pluginView = static_cast<PluginView*>(pluginWidget);
1347
}
1347
}
1348
1348
1349
PassRefPtr<Widget> WebFrameLoaderClient::createJavaAppletWidget(const IntSize& pluginSize, HTMLAppletElement* appletElement, const KURL&, const Vector<String>& paramNames, const Vector<String>& paramValues)
1349
PassRefPtr<Widget> WebFrameLoaderClient::createJavaAppletWidget(const IntSize& pluginSize, HTMLAppletElement* appletElement, const URL&, const Vector<String>& paramNames, const Vector<String>& paramValues)
1350
{
1350
{
1351
    RefPtr<Widget> plugin = createPlugin(pluginSize, appletElement, KURL(), paramNames, paramValues, appletElement->serviceType(), false);
1351
    RefPtr<Widget> plugin = createPlugin(pluginSize, appletElement, URL(), paramNames, paramValues, appletElement->serviceType(), false);
1352
    if (!plugin) {
1352
    if (!plugin) {
1353
        if (WebPage* webPage = m_frame->page()) {
1353
        if (WebPage* webPage = m_frame->page()) {
1354
            String frameURLString = m_frame->coreFrame()->loader().documentLoader()->responseURL().string();
1354
            String frameURLString = m_frame->coreFrame()->loader().documentLoader()->responseURL().string();
Lines 1360-1366 PassRefPtr<Widget> WebFrameLoaderClient::createJavaAppletWidget(const IntSize& p a/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp_sec9
1360
}
1360
}
1361
1361
1362
#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
1362
#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
1363
PassRefPtr<Widget> WebFrameLoaderClient::createMediaPlayerProxyPlugin(const IntSize&, HTMLMediaElement*, const KURL&, const Vector<String>&, const Vector<String>&, const String&)
1363
PassRefPtr<Widget> WebFrameLoaderClient::createMediaPlayerProxyPlugin(const IntSize&, HTMLMediaElement*, const URL&, const Vector<String>&, const Vector<String>&, const String&)
1364
{
1364
{
1365
    notImplemented();
1365
    notImplemented();
1366
    return 0;
1366
    return 0;
Lines 1390-1396 static bool pluginSupportsExtension(const PluginData& pluginData, const String& a/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp_sec10
1390
    return false;
1390
    return false;
1391
}
1391
}
1392
1392
1393
ObjectContentType WebFrameLoaderClient::objectContentType(const KURL& url, const String& mimeTypeIn, bool shouldPreferPlugInsForImages)
1393
ObjectContentType WebFrameLoaderClient::objectContentType(const URL& url, const String& mimeTypeIn, bool shouldPreferPlugInsForImages)
1394
{
1394
{
1395
    // FIXME: This should be merged with WebCore::FrameLoader::defaultObjectContentType when the plugin code
1395
    // FIXME: This should be merged with WebCore::FrameLoader::defaultObjectContentType when the plugin code
1396
    // is consolidated.
1396
    // is consolidated.
Lines 1575-1581 bool WebFrameLoaderClient::allowScript(bool enabledPerSettings) a/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp_sec11
1575
    return true;
1575
    return true;
1576
}
1576
}
1577
1577
1578
bool WebFrameLoaderClient::shouldForceUniversalAccessFromLocalURL(const WebCore::KURL& url)
1578
bool WebFrameLoaderClient::shouldForceUniversalAccessFromLocalURL(const WebCore::URL& url)
1579
{
1579
{
1580
    WebPage* webPage = m_frame->page();
1580
    WebPage* webPage = m_frame->page();
1581
    if (!webPage)
1581
    if (!webPage)
- a/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h -11 / +11 lines
Lines 74-80 private: a/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h_sec1
74
    virtual void dispatchDidHandleOnloadEvents() OVERRIDE;
74
    virtual void dispatchDidHandleOnloadEvents() OVERRIDE;
75
    virtual void dispatchDidReceiveServerRedirectForProvisionalLoad() OVERRIDE;
75
    virtual void dispatchDidReceiveServerRedirectForProvisionalLoad() OVERRIDE;
76
    virtual void dispatchDidCancelClientRedirect() OVERRIDE;
76
    virtual void dispatchDidCancelClientRedirect() OVERRIDE;
77
    virtual void dispatchWillPerformClientRedirect(const WebCore::KURL&, double interval, double fireDate) OVERRIDE;
77
    virtual void dispatchWillPerformClientRedirect(const WebCore::URL&, double interval, double fireDate) OVERRIDE;
78
    virtual void dispatchDidChangeLocationWithinPage() OVERRIDE;
78
    virtual void dispatchDidChangeLocationWithinPage() OVERRIDE;
79
    virtual void dispatchDidPushStateWithinPage() OVERRIDE;
79
    virtual void dispatchDidPushStateWithinPage() OVERRIDE;
80
    virtual void dispatchDidReplaceStateWithinPage() OVERRIDE;
80
    virtual void dispatchDidReplaceStateWithinPage() OVERRIDE;
Lines 133-140 private: a/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h_sec2
133
    virtual bool shouldStopLoadingForHistoryItem(WebCore::HistoryItem*) const OVERRIDE;
133
    virtual bool shouldStopLoadingForHistoryItem(WebCore::HistoryItem*) const OVERRIDE;
134
134
135
    virtual void didDisplayInsecureContent() OVERRIDE;
135
    virtual void didDisplayInsecureContent() OVERRIDE;
136
    virtual void didRunInsecureContent(WebCore::SecurityOrigin*, const WebCore::KURL&) OVERRIDE;
136
    virtual void didRunInsecureContent(WebCore::SecurityOrigin*, const WebCore::URL&) OVERRIDE;
137
    virtual void didDetectXSS(const WebCore::KURL&, bool didBlockEntirePage) OVERRIDE;
137
    virtual void didDetectXSS(const WebCore::URL&, bool didBlockEntirePage) OVERRIDE;
138
138
139
    virtual WebCore::ResourceError cancelledError(const WebCore::ResourceRequest&) OVERRIDE;
139
    virtual WebCore::ResourceError cancelledError(const WebCore::ResourceRequest&) OVERRIDE;
140
    virtual WebCore::ResourceError blockedError(const WebCore::ResourceRequest&) OVERRIDE;
140
    virtual WebCore::ResourceError blockedError(const WebCore::ResourceRequest&) OVERRIDE;
Lines 161-169 private: a/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h_sec3
161
    virtual void prepareForDataSourceReplacement() OVERRIDE;
161
    virtual void prepareForDataSourceReplacement() OVERRIDE;
162
    
162
    
163
    virtual PassRefPtr<WebCore::DocumentLoader> createDocumentLoader(const WebCore::ResourceRequest&, const WebCore::SubstituteData&);
163
    virtual PassRefPtr<WebCore::DocumentLoader> createDocumentLoader(const WebCore::ResourceRequest&, const WebCore::SubstituteData&);
164
    virtual void setTitle(const WebCore::StringWithDirection&, const WebCore::KURL&) OVERRIDE;
164
    virtual void setTitle(const WebCore::StringWithDirection&, const WebCore::URL&) OVERRIDE;
165
    
165
    
166
    virtual String userAgent(const WebCore::KURL&) OVERRIDE;
166
    virtual String userAgent(const WebCore::URL&) OVERRIDE;
167
    
167
    
168
    virtual void savePlatformDataToCachedFrame(WebCore::CachedFrame*) OVERRIDE;
168
    virtual void savePlatformDataToCachedFrame(WebCore::CachedFrame*) OVERRIDE;
169
    virtual void transitionToCommittedFromCachedFrame(WebCore::CachedFrame*) OVERRIDE;
169
    virtual void transitionToCommittedFromCachedFrame(WebCore::CachedFrame*) OVERRIDE;
Lines 177-198 private: a/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h_sec4
177
    virtual bool canCachePage() const OVERRIDE { return true; }
177
    virtual bool canCachePage() const OVERRIDE { return true; }
178
    virtual void convertMainResourceLoadToDownload(WebCore::DocumentLoader*, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&) OVERRIDE;
178
    virtual void convertMainResourceLoadToDownload(WebCore::DocumentLoader*, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&) OVERRIDE;
179
    
179
    
180
    virtual PassRefPtr<WebCore::Frame> createFrame(const WebCore::KURL& url, const String& name, WebCore::HTMLFrameOwnerElement* ownerElement,
180
    virtual PassRefPtr<WebCore::Frame> createFrame(const WebCore::URL& url, const String& name, WebCore::HTMLFrameOwnerElement* ownerElement,
181
                                          const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight) OVERRIDE;
181
                                          const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight) OVERRIDE;
182
    
182
    
183
    virtual PassRefPtr<WebCore::Widget> createPlugin(const WebCore::IntSize&, WebCore::HTMLPlugInElement*, const WebCore::KURL&, const Vector<String>&, const Vector<String>&, const String&, bool loadManually) OVERRIDE;
183
    virtual PassRefPtr<WebCore::Widget> createPlugin(const WebCore::IntSize&, WebCore::HTMLPlugInElement*, const WebCore::URL&, const Vector<String>&, const Vector<String>&, const String&, bool loadManually) OVERRIDE;
184
    virtual void recreatePlugin(WebCore::Widget*) OVERRIDE;
184
    virtual void recreatePlugin(WebCore::Widget*) OVERRIDE;
185
    virtual void redirectDataToPlugin(WebCore::Widget* pluginWidget) OVERRIDE;
185
    virtual void redirectDataToPlugin(WebCore::Widget* pluginWidget) OVERRIDE;
186
    
186
    
187
    virtual PassRefPtr<WebCore::Widget> createJavaAppletWidget(const WebCore::IntSize&, WebCore::HTMLAppletElement*, const WebCore::KURL& baseURL, const Vector<String>& paramNames, const Vector<String>& paramValues) OVERRIDE;
187
    virtual PassRefPtr<WebCore::Widget> createJavaAppletWidget(const WebCore::IntSize&, WebCore::HTMLAppletElement*, const WebCore::URL& baseURL, const Vector<String>& paramNames, const Vector<String>& paramValues) OVERRIDE;
188
    
188
    
189
#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
189
#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
190
    virtual PassRefPtr<WebCore::Widget> createMediaPlayerProxyPlugin(const WebCore::IntSize&, WebCore::HTMLMediaElement*, const WebCore::KURL&, const Vector<String>&, const Vector<String>&, const String&) OVERRIDE;
190
    virtual PassRefPtr<WebCore::Widget> createMediaPlayerProxyPlugin(const WebCore::IntSize&, WebCore::HTMLMediaElement*, const WebCore::URL&, const Vector<String>&, const Vector<String>&, const String&) OVERRIDE;
191
    virtual void hideMediaPlayerProxyPlugin(WebCore::Widget*) OVERRIDE;
191
    virtual void hideMediaPlayerProxyPlugin(WebCore::Widget*) OVERRIDE;
192
    virtual void showMediaPlayerProxyPlugin(WebCore::Widget*) OVERRIDE;
192
    virtual void showMediaPlayerProxyPlugin(WebCore::Widget*) OVERRIDE;
193
#endif
193
#endif
194
194
195
    virtual WebCore::ObjectContentType objectContentType(const WebCore::KURL&, const String& mimeType, bool shouldPreferPlugInsForImages) OVERRIDE;
195
    virtual WebCore::ObjectContentType objectContentType(const WebCore::URL&, const String& mimeType, bool shouldPreferPlugInsForImages) OVERRIDE;
196
    virtual String overrideMediaType() const OVERRIDE;
196
    virtual String overrideMediaType() const OVERRIDE;
197
197
198
    virtual void dispatchDidClearWindowObjectInWorld(WebCore::DOMWrapperWorld*) OVERRIDE;
198
    virtual void dispatchDidClearWindowObjectInWorld(WebCore::DOMWrapperWorld*) OVERRIDE;
Lines 219-225 private: a/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h_sec5
219
219
220
    virtual bool allowScript(bool enabledPerSettings) OVERRIDE;
220
    virtual bool allowScript(bool enabledPerSettings) OVERRIDE;
221
221
222
    virtual bool shouldForceUniversalAccessFromLocalURL(const WebCore::KURL&) OVERRIDE;
222
    virtual bool shouldForceUniversalAccessFromLocalURL(const WebCore::URL&) OVERRIDE;
223
223
224
    virtual PassRefPtr<WebCore::FrameNetworkingContext> createNetworkingContext() OVERRIDE;
224
    virtual PassRefPtr<WebCore::FrameNetworkingContext> createNetworkingContext() OVERRIDE;
225
225
- a/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp -10 / +10 lines
Lines 43-49 a/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp_sec1
43
#include "WebProcessProxyMessages.h"
43
#include "WebProcessProxyMessages.h"
44
#include <WebCore/Color.h>
44
#include <WebCore/Color.h>
45
#include <WebCore/Frame.h>
45
#include <WebCore/Frame.h>
46
#include <WebCore/KURL.h>
46
#include <WebCore/URL.h>
47
#include <WebCore/LoaderStrategy.h>
47
#include <WebCore/LoaderStrategy.h>
48
#include <WebCore/NetworkStorageSession.h>
48
#include <WebCore/NetworkStorageSession.h>
49
#include <WebCore/NetworkingContext.h>
49
#include <WebCore/NetworkingContext.h>
Lines 126-132 VisitedLinkStrategy* WebPlatformStrategies::createVisitedLinkStrategy() a/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp_sec2
126
126
127
// CookiesStrategy
127
// CookiesStrategy
128
128
129
String WebPlatformStrategies::cookiesForDOM(const NetworkStorageSession& session, const KURL& firstParty, const KURL& url)
129
String WebPlatformStrategies::cookiesForDOM(const NetworkStorageSession& session, const URL& firstParty, const URL& url)
130
{
130
{
131
#if ENABLE(NETWORK_PROCESS)
131
#if ENABLE(NETWORK_PROCESS)
132
    if (WebProcess::shared().usesNetworkProcess()) {
132
    if (WebProcess::shared().usesNetworkProcess()) {
Lines 140-146 String WebPlatformStrategies::cookiesForDOM(const NetworkStorageSession& session a/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp_sec3
140
    return WebCore::cookiesForDOM(session, firstParty, url);
140
    return WebCore::cookiesForDOM(session, firstParty, url);
141
}
141
}
142
142
143
void WebPlatformStrategies::setCookiesFromDOM(const NetworkStorageSession& session, const KURL& firstParty, const KURL& url, const String& cookieString)
143
void WebPlatformStrategies::setCookiesFromDOM(const NetworkStorageSession& session, const URL& firstParty, const URL& url, const String& cookieString)
144
{
144
{
145
#if ENABLE(NETWORK_PROCESS)
145
#if ENABLE(NETWORK_PROCESS)
146
    if (WebProcess::shared().usesNetworkProcess()) {
146
    if (WebProcess::shared().usesNetworkProcess()) {
Lines 152-158 void WebPlatformStrategies::setCookiesFromDOM(const NetworkStorageSession& sessi a/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp_sec4
152
    WebCore::setCookiesFromDOM(session, firstParty, url, cookieString);
152
    WebCore::setCookiesFromDOM(session, firstParty, url, cookieString);
153
}
153
}
154
154
155
bool WebPlatformStrategies::cookiesEnabled(const NetworkStorageSession& session, const KURL& firstParty, const KURL& url)
155
bool WebPlatformStrategies::cookiesEnabled(const NetworkStorageSession& session, const URL& firstParty, const URL& url)
156
{
156
{
157
#if ENABLE(NETWORK_PROCESS)
157
#if ENABLE(NETWORK_PROCESS)
158
    if (WebProcess::shared().usesNetworkProcess()) {
158
    if (WebProcess::shared().usesNetworkProcess()) {
Lines 166-172 bool WebPlatformStrategies::cookiesEnabled(const NetworkStorageSession& session, a/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp_sec5
166
    return WebCore::cookiesEnabled(session, firstParty, url);
166
    return WebCore::cookiesEnabled(session, firstParty, url);
167
}
167
}
168
168
169
String WebPlatformStrategies::cookieRequestHeaderFieldValue(const NetworkStorageSession& session, const KURL& firstParty, const KURL& url)
169
String WebPlatformStrategies::cookieRequestHeaderFieldValue(const NetworkStorageSession& session, const URL& firstParty, const URL& url)
170
{
170
{
171
#if ENABLE(NETWORK_PROCESS)
171
#if ENABLE(NETWORK_PROCESS)
172
    if (WebProcess::shared().usesNetworkProcess()) {
172
    if (WebProcess::shared().usesNetworkProcess()) {
Lines 180-186 String WebPlatformStrategies::cookieRequestHeaderFieldValue(const NetworkStorage a/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp_sec6
180
    return WebCore::cookieRequestHeaderFieldValue(session, firstParty, url);
180
    return WebCore::cookieRequestHeaderFieldValue(session, firstParty, url);
181
}
181
}
182
182
183
bool WebPlatformStrategies::getRawCookies(const NetworkStorageSession& session, const KURL& firstParty, const KURL& url, Vector<Cookie>& rawCookies)
183
bool WebPlatformStrategies::getRawCookies(const NetworkStorageSession& session, const URL& firstParty, const URL& url, Vector<Cookie>& rawCookies)
184
{
184
{
185
#if ENABLE(NETWORK_PROCESS)
185
#if ENABLE(NETWORK_PROCESS)
186
    if (WebProcess::shared().usesNetworkProcess()) {
186
    if (WebProcess::shared().usesNetworkProcess()) {
Lines 193-199 bool WebPlatformStrategies::getRawCookies(const NetworkStorageSession& session, a/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp_sec7
193
    return WebCore::getRawCookies(session, firstParty, url, rawCookies);
193
    return WebCore::getRawCookies(session, firstParty, url, rawCookies);
194
}
194
}
195
195
196
void WebPlatformStrategies::deleteCookie(const NetworkStorageSession& session, const KURL& url, const String& cookieName)
196
void WebPlatformStrategies::deleteCookie(const NetworkStorageSession& session, const URL& url, const String& cookieName)
197
{
197
{
198
#if ENABLE(NETWORK_PROCESS)
198
#if ENABLE(NETWORK_PROCESS)
199
    if (WebProcess::shared().usesNetworkProcess()) {
199
    if (WebProcess::shared().usesNetworkProcess()) {
Lines 371-377 PassRefPtr<StorageNamespace> WebPlatformStrategies::sessionStorageNamespace(Page a/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp_sec8
371
371
372
// VisitedLinkStrategy
372
// VisitedLinkStrategy
373
373
374
bool WebPlatformStrategies::isLinkVisited(Page*, LinkHash linkHash, const KURL&, const AtomicString&)
374
bool WebPlatformStrategies::isLinkVisited(Page*, LinkHash linkHash, const URL&, const AtomicString&)
375
{
375
{
376
    return WebProcess::shared().isLinkVisited(linkHash);
376
    return WebProcess::shared().isLinkVisited(linkHash);
377
}
377
}
Lines 448-459 Color WebPlatformStrategies::color(const String& pasteboardName) a/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp_sec9
448
    return color;
448
    return color;
449
}
449
}
450
450
451
KURL WebPlatformStrategies::url(const String& pasteboardName)
451
URL WebPlatformStrategies::url(const String& pasteboardName)
452
{
452
{
453
    String urlString;
453
    String urlString;
454
    WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebContext::GetPasteboardURL(pasteboardName),
454
    WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebContext::GetPasteboardURL(pasteboardName),
455
                                                Messages::WebContext::GetPasteboardURL::Reply(urlString), 0);
455
                                                Messages::WebContext::GetPasteboardURL::Reply(urlString), 0);
456
    return KURL(ParsedURLString, urlString);
456
    return URL(ParsedURLString, urlString);
457
}
457
}
458
458
459
long WebPlatformStrategies::addTypes(const Vector<String>& pasteboardTypes, const String& pasteboardName)
459
long WebPlatformStrategies::addTypes(const Vector<String>& pasteboardTypes, const String& pasteboardName)
- a/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.h -8 / +8 lines
Lines 56-67 private: a/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.h_sec1
56
    virtual WebCore::VisitedLinkStrategy* createVisitedLinkStrategy() OVERRIDE;
56
    virtual WebCore::VisitedLinkStrategy* createVisitedLinkStrategy() OVERRIDE;
57
57
58
    // WebCore::CookiesStrategy
58
    // WebCore::CookiesStrategy
59
    virtual String cookiesForDOM(const WebCore::NetworkStorageSession&, const WebCore::KURL& firstParty, const WebCore::KURL&) OVERRIDE;
59
    virtual String cookiesForDOM(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&) OVERRIDE;
60
    virtual void setCookiesFromDOM(const WebCore::NetworkStorageSession&, const WebCore::KURL& firstParty, const WebCore::KURL&, const String&) OVERRIDE;
60
    virtual void setCookiesFromDOM(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&, const String&) OVERRIDE;
61
    virtual bool cookiesEnabled(const WebCore::NetworkStorageSession&, const WebCore::KURL& firstParty, const WebCore::KURL&) OVERRIDE;
61
    virtual bool cookiesEnabled(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&) OVERRIDE;
62
    virtual String cookieRequestHeaderFieldValue(const WebCore::NetworkStorageSession&, const WebCore::KURL& firstParty, const WebCore::KURL&) OVERRIDE;
62
    virtual String cookieRequestHeaderFieldValue(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&) OVERRIDE;
63
    virtual bool getRawCookies(const WebCore::NetworkStorageSession&, const WebCore::KURL& firstParty, const WebCore::KURL&, Vector<WebCore::Cookie>&) OVERRIDE;
63
    virtual bool getRawCookies(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&, Vector<WebCore::Cookie>&) OVERRIDE;
64
    virtual void deleteCookie(const WebCore::NetworkStorageSession&, const WebCore::KURL&, const String&) OVERRIDE;
64
    virtual void deleteCookie(const WebCore::NetworkStorageSession&, const WebCore::URL&, const String&) OVERRIDE;
65
65
66
    // WebCore::DatabaseStrategy
66
    // WebCore::DatabaseStrategy
67
#if ENABLE(SQL_DATABASE)
67
#if ENABLE(SQL_DATABASE)
Lines 90-96 private: a/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.h_sec2
90
    virtual PassRefPtr<WebCore::StorageNamespace> sessionStorageNamespace(WebCore::Page*) OVERRIDE;
90
    virtual PassRefPtr<WebCore::StorageNamespace> sessionStorageNamespace(WebCore::Page*) OVERRIDE;
91
91
92
    // WebCore::VisitedLinkStrategy
92
    // WebCore::VisitedLinkStrategy
93
    virtual bool isLinkVisited(WebCore::Page*, WebCore::LinkHash, const WebCore::KURL& baseURL, const WTF::AtomicString& attributeURL) OVERRIDE;
93
    virtual bool isLinkVisited(WebCore::Page*, WebCore::LinkHash, const WebCore::URL& baseURL, const WTF::AtomicString& attributeURL) OVERRIDE;
94
    virtual void addVisitedLink(WebCore::Page*, WebCore::LinkHash) OVERRIDE;
94
    virtual void addVisitedLink(WebCore::Page*, WebCore::LinkHash) OVERRIDE;
95
95
96
#if PLATFORM(MAC)
96
#if PLATFORM(MAC)
Lines 107-113 private: a/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.h_sec3
107
    virtual long changeCount(const String& pasteboardName) OVERRIDE;
107
    virtual long changeCount(const String& pasteboardName) OVERRIDE;
108
    virtual String uniqueName() OVERRIDE;
108
    virtual String uniqueName() OVERRIDE;
109
    virtual WebCore::Color color(const String& pasteboardName) OVERRIDE;
109
    virtual WebCore::Color color(const String& pasteboardName) OVERRIDE;
110
    virtual WebCore::KURL url(const String& pasteboardName) OVERRIDE;
110
    virtual WebCore::URL url(const String& pasteboardName) OVERRIDE;
111
111
112
    virtual long addTypes(const Vector<String>& pasteboardTypes, const String& pasteboardName) OVERRIDE;
112
    virtual long addTypes(const Vector<String>& pasteboardTypes, const String& pasteboardName) OVERRIDE;
113
    virtual long setTypes(const Vector<String>& pasteboardTypes, const String& pasteboardName) OVERRIDE;
113
    virtual long setTypes(const Vector<String>& pasteboardTypes, const String& pasteboardName) OVERRIDE;
- a/Source/WebKit2/WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp -1 / +1 lines
Lines 72-78 ResourceError pluginWillHandleLoadError(const ResourceResponse& response) a/Source/WebKit2/WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp_sec1
72
    return WebCore::pluginWillHandleLoadError(response);
72
    return WebCore::pluginWillHandleLoadError(response);
73
}
73
}
74
74
75
WebCore::ResourceError internalError(const WebCore::KURL& url)
75
WebCore::ResourceError internalError(const WebCore::URL& url)
76
{
76
{
77
    return ResourceError(WebError::webKitErrorDomain(), kWKErrorInternal, url.string(), ASCIILiteral("Internal error"));
77
    return ResourceError(WebError::webKitErrorDomain(), kWKErrorInternal, url.string(), ASCIILiteral("Internal error"));
78
}
78
}
- a/Source/WebKit2/WebProcess/WebCoreSupport/gtk/WebErrorsGtk.cpp -1 / +1 lines
Lines 75-81 ResourceError pluginWillHandleLoadError(const ResourceResponse& response) a/Source/WebKit2/WebProcess/WebCoreSupport/gtk/WebErrorsGtk.cpp_sec1
75
    return WebCore::pluginWillHandleLoadError(response);
75
    return WebCore::pluginWillHandleLoadError(response);
76
}
76
}
77
77
78
WebCore::ResourceError internalError(const WebCore::KURL& url)
78
WebCore::ResourceError internalError(const WebCore::URL& url)
79
{
79
{
80
    return ResourceError(WebError::webKitErrorDomain(), kWKErrorInternal, url.string(), _("Internal error"));
80
    return ResourceError(WebError::webKitErrorDomain(), kWKErrorInternal, url.string(), _("Internal error"));
81
}
81
}
- a/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebErrorsMac.mm -1 / +1 lines
Lines 87-93 ResourceError pluginWillHandleLoadError(const ResourceResponse& response) a/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebErrorsMac.mm_sec1
87
    return ResourceError(WebError::webKitErrorDomain(), kWKErrorCodePlugInWillHandleLoad, response.url(), WEB_UI_STRING("Plug-in handled load", "WebKitErrorPlugInWillHandleLoad description"));
87
    return ResourceError(WebError::webKitErrorDomain(), kWKErrorCodePlugInWillHandleLoad, response.url(), WEB_UI_STRING("Plug-in handled load", "WebKitErrorPlugInWillHandleLoad description"));
88
}
88
}
89
89
90
ResourceError internalError(const KURL& url)
90
ResourceError internalError(const URL& url)
91
{
91
{
92
    return ResourceError(WebError::webKitErrorDomain(), kWKErrorInternal, url, WEB_UI_STRING("WebKit encountered an internal error", "WebKitErrorInternal description"));
92
    return ResourceError(WebError::webKitErrorDomain(), kWKErrorInternal, url, WEB_UI_STRING("WebKit encountered an internal error", "WebKitErrorInternal description"));
93
}
93
}
- a/Source/WebKit2/WebProcess/WebPage/WebFrame.cpp -3 / +3 lines
Lines 451-457 unsigned WebFrame::pendingUnloadCount() const a/Source/WebKit2/WebProcess/WebPage/WebFrame.cpp_sec1
451
    return m_coreFrame->document()->domWindow()->pendingUnloadEventListeners();
451
    return m_coreFrame->document()->domWindow()->pendingUnloadEventListeners();
452
}
452
}
453
453
454
bool WebFrame::allowsFollowingLink(const WebCore::KURL& url) const
454
bool WebFrame::allowsFollowingLink(const WebCore::URL& url) const
455
{
455
{
456
    if (!m_coreFrame)
456
    if (!m_coreFrame)
457
        return true;
457
        return true;
Lines 679-685 String WebFrame::provisionalURL() const a/Source/WebKit2/WebProcess/WebPage/WebFrame.cpp_sec2
679
    return provisionalDocumentLoader->url().string();
679
    return provisionalDocumentLoader->url().string();
680
}
680
}
681
681
682
String WebFrame::suggestedFilenameForResourceWithURL(const KURL& url) const
682
String WebFrame::suggestedFilenameForResourceWithURL(const URL& url) const
683
{
683
{
684
    if (!m_coreFrame)
684
    if (!m_coreFrame)
685
        return String();
685
        return String();
Lines 700-706 String WebFrame::suggestedFilenameForResourceWithURL(const KURL& url) const a/Source/WebKit2/WebProcess/WebPage/WebFrame.cpp_sec3
700
    return page()->cachedSuggestedFilenameForURL(url);
700
    return page()->cachedSuggestedFilenameForURL(url);
701
}
701
}
702
702
703
String WebFrame::mimeTypeForResourceWithURL(const KURL& url) const
703
String WebFrame::mimeTypeForResourceWithURL(const URL& url) const
704
{
704
{
705
    if (!m_coreFrame)
705
    if (!m_coreFrame)
706
        return String();
706
        return String();
- a/Source/WebKit2/WebProcess/WebPage/WebFrame.h -4 / +4 lines
Lines 44-50 class Frame; a/Source/WebKit2/WebProcess/WebPage/WebFrame.h_sec1
44
class HTMLFrameOwnerElement;
44
class HTMLFrameOwnerElement;
45
class IntPoint;
45
class IntPoint;
46
class IntRect;
46
class IntRect;
47
class KURL;
47
class URL;
48
}
48
}
49
49
50
namespace WebKit {
50
namespace WebKit {
Lines 116-126 public: a/Source/WebKit2/WebProcess/WebPage/WebFrame.h_sec2
116
    
116
    
117
    unsigned pendingUnloadCount() const;
117
    unsigned pendingUnloadCount() const;
118
    
118
    
119
    bool allowsFollowingLink(const WebCore::KURL&) const;
119
    bool allowsFollowingLink(const WebCore::URL&) const;
120
120
121
    String provisionalURL() const;
121
    String provisionalURL() const;
122
    String suggestedFilenameForResourceWithURL(const WebCore::KURL&) const;
122
    String suggestedFilenameForResourceWithURL(const WebCore::URL&) const;
123
    String mimeTypeForResourceWithURL(const WebCore::KURL&) const;
123
    String mimeTypeForResourceWithURL(const WebCore::URL&) const;
124
124
125
    void setTextDirection(const String&);
125
    void setTextDirection(const String&);
126
126
- a/Source/WebKit2/WebProcess/WebPage/WebPage.cpp -13 / +13 lines
Lines 908-914 void WebPage::sendClose() a/Source/WebKit2/WebProcess/WebPage/WebPage.cpp_sec1
908
908
909
void WebPage::loadURL(const String& url, const SandboxExtension::Handle& sandboxExtensionHandle, CoreIPC::MessageDecoder& decoder)
909
void WebPage::loadURL(const String& url, const SandboxExtension::Handle& sandboxExtensionHandle, CoreIPC::MessageDecoder& decoder)
910
{
910
{
911
    loadURLRequest(ResourceRequest(KURL(KURL(), url)), sandboxExtensionHandle, decoder);
911
    loadURLRequest(ResourceRequest(URL(URL(), url)), sandboxExtensionHandle, decoder);
912
}
912
}
913
913
914
void WebPage::loadURLRequest(const ResourceRequest& request, const SandboxExtension::Handle& sandboxExtensionHandle, CoreIPC::MessageDecoder& decoder)
914
void WebPage::loadURLRequest(const ResourceRequest& request, const SandboxExtension::Handle& sandboxExtensionHandle, CoreIPC::MessageDecoder& decoder)
Lines 930-936 void WebPage::loadURLRequest(const ResourceRequest& request, const SandboxExtens a/Source/WebKit2/WebProcess/WebPage/WebPage.cpp_sec2
930
    m_mainFrame->coreFrame()->loader().load(FrameLoadRequest(m_mainFrame->coreFrame(), request));
930
    m_mainFrame->coreFrame()->loader().load(FrameLoadRequest(m_mainFrame->coreFrame(), request));
931
}
931
}
932
932
933
void WebPage::loadDataImpl(PassRefPtr<SharedBuffer> sharedBuffer, const String& MIMEType, const String& encodingName, const KURL& baseURL, const KURL& unreachableURL, CoreIPC::MessageDecoder& decoder)
933
void WebPage::loadDataImpl(PassRefPtr<SharedBuffer> sharedBuffer, const String& MIMEType, const String& encodingName, const URL& baseURL, const URL& unreachableURL, CoreIPC::MessageDecoder& decoder)
934
{
934
{
935
    SendStopResponsivenessTimer stopper(this);
935
    SendStopResponsivenessTimer stopper(this);
936
936
Lines 953-987 void WebPage::loadDataImpl(PassRefPtr<SharedBuffer> sharedBuffer, const String& a/Source/WebKit2/WebProcess/WebPage/WebPage.cpp_sec3
953
void WebPage::loadData(const CoreIPC::DataReference& data, const String& MIMEType, const String& encodingName, const String& baseURLString, CoreIPC::MessageDecoder& decoder)
953
void WebPage::loadData(const CoreIPC::DataReference& data, const String& MIMEType, const String& encodingName, const String& baseURLString, CoreIPC::MessageDecoder& decoder)
954
{
954
{
955
    RefPtr<SharedBuffer> sharedBuffer = SharedBuffer::create(reinterpret_cast<const char*>(data.data()), data.size());
955
    RefPtr<SharedBuffer> sharedBuffer = SharedBuffer::create(reinterpret_cast<const char*>(data.data()), data.size());
956
    KURL baseURL = baseURLString.isEmpty() ? blankURL() : KURL(KURL(), baseURLString);
956
    URL baseURL = baseURLString.isEmpty() ? blankURL() : URL(URL(), baseURLString);
957
    loadDataImpl(sharedBuffer, MIMEType, encodingName, baseURL, KURL(), decoder);
957
    loadDataImpl(sharedBuffer, MIMEType, encodingName, baseURL, URL(), decoder);
958
}
958
}
959
959
960
void WebPage::loadHTMLString(const String& htmlString, const String& baseURLString, CoreIPC::MessageDecoder& decoder)
960
void WebPage::loadHTMLString(const String& htmlString, const String& baseURLString, CoreIPC::MessageDecoder& decoder)
961
{
961
{
962
    RefPtr<SharedBuffer> sharedBuffer = SharedBuffer::create(reinterpret_cast<const char*>(htmlString.characters()), htmlString.length() * sizeof(UChar));
962
    RefPtr<SharedBuffer> sharedBuffer = SharedBuffer::create(reinterpret_cast<const char*>(htmlString.characters()), htmlString.length() * sizeof(UChar));
963
    KURL baseURL = baseURLString.isEmpty() ? blankURL() : KURL(KURL(), baseURLString);
963
    URL baseURL = baseURLString.isEmpty() ? blankURL() : URL(URL(), baseURLString);
964
    loadDataImpl(sharedBuffer, "text/html", "utf-16", baseURL, KURL(), decoder);
964
    loadDataImpl(sharedBuffer, "text/html", "utf-16", baseURL, URL(), decoder);
965
}
965
}
966
966
967
void WebPage::loadAlternateHTMLString(const String& htmlString, const String& baseURLString, const String& unreachableURLString, CoreIPC::MessageDecoder& decoder)
967
void WebPage::loadAlternateHTMLString(const String& htmlString, const String& baseURLString, const String& unreachableURLString, CoreIPC::MessageDecoder& decoder)
968
{
968
{
969
    RefPtr<SharedBuffer> sharedBuffer = SharedBuffer::create(reinterpret_cast<const char*>(htmlString.characters()), htmlString.length() * sizeof(UChar));
969
    RefPtr<SharedBuffer> sharedBuffer = SharedBuffer::create(reinterpret_cast<const char*>(htmlString.characters()), htmlString.length() * sizeof(UChar));
970
    KURL baseURL = baseURLString.isEmpty() ? blankURL() : KURL(KURL(), baseURLString);
970
    URL baseURL = baseURLString.isEmpty() ? blankURL() : URL(URL(), baseURLString);
971
    KURL unreachableURL = unreachableURLString.isEmpty() ? KURL() : KURL(KURL(), unreachableURLString);
971
    URL unreachableURL = unreachableURLString.isEmpty() ? URL() : URL(URL(), unreachableURLString);
972
    loadDataImpl(sharedBuffer, "text/html", "utf-16", baseURL, unreachableURL, decoder);
972
    loadDataImpl(sharedBuffer, "text/html", "utf-16", baseURL, unreachableURL, decoder);
973
}
973
}
974
974
975
void WebPage::loadPlainTextString(const String& string, CoreIPC::MessageDecoder& decoder)
975
void WebPage::loadPlainTextString(const String& string, CoreIPC::MessageDecoder& decoder)
976
{
976
{
977
    RefPtr<SharedBuffer> sharedBuffer = SharedBuffer::create(reinterpret_cast<const char*>(string.characters()), string.length() * sizeof(UChar));
977
    RefPtr<SharedBuffer> sharedBuffer = SharedBuffer::create(reinterpret_cast<const char*>(string.characters()), string.length() * sizeof(UChar));
978
    loadDataImpl(sharedBuffer, "text/plain", "utf-16", blankURL(), KURL(), decoder);
978
    loadDataImpl(sharedBuffer, "text/plain", "utf-16", blankURL(), URL(), decoder);
979
}
979
}
980
980
981
void WebPage::loadWebArchiveData(const CoreIPC::DataReference& webArchiveData, CoreIPC::MessageDecoder& decoder)
981
void WebPage::loadWebArchiveData(const CoreIPC::DataReference& webArchiveData, CoreIPC::MessageDecoder& decoder)
982
{
982
{
983
    RefPtr<SharedBuffer> sharedBuffer = SharedBuffer::create(reinterpret_cast<const char*>(webArchiveData.data()), webArchiveData.size() * sizeof(uint8_t));
983
    RefPtr<SharedBuffer> sharedBuffer = SharedBuffer::create(reinterpret_cast<const char*>(webArchiveData.data()), webArchiveData.size() * sizeof(uint8_t));
984
    loadDataImpl(sharedBuffer, "application/x-webarchive", "utf-16", blankURL(), KURL(), decoder);
984
    loadDataImpl(sharedBuffer, "application/x-webarchive", "utf-16", blankURL(), URL(), decoder);
985
}
985
}
986
986
987
void WebPage::linkClicked(const String& url, const WebMouseEvent& event)
987
void WebPage::linkClicked(const String& url, const WebMouseEvent& event)
Lines 2353-2359 void WebPage::getMainResourceDataOfFrame(uint64_t frameID, uint64_t callbackID) a/Source/WebKit2/WebProcess/WebPage/WebPage.cpp_sec4
2353
    send(Messages::WebPageProxy::DataCallback(dataReference, callbackID));
2353
    send(Messages::WebPageProxy::DataCallback(dataReference, callbackID));
2354
}
2354
}
2355
2355
2356
static PassRefPtr<SharedBuffer> resourceDataForFrame(Frame* frame, const KURL& resourceURL)
2356
static PassRefPtr<SharedBuffer> resourceDataForFrame(Frame* frame, const URL& resourceURL)
2357
{
2357
{
2358
    DocumentLoader* loader = frame->loader().documentLoader();
2358
    DocumentLoader* loader = frame->loader().documentLoader();
2359
    if (!loader)
2359
    if (!loader)
Lines 2369-2375 static PassRefPtr<SharedBuffer> resourceDataForFrame(Frame* frame, const KURL& r a/Source/WebKit2/WebProcess/WebPage/WebPage.cpp_sec5
2369
void WebPage::getResourceDataFromFrame(uint64_t frameID, const String& resourceURLString, uint64_t callbackID)
2369
void WebPage::getResourceDataFromFrame(uint64_t frameID, const String& resourceURLString, uint64_t callbackID)
2370
{
2370
{
2371
    CoreIPC::DataReference dataReference;
2371
    CoreIPC::DataReference dataReference;
2372
    KURL resourceURL(KURL(), resourceURLString);
2372
    URL resourceURL(URL(), resourceURLString);
2373
2373
2374
    RefPtr<SharedBuffer> buffer;
2374
    RefPtr<SharedBuffer> buffer;
2375
    if (WebFrame* frame = WebProcess::shared().webFrame(frameID)) {
2375
    if (WebFrame* frame = WebProcess::shared().webFrame(frameID)) {
Lines 3309-3315 void WebPage::SandboxExtensionTracker::didFailProvisionalLoad(WebFrame* frame) a/Source/WebKit2/WebProcess/WebPage/WebPage.cpp_sec6
3309
    // because it does not pertain to the failed load, and will be needed.
3309
    // because it does not pertain to the failed load, and will be needed.
3310
}
3310
}
3311
3311
3312
bool WebPage::hasLocalDataForURL(const KURL& url)
3312
bool WebPage::hasLocalDataForURL(const URL& url)
3313
{
3313
{
3314
    if (url.isLocalFile())
3314
    if (url.isLocalFile())
3315
        return true;
3315
        return true;
- a/Source/WebKit2/WebProcess/WebPage/WebPage.h -6 / +6 lines
Lines 413-422 public: a/Source/WebKit2/WebProcess/WebPage/WebPage.h_sec1
413
    WebContextMenu* contextMenuAtPointInWindow(const WebCore::IntPoint&);
413
    WebContextMenu* contextMenuAtPointInWindow(const WebCore::IntPoint&);
414
#endif
414
#endif
415
    
415
    
416
    bool hasLocalDataForURL(const WebCore::KURL&);
416
    bool hasLocalDataForURL(const WebCore::URL&);
417
    String cachedResponseMIMETypeForURL(const WebCore::KURL&);
417
    String cachedResponseMIMETypeForURL(const WebCore::URL&);
418
    String cachedSuggestedFilenameForURL(const WebCore::KURL&);
418
    String cachedSuggestedFilenameForURL(const WebCore::URL&);
419
    PassRefPtr<WebCore::SharedBuffer> cachedResponseDataForURL(const WebCore::KURL&);
419
    PassRefPtr<WebCore::SharedBuffer> cachedResponseDataForURL(const WebCore::URL&);
420
420
421
    static bool canHandleRequest(const WebCore::ResourceRequest&);
421
    static bool canHandleRequest(const WebCore::ResourceRequest&);
422
422
Lines 686-694 private: a/Source/WebKit2/WebProcess/WebPage/WebPage.h_sec2
686
686
687
    String sourceForFrame(WebFrame*);
687
    String sourceForFrame(WebFrame*);
688
688
689
    void loadDataImpl(PassRefPtr<WebCore::SharedBuffer>, const String& MIMEType, const String& encodingName, const WebCore::KURL& baseURL, const WebCore::KURL& failingURL, CoreIPC::MessageDecoder&);
689
    void loadDataImpl(PassRefPtr<WebCore::SharedBuffer>, const String& MIMEType, const String& encodingName, const WebCore::URL& baseURL, const WebCore::URL& failingURL, CoreIPC::MessageDecoder&);
690
690
691
    bool platformHasLocalDataForURL(const WebCore::KURL&);
691
    bool platformHasLocalDataForURL(const WebCore::URL&);
692
692
693
    // Actions
693
    // Actions
694
    void tryClose();
694
    void tryClose();
- a/Source/WebKit2/WebProcess/WebPage/efl/WebPageEfl.cpp -4 / +4 lines
Lines 126-138 bool WebPage::performDefaultBehaviorForKeyEvent(const WebKeyboardEvent& keyboard a/Source/WebKit2/WebProcess/WebPage/efl/WebPageEfl.cpp_sec1
126
    return true;
126
    return true;
127
}
127
}
128
128
129
bool WebPage::platformHasLocalDataForURL(const KURL&)
129
bool WebPage::platformHasLocalDataForURL(const URL&)
130
{
130
{
131
    notImplemented();
131
    notImplemented();
132
    return false;
132
    return false;
133
}
133
}
134
134
135
String WebPage::cachedResponseMIMETypeForURL(const KURL&)
135
String WebPage::cachedResponseMIMETypeForURL(const URL&)
136
{
136
{
137
    notImplemented();
137
    notImplemented();
138
    return String();
138
    return String();
Lines 144-156 bool WebPage::platformCanHandleRequest(const ResourceRequest&) a/Source/WebKit2/WebProcess/WebPage/efl/WebPageEfl.cpp_sec2
144
    return true;
144
    return true;
145
}
145
}
146
146
147
String WebPage::cachedSuggestedFilenameForURL(const KURL&)
147
String WebPage::cachedSuggestedFilenameForURL(const URL&)
148
{
148
{
149
    notImplemented();
149
    notImplemented();
150
    return String();
150
    return String();
151
}
151
}
152
152
153
PassRefPtr<SharedBuffer> WebPage::cachedResponseDataForURL(const KURL&)
153
PassRefPtr<SharedBuffer> WebPage::cachedResponseDataForURL(const URL&)
154
{
154
{
155
    notImplemented();
155
    notImplemented();
156
    return 0;
156
    return 0;
- a/Source/WebKit2/WebProcess/WebPage/gtk/WebPageGtk.cpp -4 / +4 lines
Lines 126-138 bool WebPage::performDefaultBehaviorForKeyEvent(const WebKeyboardEvent& keyboard a/Source/WebKit2/WebProcess/WebPage/gtk/WebPageGtk.cpp_sec1
126
    return true;
126
    return true;
127
}
127
}
128
128
129
bool WebPage::platformHasLocalDataForURL(const KURL&)
129
bool WebPage::platformHasLocalDataForURL(const URL&)
130
{
130
{
131
    notImplemented();
131
    notImplemented();
132
    return false;
132
    return false;
133
}
133
}
134
134
135
String WebPage::cachedResponseMIMETypeForURL(const KURL&)
135
String WebPage::cachedResponseMIMETypeForURL(const URL&)
136
{
136
{
137
    notImplemented();
137
    notImplemented();
138
    return String();
138
    return String();
Lines 144-156 bool WebPage::platformCanHandleRequest(const ResourceRequest&) a/Source/WebKit2/WebProcess/WebPage/gtk/WebPageGtk.cpp_sec2
144
    return true;
144
    return true;
145
}
145
}
146
146
147
String WebPage::cachedSuggestedFilenameForURL(const KURL&)
147
String WebPage::cachedSuggestedFilenameForURL(const URL&)
148
{
148
{
149
    notImplemented();
149
    notImplemented();
150
    return String();
150
    return String();
151
}
151
}
152
152
153
PassRefPtr<SharedBuffer> WebPage::cachedResponseDataForURL(const KURL&)
153
PassRefPtr<SharedBuffer> WebPage::cachedResponseDataForURL(const URL&)
154
{
154
{
155
    notImplemented();
155
    notImplemented();
156
    return 0;
156
    return 0;
- a/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm -5 / +5 lines
Lines 717-723 WKAccessibilityWebPageObject* WebPage::accessibilityRemoteObject() a/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm_sec1
717
    return m_mockAccessibilityElement.get();
717
    return m_mockAccessibilityElement.get();
718
}
718
}
719
         
719
         
720
bool WebPage::platformHasLocalDataForURL(const WebCore::KURL& url)
720
bool WebPage::platformHasLocalDataForURL(const WebCore::URL& url)
721
{
721
{
722
    NSMutableURLRequest* request = [[NSMutableURLRequest alloc] initWithURL:url];
722
    NSMutableURLRequest* request = [[NSMutableURLRequest alloc] initWithURL:url];
723
    [request setValue:(NSString*)userAgent() forHTTPHeaderField:@"User-Agent"];
723
    [request setValue:(NSString*)userAgent() forHTTPHeaderField:@"User-Agent"];
Lines 731-737 bool WebPage::platformHasLocalDataForURL(const WebCore::KURL& url) a/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm_sec2
731
    return cachedResponse;
731
    return cachedResponse;
732
}
732
}
733
733
734
static NSCachedURLResponse *cachedResponseForURL(WebPage* webPage, const KURL& url)
734
static NSCachedURLResponse *cachedResponseForURL(WebPage* webPage, const URL& url)
735
{
735
{
736
    RetainPtr<NSMutableURLRequest> request = adoptNS([[NSMutableURLRequest alloc] initWithURL:url]);
736
    RetainPtr<NSMutableURLRequest> request = adoptNS([[NSMutableURLRequest alloc] initWithURL:url]);
737
    [request.get() setValue:(NSString *)webPage->userAgent() forHTTPHeaderField:@"User-Agent"];
737
    [request.get() setValue:(NSString *)webPage->userAgent() forHTTPHeaderField:@"User-Agent"];
Lines 742-758 static NSCachedURLResponse *cachedResponseForURL(WebPage* webPage, const KURL& u a/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm_sec3
742
    return [[NSURLCache sharedURLCache] cachedResponseForRequest:request.get()];
742
    return [[NSURLCache sharedURLCache] cachedResponseForRequest:request.get()];
743
}
743
}
744
744
745
String WebPage::cachedSuggestedFilenameForURL(const KURL& url)
745
String WebPage::cachedSuggestedFilenameForURL(const URL& url)
746
{
746
{
747
    return [[cachedResponseForURL(this, url) response] suggestedFilename];
747
    return [[cachedResponseForURL(this, url) response] suggestedFilename];
748
}
748
}
749
749
750
String WebPage::cachedResponseMIMETypeForURL(const KURL& url)
750
String WebPage::cachedResponseMIMETypeForURL(const URL& url)
751
{
751
{
752
    return [[cachedResponseForURL(this, url) response] MIMEType];
752
    return [[cachedResponseForURL(this, url) response] MIMEType];
753
}
753
}
754
754
755
PassRefPtr<SharedBuffer> WebPage::cachedResponseDataForURL(const KURL& url)
755
PassRefPtr<SharedBuffer> WebPage::cachedResponseDataForURL(const URL& url)
756
{
756
{
757
    return SharedBuffer::wrapNSData([cachedResponseForURL(this, url) data]);
757
    return SharedBuffer::wrapNSData([cachedResponseForURL(this, url) data]);
758
}
758
}
- a/Source/WebKit2/WebProcess/WebPage/qt/WebPageQt.cpp -4 / +4 lines
Lines 268-280 bool WebPage::performDefaultBehaviorForKeyEvent(const WebKeyboardEvent& keyboard a/Source/WebKit2/WebProcess/WebPage/qt/WebPageQt.cpp_sec1
268
    return true;
268
    return true;
269
}
269
}
270
270
271
bool WebPage::platformHasLocalDataForURL(const KURL&)
271
bool WebPage::platformHasLocalDataForURL(const URL&)
272
{
272
{
273
    notImplemented();
273
    notImplemented();
274
    return false;
274
    return false;
275
}
275
}
276
276
277
String WebPage::cachedResponseMIMETypeForURL(const KURL&)
277
String WebPage::cachedResponseMIMETypeForURL(const URL&)
278
{
278
{
279
    notImplemented();
279
    notImplemented();
280
    return String();
280
    return String();
Lines 286-298 bool WebPage::platformCanHandleRequest(const ResourceRequest&) a/Source/WebKit2/WebProcess/WebPage/qt/WebPageQt.cpp_sec2
286
    return true;
286
    return true;
287
}
287
}
288
288
289
String WebPage::cachedSuggestedFilenameForURL(const KURL&)
289
String WebPage::cachedSuggestedFilenameForURL(const URL&)
290
{
290
{
291
    notImplemented();
291
    notImplemented();
292
    return String();
292
    return String();
293
}
293
}
294
294
295
PassRefPtr<SharedBuffer> WebPage::cachedResponseDataForURL(const KURL&)
295
PassRefPtr<SharedBuffer> WebPage::cachedResponseDataForURL(const URL&)
296
{
296
{
297
    notImplemented();
297
    notImplemented();
298
    return 0;
298
    return 0;
- a/Source/WebKit2/WebProcess/mac/WebProcessMac.mm -1 / +1 lines
Lines 240-246 void WebProcess::updateActivePages() a/Source/WebKit2/WebProcess/mac/WebProcessMac.mm_sec1
240
        if (!mainFrameOrigin->isUnique())
240
        if (!mainFrameOrigin->isUnique())
241
            mainFrameOriginString = mainFrameOrigin->toRawString();
241
            mainFrameOriginString = mainFrameOrigin->toRawString();
242
        else
242
        else
243
            mainFrameOriginString = KURL(KURL(), mainFrame->url()).protocol() + ':'; // toRawString() is not supposed to work with unique origins, and would just return "://".
243
            mainFrameOriginString = URL(URL(), mainFrame->url()).protocol() + ':'; // toRawString() is not supposed to work with unique origins, and would just return "://".
244
244
245
        NSURL *originAsNSURL = [NSURL URLWithString:mainFrameOriginString];
245
        NSURL *originAsNSURL = [NSURL URLWithString:mainFrameOriginString];
246
        // +[NSURL URLWithString:] returns nil when its argument is malformed. It's unclear how we can possibly have a malformed URL here,
246
        // +[NSURL URLWithString:] returns nil when its argument is malformed. It's unclear how we can possibly have a malformed URL here,
- a/Tools/ChangeLog +9 lines
Lines 1-3 a/Tools/ChangeLog_sec1
1
2013-09-26  Darin Adler  <darin@apple.com>
2
3
        rename KURL to URL
4
        https://bugs.webkit.org/show_bug.cgi?id=16214
5
6
        Reviewed by Andreas Kling.
7
8
        * many files: Renamed, using script.
9
1
2013-09-27  Patrick Gansterer  <paroga@webkit.org>
10
2013-09-27  Patrick Gansterer  <paroga@webkit.org>
2
11
3
        Add general CMakeLists.txt for DRT
12
        Add general CMakeLists.txt for DRT
- a/Tools/DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp -3 / +3 lines
Lines 32-38 a/Tools/DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp_sec1
32
#include "Frame.h"
32
#include "Frame.h"
33
#include "HTMLInputElement.h"
33
#include "HTMLInputElement.h"
34
#include "JSElement.h"
34
#include "JSElement.h"
35
#include "KURL.h"
35
#include "URL.h"
36
#include "NotImplemented.h"
36
#include "NotImplemented.h"
37
#include "Page.h"
37
#include "Page.h"
38
#include "RenderTreeAsText.h"
38
#include "RenderTreeAsText.h"
Lines 159-166 void TestRunner::queueLoad(JSStringRef url, JSStringRef target) a/Tools/DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp_sec2
159
    OwnArrayPtr<char> urlArr = adoptArrayPtr(new char[urlArrSize]);
159
    OwnArrayPtr<char> urlArr = adoptArrayPtr(new char[urlArrSize]);
160
    JSStringGetUTF8CString(url, urlArr.get(), urlArrSize);
160
    JSStringGetUTF8CString(url, urlArr.get(), urlArrSize);
161
161
162
    WebCore::KURL base = mainFrame->loader()->documentLoader()->response().url();
162
    WebCore::URL base = mainFrame->loader()->documentLoader()->response().url();
163
    WebCore::KURL absolute(base, urlArr.get());
163
    WebCore::URL absolute(base, urlArr.get());
164
164
165
    JSRetainPtr<JSStringRef> absoluteURL(Adopt, JSStringCreateWithUTF8CString(absolute.string().utf8().data()));
165
    JSRetainPtr<JSStringRef> absoluteURL(Adopt, JSStringCreateWithUTF8CString(absolute.string().utf8().data()));
166
    WorkQueue::shared()->queue(new LoadItem(absoluteURL.get(), target));
166
    WorkQueue::shared()->queue(new LoadItem(absoluteURL.get(), target));
- a/Tools/DumpRenderTree/blackberry/WorkQueueItemBlackBerry.cpp -2 / +2 lines
Lines 22-28 a/Tools/DumpRenderTree/blackberry/WorkQueueItemBlackBerry.cpp_sec1
22
#include "DumpRenderTreeBlackBerry.h"
22
#include "DumpRenderTreeBlackBerry.h"
23
#include "Frame.h"
23
#include "Frame.h"
24
#include "FrameLoadRequest.h"
24
#include "FrameLoadRequest.h"
25
#include "KURL.h"
25
#include "URL.h"
26
#include "WebPage.h"
26
#include "WebPage.h"
27
#include <wtf/OwnArrayPtr.h>
27
#include <wtf/OwnArrayPtr.h>
28
28
Lines 46-52 bool LoadItem::invoke() const a/Tools/DumpRenderTree/blackberry/WorkQueueItemBlackBerry.cpp_sec2
46
    if (!frame)
46
    if (!frame)
47
        return false;
47
        return false;
48
48
49
    KURL kurl = KURL(KURL(), url.get());
49
    URL kurl = URL(URL(), url.get());
50
    frame->loader()->load(FrameLoadRequest(frame, ResourceRequest(kurl)));
50
    frame->loader()->load(FrameLoadRequest(frame, ResourceRequest(kurl)));
51
    return true;
51
    return true;
52
}
52
}
- a/Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp -5 / +5 lines
Lines 33-39 a/Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp_sec1
33
#include "EditingCallbacks.h"
33
#include "EditingCallbacks.h"
34
#include "EventSender.h"
34
#include "EventSender.h"
35
#include "GCController.h"
35
#include "GCController.h"
36
#include "KURL.h"
36
#include "URL.h"
37
#include "NotImplemented.h"
37
#include "NotImplemented.h"
38
#include "TestRunner.h"
38
#include "TestRunner.h"
39
#include "TextInputController.h"
39
#include "TextInputController.h"
Lines 337-350 void DumpRenderTreeChrome::resetDefaultsToConsistentValues() a/Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp_sec2
337
337
338
static String pathSuitableForTestResult(const char* uriString)
338
static String pathSuitableForTestResult(const char* uriString)
339
{
339
{
340
    KURL uri = KURL(ParsedURLString, uriString);
340
    URL uri = URL(ParsedURLString, uriString);
341
    if (uri.isEmpty())
341
    if (uri.isEmpty())
342
        return "(null)";
342
        return "(null)";
343
343
344
    if (!uri.isLocalFile())
344
    if (!uri.isLocalFile())
345
        return uri.string();
345
        return uri.string();
346
346
347
    KURL mainFrameURL = KURL(ParsedURLString, ewk_frame_uri_get(browser->mainFrame()));
347
    URL mainFrameURL = URL(ParsedURLString, ewk_frame_uri_get(browser->mainFrame()));
348
    if (mainFrameURL.isEmpty())
348
    if (mainFrameURL.isEmpty())
349
        mainFrameURL = DumpRenderTreeSupportEfl::provisionalURL(browser->mainFrame());
349
        mainFrameURL = DumpRenderTreeSupportEfl::provisionalURL(browser->mainFrame());
350
350
Lines 555-561 void DumpRenderTreeChrome::onWillSendRequest(void*, Evas_Object*, void* eventInf a/Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp_sec3
555
        return;
555
        return;
556
    }
556
    }
557
557
558
    KURL url = KURL(ParsedURLString, messages->request->url);
558
    URL url = URL(ParsedURLString, messages->request->url);
559
559
560
    if (url.isValid()
560
    if (url.isValid()
561
        && url.protocolIsInHTTPFamily()
561
        && url.protocolIsInHTTPFamily()
Lines 800-806 void DumpRenderTreeChrome::onResponseReceived(void*, Evas_Object*, void* eventIn a/Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp_sec4
800
800
801
    if (!done && gTestRunner->dumpResourceResponseMIMETypes()) {
801
    if (!done && gTestRunner->dumpResourceResponseMIMETypes()) {
802
        printf("%s has MIME type %s\n",
802
        printf("%s has MIME type %s\n",
803
               KURL(ParsedURLString, response->url).lastPathComponent().utf8().data(),
803
               URL(ParsedURLString, response->url).lastPathComponent().utf8().data(),
804
               response->mime_type);
804
               response->mime_type);
805
    }
805
    }
806
}
806
}
- a/Tools/DumpRenderTree/efl/TestRunnerEfl.cpp -5 / +5 lines
Lines 50-56 a/Tools/DumpRenderTree/efl/TestRunnerEfl.cpp_sec1
50
#include <JavaScriptCore/JSRetainPtr.h>
50
#include <JavaScriptCore/JSRetainPtr.h>
51
#include <JavaScriptCore/JSStringRef.h>
51
#include <JavaScriptCore/JSStringRef.h>
52
#include <JavaScriptCore/OpaqueJSString.h>
52
#include <JavaScriptCore/OpaqueJSString.h>
53
#include <KURL.h>
53
#include <URL.h>
54
#include <editing/FindOptions.h>
54
#include <editing/FindOptions.h>
55
#include <stdio.h>
55
#include <stdio.h>
56
#include <wtf/text/WTFString.h>
56
#include <wtf/text/WTFString.h>
Lines 157-164 JSStringRef TestRunner::pathToLocalResource(JSContextRef context, JSStringRef ur a/Tools/DumpRenderTree/efl/TestRunnerEfl.cpp_sec2
157
157
158
void TestRunner::queueLoad(JSStringRef url, JSStringRef target)
158
void TestRunner::queueLoad(JSStringRef url, JSStringRef target)
159
{
159
{
160
    WebCore::KURL baseURL(WebCore::KURL(), String::fromUTF8(ewk_frame_uri_get(browser->mainFrame())));
160
    WebCore::URL baseURL(WebCore::URL(), String::fromUTF8(ewk_frame_uri_get(browser->mainFrame())));
161
    WebCore::KURL absoluteURL(baseURL, url->string());
161
    WebCore::URL absoluteURL(baseURL, url->string());
162
162
163
    JSRetainPtr<JSStringRef> jsAbsoluteURL(
163
    JSRetainPtr<JSStringRef> jsAbsoluteURL(
164
        Adopt, JSStringCreateWithUTF8CString(absoluteURL.string().utf8().data()));
164
        Adopt, JSStringCreateWithUTF8CString(absoluteURL.string().utf8().data()));
Lines 196-202 void TestRunner::setScrollbarPolicy(JSStringRef, JSStringRef) a/Tools/DumpRenderTree/efl/TestRunnerEfl.cpp_sec3
196
196
197
void TestRunner::addOriginAccessWhitelistEntry(JSStringRef sourceOrigin, JSStringRef protocol, JSStringRef host, bool includeSubdomains)
197
void TestRunner::addOriginAccessWhitelistEntry(JSStringRef sourceOrigin, JSStringRef protocol, JSStringRef host, bool includeSubdomains)
198
{
198
{
199
    WebCore::KURL kurl;
199
    WebCore::URL kurl;
200
    kurl.setProtocol(String(protocol->characters(), protocol->length()));
200
    kurl.setProtocol(String(protocol->characters(), protocol->length()));
201
    kurl.setHost(String(host->characters(), host->length()));
201
    kurl.setHost(String(host->characters(), host->length()));
202
202
Lines 205-211 void TestRunner::addOriginAccessWhitelistEntry(JSStringRef sourceOrigin, JSStrin a/Tools/DumpRenderTree/efl/TestRunnerEfl.cpp_sec4
205
205
206
void TestRunner::removeOriginAccessWhitelistEntry(JSStringRef sourceOrigin, JSStringRef protocol, JSStringRef host, bool includeSubdomains)
206
void TestRunner::removeOriginAccessWhitelistEntry(JSStringRef sourceOrigin, JSStringRef protocol, JSStringRef host, bool includeSubdomains)
207
{
207
{
208
    WebCore::KURL kurl;
208
    WebCore::URL kurl;
209
    kurl.setProtocol(String(protocol->characters(), protocol->length()));
209
    kurl.setProtocol(String(protocol->characters(), protocol->length()));
210
    kurl.setHost(String(host->characters(), host->length()));
210
    kurl.setHost(String(host->characters(), host->length()));
211
211
- a/Tools/Scripts/do-webcore-rename -9 / +8 lines
Lines 74-79 find(\&wanted, "Source/WebCore"); a/Tools/Scripts/do-webcore-rename_sec1
74
find(\&wanted, "Source/WebKit");
74
find(\&wanted, "Source/WebKit");
75
find(\&wanted, "Source/WebKit2");
75
find(\&wanted, "Source/WebKit2");
76
find(\&wanted, "Tools/DumpRenderTree");
76
find(\&wanted, "Tools/DumpRenderTree");
77
find(\&wanted, "Tools/TestWebKitAPI");
77
78
78
sub wanted
79
sub wanted
79
{
80
{
Lines 93-103 sub wanted a/Tools/Scripts/do-webcore-rename_sec2
93
94
94
# Setting isDOMTypeRename to 1 rather than 0 expands the regexps used
95
# Setting isDOMTypeRename to 1 rather than 0 expands the regexps used
95
# below to handle custom JavaScript bindings.
96
# below to handle custom JavaScript bindings.
96
my $isDOMTypeRename = 1;
97
my $isDOMTypeRename = 0;
97
my %renames = (
98
my %renames = (
98
    # Renames go here in the form of:
99
    # Renames go here in the form of:
99
    "isTransformInvertible" => "hasInvertibleTransform",
100
    "WKURL" => "WKURL",
100
    "m_invertibleCTM" => "m_hasInvertibleTransform",
101
    "KURL" => "URL",
102
    "KURLCFNet" => "URLCF",
103
    "KURLHash" => "URLHash",
104
    "KURLMac" => "URLMac",
105
    "KURL_h" => "URL_h",
101
);
106
);
102
107
103
my %renamesContemplatedForTheFuture = (
108
my %renamesContemplatedForTheFuture = (
Lines 108-119 my %renamesContemplatedForTheFuture = ( a/Tools/Scripts/do-webcore-rename_sec3
108
    "DateInstance" => "JSDate",
113
    "DateInstance" => "JSDate",
109
    "ErrorInstance" => "JSError",
114
    "ErrorInstance" => "JSError",
110
115
111
    "KURL" => "URL",
112
    "KURLCFNet" => "URLCF",
113
    "KURLHash" => "URLHash",
114
    "KURLMac" => "URLMac",
115
    "KURL_h" => "URL_h",
116
117
    "TreeShared" => "TreeRefCounted",
116
    "TreeShared" => "TreeRefCounted",
118
117
119
    "StringImpl" => "SharedString",
118
    "StringImpl" => "SharedString",
- a/Tools/TestWebKitAPI/GNUmakefile.am -1 / +1 lines
Lines 166-172 Programs_TestWebKitAPI_TestWebCore_LDFLAGS = \ a/Tools/TestWebKitAPI/GNUmakefile.am_sec1
166
	-no-fast-install
166
	-no-fast-install
167
167
168
Programs_TestWebKitAPI_TestWebCore_SOURCES = \
168
Programs_TestWebKitAPI_TestWebCore_SOURCES = \
169
	Tools/TestWebKitAPI/Tests/WebCore/KURL.cpp \
169
	Tools/TestWebKitAPI/Tests/WebCore/URL.cpp \
170
	Tools/TestWebKitAPI/Tests/WebCore/LayoutUnit.cpp
170
	Tools/TestWebKitAPI/Tests/WebCore/LayoutUnit.cpp
171
171
172
Programs_TestWebKitAPI_TestGtk_CPPFLAGS = \
172
Programs_TestWebKitAPI_TestGtk_CPPFLAGS = \
- a/Tools/TestWebKitAPI/PlatformEfl.cmake -1 / +1 lines
Lines 49-55 set(webkit2_api_harness_SOURCES a/Tools/TestWebKitAPI/PlatformEfl.cmake_sec1
49
49
50
set(test_webcore_BINARIES
50
set(test_webcore_BINARIES
51
    LayoutUnit
51
    LayoutUnit
52
    KURL
52
    URL
53
)
53
)
54
54
55
# In here we list the bundles that are used by our specific WK2 API Tests
55
# In here we list the bundles that are used by our specific WK2 API Tests
- a/Tools/TestWebKitAPI/PlatformGTK.cmake -1 / +1 lines
Lines 64-70 list(APPEND test_webcore_LIBRARIES a/Tools/TestWebKitAPI/PlatformGTK.cmake_sec1
64
64
65
set(test_webcore_BINARIES
65
set(test_webcore_BINARIES
66
    LayoutUnit
66
    LayoutUnit
67
    KURL
67
    URL
68
)
68
)
69
69
70
set(test_webkit2_api_BINARIES
70
set(test_webkit2_api_BINARIES
- a/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj -4 / +4 lines
Lines 75-81 a/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj_sec1
75
		37E1064C1697681800B78BD0 /* DOMHTMLTableCellElementCellAbove.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 37E1064B169767F700B78BD0 /* DOMHTMLTableCellElementCellAbove.html */; };
75
		37E1064C1697681800B78BD0 /* DOMHTMLTableCellElementCellAbove.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 37E1064B169767F700B78BD0 /* DOMHTMLTableCellElementCellAbove.html */; };
76
		37E1064D16976C8500B78BD0 /* DOMHTMLTableCellCellAbove.mm in Sources */ = {isa = PBXBuildFile; fileRef = 37E1064A1697676400B78BD0 /* DOMHTMLTableCellCellAbove.mm */; };
76
		37E1064D16976C8500B78BD0 /* DOMHTMLTableCellCellAbove.mm in Sources */ = {isa = PBXBuildFile; fileRef = 37E1064A1697676400B78BD0 /* DOMHTMLTableCellCellAbove.mm */; };
77
		37E38C34169B7D010084C28C /* WebViewDidRemoveFrameFromHierarchy.mm in Sources */ = {isa = PBXBuildFile; fileRef = 37E38C33169B7D010084C28C /* WebViewDidRemoveFrameFromHierarchy.mm */; };
77
		37E38C34169B7D010084C28C /* WebViewDidRemoveFrameFromHierarchy.mm in Sources */ = {isa = PBXBuildFile; fileRef = 37E38C33169B7D010084C28C /* WebViewDidRemoveFrameFromHierarchy.mm */; };
78
		440A1D3914A0103A008A66F2 /* KURL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 440A1D3814A0103A008A66F2 /* KURL.cpp */; };
78
		440A1D3914A0103A008A66F2 /* URL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 440A1D3814A0103A008A66F2 /* URL.cpp */; };
79
		4BB4160216815B2600824238 /* JSWrapperForNodeInWebFrame.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4BB4160116815B2600824238 /* JSWrapperForNodeInWebFrame.mm */; };
79
		4BB4160216815B2600824238 /* JSWrapperForNodeInWebFrame.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4BB4160116815B2600824238 /* JSWrapperForNodeInWebFrame.mm */; };
80
		4BB4160416815F9100824238 /* ElementAtPointInWebFrame.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4BB4160316815F9100824238 /* ElementAtPointInWebFrame.mm */; };
80
		4BB4160416815F9100824238 /* ElementAtPointInWebFrame.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4BB4160316815F9100824238 /* ElementAtPointInWebFrame.mm */; };
81
		4BFDFFA71314776C0061F24B /* HitTestResultNodeHandle_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BFDFFA61314776C0061F24B /* HitTestResultNodeHandle_Bundle.cpp */; };
81
		4BFDFFA71314776C0061F24B /* HitTestResultNodeHandle_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BFDFFA61314776C0061F24B /* HitTestResultNodeHandle_Bundle.cpp */; };
Lines 380-386 a/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj_sec2
380
		37E1064A1697676400B78BD0 /* DOMHTMLTableCellCellAbove.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMHTMLTableCellCellAbove.mm; sourceTree = "<group>"; };
380
		37E1064A1697676400B78BD0 /* DOMHTMLTableCellCellAbove.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMHTMLTableCellCellAbove.mm; sourceTree = "<group>"; };
381
		37E1064B169767F700B78BD0 /* DOMHTMLTableCellElementCellAbove.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = DOMHTMLTableCellElementCellAbove.html; sourceTree = "<group>"; };
381
		37E1064B169767F700B78BD0 /* DOMHTMLTableCellElementCellAbove.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = DOMHTMLTableCellElementCellAbove.html; sourceTree = "<group>"; };
382
		37E38C33169B7D010084C28C /* WebViewDidRemoveFrameFromHierarchy.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebViewDidRemoveFrameFromHierarchy.mm; sourceTree = "<group>"; };
382
		37E38C33169B7D010084C28C /* WebViewDidRemoveFrameFromHierarchy.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebViewDidRemoveFrameFromHierarchy.mm; sourceTree = "<group>"; };
383
		440A1D3814A0103A008A66F2 /* KURL.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = KURL.cpp; sourceTree = "<group>"; };
383
		440A1D3814A0103A008A66F2 /* URL.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = URL.cpp; sourceTree = "<group>"; };
384
		44A622C114A0E2B60048515B /* WTFStringUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WTFStringUtilities.h; sourceTree = "<group>"; };
384
		44A622C114A0E2B60048515B /* WTFStringUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WTFStringUtilities.h; sourceTree = "<group>"; };
385
		4BB4160116815B2600824238 /* JSWrapperForNodeInWebFrame.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = JSWrapperForNodeInWebFrame.mm; sourceTree = "<group>"; };
385
		4BB4160116815B2600824238 /* JSWrapperForNodeInWebFrame.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = JSWrapperForNodeInWebFrame.mm; sourceTree = "<group>"; };
386
		4BB4160316815F9100824238 /* ElementAtPointInWebFrame.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ElementAtPointInWebFrame.mm; sourceTree = "<group>"; };
386
		4BB4160316815F9100824238 /* ElementAtPointInWebFrame.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ElementAtPointInWebFrame.mm; sourceTree = "<group>"; };
Lines 646-652 a/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj_sec3
646
		440A1D3614A01000008A66F2 /* WebCore */ = {
646
		440A1D3614A01000008A66F2 /* WebCore */ = {
647
			isa = PBXGroup;
647
			isa = PBXGroup;
648
			children = (
648
			children = (
649
				440A1D3814A0103A008A66F2 /* KURL.cpp */,
649
				440A1D3814A0103A008A66F2 /* URL.cpp */,
650
				14464012167A8305000BD218 /* LayoutUnit.cpp */,
650
				14464012167A8305000BD218 /* LayoutUnit.cpp */,
651
			);
651
			);
652
			path = WebCore;
652
			path = WebCore;
Lines 1142-1148 a/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj_sec4
1142
				C0ADBE7C12FCA4D000D2C129 /* JavaScriptTest.cpp in Sources */,
1142
				C0ADBE7C12FCA4D000D2C129 /* JavaScriptTest.cpp in Sources */,
1143
				C081224213FC172400DC39AE /* JavaScriptTestMac.mm in Sources */,
1143
				C081224213FC172400DC39AE /* JavaScriptTestMac.mm in Sources */,
1144
				4BB4160216815B2600824238 /* JSWrapperForNodeInWebFrame.mm in Sources */,
1144
				4BB4160216815B2600824238 /* JSWrapperForNodeInWebFrame.mm in Sources */,
1145
				440A1D3914A0103A008A66F2 /* KURL.cpp in Sources */,
1145
				440A1D3914A0103A008A66F2 /* URL.cpp in Sources */,
1146
				14464013167A8305000BD218 /* LayoutUnit.cpp in Sources */,
1146
				14464013167A8305000BD218 /* LayoutUnit.cpp in Sources */,
1147
				2D640B5517875DFF00BFAF99 /* ScrollPinningBehaviors.cpp in Sources */,
1147
				2D640B5517875DFF00BFAF99 /* ScrollPinningBehaviors.cpp in Sources */,
1148
				26300B1816755CD90066886D /* ListHashSet.cpp in Sources */,
1148
				26300B1816755CD90066886D /* ListHashSet.cpp in Sources */,
- a/Tools/TestWebKitAPI/Tests/WebCore/KURL.cpp -82 lines
Lines 1-82 a/Tools/TestWebKitAPI/Tests/WebCore/KURL.cpp_sec1
1
/*
2
 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
6
 * are met:
7
 * 1. Redistributions of source code must retain the above copyright
8
 *    notice, this list of conditions and the following disclaimer.
9
 * 2. Redistributions in binary form must reproduce the above copyright
10
 *    notice, this list of conditions and the following disclaimer in the
11
 *    documentation and/or other materials provided with the distribution.
12
 *
13
 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16
 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17
 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23
 * THE POSSIBILITY OF SUCH DAMAGE.
24
 */
25
26
#include "config.h"
27
#include "WTFStringUtilities.h"
28
#include <WebCore/KURL.h>
29
#include <wtf/MainThread.h>
30
31
using namespace WebCore;
32
33
namespace TestWebKitAPI {
34
35
class KURLTest : public testing::Test {
36
public:
37
    virtual void SetUp()
38
    {
39
        WTF::initializeMainThread();
40
    }
41
};
42
43
TEST_F(KURLTest, KURLConstructorDefault)
44
{
45
    KURL kurl;
46
47
    EXPECT_TRUE(kurl.isEmpty());
48
    EXPECT_TRUE(kurl.isNull());
49
    EXPECT_FALSE(kurl.isValid());
50
}
51
52
TEST_F(KURLTest, KURLConstructorConstChar)
53
{
54
    KURL kurl(ParsedURLString, "http://username:password@www.example.com:8080/index.html?var=val#fragment");
55
56
    EXPECT_FALSE(kurl.isEmpty());
57
    EXPECT_FALSE(kurl.isNull());
58
    EXPECT_TRUE(kurl.isValid());
59
60
    EXPECT_EQ(String("http"), kurl.protocol());
61
    EXPECT_EQ(String("www.example.com"), kurl.host());
62
    EXPECT_TRUE(kurl.hasPort());
63
    EXPECT_EQ(8080, kurl.port());
64
    EXPECT_EQ(String("username"), kurl.user());
65
    EXPECT_EQ(String("password"), kurl.pass());
66
    EXPECT_EQ(String("/index.html"), kurl.path());
67
    EXPECT_EQ(String("index.html"), kurl.lastPathComponent());
68
    EXPECT_EQ(String("var=val"), kurl.query());
69
    EXPECT_TRUE(kurl.hasFragmentIdentifier());
70
    EXPECT_EQ(String("fragment"), kurl.fragmentIdentifier());
71
}
72
73
TEST_F(KURLTest, KURLDataURIStringSharing)
74
{
75
    KURL baseURL(ParsedURLString, "http://www.webkit.org/");
76
    String threeApples = "data:text/plain;charset=utf-8;base64,76O/76O/76O/";
77
78
    KURL url(baseURL, threeApples);
79
    EXPECT_EQ(threeApples.impl(), url.string().impl());
80
}
81
82
} // namespace TestWebKitAPI

Return to Bug 16214