Skip to content
Permalink
Browse files
2011-05-04 Tao Bai <michaelbai@chromium.org>
        Reviewed by David Kilzer.

        Populate touch-icon url to FrameLoaderClient
        https://bugs.webkit.org/show_bug.cgi?id=59143

        * Configurations/FeatureDefines.xcconfig:
2011-05-04  Tao Bai  <michaelbai@chromium.org>

        Reviewed by David Kilzer.

        Populate touch-icon url to FrameLoaderClient
        https://bugs.webkit.org/show_bug.cgi?id=59143

        Parsed and populated apple-touch-icon url to FrameLoaderClient.
        Changed favicon to be a type of icon.

        * CMakeLists.txt:
        * Configurations/FeatureDefines.xcconfig:
        * GNUmakefile.am:
        * GNUmakefile.list.am:
        * WebCore.gypi:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
        * dom/Document.cpp:
        (WebCore::Document::iconURL):
        (WebCore::Document::setIconURL):
        * dom/Document.h:
        * dom/IconURL.cpp: Added.
        (WebCore::toIconIndex):
        * dom/IconURL.h: Added.
        (WebCore::IconURL::IconURL):
        * features.pri:
        * html/HTMLLinkElement.cpp:
        (WebCore::HTMLLinkElement::tokenizeRelAttribute):
        (WebCore::HTMLLinkElement::process):
        (WebCore::HTMLLinkElement::addSubresourceAttributeURLs):
        * html/HTMLLinkElement.h:
        (WebCore::HTMLLinkElement::RelAttribute::RelAttribute):
        (WebCore::HTMLLinkElement::isEnabledViaScript):
        * html/parser/HTMLPreloadScanner.cpp:
        (WebCore::HTMLNames::PreloadTask::relAttributeIsStyleSheet):
        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::iconURL):
        (WebCore::DocumentLoader::setIconURL):
        * loader/DocumentLoader.h:
        * loader/EmptyClients.h:
        (WebCore::EmptyFrameLoaderClient::dispatchDidChangeIcons):
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::iconURL):
        (WebCore::FrameLoader::iconURLs):
        (WebCore::FrameLoader::fillIconURL):
        (WebCore::FrameLoader::getDefaultIconURL):
        (WebCore::FrameLoader::setIconURL):
        (WebCore::FrameLoader::didChangeIcons):
        * loader/FrameLoader.h:
        * loader/FrameLoaderClient.h:
2011-05-04  Tao Bai  <michaelbai@chromium.org>

        Reviewed by David Kilzer.

        Populate touch-icon url to FrameLoaderClient
        https://bugs.webkit.org/show_bug.cgi?id=59143

        Respected the change of FrameLoaderClient.

        * src/FrameLoaderClientImpl.cpp:
        (WebKit::FrameLoaderClientImpl::dispatchDidChangeIcons):
        * src/FrameLoaderClientImpl.h:
2011-05-04  Tao Bai  <michaelbai@chromium.org>

        Reviewed by David Kilzer.

        Populate touch-icon url to FrameLoaderClient
        https://bugs.webkit.org/show_bug.cgi?id=59143

        Respect the interface change in FrameLoaderClient

        * WebCoreSupport/FrameLoaderClientEfl.cpp:
        (WebCore::FrameLoaderClientEfl::dispatchDidChangeIcons):
        * WebCoreSupport/FrameLoaderClientEfl.h:
2011-05-04  Tao Bai  <michaelbai@chromium.org>

        Reviewed by David Kilzer.

        Populate touch-icon url to FrameLoaderClient
        https://bugs.webkit.org/show_bug.cgi?id=59143

        Respect the interface change in FrameLoaderClient.

        * WebCoreSupport/FrameLoaderClientGtk.cpp:
        (WebKit::FrameLoaderClient::dispatchDidChangeIcons):
        * WebCoreSupport/FrameLoaderClientGtk.h:
2011-05-04  Tao Bai  <michaelbai@chromium.org>

        Reviewed by David Kilzer.

        Populate touch-icon url to FrameLoaderClient
        https://bugs.webkit.org/show_bug.cgi?id=59143

        Respect the interface change in FrameLoaderClient.

        * Configurations/FeatureDefines.xcconfig:
        * WebCoreSupport/WebFrameLoaderClient.h:
        * WebCoreSupport/WebFrameLoaderClient.mm:
        (WebFrameLoaderClient::dispatchDidChangeIcons):
2011-05-04  Tao Bai  <michaelbai@chromium.org>

        Reviewed by David Kilzer.

        Populate touch-icon url to FrameLoaderClient
        https://bugs.webkit.org/show_bug.cgi?id=59143

        Respect the interface change in FrameLoaderClient.

        * WebCoreSupport/FrameLoaderClientQt.cpp:
        (WebCore::FrameLoaderClientQt::dispatchDidChangeIcons):
        * WebCoreSupport/FrameLoaderClientQt.h:
2011-05-04  Tao Bai  <michaelbai@chromium.org>

        Reviewed by David Kilzer.

        Populate touch-icon url to FrameLoaderClient
        https://bugs.webkit.org/show_bug.cgi?id=59143

        Respect the interface change in FrameLoaderClient.

        * WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebFrameLoaderClient::dispatchDidChangeIcons):
        * WebCoreSupport/WebFrameLoaderClient.h:
2011-05-04  Tao Bai  <michaelbai@chromium.org>

        Reviewed by David Kilzer.

        Populate touch-icon url to FrameLoaderClient
        https://bugs.webkit.org/show_bug.cgi?id=59143

        Respect the interface change in FrameLoaderClient.

        * WebCoreSupport/FrameLoaderClientWinCE.cpp:
        (WebKit::FrameLoaderClientWinCE::dispatchDidChangeIcons):
        * WebCoreSupport/FrameLoaderClientWinCE.h:
2011-05-04  Tao Bai  <michaelbai@chromium.org>

        Reviewed by David Kilzer.

        Populate touch-icon url to FrameLoaderClient
        https://bugs.webkit.org/show_bug.cgi?id=59143

        Respect the interface change in FrameLoaderClient.

        * WebKitSupport/FrameLoaderClientWx.cpp:
        (WebCore::FrameLoaderClientWx::dispatchDidChangeIcons):
        * WebKitSupport/FrameLoaderClientWx.h:
2011-05-04  Tao Bai  <michaelbai@chromium.org>

        Reviewed by David Kilzer.

        Populate touch-icon url to FrameLoaderClient
        https://bugs.webkit.org/show_bug.cgi?id=59143

        Respected the change of FrameLoaderClient.
        Added WebIconURL and WebIconType responding the new IconURL and IconType.
        Supported to get the multiple icon urls.

        * Configurations/FeatureDefines.xcconfig:
        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::dispatchDidChangeIcons):
        * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2011-05-04  Tao Bai  <michaelbai@chromium.org>

        Reviewed by David Kilzer.

        Populate touch-icon url to FrameLoaderClient
        https://bugs.webkit.org/show_bug.cgi?id=59143

        Disable touch icon by default.

        * Scripts/build-webkit:

Canonical link: https://commits.webkit.org/75470@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@85785 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
webkit-commit-queue committed May 4, 2011
1 parent d7cc1bd commit d9088689e4cb9aab1b89df2720171b82f5d94924
Showing 57 changed files with 578 additions and 65 deletions.
@@ -1,3 +1,12 @@
2011-05-04 Tao Bai <michaelbai@chromium.org>

Reviewed by David Kilzer.

Populate touch-icon url to FrameLoaderClient
https://bugs.webkit.org/show_bug.cgi?id=59143

* Configurations/FeatureDefines.xcconfig:

2011-05-03 Geoffrey Garen <ggaren@apple.com>

Reviewed by Darin Adler.
@@ -117,6 +117,8 @@ ENABLE_VIDEO_TRACK = ;

ENABLE_MEDIA_STATISTICS = ;

ENABLE_TOUCH_ICON_LOADING = ;

ENABLE_WEB_AUDIO = ;

ENABLE_WEB_SOCKETS = $(ENABLE_WEB_SOCKETS_$(REAL_PLATFORM_NAME));
@@ -131,4 +133,4 @@ ENABLE_XHTMLMP = ;
ENABLE_XPATH = ENABLE_XPATH;
ENABLE_XSLT = ENABLE_XSLT;

FEATURE_DEFINES = $(ENABLE_LINK_PREFETCH) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_WEBGL) $(ENABLE_3D_RENDERING) $(ENABLE_ANIMATION_API) $(ENABLE_BLOB) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CLIENT_BASED_GEOLOCATION) $(ENABLE_DATABASE) $(ENABLE_DATALIST) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DETAILS) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DIRECTORY_UPLOAD) $(ENABLE_DOM_STORAGE) $(ENABLE_EVENTSOURCE) $(ENABLE_FILTERS) $(ENABLE_FILE_SYSTEM) $(ENABLE_FULLSCREEN_API) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INPUT_SPEECH) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_MATHML) $(ENABLE_METER_TAG) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFLINE_WEB_APPLICATIONS) $(ENABLE_PAGE_VISIBILITY_API) $(ENABLE_PROGRESS_TAG) $(ENABLE_REGISTER_PROTOCOL_HANDLER) $(ENABLE_QUOTA) $(ENABLE_SHARED_WORKERS) $(ENABLE_SVG) $(ENABLE_SVG_ANIMATION) $(ENABLE_SVG_AS_IMAGE) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS) $(ENABLE_SVG_FOREIGN_OBJECT) $(ENABLE_SVG_USE) $(ENABLE_VIDEO) $(ENABLE_VIDEO_TRACK) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WORKERS) $(ENABLE_XHTMLMP) $(ENABLE_XPATH) $(ENABLE_XSLT);
FEATURE_DEFINES = $(ENABLE_LINK_PREFETCH) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_WEBGL) $(ENABLE_3D_RENDERING) $(ENABLE_ANIMATION_API) $(ENABLE_BLOB) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CLIENT_BASED_GEOLOCATION) $(ENABLE_DATABASE) $(ENABLE_DATALIST) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DETAILS) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DIRECTORY_UPLOAD) $(ENABLE_DOM_STORAGE) $(ENABLE_EVENTSOURCE) $(ENABLE_FILTERS) $(ENABLE_FILE_SYSTEM) $(ENABLE_FULLSCREEN_API) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INPUT_SPEECH) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_MATHML) $(ENABLE_METER_TAG) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFLINE_WEB_APPLICATIONS) $(ENABLE_PAGE_VISIBILITY_API) $(ENABLE_PROGRESS_TAG) $(ENABLE_REGISTER_PROTOCOL_HANDLER) $(ENABLE_QUOTA) $(ENABLE_SHARED_WORKERS) $(ENABLE_SVG) $(ENABLE_SVG_ANIMATION) $(ENABLE_SVG_AS_IMAGE) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS) $(ENABLE_SVG_FOREIGN_OBJECT) $(ENABLE_SVG_USE) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_VIDEO) $(ENABLE_VIDEO_TRACK) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WORKERS) $(ENABLE_XHTMLMP) $(ENABLE_XPATH) $(ENABLE_XSLT);
@@ -569,6 +569,7 @@ SET(WebCore_SOURCES
dom/EventQueue.cpp
dom/ExceptionBase.cpp
dom/ExceptionCode.cpp
dom/IconURL.cpp
dom/InputElement.cpp
dom/KeyboardEvent.cpp
dom/MessageChannel.cpp
@@ -1,3 +1,54 @@
2011-05-04 Tao Bai <michaelbai@chromium.org>

Reviewed by David Kilzer.

Populate touch-icon url to FrameLoaderClient
https://bugs.webkit.org/show_bug.cgi?id=59143

Parsed and populated apple-touch-icon url to FrameLoaderClient.
Changed favicon to be a type of icon.

* CMakeLists.txt:
* Configurations/FeatureDefines.xcconfig:
* GNUmakefile.am:
* GNUmakefile.list.am:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* dom/Document.cpp:
(WebCore::Document::iconURL):
(WebCore::Document::setIconURL):
* dom/Document.h:
* dom/IconURL.cpp: Added.
(WebCore::toIconIndex):
* dom/IconURL.h: Added.
(WebCore::IconURL::IconURL):
* features.pri:
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::tokenizeRelAttribute):
(WebCore::HTMLLinkElement::process):
(WebCore::HTMLLinkElement::addSubresourceAttributeURLs):
* html/HTMLLinkElement.h:
(WebCore::HTMLLinkElement::RelAttribute::RelAttribute):
(WebCore::HTMLLinkElement::isEnabledViaScript):
* html/parser/HTMLPreloadScanner.cpp:
(WebCore::HTMLNames::PreloadTask::relAttributeIsStyleSheet):
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::iconURL):
(WebCore::DocumentLoader::setIconURL):
* loader/DocumentLoader.h:
* loader/EmptyClients.h:
(WebCore::EmptyFrameLoaderClient::dispatchDidChangeIcons):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::iconURL):
(WebCore::FrameLoader::iconURLs):
(WebCore::FrameLoader::fillIconURL):
(WebCore::FrameLoader::getDefaultIconURL):
(WebCore::FrameLoader::setIconURL):
(WebCore::FrameLoader::didChangeIcons):
* loader/FrameLoader.h:
* loader/FrameLoaderClient.h:

2011-05-04 Chris Marrin <cmarrin@apple.com>

Reviewed by Simon Fraser.
@@ -117,6 +117,8 @@ ENABLE_VIDEO_TRACK = ;

ENABLE_MEDIA_STATISTICS = ;

ENABLE_TOUCH_ICON_LOADING = ;

ENABLE_WEB_AUDIO = ;

ENABLE_WEB_SOCKETS = $(ENABLE_WEB_SOCKETS_$(REAL_PLATFORM_NAME));
@@ -131,4 +133,4 @@ ENABLE_XHTMLMP = ;
ENABLE_XPATH = ENABLE_XPATH;
ENABLE_XSLT = ENABLE_XSLT;

FEATURE_DEFINES = $(ENABLE_LINK_PREFETCH) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_WEBGL) $(ENABLE_3D_RENDERING) $(ENABLE_ANIMATION_API) $(ENABLE_BLOB) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CLIENT_BASED_GEOLOCATION) $(ENABLE_DATABASE) $(ENABLE_DATALIST) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DETAILS) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DIRECTORY_UPLOAD) $(ENABLE_DOM_STORAGE) $(ENABLE_EVENTSOURCE) $(ENABLE_FILTERS) $(ENABLE_FILE_SYSTEM) $(ENABLE_FULLSCREEN_API) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INPUT_SPEECH) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_MATHML) $(ENABLE_METER_TAG) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFLINE_WEB_APPLICATIONS) $(ENABLE_PAGE_VISIBILITY_API) $(ENABLE_PROGRESS_TAG) $(ENABLE_REGISTER_PROTOCOL_HANDLER) $(ENABLE_QUOTA) $(ENABLE_SHARED_WORKERS) $(ENABLE_SVG) $(ENABLE_SVG_ANIMATION) $(ENABLE_SVG_AS_IMAGE) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS) $(ENABLE_SVG_FOREIGN_OBJECT) $(ENABLE_SVG_USE) $(ENABLE_VIDEO) $(ENABLE_VIDEO_TRACK) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WORKERS) $(ENABLE_XHTMLMP) $(ENABLE_XPATH) $(ENABLE_XSLT);
FEATURE_DEFINES = $(ENABLE_LINK_PREFETCH) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_WEBGL) $(ENABLE_3D_RENDERING) $(ENABLE_ANIMATION_API) $(ENABLE_BLOB) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CLIENT_BASED_GEOLOCATION) $(ENABLE_DATABASE) $(ENABLE_DATALIST) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DETAILS) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DIRECTORY_UPLOAD) $(ENABLE_DOM_STORAGE) $(ENABLE_EVENTSOURCE) $(ENABLE_FILTERS) $(ENABLE_FILE_SYSTEM) $(ENABLE_FULLSCREEN_API) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INPUT_SPEECH) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_MATHML) $(ENABLE_METER_TAG) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFLINE_WEB_APPLICATIONS) $(ENABLE_PAGE_VISIBILITY_API) $(ENABLE_PROGRESS_TAG) $(ENABLE_REGISTER_PROTOCOL_HANDLER) $(ENABLE_QUOTA) $(ENABLE_SHARED_WORKERS) $(ENABLE_SVG) $(ENABLE_SVG_ANIMATION) $(ENABLE_SVG_AS_IMAGE) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS) $(ENABLE_SVG_FOREIGN_OBJECT) $(ENABLE_SVG_USE) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_VIDEO) $(ENABLE_VIDEO_TRACK) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WORKERS) $(ENABLE_XHTMLMP) $(ENABLE_XPATH) $(ENABLE_XSLT);
@@ -260,6 +260,16 @@ webcore_built_sources += \
DerivedSources/WebCore/JSStorageInfoUsageCallback.h
endif # END ENABLE_QUOTA

# ----
# Touch Icon Loading
# ----
if ENABLE_TOUCH_ICON_LOADING
FEATURE_DEFINES += ENABLE_TOUCH_ICON_LOADING=1
webcore_cppflags += -DENABLE_TOUCH_ICON_LOADING=1
else
webcore_cppflags += -DENABLE_TOUCH_ICON_LOADING=0
endif # END ENABLE_TOUCH_ICON_LOADING

# ----
# Speech Input API support
# ----
@@ -1151,6 +1151,8 @@ webcore_sources += \
Source/WebCore/dom/ExceptionCode.h \
Source/WebCore/dom/FragmentScriptingPermission.h \
Source/WebCore/dom/IgnoreDestructiveWriteCountIncrementer.h \
Source/WebCore/dom/IconURL.cpp \
Source/WebCore/dom/IconURL.h \
Source/WebCore/dom/InputElement.cpp \
Source/WebCore/dom/InputElement.h \
Source/WebCore/dom/HashChangeEvent.h \
@@ -2470,6 +2470,8 @@
'dom/ExceptionCode.cpp',
'dom/HashChangeEvent.h',
'dom/IgnoreDestructiveWriteCountIncrementer.h',
'dom/IconURL.cpp',
'dom/IconURL.h',
'dom/InputElement.cpp',
'dom/KeyboardEvent.cpp',
'dom/MessageChannel.cpp',
@@ -492,6 +492,7 @@ SOURCES += \
dom/EventQueue.cpp \
dom/ExceptionBase.cpp \
dom/ExceptionCode.cpp \
dom/IconURL.cpp \
dom/InputElement.cpp \
dom/KeyboardEvent.cpp \
dom/MessageChannel.cpp \
@@ -44501,6 +44501,62 @@
RelativePath="..\dom\IgnoreDestructiveWriteCountIncrementer.h"
>
</File>
<File
RelativePath="..\dom\IconURL.cpp"
>
<FileConfiguration
Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug_Cairo_CFLite|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
<FileConfiguration
Name="Release_Cairo_CFLite|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug_All|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
<FileConfiguration
Name="Production|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\dom\IconURL.h"
>
</File>
<File
RelativePath="..\dom\InputElement.cpp"
>
@@ -970,6 +970,8 @@
449B19F50FA72ECE0015CA4A /* HTMLParserQuirks.h in Headers */ = {isa = PBXBuildFile; fileRef = 449B19F30FA72ECE0015CA4A /* HTMLParserQuirks.h */; settings = {ATTRIBUTES = (Private, ); }; };
44A28AAC12DFB8AC00AE923B /* MathMLElementFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 44A28AAB12DFB8AC00AE923B /* MathMLElementFactory.h */; };
44A28AAF12DFB8BF00AE923B /* MathMLNames.h in Headers */ = {isa = PBXBuildFile; fileRef = 44A28AAE12DFB8BF00AE923B /* MathMLNames.h */; };
45099C411370A7800058D513 /* IconURL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 45099C401370A7800058D513 /* IconURL.cpp */; };
45BAC2B01360BBAB005DA258 /* IconURL.h in Headers */ = {isa = PBXBuildFile; fileRef = 45BAC2AF1360BBAB005DA258 /* IconURL.h */; settings = {ATTRIBUTES = (Private, ); }; };
4614A1FE0B23A8D600446E1C /* copyCursor.png in Resources */ = {isa = PBXBuildFile; fileRef = 4614A1FD0B23A8D600446E1C /* copyCursor.png */; };
464EA2730B8A350B00A8E6E3 /* crossHairCursor.png in Resources */ = {isa = PBXBuildFile; fileRef = 464EA2710B8A350B00A8E6E3 /* crossHairCursor.png */; };
464EA2740B8A350B00A8E6E3 /* notAllowedCursor.png in Resources */ = {isa = PBXBuildFile; fileRef = 464EA2720B8A350B00A8E6E3 /* notAllowedCursor.png */; };
@@ -7441,6 +7443,8 @@
449B19F30FA72ECE0015CA4A /* HTMLParserQuirks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLParserQuirks.h; sourceTree = "<group>"; };
44A28AAB12DFB8AC00AE923B /* MathMLElementFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MathMLElementFactory.h; sourceTree = "<group>"; };
44A28AAE12DFB8BF00AE923B /* MathMLNames.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MathMLNames.h; sourceTree = "<group>"; };
45099C401370A7800058D513 /* IconURL.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = IconURL.cpp; path = dom/IconURL.cpp; sourceTree = "<group>"; };
45BAC2AF1360BBAB005DA258 /* IconURL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IconURL.h; path = dom/IconURL.h; sourceTree = "<group>"; };
4614A1FD0B23A8D600446E1C /* copyCursor.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = copyCursor.png; sourceTree = "<group>"; };
464EA2710B8A350B00A8E6E3 /* crossHairCursor.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = crossHairCursor.png; sourceTree = "<group>"; };
464EA2720B8A350B00A8E6E3 /* notAllowedCursor.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = notAllowedCursor.png; sourceTree = "<group>"; };
@@ -12527,6 +12531,8 @@
0867D691FE84028FC02AAC07 /* WebKit */ = {
isa = PBXGroup;
children = (
45099C401370A7800058D513 /* IconURL.cpp */,
45BAC2AF1360BBAB005DA258 /* IconURL.h */,
65C97AF208EA908800ACD273 /* config.h */,
EDEC98020AED7E170059137F /* WebCorePrefix.h */,
9307061309E0CA8200B17FE4 /* DerivedSources.make */,
@@ -22717,6 +22723,7 @@
93F199ED08245E59001E9ABC /* XSLTProcessor.h in Headers */,
E1BE512E0CF6C512002EA959 /* XSLTUnicodeSort.h in Headers */,
977E2E0F12F0FC9C00C13379 /* XSSFilter.h in Headers */,
45BAC2B01360BBAB005DA258 /* IconURL.h in Headers */,
B1E54594134629C10092A545 /* MediaStreamClient.h in Headers */,
B1E54598134629C10092A545 /* MediaStreamController.h in Headers */,
B1E54596134629C10092A545 /* MediaStreamFrameController.h in Headers */,
@@ -25380,6 +25387,7 @@
93F19B0508245E59001E9ABC /* XSLTProcessorLibxslt.cpp in Sources */,
E1BE512D0CF6C512002EA959 /* XSLTUnicodeSort.cpp in Sources */,
977E2E0E12F0FC9C00C13379 /* XSSFilter.cpp in Sources */,
45099C411370A7800058D513 /* IconURL.cpp in Sources */,
B1E54597134629C10092A545 /* MediaStreamController.cpp in Sources */,
B1E54595134629C10092A545 /* MediaStreamFrameController.cpp in Sources */,
);
@@ -75,6 +75,7 @@
#include "EventTarget.cpp"
#include "ExceptionBase.cpp"
#include "ExceptionCode.cpp"
#include "IconURL.cpp"
#include "InputElement.cpp"
#include "KeyboardEvent.cpp"
#include "MessageChannel.cpp"
@@ -4395,15 +4395,26 @@ unsigned FormElementKeyHash::hash(const FormElementKey& key)
return StringHasher::hashMemory<sizeof(FormElementKey)>(&key);
}

void Document::setIconURL(const String& iconURL, const String& type)
IconURL Document::iconURL(IconType iconType) const
{
// FIXME - <rdar://problem/4727645> - At some point in the future, we might actually honor the "type"
if (m_iconURL.isEmpty())
m_iconURL = iconURL;
else if (!type.isEmpty())
m_iconURL = iconURL;
return m_iconURLs[toIconIndex(iconType)];
}

void Document::setIconURL(const String& url, const String& mimeType, IconType iconType)
{
// FIXME - <rdar://problem/4727645> - At some point in the future, we might actually honor the "mimeType"
IconURL newURL(KURL(ParsedURLString, url), iconType);
if (!iconURL(iconType).m_iconURL.isEmpty())
setIconURL(newURL);
else if (!mimeType.isEmpty())
setIconURL(newURL);
if (Frame* f = frame())
f->loader()->setIconURL(m_iconURL);
f->loader()->setIconURL(newURL);
}

void Document::setIconURL(const IconURL& iconURL)
{
m_iconURLs[toIconIndex(iconURL.m_iconType)] = iconURL;
}

void Document::registerFormElementWithFormAttribute(FormAssociatedElement* element)
@@ -33,6 +33,7 @@
#include "Color.h"
#include "DOMTimeStamp.h"
#include "DocumentTiming.h"
#include "IconURL.h"
#include "QualifiedName.h"
#include "ScriptExecutionContext.h"
#include "StringWithDirection.h"
@@ -920,8 +921,9 @@ class Document : public TreeScope, public ScriptExecutionContext {

void setHasNodesWithPlaceholderStyle() { m_hasNodesWithPlaceholderStyle = true; }

const String& iconURL() const { return m_iconURL; }
void setIconURL(const String& iconURL, const String& type);
IconURL iconURL(IconType) const;
void setIconURL(const String&, const String&, IconType);
void setIconURL(const IconURL&);

void setUseSecureKeyboardEntryWhenActive(bool);
bool useSecureKeyboardEntryWhenActive() const;
@@ -1329,8 +1331,8 @@ class Document : public TreeScope, public ScriptExecutionContext {

bool m_createRenderers;
bool m_inPageCache;
String m_iconURL;
IconURL m_iconURLs[ICON_COUNT];

HashSet<Element*> m_documentActivationCallbackElements;
HashSet<Element*> m_mediaVolumeCallbackElements;
HashSet<Element*> m_privateBrowsingStateChangedElements;
@@ -0,0 +1,58 @@
/*
* Copyright (C) 2011 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#include "config.h"
#include "IconURL.h"

namespace WebCore {

size_t toIconIndex(IconType type)
{
size_t index = 0;
switch (type) {
case Favicon:
index = 0;
break;
#if ENABLE(TOUCH_ICON_LOADING)
case TouchPrecomposedIcon:
index = 1;
break;
case TouchIcon:
index = 2;
break;
#endif
default:
ASSERT_NOT_REACHED();
}
return index;
}

}

0 comments on commit d908868

Please sign in to comment.