summaryrefslogtreecommitdiffstats
path: root/WebKit/win
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/win')
-rw-r--r--WebKit/win/ChangeLog986
-rw-r--r--WebKit/win/DOMCoreClasses.cpp76
-rw-r--r--WebKit/win/DOMCoreClasses.h704
-rw-r--r--WebKit/win/DOMHTMLClasses.cpp32
-rw-r--r--WebKit/win/DOMHTMLClasses.h262
-rw-r--r--WebKit/win/ForEachCoClass.h1
-rw-r--r--WebKit/win/FullscreenVideoController.cpp14
-rw-r--r--WebKit/win/FullscreenVideoController.h2
-rw-r--r--WebKit/win/Interfaces/DOMHTML.idl15
-rw-r--r--WebKit/win/Interfaces/IWebEmbeddedView.idl92
-rwxr-xr-xWebKit/win/Interfaces/IWebFramePrivate.idl2
-rw-r--r--WebKit/win/Interfaces/IWebPreferences.idl3
-rw-r--r--WebKit/win/Interfaces/IWebPreferencesPrivate.idl10
-rw-r--r--WebKit/win/Interfaces/IWebScriptWorld.idl1
-rwxr-xr-xWebKit/win/Interfaces/IWebUIDelegatePrivate.idl3
-rw-r--r--WebKit/win/Interfaces/IWebUserContentURLPattern.idl43
-rw-r--r--WebKit/win/Interfaces/IWebViewPrivate.idl11
-rw-r--r--WebKit/win/Interfaces/WebKit.idl10
-rw-r--r--WebKit/win/WebCoreLocalizedStrings.cpp5
-rw-r--r--WebKit/win/WebCoreSupport/EmbeddedWidget.cpp476
-rw-r--r--WebKit/win/WebCoreSupport/EmbeddedWidget.h170
-rw-r--r--WebKit/win/WebCoreSupport/WebChromeClient.cpp27
-rw-r--r--WebKit/win/WebCoreSupport/WebChromeClient.h8
-rw-r--r--WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.cpp2
-rw-r--r--WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.h2
-rw-r--r--WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp11
-rw-r--r--WebKit/win/WebCoreSupport/WebFrameLoaderClient.h1
-rw-r--r--WebKit/win/WebCoreSupport/WebInspectorClient.cpp310
-rw-r--r--WebKit/win/WebCoreSupport/WebInspectorClient.h63
-rw-r--r--WebKit/win/WebDownload.cpp2
-rw-r--r--WebKit/win/WebDownloadCFNet.cpp2
-rw-r--r--WebKit/win/WebDownloadCurl.cpp2
-rw-r--r--WebKit/win/WebFrame.cpp22
-rw-r--r--WebKit/win/WebFrame.h2
-rw-r--r--WebKit/win/WebHistoryItem.cpp2
-rw-r--r--WebKit/win/WebInspector.cpp8
-rw-r--r--WebKit/win/WebKit.vcproj/Interfaces.vcproj20
-rw-r--r--WebKit/win/WebKit.vcproj/WebKit.def1
-rw-r--r--WebKit/win/WebKit.vcproj/WebKit.vcproj14
-rw-r--r--WebKit/win/WebKit.vcproj/WebKit_debug.def1
-rw-r--r--WebKit/win/WebKitClassFactory.cpp3
-rw-r--r--WebKit/win/WebKitDLL.cpp3
-rw-r--r--WebKit/win/WebKitGraphics.cpp8
-rw-r--r--WebKit/win/WebKitGraphics.h2
-rw-r--r--WebKit/win/WebKitPrefix.h1
-rw-r--r--WebKit/win/WebLocalizableStrings.cpp2
-rw-r--r--WebKit/win/WebMutableURLRequest.cpp2
-rw-r--r--WebKit/win/WebPreferenceKeysPrivate.h6
-rw-r--r--WebKit/win/WebPreferences.cpp42
-rw-r--r--WebKit/win/WebPreferences.h12
-rw-r--r--WebKit/win/WebScriptWorld.cpp6
-rw-r--r--WebKit/win/WebScriptWorld.h1
-rw-r--r--WebKit/win/WebTextRenderer.cpp10
-rw-r--r--WebKit/win/WebUserContentURLPattern.cpp120
-rw-r--r--WebKit/win/WebUserContentURLPattern.h57
-rw-r--r--WebKit/win/WebView.cpp93
-rw-r--r--WebKit/win/WebView.h9
57 files changed, 2770 insertions, 1025 deletions
diff --git a/WebKit/win/ChangeLog b/WebKit/win/ChangeLog
index 8dd19ad..287a9be 100644
--- a/WebKit/win/ChangeLog
+++ b/WebKit/win/ChangeLog
@@ -1,3 +1,989 @@
+2010-04-20 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Factor DocumentWriter out of FrameLoader
+ https://bugs.webkit.org/show_bug.cgi?id=37175
+
+ Update these callsites because the method moved to DocumentWriter.
+
+ * WebCoreSupport/WebFrameLoaderClient.cpp:
+ (WebFrameLoaderClient::receivedData):
+
+2010-04-20 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Change a parameter type of chooseIconForFiles()
+ https://bugs.webkit.org/show_bug.cgi?id=37504
+
+ * WebCoreSupport/WebChromeClient.cpp:
+ (WebChromeClient::chooseIconForFiles):
+ * WebCoreSupport/WebChromeClient.h:
+
+2010-04-16 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by NOBODY (Windows build fix).
+
+ * WebFrame.cpp:
+ (WebFrame::stringByEvaluatingJavaScriptInScriptWorld):
+ * WebView.cpp:
+ (WebView::stringByEvaluatingJavaScriptFromString):
+
+2010-04-16 Adam Roben <aroben@apple.com>
+
+ Make it possible for clients to instantiate a WebUserContentURLPattern
+
+ Reviewed by Tim Hatcher.
+
+ * ForEachCoClass.h: Added WebUserContentURLPattern to the FOR_EACH_COCLASS macro, which
+ lists all our instantiatable classes.
+
+ * WebKitClassFactory.cpp: Added a now-required #include.
+
+2010-04-15 Adam Roben <aroben@apple.com>
+
+ Expose UserContentURLPattern as WebKit SPI
+
+ Fixes <http://webkit.org/b/37354>.
+
+ Reviewed by Tim Hatcher.
+
+ * Interfaces/IWebUserContentURLPattern.idl: Added.
+
+ * Interfaces/WebKit.idl: Added WebUserContentURLPattern.
+
+ * WebKit.vcproj/Interfaces.vcproj: Added IWebUserContentURLPattern.
+
+ * WebKit.vcproj/WebKit.vcproj: Added WebUserContentURLPattern.
+
+ * WebUserContentURLPattern.cpp: Added.
+ (WebUserContentURLPattern::WebUserContentURLPattern):
+ (WebUserContentURLPattern::~WebUserContentURLPattern):
+ (WebUserContentURLPattern::createInstance):
+ (WebUserContentURLPattern::AddRef):
+ (WebUserContentURLPattern::Release):
+ (WebUserContentURLPattern::QueryInterface):
+ Standard COM implementations.
+
+ (WebUserContentURLPattern::parse): Parse the string into a
+ UserContentURLPattern and store it.
+
+ (WebUserContentURLPattern::isValid):
+ (WebUserContentURLPattern::scheme):
+ (WebUserContentURLPattern::host):
+ (WebUserContentURLPattern::matchesSubdomains):
+ Call through to UserContentURLPattern.
+
+ * WebUserContentURLPattern.h: Added.
+
+2010-04-14 Adam Roben <aroben@apple.com>
+
+ Expose DOMWrapperWorld::unregisterWorld as WebKit SPI on Windows
+
+ Fixes <http://webkit.org/b/37619>.
+
+ Reviewed by Steve Falkenburg.
+
+ * Interfaces/IWebScriptWorld.idl: Added unregisterWorld.
+
+ * Interfaces/WebKit.idl: Touched to force a build.
+
+ * WebScriptWorld.cpp:
+ (WebScriptWorld::unregisterWorld):
+ * WebScriptWorld.h:
+ Added. Just calls through to DOMWrapperWorld::unregisterWorld.
+
+2010-04-12 Timothy Hatcher <timothy@apple.com>
+
+ SecurityOrigin needs a way to remove individual OriginAccessEntries
+ https://bugs.webkit.org/show_bug.cgi?id=37449
+
+ Reviewed by Dave Hyatt.
+
+ * Interfaces/IWebViewPrivate.idl:
+ * WebView.cpp:
+ (WebView::removeOriginAccessWhitelistEntry): Call SecurityOrigin::removeOriginAccessWhitelistEntry.
+ * WebView.h: Added removeOriginAccessWhitelistEntry.
+
+2010-04-13 Timothy Hatcher <timothy@apple.com>
+
+ Rename SecurityOrigin::whiteListAccessFromOrigin to addOriginAccessWhitelistEntry.
+ And SecurityOrigin::resetOriginAccessWhiteLists to resetOriginAccessWhitelists.
+
+ SecurityOrigin needs a way to remove individual OriginAccessEntries
+ https://bugs.webkit.org/show_bug.cgi?id=37449
+
+ Reviewed by Dave Hyatt.
+
+ * Interfaces/IWebViewPrivate.idl:
+ * WebView.cpp:
+ (WebView::addOriginAccessWhitelistEntry):
+ (WebView::resetOriginAccessWhitelists):
+ * WebView.h:
+
+2010-04-11 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r57468.
+ http://trac.webkit.org/changeset/57468
+ https://bugs.webkit.org/show_bug.cgi?id=37433
+
+ Broke the world... Must have applied the patch wrong
+ (Requested by abarth on #webkit).
+
+ * WebCoreSupport/WebFrameLoaderClient.cpp:
+ (WebFrameLoaderClient::receivedData):
+
+2010-04-11 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Factor DocumentWriter out of FrameLoader
+ https://bugs.webkit.org/show_bug.cgi?id=37175
+
+ Update these callsites because the method moved to DocumentWriter.
+
+ * WebCoreSupport/WebFrameLoaderClient.cpp:
+ (WebFrameLoaderClient::receivedData):
+
+2010-04-09 Adam Roben <aroben@apple.com>
+
+ Windows Debug/Release build fix after r57244
+
+ * WebKit.vcproj/WebKit.vcproj: Don't delay-load QuartzCore.dll or
+ QuartzCoreInterface.dll in any configurations. r57244 made this change
+ only for Debug_Internal.
+
+2010-04-08 Steve Falkenburg <sfalken@apple.com>
+
+ Reviewed by Darin Adler.
+
+ WebView::isLoading should null check m_mainFrame
+ https://bugs.webkit.org/show_bug.cgi?id=37294
+
+ * WebView.cpp:
+ (WebView::isLoading):
+
+2010-04-07 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Steve Falkenburg.
+
+ Remove QuartzCoreInterface from the build
+
+ No longer needed since QuartzCore.dll is now included in the latest Safari release (4.0.5).
+
+ * WebKit.vcproj/WebKit.vcproj:Removed delay load for QuartzCore and QuartzCoreInterface
+
+2010-04-07 Andrey Kosyakov <caseq@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Removed redundant FrameLoaderClient::dispatchDidLoadResourceByXMLHttpRequest()
+ https://bugs.webkit.org/show_bug.cgi?id=36949
+
+ * WebCoreSupport/WebFrameLoaderClient.cpp:
+ * WebCoreSupport/WebFrameLoaderClient.h:
+
+2010-04-05 Peter Nelson <charn.opcode@gmail.com>
+
+ Reviewed by Eric Seidel.
+
+ Fixed style errors in DOMCoreClasses.h to bring it up to scratch
+ for https://bugs.webkit.org/show_bug.cgi?id=34979.
+
+ * DOMCoreClasses.h:
+ (DOMObject::throwException):
+ (DOMObject::callWebScriptMethod):
+ (DOMObject::evaluateWebScript):
+ (DOMObject::removeWebScriptKey):
+ (DOMObject::stringRepresentation):
+ (DOMObject::webScriptValueAtIndex):
+ (DOMObject::setWebScriptValueAtIndex):
+ (DOMObject::setException):
+ (DOMNodeList::throwException):
+ (DOMNodeList::callWebScriptMethod):
+ (DOMNodeList::evaluateWebScript):
+ (DOMNodeList::removeWebScriptKey):
+ (DOMNodeList::stringRepresentation):
+ (DOMNodeList::webScriptValueAtIndex):
+ (DOMNodeList::setWebScriptValueAtIndex):
+ (DOMNodeList::setException):
+ (DOMDocument::throwException):
+ (DOMDocument::callWebScriptMethod):
+ (DOMDocument::evaluateWebScript):
+ (DOMDocument::removeWebScriptKey):
+ (DOMDocument::stringRepresentation):
+ (DOMDocument::webScriptValueAtIndex):
+ (DOMDocument::setWebScriptValueAtIndex):
+ (DOMDocument::setException):
+ (DOMDocument::nodeName):
+ (DOMDocument::nodeValue):
+ (DOMDocument::setNodeValue):
+ (DOMDocument::nodeType):
+ (DOMDocument::parentNode):
+ (DOMDocument::childNodes):
+ (DOMDocument::firstChild):
+ (DOMDocument::lastChild):
+ (DOMDocument::previousSibling):
+ (DOMDocument::nextSibling):
+ (DOMDocument::attributes):
+ (DOMDocument::ownerDocument):
+ (DOMDocument::insertBefore):
+ (DOMDocument::replaceChild):
+ (DOMDocument::removeChild):
+ (DOMDocument::appendChild):
+ (DOMDocument::hasChildNodes):
+ (DOMDocument::cloneNode):
+ (DOMDocument::isSupported):
+ (DOMDocument::namespaceURI):
+ (DOMDocument::prefix):
+ (DOMDocument::setPrefix):
+ (DOMDocument::localName):
+ (DOMDocument::hasAttributes):
+ (DOMDocument::isSameNode):
+ (DOMDocument::isEqualNode):
+ (DOMDocument::textContent):
+ (DOMDocument::setTextContent):
+ (DOMElement::throwException):
+ (DOMElement::callWebScriptMethod):
+ (DOMElement::evaluateWebScript):
+ (DOMElement::removeWebScriptKey):
+ (DOMElement::stringRepresentation):
+ (DOMElement::webScriptValueAtIndex):
+ (DOMElement::setWebScriptValueAtIndex):
+ (DOMElement::setException):
+ (DOMElement::nodeName):
+ (DOMElement::nodeValue):
+ (DOMElement::setNodeValue):
+ (DOMElement::nodeType):
+ (DOMElement::parentNode):
+ (DOMElement::childNodes):
+ (DOMElement::firstChild):
+ (DOMElement::lastChild):
+ (DOMElement::previousSibling):
+ (DOMElement::nextSibling):
+ (DOMElement::attributes):
+ (DOMElement::ownerDocument):
+ (DOMElement::insertBefore):
+ (DOMElement::replaceChild):
+ (DOMElement::removeChild):
+ (DOMElement::appendChild):
+ (DOMElement::hasChildNodes):
+ (DOMElement::cloneNode):
+ (DOMElement::isSupported):
+ (DOMElement::namespaceURI):
+ (DOMElement::prefix):
+ (DOMElement::setPrefix):
+ (DOMElement::localName):
+ (DOMElement::hasAttributes):
+ (DOMElement::isSameNode):
+ (DOMElement::isEqualNode):
+ (DOMElement::textContent):
+ (DOMElement::setTextContent):
+
+2010-04-05 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=37111
+ <rdar://problem/7790327> Draw replacement text when plug-in host crashes
+
+ * WebCoreLocalizedStrings.cpp: (WebCore::crashedPluginText): Added a stub string for plug-in
+ failure.
+
+2010-04-02 Rafael Weinstein <rafaelw@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Clean up unused calls after changes to checkPermission and requestPermission argument lists.
+
+ * WebCoreSupport/WebDesktopNotificationsDelegate.cpp:
+ (WebDesktopNotificationsDelegate::requestPermission):
+ * WebCoreSupport/WebDesktopNotificationsDelegate.h:
+
+2010-04-01 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Added layerTreeAsText function to DRT (for Mac)
+ https://bugs.webkit.org/show_bug.cgi?id=36782
+
+ This is the WebKit side for Windows. It plumbs the
+ call from WebCore to DRT.
+
+ * Interfaces/IWebFramePrivate.idl:
+ * WebFrame.cpp:WebKit (Windows) side of plumbing
+ (WebFrame::layerTreeAsText):
+ * WebFrame.h:
+
+2010-03-31 Marcus Bulach <bulach@chromium.org>
+
+ Reviewed by Jeremy Orlow.
+
+ Adds Geolocation param for cancelGeolocationPermissionRequestForFrame.
+ https://bugs.webkit.org/show_bug.cgi?id=35031
+
+ * WebCoreSupport/WebChromeClient.h:
+ (WebChromeClient::cancelGeolocationPermissionRequestForFrame):
+
+2010-03-30 Gavin Barraclough <barraclough@apple.com>
+
+ Rubber stamped by Sam Weinig.
+
+ https://bugs.webkit.org/show_bug.cgi?id=36866
+ Move CString to WTF
+
+ * WebDownload.cpp:
+ * WebDownloadCFNet.cpp:
+ * WebDownloadCurl.cpp:
+ * WebHistoryItem.cpp:
+ * WebLocalizableStrings.cpp:
+ * WebMutableURLRequest.cpp:
+ * WebPreferences.cpp:
+ (WebPreferences::migrateWebKitPreferencesToCFPreferences):
+ * WebView.cpp:
+
+2010-03-30 Adam Roben <aroben@apple.com>
+
+ Windows build fix
+
+ * Interfaces/WebKit.idl: Touched this to force a build.
+
+2010-03-29 Steve Falkenburg <sfalken@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ Default value of accelerated compositing should be false for Windows
+ https://bugs.webkit.org/show_bug.cgi?id=36805
+
+ * WebPreferences.cpp:
+ (WebPreferences::initializeDefaultSettings):
+
+2010-03-29 Rafael Weinstein <rafaelw@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Change NotificationPresenter::checkPermission() to take the source frames full KURL,
+ rather than its SecurityOrigin. This will aid chromium in having more fine grained
+ permissions to control notification spam.
+
+ * WebCoreSupport/WebDesktopNotificationsDelegate.cpp:
+ (WebDesktopNotificationsDelegate::checkPermission):
+ * WebCoreSupport/WebDesktopNotificationsDelegate.h:
+
+2010-03-26 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Reviewed by Antti Koivisto.
+
+ Change method name due to it dealing with both flattening
+ of frame sets and inner frames.
+
+ * Interfaces/IWebPreferencesPrivate.idl:
+ * WebPreferenceKeysPrivate.h:
+ * WebPreferences.cpp:
+ (WebPreferences::initializeDefaultSettings):
+ (WebPreferences::isFrameFlatteningEnabled):
+ (WebPreferences::setFrameFlatteningEnabled):
+ * WebPreferences.h:
+ * WebView.cpp:
+ (WebView::notifyPreferencesChanged):
+
+2010-03-24 Jon Honeycutt <jhoneycutt@apple.com>
+
+ <rdar://problem/7780798> Missing plug-ins should be represented by text
+ only, instead of lego block
+
+ https://bugs.webkit.org/show_bug.cgi?id=36583
+
+ Reviewed by Dan Bernstein.
+
+ * WebCoreSupport/WebFrameLoaderClient.cpp:
+ (WebFrameLoaderClient::createPlugin):
+ Return 0 if we failed to initialize the plug-in, which causes the new
+ "missing plug-in" text to draw.
+
+2010-03-24 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Make Icon::createIconForFiles() optional.
+ https://bugs.webkit.org/show_bug.cgi?id=35072
+
+ - Rename iconForFiles() to chooseIconForFiles().
+ - Call Icon::createIconForFiles() from chooseIconForFiles().
+
+ * WebCoreSupport/WebChromeClient.cpp:
+ (WebChromeClient::chooseIconForFiles):
+ * WebCoreSupport/WebChromeClient.h:
+
+2010-03-22 Darin Adler <darin@apple.com>
+
+ * WebCoreLocalizedStrings.cpp:
+ (WebCore::missingPluginText): Fixed localization helper text to match the same
+ string from Mac WebKit.
+
+2010-03-22 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by John Sullivan.
+
+ https://bugs.webkit.org/show_bug.cgi?id=36328
+
+ * WebCoreLocalizedStrings.cpp:
+ (WebCore::missingPluginText): Added.
+
+2010-03-17 Enrica Casucci <enrica@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Missing support for showing compositing layers borders and repaint count on Windows.
+ <rdar://problem/7760736>
+ <https://bugs.webkit.org/show_bug.cgi?id=36197>
+
+ * Interfaces/IWebPreferencesPrivate.idl:
+ * WebPreferenceKeysPrivate.h:
+ * WebPreferences.cpp:
+ (WebPreferences::initializeDefaultSettings):
+ (WebPreferences::showDebugBorders):
+ (WebPreferences::setShowDebugBorders):
+ (WebPreferences::showRepaintCounter):
+ (WebPreferences::setShowRepaintCounter):
+ * WebPreferences.h:
+ * WebView.cpp:
+ (WebView::notifyPreferencesChanged):
+
+2010-03-16 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Introduce InspectorFrontendClient that provides InspectorFrontend with an interface to the embedder. InspectorClient now serves as a delegate for InspectorController and does not contain methods for managing inspector frontend window. That allows to create remote InspectorFrontendHost.
+
+ Introduce InspectorFrontendClient that would provide InspectorFrontend with an interface to the embedder
+ https://bugs.webkit.org/show_bug.cgi?id=35036
+
+ * WebCoreSupport/WebInspectorClient.cpp:
+ (WebInspectorClient::WebInspectorClient):
+ (WebInspectorClient::~WebInspectorClient):
+ (WebInspectorClient::openInspectorFrontend):
+ (WebInspectorClient::highlight):
+ (WebInspectorClient::hideHighlight):
+ (WebInspectorClient::updateHighlight):
+ (WebInspectorFrontendClient::WebInspectorFrontendClient):
+ (WebInspectorFrontendClient::~WebInspectorFrontendClient):
+ (WebInspectorFrontendClient::frontendLoaded):
+ (WebInspectorFrontendClient::localizedStringsURL):
+ (WebInspectorFrontendClient::hiddenPanels):
+ (WebInspectorFrontendClient::bringToFront):
+ (WebInspectorFrontendClient::closeWindow):
+ (WebInspectorFrontendClient::attachWindow):
+ (WebInspectorFrontendClient::detachWindow):
+ (WebInspectorFrontendClient::setAttachedWindowHeight):
+ (WebInspectorFrontendClient::inspectedURLChanged):
+ (WebInspectorFrontendClient::closeWindowWithoutNotifications):
+ (WebInspectorFrontendClient::showWindowWithoutNotifications):
+ (WebInspectorFrontendClient::destroyInspectorView):
+ (WebInspectorFrontendClient::updateWindowTitle):
+ (WebInspectorFrontendClient::onGetMinMaxInfo):
+ (WebInspectorFrontendClient::onSize):
+ (WebInspectorFrontendClient::onClose):
+ (WebInspectorFrontendClient::onSetFocus):
+ (WebInspectorFrontendClient::onWebViewWindowPosChanging):
+ (WebInspectorWndProc):
+ (WebInspectorFrontendClient::windowReceivedMessage):
+ * WebCoreSupport/WebInspectorClient.h:
+ (WebInspectorClient::frontendClosing):
+ * WebInspector.cpp:
+ (WebInspector::attach):
+ (WebInspector::detach):
+
+2010-03-14 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler.
+
+ WebKit part of removing support for legacy versions of Core Graphics
+
+ * WebKitClassFactory.cpp:
+ (WebKitClassFactory::WebKitClassFactory): Removed call to populateFontDatabase().
+ * WebKitGraphics.cpp:
+ (makeFont): Ditto.
+ * WebTextRenderer.cpp:
+ (WebTextRenderer::registerPrivateFont): Removed call to wkAddFontsAtPath().
+
+2010-03-12 Enrica Casucci <enrica@apple.com>
+
+ Fixed broken build on Windows.
+ Added contditional compilation for accelerated compositing.
+
+ * WebView.cpp:
+ (WebView::deleteBackingStore):
+ (WebView::addToDirtyRegion):
+ (WebView::updateBackingStore):
+
+2010-03-12 Beth Dakin <bdakin@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=34942 Fullscreen
+ API naming is inconsistent
+ -and corresponding-
+ <rdar://problem/7729165>
+
+ This patch changes all occurrences of "fullScreen" to the more
+ popular "fullscreen."
+
+ * FullscreenVideoController.cpp:
+ (FullscreenVideoController::onMouseDown):
+ (FullscreenVideoController::onMouseMove):
+ (FullscreenVideoController::onMouseUp):
+ * FullscreenVideoController.h:
+ (FullscreenVideoController::fullscreenToHUDCoordinates):
+
+2010-03-12 Beth Dakin <bdakin@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=33739 Fullscreen
+ video HUD stays on top when switching to another window (e.g. via
+ Alt-Tab)
+ -and corresponding-
+ <rdar://problem/7547574>
+
+ The HUD was always on top because it had the WS_EX_TOPMOST style.
+ So I removed the style and made m_videoWindow the owner of
+ m_hudWindow. This keeps m_hudWindow on top only when m_videoWindow
+ is the focused window.
+
+ * FullscreenVideoController.cpp:
+ (FullscreenVideoController::exitFullscreen): ASSERT that movie()->exitFullscreen() also destroyed the hud.
+ (FullscreenVideoController::createHUDWindow):
+
+2010-03-12 Enrica Casucci <enrica@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Content of 3D tests appears at the bottom right corner sometimes.
+ <rdar://problem/7556244>
+ <https://bugs.webkit.org/show_bug.cgi?id=36027>
+
+ See detailed comments in WebCore/ChangeLog.
+
+ * WebView.cpp:
+ (WebView::deleteBackingStore): Reset the dirty flag when deleting the backing store.
+ (WebView::addToDirtyRegion): Set the dirty flag when adding dirty rectangles to the
+ backing store dirty region.
+ (WebView::updateBackingStore): Reset the dirty flag after painting into the backing store.
+ (WebView::setAcceleratedCompositing): Removed unnecessary call to updateRootLayerContents.
+ (WebView::updateRootLayerContents): Changed the way we pass parameters to setScrollFrame.
+ We are passing width and height of the view content together with the offset for the scrolling.
+ It was confusing to pass it all as a rectangle, when it is not a rectangle.
+
+2010-03-11 Aaron Boodman <aa@chromium.org>
+
+ Kill WebDocument::applicationID() (part 1).
+
+ Modify interface to WebCore::NotificationPresenter::checkPermission()
+ and remove implementation of WebDocument::applicationID(). Breaking
+ API changes will be in a subsequent change.
+ https://bugs.webkit.org/show_bug.cgi?id=35846
+
+ * WebCoreSupport/WebDesktopNotificationsDelegate.cpp:
+ (WebDesktopNotificationsDelegate::checkPermission):
+ * WebCoreSupport/WebDesktopNotificationsDelegate.h:
+
+2010-03-11 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by David Hyatt.
+
+ Remove invalidateContents, it isn't used and it never makes sense to only invalidate the contents.
+
+ * WebCoreSupport/WebChromeClient.cpp:
+ * WebCoreSupport/WebChromeClient.h:
+
+2010-03-10 Eric Uhrhane <ericu@chromium.org>
+
+ Reviewed by David Levin.
+
+ The build fix for my patch on bug #35763 wasn't quite right--it removed
+ the call entirely, instead of replacing it with the new API. This adds
+ the call to Database::setIsAvailable.
+
+ https://bugs.webkit.org/show_bug.cgi?id=35763
+
+ * WebView.cpp: Added a call to Database::setIsAvailable where change 55667 removed the old Settings API call <http://trac.webkit.org/changeset/55667>.
+ (WebView::notifyPreferencesChanged):
+
+2010-03-10 John Sullivan <sullivan@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ <rdar://problem/7735387> input type other than text won't work with autofill
+ <https://bugs.webkit.org/show_bug.cgi?id=35963>
+
+ * WebFrame.cpp:
+ (WebFrame::elementDoesAutoComplete):
+ Return true for any text field that's not a password, rather than only
+ for TEXT type.
+
+2010-03-09 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ REGRESSION: WebInspector docking busted on Windows
+ <rdar://problem/7728433> and https://bugs.webkit.org/show_bug.cgi?id=35953
+
+ * WebCoreSupport/WebInspectorClient.cpp:
+ (WebInspectorClient::attachWindow): Use the InspectorController:: copy of the should attach settings key.
+ (WebInspectorClient::detachWindow): Ditto.
+ (WebInspectorClient::showWindowWithoutNotifications): Ditto.
+
+2010-03-09 John Sullivan <sullivan@apple.com>
+
+ Fixed localized string key collision. update-webkit-localized-strings now
+ runs without errors.
+
+ Reviewed by Adam Roben.
+
+ * WebCoreLocalizedStrings.cpp:
+ (WebCore::AXMenuListPopupActionVerb):
+ Used LPCTSTR_UI_STRING_KEY for the 2nd use of "press".
+
+2010-03-08 Adam Treat <atreat@rim.com>
+
+ Unreviewed build fix for Windows.
+
+ * WebCoreSupport/WebChromeClient.cpp:
+ (WebChromeClient::invalidateContents):
+
+2010-03-02 Adam Treat <atreat@rim.com>
+
+ Reviewed by Dave Hyatt.
+
+ Adapt the win port to the refactoring of repaint methods.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34214
+
+ * WebCoreSupport/WebChromeClient.cpp:
+ (WebChromeClient::invalidateContents):
+ (WebChromeClient::invalidateWindow):
+ (WebChromeClient::invalidateContentsAndWindow):
+ (WebChromeClient::invalidateContentsForSlowScroll):
+ * WebCoreSupport/WebChromeClient.h:
+
+2010-03-08 Daniel Bates <dbates@rim.com>
+
+ Unreviewed, build fix.
+
+ Attempt to fix the Windows builds by applying the corresponding change
+ made in bug #35763 <https://bugs.webkit.org/show_bug.cgi?id=35763>.
+
+ * WebView.cpp: Removed call to settings->setDatabasesEnabled since this
+ setting no longer exists following changeset 55666 <http://trac.webkit.org/changeset/55666>.
+ (WebView::notifyPreferencesChanged):
+
+2010-03-07 Mark Rowe <mrowe@apple.com>
+
+ Windows build fix.
+
+ * WebKitPrefix.h: Include CoreFoundation/CoreFoundation.h from the Windows prefix header
+ since some WebCore headers rely on the types declared within being available via the prefix
+ header.
+
+2010-03-05 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Got rid of platformLayer use in WebView.
+ https://bugs.webkit.org/show_bug.cgi?id=35798
+
+ WKCACFLayer no longer depends on GraphicsLayer, so I got rid of
+ that dependency on WebView. Now WebChromeClient casts platformLayer
+ to WKCACFLayer which will always be the case on Windows.
+
+ * WebCoreSupport/WebChromeClient.cpp:
+ (WebChromeClient::attachRootGraphicsLayer):
+ * WebView.cpp:
+ (WebView::setRootChildLayer):
+ * WebView.h:
+
+2010-03-04 Beth Dakin <bdakin@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ WebCore::Page::setInstanceHandle() is now just
+ WebCore::setInstanceHandle()
+
+ * WebKitDLL.cpp:
+ (DllMain):
+
+2010-03-03 Alice Liu <alice.liu@apple.com>
+
+ Reviewed by Jon Honeycutt.
+
+ Add a way to get an iframe's content frame
+
+ * DOMCoreClasses.cpp:
+ (DOMElement::createInstance):
+ Added case for DOMHTMLIFrameElement
+ * DOMHTMLClasses.cpp:
+ Adding the few DOMHTMLIFrameElement functions definitions that have
+ distinct implementations (all others just call parent implementation)
+ (DOMHTMLIFrameElement::QueryInterface):
+ (DOMHTMLIFrameElement::contentFrame):
+ * DOMHTMLClasses.h:
+ Most of these function declarations have definitions that just call the parent implementation
+ (DOMHTMLIFrameElement::DOMHTMLIFrameElement):
+ (DOMHTMLIFrameElement::AddRef):
+ (DOMHTMLIFrameElement::Release):
+ (DOMHTMLIFrameElement::throwException):
+ (DOMHTMLIFrameElement::callWebScriptMethod):
+ (DOMHTMLIFrameElement::evaluateWebScript):
+ (DOMHTMLIFrameElement::removeWebScriptKey):
+ (DOMHTMLIFrameElement::stringRepresentation):
+ (DOMHTMLIFrameElement::webScriptValueAtIndex):
+ (DOMHTMLIFrameElement::setWebScriptValueAtIndex):
+ (DOMHTMLIFrameElement::setException):
+ (DOMHTMLIFrameElement::nodeName):
+ (DOMHTMLIFrameElement::nodeValue):
+ (DOMHTMLIFrameElement::setNodeValue):
+ (DOMHTMLIFrameElement::nodeType):
+ (DOMHTMLIFrameElement::parentNode):
+ (DOMHTMLIFrameElement::childNodes):
+ (DOMHTMLIFrameElement::firstChild):
+ (DOMHTMLIFrameElement::lastChild):
+ (DOMHTMLIFrameElement::previousSibling):
+ (DOMHTMLIFrameElement::nextSibling):
+ (DOMHTMLIFrameElement::attributes):
+ (DOMHTMLIFrameElement::ownerDocument):
+ (DOMHTMLIFrameElement::insertBefore):
+ (DOMHTMLIFrameElement::replaceChild):
+ (DOMHTMLIFrameElement::removeChild):
+ (DOMHTMLIFrameElement::appendChild):
+ (DOMHTMLIFrameElement::hasChildNodes):
+ (DOMHTMLIFrameElement::cloneNode):
+ (DOMHTMLIFrameElement::normalize):
+ (DOMHTMLIFrameElement::isSupported):
+ (DOMHTMLIFrameElement::namespaceURI):
+ (DOMHTMLIFrameElement::prefix):
+ (DOMHTMLIFrameElement::setPrefix):
+ (DOMHTMLIFrameElement::localName):
+ (DOMHTMLIFrameElement::hasAttributes):
+ (DOMHTMLIFrameElement::isSameNode):
+ (DOMHTMLIFrameElement::isEqualNode):
+ (DOMHTMLIFrameElement::textContent):
+ (DOMHTMLIFrameElement::setTextContent):
+ (DOMHTMLIFrameElement::tagName):
+ (DOMHTMLIFrameElement::getAttribute):
+ (DOMHTMLIFrameElement::setAttribute):
+ (DOMHTMLIFrameElement::removeAttribute):
+ (DOMHTMLIFrameElement::getAttributeNode):
+ (DOMHTMLIFrameElement::setAttributeNode):
+ (DOMHTMLIFrameElement::removeAttributeNode):
+ (DOMHTMLIFrameElement::getElementsByTagName):
+ (DOMHTMLIFrameElement::getAttributeNS):
+ (DOMHTMLIFrameElement::setAttributeNS):
+ (DOMHTMLIFrameElement::removeAttributeNS):
+ (DOMHTMLIFrameElement::getAttributeNodeNS):
+ (DOMHTMLIFrameElement::setAttributeNodeNS):
+ (DOMHTMLIFrameElement::getElementsByTagNameNS):
+ (DOMHTMLIFrameElement::hasAttribute):
+ (DOMHTMLIFrameElement::hasAttributeNS):
+ (DOMHTMLIFrameElement::focus):
+ (DOMHTMLIFrameElement::blur):
+ (DOMHTMLIFrameElement::idName):
+ (DOMHTMLIFrameElement::setIdName):
+ (DOMHTMLIFrameElement::title):
+ (DOMHTMLIFrameElement::setTitle):
+ (DOMHTMLIFrameElement::lang):
+ (DOMHTMLIFrameElement::setLang):
+ (DOMHTMLIFrameElement::dir):
+ (DOMHTMLIFrameElement::setDir):
+ (DOMHTMLIFrameElement::className):
+ (DOMHTMLIFrameElement::setClassName):
+ (DOMHTMLIFrameElement::innerHTML):
+ (DOMHTMLIFrameElement::setInnerHTML):
+ (DOMHTMLIFrameElement::innerText):
+ (DOMHTMLIFrameElement::setInnerText):
+ * Interfaces/DOMHTML.idl:
+ Added IDOMHTMLIFrameElement interface
+
+2010-03-03 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Export acceleratedCompositing flag in IWebPreferences.
+ https://bugs.webkit.org/show_bug.cgi?id=35610
+
+ * Interfaces/IWebPreferences.idl:
+
+2010-03-02 Beth Dakin <bdakin@apple.com>
+
+ Reviewed by Darin Adler and Adam Roben.
+
+ Tiny WebKit portion of fix for <rdar://problem/7485289> WebKit
+ crashes on systems that don't support CoreAnimation
+
+ setHostWindow() no longer calls createRenderer(), so now that has
+ to be called manually.
+
+ * WebView.cpp:
+ (WebView::setAcceleratedCompositing):
+
+2010-03-02 Adam Roben <aroben@apple.com>
+
+ Add IWebViewPrivate::registerURLSchemeAsSecure
+
+ Fixes <http://webkit.org/b/35580> <rdar://problem/7706407> Expose
+ SecurityOrigin::registerURLSchemeAsSecure as WebKit SPI
+
+ Reviewed by Tim Hatcher.
+
+ * Interfaces/WebKit.idl: Touched to force a build.
+
+ * Interfaces/IWebViewPrivate.idl:
+ * WebView.cpp:
+ (WebView::registerURLSchemeAsSecure):
+ * WebView.h:
+ Added. Calls through to SecurityOrigin::registerURLSchemeAsSecure.
+
+2010-03-01 Jon Honeycutt <jhoneycutt@apple.com>
+
+ Remove Windows line endings from some files.
+
+ Rubber-stamped by Alice Liu.
+
+ * Interfaces/IWebEmbeddedView.idl:
+
+ * WebCoreSupport/EmbeddedWidget.cpp:
+ (EmbeddedWidget::create):
+ (EmbeddedWidget::~EmbeddedWidget):
+ (EmbeddedWidget::createWindow):
+ (EmbeddedWidget::invalidateRect):
+ (EmbeddedWidget::setFrameRect):
+ (EmbeddedWidget::frameRectsChanged):
+ (EmbeddedWidget::setFocus):
+ (EmbeddedWidget::show):
+ (EmbeddedWidget::hide):
+ (EmbeddedWidget::windowClipRect):
+ (EmbeddedWidget::setParent):
+ (EmbeddedWidget::attachToWindow):
+ (EmbeddedWidget::detachFromWindow):
+ (EmbeddedWidget::didReceiveResponse):
+ (EmbeddedWidget::didReceiveData):
+ (EmbeddedWidget::didFinishLoading):
+ (EmbeddedWidget::didFail):
+
+ * WebCoreSupport/EmbeddedWidget.h:
+ (EmbeddedWidget::EmbeddedWidget):
+
+2010-03-01 Jon Honeycutt <jhoneycutt@apple.com>
+
+ Some WebKit DOMNode API is unimplemented.
+ https://bugs.webkit.org/show_bug.cgi?id=35554
+
+ Reviewed by Alice Liu.
+
+ * DOMCoreClasses.cpp:
+ (DOMNode::nextSibling):
+ Create a DOMNode to wrap m_node's next sibling, and assign it to the
+ out param 'result'.
+ (DOMNode::insertBefore):
+ Query for the DOMNode for newChild, and return early if we fail. Query
+ refChild for DOMNode. Call insertBefore(), passing the newChild's
+ WebCore node and refChild's WebCore node (if refChild is non-null). If
+ we successfully insert the child, fill the result out param with
+ newChild, ref it, and return S_OK. Otherwise, return E_FAIL.
+ (DOMNode::removeChild):
+ Query oldChild for DOMNode. If we fail, return E_FAIL. Call
+ removeChild(), passing the node's WebCore node. If this fails, return
+ E_FAIL. Otherwise, fill the result out param with oldChild, ref it, and
+ return S_OK.
+
+2010-03-01 Jakob Petsovits <jpetsovits@rim.com>
+
+ Reviewed by Adam Barth.
+
+ Adapt to the new ZoomMode enum.
+ https://bugs.webkit.org/show_bug.cgi?id=35347
+
+ * WebFrame.cpp:
+ (WebFrame::setTextSizeMultiplier):
+ * WebView.cpp:
+ (WebView::setZoomMultiplier):
+ (WebView::zoomMultiplier):
+ (WebView::canMakeTextLarger):
+ (WebView::makeTextLarger):
+ (WebView::canMakeTextSmaller):
+ (WebView::makeTextSmaller):
+ (WebView::notifyPreferencesChanged):
+
+2010-02-26 Jon Honeycutt <jhoneycutt@apple.com>
+
+ <rdar://problem/7703368> IWebUIDelegatePrivate::embeddedViewWithArguments
+ is passed wrong arguments
+
+ Reviewed by Adam Roben.
+
+ * Interfaces/IWebUIDelegatePrivate.idl:
+ Update copyright strings. Added a new key for the plug-in source URL.
+
+ * Interfaces/WebKit.idl:
+ Update copyright strings.
+
+ * WebCoreSupport/WebFrameLoaderClient.cpp:
+ (WebFrameLoaderClient::createPlugin):
+ Pass the URL of the plug-in as the source URL. Pass the document's
+ base URI for the base URL.
+
+2010-02-23 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Tim Hatcher and Pavel Feldman.
+
+ Regression (r55107) - WebInspector docking is busted.
+ https://bugs.webkit.org/show_bug.cgi?id=35274
+
+ * WebCoreSupport/WebInspectorClient.cpp:
+ (WebInspectorClient::showWindowWithoutNotifications): Swap the order of the "should attach?" check
+ to get the expected behavior.
+
+2010-02-23 Steve Block <steveblock@google.com>
+
+ Reviewed by Darin Adler.
+
+ Adds ChromeClient::cancelGeolocationPermissionRequestForFrame
+ https://bugs.webkit.org/show_bug.cgi?id=34962
+
+ This method is required so that a Geolocation object can cancel an
+ asynchronous permission request. This allows the chrome client to cancel
+ any UI it is showing for the permission request.
+
+ * WebCoreSupport/WebChromeClient.h:
+ (WebChromeClient::cancelGeolocationPermissionRequestForFrame):
+
+2010-02-22 Steve Falkenburg <sfalken@apple.com>
+
+ Reviewed by Darin Adler.
+
+ WebKit on Windows should pick up system setting changes without requiring explicit API calls
+ https://bugs.webkit.org/show_bug.cgi?id=35269
+
+ * WebKit.vcproj/WebKit.def: Removed WebKitSystemParameterChanged.
+ * WebKit.vcproj/WebKit_debug.def: Removed WebKitSystemParameterChanged.
+ * WebKitGraphics.cpp: Removed WebKitSystemParameterChanged.
+ * WebKitGraphics.h: Removed WebKitSystemParameterChanged.
+ * WebView.cpp:
+ (systemParameterChanged): Call through to wkSystemFontSmoothingChanged for font changes.
+ (WebView::windowReceivedMessage): Pick up WM_SETTINGCHANGE from windowReceivedMessage.
+
+2010-02-22 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ Disable WebView docking to views that are too small.
+ <rdar://problem/7248409> and https://bugs.webkit.org/show_bug.cgi?id=35254
+
+ * WebCoreSupport/WebInspectorClient.cpp:
+ (WebInspectorClient::showWindowWithoutNotifications): No matter the preference, don't open the inspector
+ window attached if WebCore says it shouldn't be attached.
+
2010-02-17 Steve Falkenburg <sfalken@apple.com>
Reviewed by Dan Bernstein.
diff --git a/WebKit/win/DOMCoreClasses.cpp b/WebKit/win/DOMCoreClasses.cpp
index 8ea7c84..4e8af61 100644
--- a/WebKit/win/DOMCoreClasses.cpp
+++ b/WebKit/win/DOMCoreClasses.cpp
@@ -184,10 +184,15 @@ HRESULT STDMETHODCALLTYPE DOMNode::previousSibling(
}
HRESULT STDMETHODCALLTYPE DOMNode::nextSibling(
- /* [retval][out] */ IDOMNode** /*result*/)
+ /* [retval][out] */ IDOMNode** result)
{
- ASSERT_NOT_REACHED();
- return E_NOTIMPL;
+ if (!result)
+ return E_POINTER;
+ *result = 0;
+ if (!m_node)
+ return E_FAIL;
+ *result = DOMNode::createInstance(m_node->nextSibling());
+ return *result ? S_OK : E_FAIL;
}
HRESULT STDMETHODCALLTYPE DOMNode::attributes(
@@ -210,12 +215,31 @@ HRESULT STDMETHODCALLTYPE DOMNode::ownerDocument(
}
HRESULT STDMETHODCALLTYPE DOMNode::insertBefore(
- /* [in] */ IDOMNode* /*newChild*/,
- /* [in] */ IDOMNode* /*refChild*/,
- /* [retval][out] */ IDOMNode** /*result*/)
+ /* [in] */ IDOMNode* newChild,
+ /* [in] */ IDOMNode* refChild,
+ /* [retval][out] */ IDOMNode** result)
{
- ASSERT_NOT_REACHED();
- return E_NOTIMPL;
+ if (!result)
+ return E_POINTER;
+
+ *result = 0;
+
+ if (!m_node)
+ return E_FAIL;
+
+ COMPtr<DOMNode> newChildNode(Query, newChild);
+ if (!newChildNode)
+ return E_FAIL;
+
+ COMPtr<DOMNode> refChildNode(Query, refChild);
+
+ ExceptionCode ec;
+ if (!m_node->insertBefore(newChildNode->node(), refChildNode ? refChildNode->node() : 0, ec))
+ return E_FAIL;
+
+ *result = newChild;
+ (*result)->AddRef();
+ return S_OK;
}
HRESULT STDMETHODCALLTYPE DOMNode::replaceChild(
@@ -228,11 +252,28 @@ HRESULT STDMETHODCALLTYPE DOMNode::replaceChild(
}
HRESULT STDMETHODCALLTYPE DOMNode::removeChild(
- /* [in] */ IDOMNode* /*oldChild*/,
- /* [retval][out] */ IDOMNode** /*result*/)
+ /* [in] */ IDOMNode* oldChild,
+ /* [retval][out] */ IDOMNode** result)
{
- ASSERT_NOT_REACHED();
- return E_NOTIMPL;
+ if (!result)
+ return E_POINTER;
+
+ *result = 0;
+
+ if (!m_node)
+ return E_FAIL;
+
+ COMPtr<DOMNode> oldChildNode(Query, oldChild);
+ if (!oldChildNode)
+ return E_FAIL;
+
+ ExceptionCode ec;
+ if (!m_node->removeChild(oldChildNode->node(), ec))
+ return E_FAIL;
+
+ *result = oldChild;
+ (*result)->AddRef();
+ return S_OK;
}
HRESULT STDMETHODCALLTYPE DOMNode::appendChild(
@@ -1295,14 +1336,17 @@ IDOMElement* DOMElement::createInstance(WebCore::Element* e)
if (e->hasTagName(formTag)) {
DOMHTMLFormElement* newElement = new DOMHTMLFormElement(e);
hr = newElement->QueryInterface(IID_IDOMElement, (void**)&domElement);
- } else if (e->hasTagName(selectTag)) {
- DOMHTMLSelectElement* newElement = new DOMHTMLSelectElement(e);
+ } else if (e->hasTagName(iframeTag)) {
+ DOMHTMLIFrameElement* newElement = new DOMHTMLIFrameElement(e);
+ hr = newElement->QueryInterface(IID_IDOMElement, (void**)&domElement);
+ } else if (e->hasTagName(inputTag)) {
+ DOMHTMLInputElement* newElement = new DOMHTMLInputElement(e);
hr = newElement->QueryInterface(IID_IDOMElement, (void**)&domElement);
} else if (e->hasTagName(optionTag)) {
DOMHTMLOptionElement* newElement = new DOMHTMLOptionElement(e);
hr = newElement->QueryInterface(IID_IDOMElement, (void**)&domElement);
- } else if (e->hasTagName(inputTag)) {
- DOMHTMLInputElement* newElement = new DOMHTMLInputElement(e);
+ } else if (e->hasTagName(selectTag)) {
+ DOMHTMLSelectElement* newElement = new DOMHTMLSelectElement(e);
hr = newElement->QueryInterface(IID_IDOMElement, (void**)&domElement);
} else if (e->hasTagName(textareaTag)) {
DOMHTMLTextAreaElement* newElement = new DOMHTMLTextAreaElement(e);
diff --git a/WebKit/win/DOMCoreClasses.h b/WebKit/win/DOMCoreClasses.h
index 3941d13..f8a3dbb 100644
--- a/WebKit/win/DOMCoreClasses.h
+++ b/WebKit/win/DOMCoreClasses.h
@@ -30,14 +30,14 @@
#include "WebScriptObject.h"
namespace WebCore {
- class Element;
- class Document;
- class Node;
- class NodeList;
+class Element;
+class Document;
+class Node;
+class NodeList;
}
-class DOMObject : public WebScriptObject, public IDOMObject
-{
+
+class DOMObject : public WebScriptObject, public IDOMObject {
public:
// IUnknown
virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void** ppvObject);
@@ -45,40 +45,39 @@ public:
virtual ULONG STDMETHODCALLTYPE Release(void) { return WebScriptObject::Release(); }
// IWebScriptObject
- virtual HRESULT STDMETHODCALLTYPE throwException(
+ virtual HRESULT STDMETHODCALLTYPE throwException(
/* [in] */ BSTR exceptionMessage,
- /* [retval][out] */ BOOL *result) { return WebScriptObject::throwException(exceptionMessage, result); }
+ /* [retval][out] */ BOOL* result) { return WebScriptObject::throwException(exceptionMessage, result); }
- virtual HRESULT STDMETHODCALLTYPE callWebScriptMethod(
+ virtual HRESULT STDMETHODCALLTYPE callWebScriptMethod(
/* [in] */ BSTR name,
/* [size_is][in] */ const VARIANT args[ ],
/* [in] */ int cArgs,
- /* [retval][out] */ VARIANT *result) { return WebScriptObject::callWebScriptMethod(name, args, cArgs, result); }
+ /* [retval][out] */ VARIANT* result) { return WebScriptObject::callWebScriptMethod(name, args, cArgs, result); }
- virtual HRESULT STDMETHODCALLTYPE evaluateWebScript(
+ virtual HRESULT STDMETHODCALLTYPE evaluateWebScript(
/* [in] */ BSTR script,
- /* [retval][out] */ VARIANT *result) { return WebScriptObject::evaluateWebScript(script, result); }
+ /* [retval][out] */ VARIANT* result) { return WebScriptObject::evaluateWebScript(script, result); }
- virtual HRESULT STDMETHODCALLTYPE removeWebScriptKey(
+ virtual HRESULT STDMETHODCALLTYPE removeWebScriptKey(
/* [in] */ BSTR name) { return WebScriptObject::removeWebScriptKey(name); }
- virtual HRESULT STDMETHODCALLTYPE stringRepresentation(
+ virtual HRESULT STDMETHODCALLTYPE stringRepresentation(
/* [retval][out] */ BSTR* stringRepresentation) { return WebScriptObject::stringRepresentation(stringRepresentation); }
- virtual HRESULT STDMETHODCALLTYPE webScriptValueAtIndex(
+ virtual HRESULT STDMETHODCALLTYPE webScriptValueAtIndex(
/* [in] */ unsigned int index,
- /* [retval][out] */ VARIANT *result) { return WebScriptObject::webScriptValueAtIndex(index, result); }
+ /* [retval][out] */ VARIANT* result) { return WebScriptObject::webScriptValueAtIndex(index, result); }
- virtual HRESULT STDMETHODCALLTYPE setWebScriptValueAtIndex(
+ virtual HRESULT STDMETHODCALLTYPE setWebScriptValueAtIndex(
/* [in] */ unsigned int index,
/* [in] */ VARIANT val) { return WebScriptObject::setWebScriptValueAtIndex(index, val); }
- virtual HRESULT STDMETHODCALLTYPE setException(
+ virtual HRESULT STDMETHODCALLTYPE setException(
/* [in] */ BSTR description) { return WebScriptObject::setException(description); }
};
-class DECLSPEC_UUID("062AEEE3-9E42-44DC-A8A9-236B216FE011") DOMNode : public DOMObject, public IDOMNode, public IDOMEventTarget
-{
+class DECLSPEC_UUID("062AEEE3-9E42-44DC-A8A9-236B216FE011") DOMNode : public DOMObject, public IDOMNode, public IDOMEventTarget {
protected:
DOMNode(WebCore::Node* n);
~DOMNode();
@@ -93,149 +92,149 @@ public:
virtual ULONG STDMETHODCALLTYPE Release(void) { return DOMObject::Release(); }
// IWebScriptObject
- virtual HRESULT STDMETHODCALLTYPE throwException(
+ virtual HRESULT STDMETHODCALLTYPE throwException(
/* [in] */ BSTR exceptionMessage,
- /* [retval][out] */ BOOL *result) { return DOMObject::throwException(exceptionMessage, result); }
+ /* [retval][out] */ BOOL* result) { return DOMObject::throwException(exceptionMessage, result); }
- virtual HRESULT STDMETHODCALLTYPE callWebScriptMethod(
+ virtual HRESULT STDMETHODCALLTYPE callWebScriptMethod(
/* [in] */ BSTR name,
/* [size_is][in] */ const VARIANT args[ ],
/* [in] */ int cArgs,
- /* [retval][out] */ VARIANT *result) { return DOMObject::callWebScriptMethod(name, args, cArgs, result); }
+ /* [retval][out] */ VARIANT* result) { return DOMObject::callWebScriptMethod(name, args, cArgs, result); }
- virtual HRESULT STDMETHODCALLTYPE evaluateWebScript(
+ virtual HRESULT STDMETHODCALLTYPE evaluateWebScript(
/* [in] */ BSTR script,
- /* [retval][out] */ VARIANT *result) { return DOMObject::evaluateWebScript(script, result); }
+ /* [retval][out] */ VARIANT* result) { return DOMObject::evaluateWebScript(script, result); }
- virtual HRESULT STDMETHODCALLTYPE removeWebScriptKey(
+ virtual HRESULT STDMETHODCALLTYPE removeWebScriptKey(
/* [in] */ BSTR name) { return DOMObject::removeWebScriptKey(name); }
- virtual HRESULT STDMETHODCALLTYPE stringRepresentation(
+ virtual HRESULT STDMETHODCALLTYPE stringRepresentation(
/* [retval][out] */ BSTR* stringRepresentation) { return DOMObject::stringRepresentation(stringRepresentation); }
- virtual HRESULT STDMETHODCALLTYPE webScriptValueAtIndex(
+ virtual HRESULT STDMETHODCALLTYPE webScriptValueAtIndex(
/* [in] */ unsigned int index,
- /* [retval][out] */ VARIANT *result) { return DOMObject::webScriptValueAtIndex(index, result); }
+ /* [retval][out] */ VARIANT* result) { return DOMObject::webScriptValueAtIndex(index, result); }
- virtual HRESULT STDMETHODCALLTYPE setWebScriptValueAtIndex(
+ virtual HRESULT STDMETHODCALLTYPE setWebScriptValueAtIndex(
/* [in] */ unsigned int index,
/* [in] */ VARIANT val) { return DOMObject::setWebScriptValueAtIndex(index, val); }
- virtual HRESULT STDMETHODCALLTYPE setException(
+ virtual HRESULT STDMETHODCALLTYPE setException(
/* [in] */ BSTR description) { return DOMObject::setException(description); }
// IDOMNode
- virtual HRESULT STDMETHODCALLTYPE nodeName(
- /* [retval][out] */ BSTR *result);
+ virtual HRESULT STDMETHODCALLTYPE nodeName(
+ /* [retval][out] */ BSTR* result);
- virtual HRESULT STDMETHODCALLTYPE nodeValue(
- /* [retval][out] */ BSTR *result);
+ virtual HRESULT STDMETHODCALLTYPE nodeValue(
+ /* [retval][out] */ BSTR* result);
- virtual HRESULT STDMETHODCALLTYPE setNodeValue(
+ virtual HRESULT STDMETHODCALLTYPE setNodeValue(
/* [in] */ BSTR value);
- virtual HRESULT STDMETHODCALLTYPE nodeType(
- /* [retval][out] */ unsigned short *result);
+ virtual HRESULT STDMETHODCALLTYPE nodeType(
+ /* [retval][out] */ unsigned short* result);
- virtual HRESULT STDMETHODCALLTYPE parentNode(
- /* [retval][out] */ IDOMNode **result);
+ virtual HRESULT STDMETHODCALLTYPE parentNode(
+ /* [retval][out] */ IDOMNode** result);
- virtual HRESULT STDMETHODCALLTYPE childNodes(
- /* [retval][out] */ IDOMNodeList **result);
+ virtual HRESULT STDMETHODCALLTYPE childNodes(
+ /* [retval][out] */ IDOMNodeList** result);
- virtual HRESULT STDMETHODCALLTYPE firstChild(
- /* [retval][out] */ IDOMNode **result);
+ virtual HRESULT STDMETHODCALLTYPE firstChild(
+ /* [retval][out] */ IDOMNode** result);
- virtual HRESULT STDMETHODCALLTYPE lastChild(
- /* [retval][out] */ IDOMNode **result);
+ virtual HRESULT STDMETHODCALLTYPE lastChild(
+ /* [retval][out] */ IDOMNode** result);
- virtual HRESULT STDMETHODCALLTYPE previousSibling(
- /* [retval][out] */ IDOMNode **result);
+ virtual HRESULT STDMETHODCALLTYPE previousSibling(
+ /* [retval][out] */ IDOMNode** result);
- virtual HRESULT STDMETHODCALLTYPE nextSibling(
- /* [retval][out] */ IDOMNode **result);
+ virtual HRESULT STDMETHODCALLTYPE nextSibling(
+ /* [retval][out] */ IDOMNode** result);
- virtual HRESULT STDMETHODCALLTYPE attributes(
- /* [retval][out] */ IDOMNamedNodeMap **result);
+ virtual HRESULT STDMETHODCALLTYPE attributes(
+ /* [retval][out] */ IDOMNamedNodeMap** result);
- virtual HRESULT STDMETHODCALLTYPE ownerDocument(
- /* [retval][out] */ IDOMDocument **result);
+ virtual HRESULT STDMETHODCALLTYPE ownerDocument(
+ /* [retval][out] */ IDOMDocument** result);
- virtual HRESULT STDMETHODCALLTYPE insertBefore(
- /* [in] */ IDOMNode *newChild,
- /* [in] */ IDOMNode *refChild,
- /* [retval][out] */ IDOMNode **result);
+ virtual HRESULT STDMETHODCALLTYPE insertBefore(
+ /* [in] */ IDOMNode* newChild,
+ /* [in] */ IDOMNode* refChild,
+ /* [retval][out] */ IDOMNode** result);
- virtual HRESULT STDMETHODCALLTYPE replaceChild(
- /* [in] */ IDOMNode *newChild,
- /* [in] */ IDOMNode *oldChild,
- /* [retval][out] */ IDOMNode **result);
+ virtual HRESULT STDMETHODCALLTYPE replaceChild(
+ /* [in] */ IDOMNode* newChild,
+ /* [in] */ IDOMNode* oldChild,
+ /* [retval][out] */ IDOMNode** result);
- virtual HRESULT STDMETHODCALLTYPE removeChild(
- /* [in] */ IDOMNode *oldChild,
- /* [retval][out] */ IDOMNode **result);
+ virtual HRESULT STDMETHODCALLTYPE removeChild(
+ /* [in] */ IDOMNode* oldChild,
+ /* [retval][out] */ IDOMNode** result);
- virtual HRESULT STDMETHODCALLTYPE appendChild(
- /* [in] */ IDOMNode *oldChild,
- /* [retval][out] */ IDOMNode **result);
+ virtual HRESULT STDMETHODCALLTYPE appendChild(
+ /* [in] */ IDOMNode* oldChild,
+ /* [retval][out] */ IDOMNode** result);
- virtual HRESULT STDMETHODCALLTYPE hasChildNodes(
- /* [retval][out] */ BOOL *result);
+ virtual HRESULT STDMETHODCALLTYPE hasChildNodes(
+ /* [retval][out] */ BOOL* result);
- virtual HRESULT STDMETHODCALLTYPE cloneNode(
+ virtual HRESULT STDMETHODCALLTYPE cloneNode(
/* [in] */ BOOL deep,
- /* [retval][out] */ IDOMNode **result);
+ /* [retval][out] */ IDOMNode** result);
virtual HRESULT STDMETHODCALLTYPE normalize( void);
- virtual HRESULT STDMETHODCALLTYPE isSupported(
+ virtual HRESULT STDMETHODCALLTYPE isSupported(
/* [in] */ BSTR feature,
/* [in] */ BSTR version,
- /* [retval][out] */ BOOL *result);
+ /* [retval][out] */ BOOL* result);
- virtual HRESULT STDMETHODCALLTYPE namespaceURI(
- /* [retval][out] */ BSTR *result);
+ virtual HRESULT STDMETHODCALLTYPE namespaceURI(
+ /* [retval][out] */ BSTR* result);
- virtual HRESULT STDMETHODCALLTYPE prefix(
- /* [retval][out] */ BSTR *result);
+ virtual HRESULT STDMETHODCALLTYPE prefix(
+ /* [retval][out] */ BSTR* result);
- virtual HRESULT STDMETHODCALLTYPE setPrefix(
+ virtual HRESULT STDMETHODCALLTYPE setPrefix(
/* [in] */ BSTR prefix);
- virtual HRESULT STDMETHODCALLTYPE localName(
- /* [retval][out] */ BSTR *result);
+ virtual HRESULT STDMETHODCALLTYPE localName(
+ /* [retval][out] */ BSTR* result);
- virtual HRESULT STDMETHODCALLTYPE hasAttributes(
- /* [retval][out] */ BOOL *result);
+ virtual HRESULT STDMETHODCALLTYPE hasAttributes(
+ /* [retval][out] */ BOOL* result);
- virtual HRESULT STDMETHODCALLTYPE isSameNode(
+ virtual HRESULT STDMETHODCALLTYPE isSameNode(
/* [in] */ IDOMNode* other,
/* [retval][out] */ BOOL* result);
- virtual HRESULT STDMETHODCALLTYPE isEqualNode(
+ virtual HRESULT STDMETHODCALLTYPE isEqualNode(
/* [in] */ IDOMNode* other,
/* [retval][out] */ BOOL* result);
- virtual HRESULT STDMETHODCALLTYPE textContent(
+ virtual HRESULT STDMETHODCALLTYPE textContent(
/* [retval][out] */ BSTR* result);
- virtual HRESULT STDMETHODCALLTYPE setTextContent(
+ virtual HRESULT STDMETHODCALLTYPE setTextContent(
/* [in] */ BSTR text);
// IDOMEventTarget
- virtual HRESULT STDMETHODCALLTYPE addEventListener(
+ virtual HRESULT STDMETHODCALLTYPE addEventListener(
/* [in] */ BSTR type,
/* [in] */ IDOMEventListener *listener,
/* [in] */ BOOL useCapture);
- virtual HRESULT STDMETHODCALLTYPE removeEventListener(
+ virtual HRESULT STDMETHODCALLTYPE removeEventListener(
/* [in] */ BSTR type,
/* [in] */ IDOMEventListener *listener,
/* [in] */ BOOL useCapture);
- virtual HRESULT STDMETHODCALLTYPE dispatchEvent(
+ virtual HRESULT STDMETHODCALLTYPE dispatchEvent(
/* [in] */ IDOMEvent *evt,
- /* [retval][out] */ BOOL *result);
+ /* [retval][out] */ BOOL* result);
// DOMNode
WebCore::Node* node() const { return m_node; }
@@ -244,8 +243,7 @@ protected:
WebCore::Node* m_node;
};
-class DOMNodeList : public DOMObject, public IDOMNodeList
-{
+class DOMNodeList : public DOMObject, public IDOMNodeList {
protected:
DOMNodeList(WebCore::NodeList* l);
~DOMNodeList();
@@ -260,51 +258,50 @@ public:
virtual ULONG STDMETHODCALLTYPE Release(void) { return DOMObject::Release(); }
// IWebScriptObject
- virtual HRESULT STDMETHODCALLTYPE throwException(
+ virtual HRESULT STDMETHODCALLTYPE throwException(
/* [in] */ BSTR exceptionMessage,
- /* [retval][out] */ BOOL *result) { return DOMObject::throwException(exceptionMessage, result); }
+ /* [retval][out] */ BOOL* result) { return DOMObject::throwException(exceptionMessage, result); }
- virtual HRESULT STDMETHODCALLTYPE callWebScriptMethod(
+ virtual HRESULT STDMETHODCALLTYPE callWebScriptMethod(
/* [in] */ BSTR name,
/* [size_is][in] */ const VARIANT args[ ],
/* [in] */ int cArgs,
- /* [retval][out] */ VARIANT *result) { return DOMObject::callWebScriptMethod(name, args, cArgs, result); }
+ /* [retval][out] */ VARIANT* result) { return DOMObject::callWebScriptMethod(name, args, cArgs, result); }
- virtual HRESULT STDMETHODCALLTYPE evaluateWebScript(
+ virtual HRESULT STDMETHODCALLTYPE evaluateWebScript(
/* [in] */ BSTR script,
- /* [retval][out] */ VARIANT *result) { return DOMObject::evaluateWebScript(script, result); }
+ /* [retval][out] */ VARIANT* result) { return DOMObject::evaluateWebScript(script, result); }
- virtual HRESULT STDMETHODCALLTYPE removeWebScriptKey(
+ virtual HRESULT STDMETHODCALLTYPE removeWebScriptKey(
/* [in] */ BSTR name) { return DOMObject::removeWebScriptKey(name); }
- virtual HRESULT STDMETHODCALLTYPE stringRepresentation(
+ virtual HRESULT STDMETHODCALLTYPE stringRepresentation(
/* [retval][out] */ BSTR* stringRepresentation) { return DOMObject::stringRepresentation(stringRepresentation); }
- virtual HRESULT STDMETHODCALLTYPE webScriptValueAtIndex(
+ virtual HRESULT STDMETHODCALLTYPE webScriptValueAtIndex(
/* [in] */ unsigned int index,
- /* [retval][out] */ VARIANT *result) { return DOMObject::webScriptValueAtIndex(index, result); }
+ /* [retval][out] */ VARIANT* result) { return DOMObject::webScriptValueAtIndex(index, result); }
- virtual HRESULT STDMETHODCALLTYPE setWebScriptValueAtIndex(
+ virtual HRESULT STDMETHODCALLTYPE setWebScriptValueAtIndex(
/* [in] */ unsigned int index,
/* [in] */ VARIANT val) { return DOMObject::setWebScriptValueAtIndex(index, val); }
- virtual HRESULT STDMETHODCALLTYPE setException(
+ virtual HRESULT STDMETHODCALLTYPE setException(
/* [in] */ BSTR description) { return DOMObject::setException(description); }
// IDOMNodeList
- virtual HRESULT STDMETHODCALLTYPE item(
+ virtual HRESULT STDMETHODCALLTYPE item(
/* [in] */ UINT index,
- /* [retval][out] */ IDOMNode **result);
+ /* [retval][out] */ IDOMNode** result);
- virtual HRESULT STDMETHODCALLTYPE length(
- /* [retval][out] */ UINT *result);
+ virtual HRESULT STDMETHODCALLTYPE length(
+ /* [retval][out] */ UINT* result);
protected:
WebCore::NodeList* m_nodeList;
};
-class DOMDocument : public DOMNode, public IDOMDocument, public IDOMViewCSS, public IDOMDocumentEvent
-{
+class DOMDocument : public DOMNode, public IDOMDocument, public IDOMViewCSS, public IDOMDocumentEvent {
protected:
DOMDocument(WebCore::Document* d);
~DOMDocument();
@@ -319,215 +316,215 @@ public:
virtual ULONG STDMETHODCALLTYPE Release(void) { return DOMNode::Release(); }
// IWebScriptObject
- virtual HRESULT STDMETHODCALLTYPE throwException(
+ virtual HRESULT STDMETHODCALLTYPE throwException(
/* [in] */ BSTR exceptionMessage,
- /* [retval][out] */ BOOL *result) { return DOMNode::throwException(exceptionMessage, result); }
+ /* [retval][out] */ BOOL* result) { return DOMNode::throwException(exceptionMessage, result); }
- virtual HRESULT STDMETHODCALLTYPE callWebScriptMethod(
+ virtual HRESULT STDMETHODCALLTYPE callWebScriptMethod(
/* [in] */ BSTR name,
/* [size_is][in] */ const VARIANT args[ ],
/* [in] */ int cArgs,
- /* [retval][out] */ VARIANT *result) { return DOMNode::callWebScriptMethod(name, args, cArgs, result); }
+ /* [retval][out] */ VARIANT* result) { return DOMNode::callWebScriptMethod(name, args, cArgs, result); }
- virtual HRESULT STDMETHODCALLTYPE evaluateWebScript(
+ virtual HRESULT STDMETHODCALLTYPE evaluateWebScript(
/* [in] */ BSTR script,
- /* [retval][out] */ VARIANT *result) { return DOMNode::evaluateWebScript(script, result); }
+ /* [retval][out] */ VARIANT* result) { return DOMNode::evaluateWebScript(script, result); }
- virtual HRESULT STDMETHODCALLTYPE removeWebScriptKey(
+ virtual HRESULT STDMETHODCALLTYPE removeWebScriptKey(
/* [in] */ BSTR name) { return DOMNode::removeWebScriptKey(name); }
- virtual HRESULT STDMETHODCALLTYPE stringRepresentation(
+ virtual HRESULT STDMETHODCALLTYPE stringRepresentation(
/* [retval][out] */ BSTR* stringRepresentation) { return DOMNode::stringRepresentation(stringRepresentation); }
- virtual HRESULT STDMETHODCALLTYPE webScriptValueAtIndex(
+ virtual HRESULT STDMETHODCALLTYPE webScriptValueAtIndex(
/* [in] */ unsigned int index,
- /* [retval][out] */ VARIANT *result) { return DOMNode::webScriptValueAtIndex(index, result); }
+ /* [retval][out] */ VARIANT* result) { return DOMNode::webScriptValueAtIndex(index, result); }
- virtual HRESULT STDMETHODCALLTYPE setWebScriptValueAtIndex(
+ virtual HRESULT STDMETHODCALLTYPE setWebScriptValueAtIndex(
/* [in] */ unsigned int index,
/* [in] */ VARIANT val) { return DOMNode::setWebScriptValueAtIndex(index, val); }
- virtual HRESULT STDMETHODCALLTYPE setException(
+ virtual HRESULT STDMETHODCALLTYPE setException(
/* [in] */ BSTR description) { return DOMNode::setException(description); }
// IDOMNode
- virtual HRESULT STDMETHODCALLTYPE nodeName(
- /* [retval][out] */ BSTR *result) { return DOMNode::nodeName(result); }
+ virtual HRESULT STDMETHODCALLTYPE nodeName(
+ /* [retval][out] */ BSTR* result) { return DOMNode::nodeName(result); }
- virtual HRESULT STDMETHODCALLTYPE nodeValue(
- /* [retval][out] */ BSTR *result) { return DOMNode::nodeValue(result); }
+ virtual HRESULT STDMETHODCALLTYPE nodeValue(
+ /* [retval][out] */ BSTR* result) { return DOMNode::nodeValue(result); }
- virtual HRESULT STDMETHODCALLTYPE setNodeValue(
+ virtual HRESULT STDMETHODCALLTYPE setNodeValue(
/* [in] */ BSTR value) { return DOMNode::setNodeValue(value); }
- virtual HRESULT STDMETHODCALLTYPE nodeType(
- /* [retval][out] */ unsigned short *result) { return DOMNode::nodeType(result); }
+ virtual HRESULT STDMETHODCALLTYPE nodeType(
+ /* [retval][out] */ unsigned short* result) { return DOMNode::nodeType(result); }
- virtual HRESULT STDMETHODCALLTYPE parentNode(
- /* [retval][out] */ IDOMNode **result) { return DOMNode::parentNode(result); }
+ virtual HRESULT STDMETHODCALLTYPE parentNode(
+ /* [retval][out] */ IDOMNode** result) { return DOMNode::parentNode(result); }
- virtual HRESULT STDMETHODCALLTYPE childNodes(
- /* [retval][out] */ IDOMNodeList **result) { return DOMNode::childNodes(result); }
+ virtual HRESULT STDMETHODCALLTYPE childNodes(
+ /* [retval][out] */ IDOMNodeList** result) { return DOMNode::childNodes(result); }
- virtual HRESULT STDMETHODCALLTYPE firstChild(
- /* [retval][out] */ IDOMNode **result) { return DOMNode::firstChild(result); }
+ virtual HRESULT STDMETHODCALLTYPE firstChild(
+ /* [retval][out] */ IDOMNode** result) { return DOMNode::firstChild(result); }
- virtual HRESULT STDMETHODCALLTYPE lastChild(
- /* [retval][out] */ IDOMNode **result) { return DOMNode::lastChild(result); }
+ virtual HRESULT STDMETHODCALLTYPE lastChild(
+ /* [retval][out] */ IDOMNode** result) { return DOMNode::lastChild(result); }
- virtual HRESULT STDMETHODCALLTYPE previousSibling(
- /* [retval][out] */ IDOMNode **result) { return DOMNode::previousSibling(result); }
+ virtual HRESULT STDMETHODCALLTYPE previousSibling(
+ /* [retval][out] */ IDOMNode** result) { return DOMNode::previousSibling(result); }
- virtual HRESULT STDMETHODCALLTYPE nextSibling(
- /* [retval][out] */ IDOMNode **result) { return DOMNode::nextSibling(result); }
+ virtual HRESULT STDMETHODCALLTYPE nextSibling(
+ /* [retval][out] */ IDOMNode** result) { return DOMNode::nextSibling(result); }
- virtual HRESULT STDMETHODCALLTYPE attributes(
- /* [retval][out] */ IDOMNamedNodeMap **result) { return DOMNode::attributes(result); }
+ virtual HRESULT STDMETHODCALLTYPE attributes(
+ /* [retval][out] */ IDOMNamedNodeMap** result) { return DOMNode::attributes(result); }
- virtual HRESULT STDMETHODCALLTYPE ownerDocument(
- /* [retval][out] */ IDOMDocument **result) { return DOMNode::ownerDocument(result); }
+ virtual HRESULT STDMETHODCALLTYPE ownerDocument(
+ /* [retval][out] */ IDOMDocument** result) { return DOMNode::ownerDocument(result); }
- virtual HRESULT STDMETHODCALLTYPE insertBefore(
- /* [in] */ IDOMNode *newChild,
- /* [in] */ IDOMNode *refChild,
- /* [retval][out] */ IDOMNode **result) { return DOMNode::insertBefore(newChild, refChild, result); }
+ virtual HRESULT STDMETHODCALLTYPE insertBefore(
+ /* [in] */ IDOMNode* newChild,
+ /* [in] */ IDOMNode* refChild,
+ /* [retval][out] */ IDOMNode** result) { return DOMNode::insertBefore(newChild, refChild, result); }
- virtual HRESULT STDMETHODCALLTYPE replaceChild(
- /* [in] */ IDOMNode *newChild,
- /* [in] */ IDOMNode *oldChild,
- /* [retval][out] */ IDOMNode **result) { return DOMNode::replaceChild(newChild, oldChild, result); }
+ virtual HRESULT STDMETHODCALLTYPE replaceChild(
+ /* [in] */ IDOMNode* newChild,
+ /* [in] */ IDOMNode* oldChild,
+ /* [retval][out] */ IDOMNode** result) { return DOMNode::replaceChild(newChild, oldChild, result); }
- virtual HRESULT STDMETHODCALLTYPE removeChild(
- /* [in] */ IDOMNode *oldChild,
- /* [retval][out] */ IDOMNode **result) { return DOMNode::removeChild(oldChild, result); }
+ virtual HRESULT STDMETHODCALLTYPE removeChild(
+ /* [in] */ IDOMNode* oldChild,
+ /* [retval][out] */ IDOMNode** result) { return DOMNode::removeChild(oldChild, result); }
- virtual HRESULT STDMETHODCALLTYPE appendChild(
- /* [in] */ IDOMNode *oldChild,
- /* [retval][out] */ IDOMNode **result) { return DOMNode::appendChild(oldChild, result); }
+ virtual HRESULT STDMETHODCALLTYPE appendChild(
+ /* [in] */ IDOMNode* oldChild,
+ /* [retval][out] */ IDOMNode** result) { return DOMNode::appendChild(oldChild, result); }
- virtual HRESULT STDMETHODCALLTYPE hasChildNodes(
- /* [retval][out] */ BOOL *result) { return DOMNode::hasChildNodes(result); }
+ virtual HRESULT STDMETHODCALLTYPE hasChildNodes(
+ /* [retval][out] */ BOOL* result) { return DOMNode::hasChildNodes(result); }
- virtual HRESULT STDMETHODCALLTYPE cloneNode(
+ virtual HRESULT STDMETHODCALLTYPE cloneNode(
/* [in] */ BOOL deep,
- /* [retval][out] */ IDOMNode **result) { return DOMNode::cloneNode(deep, result); }
+ /* [retval][out] */ IDOMNode** result) { return DOMNode::cloneNode(deep, result); }
virtual HRESULT STDMETHODCALLTYPE normalize( void) { return DOMNode::normalize(); }
- virtual HRESULT STDMETHODCALLTYPE isSupported(
+ virtual HRESULT STDMETHODCALLTYPE isSupported(
/* [in] */ BSTR feature,
/* [in] */ BSTR version,
- /* [retval][out] */ BOOL *result) { return DOMNode::isSupported(feature, version, result); }
+ /* [retval][out] */ BOOL* result) { return DOMNode::isSupported(feature, version, result); }
- virtual HRESULT STDMETHODCALLTYPE namespaceURI(
- /* [retval][out] */ BSTR *result) { return DOMNode::namespaceURI(result); }
+ virtual HRESULT STDMETHODCALLTYPE namespaceURI(
+ /* [retval][out] */ BSTR* result) { return DOMNode::namespaceURI(result); }
- virtual HRESULT STDMETHODCALLTYPE prefix(
- /* [retval][out] */ BSTR *result) { return DOMNode::prefix(result); }
+ virtual HRESULT STDMETHODCALLTYPE prefix(
+ /* [retval][out] */ BSTR* result) { return DOMNode::prefix(result); }
- virtual HRESULT STDMETHODCALLTYPE setPrefix(
+ virtual HRESULT STDMETHODCALLTYPE setPrefix(
/* [in] */ BSTR prefix) { return DOMNode::setPrefix(prefix); }
- virtual HRESULT STDMETHODCALLTYPE localName(
- /* [retval][out] */ BSTR *result) { return DOMNode::localName(result); }
+ virtual HRESULT STDMETHODCALLTYPE localName(
+ /* [retval][out] */ BSTR* result) { return DOMNode::localName(result); }
- virtual HRESULT STDMETHODCALLTYPE hasAttributes(
- /* [retval][out] */ BOOL *result) { return DOMNode::hasAttributes(result); }
+ virtual HRESULT STDMETHODCALLTYPE hasAttributes(
+ /* [retval][out] */ BOOL* result) { return DOMNode::hasAttributes(result); }
- virtual HRESULT STDMETHODCALLTYPE isSameNode(
+ virtual HRESULT STDMETHODCALLTYPE isSameNode(
/* [in] */ IDOMNode* other,
/* [retval][out] */ BOOL* result) { return DOMNode::isSameNode(other, result); }
- virtual HRESULT STDMETHODCALLTYPE isEqualNode(
+ virtual HRESULT STDMETHODCALLTYPE isEqualNode(
/* [in] */ IDOMNode* other,
/* [retval][out] */ BOOL* result) { return DOMNode::isEqualNode(other, result); }
- virtual HRESULT STDMETHODCALLTYPE textContent(
+ virtual HRESULT STDMETHODCALLTYPE textContent(
/* [retval][out] */ BSTR* result) { return DOMNode::textContent(result); }
- virtual HRESULT STDMETHODCALLTYPE setTextContent(
+ virtual HRESULT STDMETHODCALLTYPE setTextContent(
/* [in] */ BSTR text) { return DOMNode::setTextContent(text); }
// IDOMDocument
- virtual HRESULT STDMETHODCALLTYPE doctype(
- /* [retval][out] */ IDOMDocumentType **result);
+ virtual HRESULT STDMETHODCALLTYPE doctype(
+ /* [retval][out] */ IDOMDocumentType** result);
- virtual HRESULT STDMETHODCALLTYPE implementation(
- /* [retval][out] */ IDOMImplementation **result);
+ virtual HRESULT STDMETHODCALLTYPE implementation(
+ /* [retval][out] */ IDOMImplementation** result);
- virtual HRESULT STDMETHODCALLTYPE documentElement(
- /* [retval][out] */ IDOMElement **result);
+ virtual HRESULT STDMETHODCALLTYPE documentElement(
+ /* [retval][out] */ IDOMElement** result);
- virtual HRESULT STDMETHODCALLTYPE createElement(
+ virtual HRESULT STDMETHODCALLTYPE createElement(
/* [in] */ BSTR tagName,
- /* [retval][out] */ IDOMElement **result);
+ /* [retval][out] */ IDOMElement** result);
- virtual HRESULT STDMETHODCALLTYPE createDocumentFragment(
- /* [retval][out] */ IDOMDocumentFragment **result);
+ virtual HRESULT STDMETHODCALLTYPE createDocumentFragment(
+ /* [retval][out] */ IDOMDocumentFragment** result);
- virtual HRESULT STDMETHODCALLTYPE createTextNode(
+ virtual HRESULT STDMETHODCALLTYPE createTextNode(
/* [in] */ BSTR data,
- /* [retval][out] */ IDOMText **result);
+ /* [retval][out] */ IDOMText** result);
- virtual HRESULT STDMETHODCALLTYPE createComment(
+ virtual HRESULT STDMETHODCALLTYPE createComment(
/* [in] */ BSTR data,
- /* [retval][out] */ IDOMComment **result);
+ /* [retval][out] */ IDOMComment** result);
- virtual HRESULT STDMETHODCALLTYPE createCDATASection(
+ virtual HRESULT STDMETHODCALLTYPE createCDATASection(
/* [in] */ BSTR data,
- /* [retval][out] */ IDOMCDATASection **result);
+ /* [retval][out] */ IDOMCDATASection** result);
- virtual HRESULT STDMETHODCALLTYPE createProcessingInstruction(
+ virtual HRESULT STDMETHODCALLTYPE createProcessingInstruction(
/* [in] */ BSTR target,
/* [in] */ BSTR data,
- /* [retval][out] */ IDOMProcessingInstruction **result);
+ /* [retval][out] */ IDOMProcessingInstruction** result);
- virtual HRESULT STDMETHODCALLTYPE createAttribute(
+ virtual HRESULT STDMETHODCALLTYPE createAttribute(
/* [in] */ BSTR name,
- /* [retval][out] */ IDOMAttr **result);
+ /* [retval][out] */ IDOMAttr** result);
- virtual HRESULT STDMETHODCALLTYPE createEntityReference(
+ virtual HRESULT STDMETHODCALLTYPE createEntityReference(
/* [in] */ BSTR name,
- /* [retval][out] */ IDOMEntityReference **result);
+ /* [retval][out] */ IDOMEntityReference** result);
- virtual HRESULT STDMETHODCALLTYPE getElementsByTagName(
+ virtual HRESULT STDMETHODCALLTYPE getElementsByTagName(
/* [in] */ BSTR tagName,
- /* [retval][out] */ IDOMNodeList **result);
+ /* [retval][out] */ IDOMNodeList** result);
- virtual HRESULT STDMETHODCALLTYPE importNode(
- /* [in] */ IDOMNode *importedNode,
+ virtual HRESULT STDMETHODCALLTYPE importNode(
+ /* [in] */ IDOMNode* importedNode,
/* [in] */ BOOL deep,
- /* [retval][out] */ IDOMNode **result);
+ /* [retval][out] */ IDOMNode** result);
- virtual HRESULT STDMETHODCALLTYPE createElementNS(
+ virtual HRESULT STDMETHODCALLTYPE createElementNS(
/* [in] */ BSTR namespaceURI,
/* [in] */ BSTR qualifiedName,
- /* [retval][out] */ IDOMElement **result);
+ /* [retval][out] */ IDOMElement** result);
- virtual HRESULT STDMETHODCALLTYPE createAttributeNS(
+ virtual HRESULT STDMETHODCALLTYPE createAttributeNS(
/* [in] */ BSTR namespaceURI,
/* [in] */ BSTR qualifiedName,
- /* [retval][out] */ IDOMAttr **result);
+ /* [retval][out] */ IDOMAttr** result);
- virtual HRESULT STDMETHODCALLTYPE getElementsByTagNameNS(
+ virtual HRESULT STDMETHODCALLTYPE getElementsByTagNameNS(
/* [in] */ BSTR namespaceURI,
/* [in] */ BSTR localName,
- /* [retval][out] */ IDOMNodeList **result);
+ /* [retval][out] */ IDOMNodeList** result);
- virtual HRESULT STDMETHODCALLTYPE getElementById(
+ virtual HRESULT STDMETHODCALLTYPE getElementById(
/* [in] */ BSTR elementId,
- /* [retval][out] */ IDOMElement **result);
+ /* [retval][out] */ IDOMElement** result);
// IDOMViewCSS
- virtual HRESULT STDMETHODCALLTYPE getComputedStyle(
- /* [in] */ IDOMElement *elt,
+ virtual HRESULT STDMETHODCALLTYPE getComputedStyle(
+ /* [in] */ IDOMElement* elt,
/* [in] */ BSTR pseudoElt,
- /* [retval][out] */ IDOMCSSStyleDeclaration **result);
+ /* [retval][out] */ IDOMCSSStyleDeclaration** result);
// IDOMDocumentEvent
- virtual HRESULT STDMETHODCALLTYPE createEvent(
+ virtual HRESULT STDMETHODCALLTYPE createEvent(
/* [in] */ BSTR eventType,
- /* [retval][out] */ IDOMEvent **result);
+ /* [retval][out] */ IDOMEvent** result);
// DOMDocument
WebCore::Document* document() { return m_document; }
@@ -536,8 +533,7 @@ protected:
WebCore::Document* m_document;
};
-class DOMElement : public DOMNode, public IDOMElement, public IDOMElementPrivate, public IDOMNodeExtensions, public IDOMElementCSSInlineStyle, public IDOMElementExtensions
-{
+class DOMElement : public DOMNode, public IDOMElement, public IDOMElementPrivate, public IDOMNodeExtensions, public IDOMElementCSSInlineStyle, public IDOMElementExtensions {
protected:
DOMElement(WebCore::Element* e);
~DOMElement();
@@ -551,225 +547,225 @@ public:
virtual ULONG STDMETHODCALLTYPE Release(void) { return DOMNode::Release(); }
// IWebScriptObject
- virtual HRESULT STDMETHODCALLTYPE throwException(
+ virtual HRESULT STDMETHODCALLTYPE throwException(
/* [in] */ BSTR exceptionMessage,
- /* [retval][out] */ BOOL *result) { return DOMNode::throwException(exceptionMessage, result); }
+ /* [retval][out] */ BOOL* result) { return DOMNode::throwException(exceptionMessage, result); }
- virtual HRESULT STDMETHODCALLTYPE callWebScriptMethod(
+ virtual HRESULT STDMETHODCALLTYPE callWebScriptMethod(
/* [in] */ BSTR name,
/* [size_is][in] */ const VARIANT args[ ],
/* [in] */ int cArgs,
- /* [retval][out] */ VARIANT *result) { return DOMNode::callWebScriptMethod(name, args, cArgs, result); }
+ /* [retval][out] */ VARIANT* result) { return DOMNode::callWebScriptMethod(name, args, cArgs, result); }
- virtual HRESULT STDMETHODCALLTYPE evaluateWebScript(
+ virtual HRESULT STDMETHODCALLTYPE evaluateWebScript(
/* [in] */ BSTR script,
- /* [retval][out] */ VARIANT *result) { return DOMNode::evaluateWebScript(script, result); }
+ /* [retval][out] */ VARIANT* result) { return DOMNode::evaluateWebScript(script, result); }
- virtual HRESULT STDMETHODCALLTYPE removeWebScriptKey(
+ virtual HRESULT STDMETHODCALLTYPE removeWebScriptKey(
/* [in] */ BSTR name) { return DOMNode::removeWebScriptKey(name); }
- virtual HRESULT STDMETHODCALLTYPE stringRepresentation(
+ virtual HRESULT STDMETHODCALLTYPE stringRepresentation(
/* [retval][out] */ BSTR* stringRepresentation) { return DOMNode::stringRepresentation(stringRepresentation); }
- virtual HRESULT STDMETHODCALLTYPE webScriptValueAtIndex(
+ virtual HRESULT STDMETHODCALLTYPE webScriptValueAtIndex(
/* [in] */ unsigned int index,
- /* [retval][out] */ VARIANT *result) { return DOMNode::webScriptValueAtIndex(index, result); }
+ /* [retval][out] */ VARIANT* result) { return DOMNode::webScriptValueAtIndex(index, result); }
- virtual HRESULT STDMETHODCALLTYPE setWebScriptValueAtIndex(
+ virtual HRESULT STDMETHODCALLTYPE setWebScriptValueAtIndex(
/* [in] */ unsigned int index,
/* [in] */ VARIANT val) { return DOMNode::setWebScriptValueAtIndex(index, val); }
- virtual HRESULT STDMETHODCALLTYPE setException(
+ virtual HRESULT STDMETHODCALLTYPE setException(
/* [in] */ BSTR description) { return DOMNode::setException(description); }
// IDOMNode
- virtual HRESULT STDMETHODCALLTYPE nodeName(
- /* [retval][out] */ BSTR *result) { return DOMNode::nodeName(result); }
+ virtual HRESULT STDMETHODCALLTYPE nodeName(
+ /* [retval][out] */ BSTR* result) { return DOMNode::nodeName(result); }
- virtual HRESULT STDMETHODCALLTYPE nodeValue(
- /* [retval][out] */ BSTR *result) { return DOMNode::nodeValue(result); }
+ virtual HRESULT STDMETHODCALLTYPE nodeValue(
+ /* [retval][out] */ BSTR* result) { return DOMNode::nodeValue(result); }
- virtual HRESULT STDMETHODCALLTYPE setNodeValue(
+ virtual HRESULT STDMETHODCALLTYPE setNodeValue(
/* [in] */ BSTR value) { return DOMNode::setNodeValue(value); }
- virtual HRESULT STDMETHODCALLTYPE nodeType(
- /* [retval][out] */ unsigned short *result) { return DOMNode::nodeType(result); }
+ virtual HRESULT STDMETHODCALLTYPE nodeType(
+ /* [retval][out] */ unsigned short* result) { return DOMNode::nodeType(result); }
- virtual HRESULT STDMETHODCALLTYPE parentNode(
- /* [retval][out] */ IDOMNode **result) { return DOMNode::parentNode(result); }
+ virtual HRESULT STDMETHODCALLTYPE parentNode(
+ /* [retval][out] */ IDOMNode** result) { return DOMNode::parentNode(result); }
- virtual HRESULT STDMETHODCALLTYPE childNodes(
- /* [retval][out] */ IDOMNodeList **result) { return DOMNode::childNodes(result); }
+ virtual HRESULT STDMETHODCALLTYPE childNodes(
+ /* [retval][out] */ IDOMNodeList** result) { return DOMNode::childNodes(result); }
- virtual HRESULT STDMETHODCALLTYPE firstChild(
- /* [retval][out] */ IDOMNode **result) { return DOMNode::firstChild(result); }
+ virtual HRESULT STDMETHODCALLTYPE firstChild(
+ /* [retval][out] */ IDOMNode** result) { return DOMNode::firstChild(result); }
- virtual HRESULT STDMETHODCALLTYPE lastChild(
- /* [retval][out] */ IDOMNode **result) { return DOMNode::lastChild(result); }
+ virtual HRESULT STDMETHODCALLTYPE lastChild(
+ /* [retval][out] */ IDOMNode** result) { return DOMNode::lastChild(result); }
- virtual HRESULT STDMETHODCALLTYPE previousSibling(
- /* [retval][out] */ IDOMNode **result) { return DOMNode::previousSibling(result); }
+ virtual HRESULT STDMETHODCALLTYPE previousSibling(
+ /* [retval][out] */ IDOMNode** result) { return DOMNode::previousSibling(result); }
- virtual HRESULT STDMETHODCALLTYPE nextSibling(
- /* [retval][out] */ IDOMNode **result) { return DOMNode::nextSibling(result); }
+ virtual HRESULT STDMETHODCALLTYPE nextSibling(
+ /* [retval][out] */ IDOMNode** result) { return DOMNode::nextSibling(result); }
- virtual HRESULT STDMETHODCALLTYPE attributes(
- /* [retval][out] */ IDOMNamedNodeMap **result) { return DOMNode::attributes(result); }
+ virtual HRESULT STDMETHODCALLTYPE attributes(
+ /* [retval][out] */ IDOMNamedNodeMap** result) { return DOMNode::attributes(result); }
- virtual HRESULT STDMETHODCALLTYPE ownerDocument(
- /* [retval][out] */ IDOMDocument **result) { return DOMNode::ownerDocument(result); }
+ virtual HRESULT STDMETHODCALLTYPE ownerDocument(
+ /* [retval][out] */ IDOMDocument** result) { return DOMNode::ownerDocument(result); }
- virtual HRESULT STDMETHODCALLTYPE insertBefore(
- /* [in] */ IDOMNode *newChild,
- /* [in] */ IDOMNode *refChild,
- /* [retval][out] */ IDOMNode **result) { return DOMNode::insertBefore(newChild, refChild, result); }
+ virtual HRESULT STDMETHODCALLTYPE insertBefore(
+ /* [in] */ IDOMNode* newChild,
+ /* [in] */ IDOMNode* refChild,
+ /* [retval][out] */ IDOMNode** result) { return DOMNode::insertBefore(newChild, refChild, result); }
- virtual HRESULT STDMETHODCALLTYPE replaceChild(
- /* [in] */ IDOMNode *newChild,
- /* [in] */ IDOMNode *oldChild,
- /* [retval][out] */ IDOMNode **result) { return DOMNode::replaceChild(newChild, oldChild, result); }
+ virtual HRESULT STDMETHODCALLTYPE replaceChild(
+ /* [in] */ IDOMNode* newChild,
+ /* [in] */ IDOMNode* oldChild,
+ /* [retval][out] */ IDOMNode** result) { return DOMNode::replaceChild(newChild, oldChild, result); }
- virtual HRESULT STDMETHODCALLTYPE removeChild(
- /* [in] */ IDOMNode *oldChild,
- /* [retval][out] */ IDOMNode **result) { return DOMNode::removeChild(oldChild, result); }
+ virtual HRESULT STDMETHODCALLTYPE removeChild(
+ /* [in] */ IDOMNode* oldChild,
+ /* [retval][out] */ IDOMNode** result) { return DOMNode::removeChild(oldChild, result); }
- virtual HRESULT STDMETHODCALLTYPE appendChild(
- /* [in] */ IDOMNode *oldChild,
- /* [retval][out] */ IDOMNode **result) { return DOMNode::appendChild(oldChild, result); }
+ virtual HRESULT STDMETHODCALLTYPE appendChild(
+ /* [in] */ IDOMNode* oldChild,
+ /* [retval][out] */ IDOMNode** result) { return DOMNode::appendChild(oldChild, result); }
- virtual HRESULT STDMETHODCALLTYPE hasChildNodes(
- /* [retval][out] */ BOOL *result) { return DOMNode::hasChildNodes(result); }
+ virtual HRESULT STDMETHODCALLTYPE hasChildNodes(
+ /* [retval][out] */ BOOL* result) { return DOMNode::hasChildNodes(result); }
- virtual HRESULT STDMETHODCALLTYPE cloneNode(
+ virtual HRESULT STDMETHODCALLTYPE cloneNode(
/* [in] */ BOOL deep,
- /* [retval][out] */ IDOMNode **result) { return DOMNode::cloneNode(deep, result); }
+ /* [retval][out] */ IDOMNode** result) { return DOMNode::cloneNode(deep, result); }
virtual HRESULT STDMETHODCALLTYPE normalize( void) { return DOMNode::normalize(); }
- virtual HRESULT STDMETHODCALLTYPE isSupported(
+ virtual HRESULT STDMETHODCALLTYPE isSupported(
/* [in] */ BSTR feature,
/* [in] */ BSTR version,
- /* [retval][out] */ BOOL *result) { return DOMNode::isSupported(feature, version, result); }
+ /* [retval][out] */ BOOL* result) { return DOMNode::isSupported(feature, version, result); }
- virtual HRESULT STDMETHODCALLTYPE namespaceURI(
- /* [retval][out] */ BSTR *result) { return DOMNode::namespaceURI(result); }
+ virtual HRESULT STDMETHODCALLTYPE namespaceURI(
+ /* [retval][out] */ BSTR* result) { return DOMNode::namespaceURI(result); }
- virtual HRESULT STDMETHODCALLTYPE prefix(
- /* [retval][out] */ BSTR *result) { return DOMNode::prefix(result); }
+ virtual HRESULT STDMETHODCALLTYPE prefix(
+ /* [retval][out] */ BSTR* result) { return DOMNode::prefix(result); }
- virtual HRESULT STDMETHODCALLTYPE setPrefix(
+ virtual HRESULT STDMETHODCALLTYPE setPrefix(
/* [in] */ BSTR prefix) { return DOMNode::setPrefix(prefix); }
- virtual HRESULT STDMETHODCALLTYPE localName(
- /* [retval][out] */ BSTR *result) { return DOMNode::localName(result); }
+ virtual HRESULT STDMETHODCALLTYPE localName(
+ /* [retval][out] */ BSTR* result) { return DOMNode::localName(result); }
- virtual HRESULT STDMETHODCALLTYPE hasAttributes(
- /* [retval][out] */ BOOL *result) { return DOMNode::hasAttributes(result); }
+ virtual HRESULT STDMETHODCALLTYPE hasAttributes(
+ /* [retval][out] */ BOOL* result) { return DOMNode::hasAttributes(result); }
- virtual HRESULT STDMETHODCALLTYPE isSameNode(
+ virtual HRESULT STDMETHODCALLTYPE isSameNode(
/* [in] */ IDOMNode* other,
/* [retval][out] */ BOOL* result) { return DOMNode::isSameNode(other, result); }
- virtual HRESULT STDMETHODCALLTYPE isEqualNode(
+ virtual HRESULT STDMETHODCALLTYPE isEqualNode(
/* [in] */ IDOMNode* other,
/* [retval][out] */ BOOL* result) { return DOMNode::isEqualNode(other, result); }
- virtual HRESULT STDMETHODCALLTYPE textContent(
+ virtual HRESULT STDMETHODCALLTYPE textContent(
/* [retval][out] */ BSTR* result) { return DOMNode::textContent(result); }
- virtual HRESULT STDMETHODCALLTYPE setTextContent(
+ virtual HRESULT STDMETHODCALLTYPE setTextContent(
/* [in] */ BSTR text) { return DOMNode::setTextContent(text); }
// IDOMElement
- virtual HRESULT STDMETHODCALLTYPE tagName(
- /* [retval][out] */ BSTR *result);
+ virtual HRESULT STDMETHODCALLTYPE tagName(
+ /* [retval][out] */ BSTR* result);
- virtual HRESULT STDMETHODCALLTYPE getAttribute(
+ virtual HRESULT STDMETHODCALLTYPE getAttribute(
/* [in] */ BSTR name,
- /* [retval][out] */ BSTR *result);
+ /* [retval][out] */ BSTR* result);
- virtual HRESULT STDMETHODCALLTYPE setAttribute(
+ virtual HRESULT STDMETHODCALLTYPE setAttribute(
/* [in] */ BSTR name,
/* [in] */ BSTR value);
- virtual HRESULT STDMETHODCALLTYPE removeAttribute(
+ virtual HRESULT STDMETHODCALLTYPE removeAttribute(
/* [in] */ BSTR name);
- virtual HRESULT STDMETHODCALLTYPE getAttributeNode(
+ virtual HRESULT STDMETHODCALLTYPE getAttributeNode(
/* [in] */ BSTR name,
- /* [retval][out] */ IDOMAttr **result);
+ /* [retval][out] */ IDOMAttr** result);
- virtual HRESULT STDMETHODCALLTYPE setAttributeNode(
+ virtual HRESULT STDMETHODCALLTYPE setAttributeNode(
/* [in] */ IDOMAttr *newAttr,
- /* [retval][out] */ IDOMAttr **result);
+ /* [retval][out] */ IDOMAttr** result);
- virtual HRESULT STDMETHODCALLTYPE removeAttributeNode(
+ virtual HRESULT STDMETHODCALLTYPE removeAttributeNode(
/* [in] */ IDOMAttr *oldAttr,
- /* [retval][out] */ IDOMAttr **result);
+ /* [retval][out] */ IDOMAttr** result);
- virtual HRESULT STDMETHODCALLTYPE getElementsByTagName(
+ virtual HRESULT STDMETHODCALLTYPE getElementsByTagName(
/* [in] */ BSTR name,
- /* [retval][out] */ IDOMNodeList **result);
+ /* [retval][out] */ IDOMNodeList** result);
- virtual HRESULT STDMETHODCALLTYPE getAttributeNS(
+ virtual HRESULT STDMETHODCALLTYPE getAttributeNS(
/* [in] */ BSTR namespaceURI,
/* [in] */ BSTR localName,
- /* [retval][out] */ BSTR *result);
+ /* [retval][out] */ BSTR* result);
- virtual HRESULT STDMETHODCALLTYPE setAttributeNS(
+ virtual HRESULT STDMETHODCALLTYPE setAttributeNS(
/* [in] */ BSTR namespaceURI,
/* [in] */ BSTR qualifiedName,
/* [in] */ BSTR value);
- virtual HRESULT STDMETHODCALLTYPE removeAttributeNS(
+ virtual HRESULT STDMETHODCALLTYPE removeAttributeNS(
/* [in] */ BSTR namespaceURI,
/* [in] */ BSTR localName);
- virtual HRESULT STDMETHODCALLTYPE getAttributeNodeNS(
+ virtual HRESULT STDMETHODCALLTYPE getAttributeNodeNS(
/* [in] */ BSTR namespaceURI,
/* [in] */ BSTR localName,
- /* [retval][out] */ IDOMAttr **result);
+ /* [retval][out] */ IDOMAttr** result);
- virtual HRESULT STDMETHODCALLTYPE setAttributeNodeNS(
+ virtual HRESULT STDMETHODCALLTYPE setAttributeNodeNS(
/* [in] */ IDOMAttr *newAttr,
- /* [retval][out] */ IDOMAttr **result);
+ /* [retval][out] */ IDOMAttr** result);
- virtual HRESULT STDMETHODCALLTYPE getElementsByTagNameNS(
+ virtual HRESULT STDMETHODCALLTYPE getElementsByTagNameNS(
/* [in] */ BSTR namespaceURI,
/* [in] */ BSTR localName,
- /* [retval][out] */ IDOMNodeList **result);
+ /* [retval][out] */ IDOMNodeList** result);
- virtual HRESULT STDMETHODCALLTYPE hasAttribute(
+ virtual HRESULT STDMETHODCALLTYPE hasAttribute(
/* [in] */ BSTR name,
- /* [retval][out] */ BOOL *result);
+ /* [retval][out] */ BOOL* result);
- virtual HRESULT STDMETHODCALLTYPE hasAttributeNS(
+ virtual HRESULT STDMETHODCALLTYPE hasAttributeNS(
/* [in] */ BSTR namespaceURI,
/* [in] */ BSTR localName,
- /* [retval][out] */ BOOL *result);
+ /* [retval][out] */ BOOL* result);
virtual HRESULT STDMETHODCALLTYPE focus( void);
virtual HRESULT STDMETHODCALLTYPE blur( void);
// IDOMNodeExtensions
- virtual HRESULT STDMETHODCALLTYPE boundingBox(
+ virtual HRESULT STDMETHODCALLTYPE boundingBox(
/* [retval][out] */ LPRECT rect);
- virtual HRESULT STDMETHODCALLTYPE lineBoxRects(
+ virtual HRESULT STDMETHODCALLTYPE lineBoxRects(
/* [size_is][in] */ RECT* rects,
/* [in] */ int cRects);
// IDOMElementPrivate
- virtual HRESULT STDMETHODCALLTYPE coreElement(
+ virtual HRESULT STDMETHODCALLTYPE coreElement(
void** element);
- virtual HRESULT STDMETHODCALLTYPE isEqual(
- /* [in] */ IDOMElement *other,
- /* [retval][out] */ BOOL *result);
+ virtual HRESULT STDMETHODCALLTYPE isEqual(
+ /* [in] */ IDOMElement* other,
+ /* [retval][out] */ BOOL* result);
- virtual HRESULT STDMETHODCALLTYPE isFocused(
- /* [retval][out] */ BOOL *result);
+ virtual HRESULT STDMETHODCALLTYPE isFocused(
+ /* [retval][out] */ BOOL* result);
virtual HRESULT STDMETHODCALLTYPE innerText(
/* [retval][out] */ BSTR* result);
@@ -781,53 +777,53 @@ public:
/* [retval][out] */ HBITMAP* image);
// IDOMElementCSSInlineStyle
- virtual HRESULT STDMETHODCALLTYPE style(
- /* [retval][out] */ IDOMCSSStyleDeclaration **result);
+ virtual HRESULT STDMETHODCALLTYPE style(
+ /* [retval][out] */ IDOMCSSStyleDeclaration** result);
// IDOMElementExtensions
- virtual HRESULT STDMETHODCALLTYPE offsetLeft(
- /* [retval][out] */ int *result);
+ virtual HRESULT STDMETHODCALLTYPE offsetLeft(
+ /* [retval][out] */ int* result);
- virtual HRESULT STDMETHODCALLTYPE offsetTop(
- /* [retval][out] */ int *result);
+ virtual HRESULT STDMETHODCALLTYPE offsetTop(
+ /* [retval][out] */ int* result);
- virtual HRESULT STDMETHODCALLTYPE offsetWidth(
- /* [retval][out] */ int *result);
+ virtual HRESULT STDMETHODCALLTYPE offsetWidth(
+ /* [retval][out] */ int* result);
- virtual HRESULT STDMETHODCALLTYPE offsetHeight(
- /* [retval][out] */ int *result);
+ virtual HRESULT STDMETHODCALLTYPE offsetHeight(
+ /* [retval][out] */ int* result);
- virtual HRESULT STDMETHODCALLTYPE offsetParent(
- /* [retval][out] */ IDOMElement **result);
+ virtual HRESULT STDMETHODCALLTYPE offsetParent(
+ /* [retval][out] */ IDOMElement** result);
- virtual HRESULT STDMETHODCALLTYPE clientWidth(
- /* [retval][out] */ int *result);
+ virtual HRESULT STDMETHODCALLTYPE clientWidth(
+ /* [retval][out] */ int* result);
- virtual HRESULT STDMETHODCALLTYPE clientHeight(
- /* [retval][out] */ int *result);
+ virtual HRESULT STDMETHODCALLTYPE clientHeight(
+ /* [retval][out] */ int* result);
- virtual HRESULT STDMETHODCALLTYPE scrollLeft(
- /* [retval][out] */ int *result);
+ virtual HRESULT STDMETHODCALLTYPE scrollLeft(
+ /* [retval][out] */ int* result);
- virtual HRESULT STDMETHODCALLTYPE setScrollLeft(
+ virtual HRESULT STDMETHODCALLTYPE setScrollLeft(
/* [in] */ int newScrollLeft);
- virtual HRESULT STDMETHODCALLTYPE scrollTop(
- /* [retval][out] */ int *result);
+ virtual HRESULT STDMETHODCALLTYPE scrollTop(
+ /* [retval][out] */ int* result);
- virtual HRESULT STDMETHODCALLTYPE setScrollTop(
+ virtual HRESULT STDMETHODCALLTYPE setScrollTop(
/* [in] */ int newScrollTop);
- virtual HRESULT STDMETHODCALLTYPE scrollWidth(
- /* [retval][out] */ int *result);
+ virtual HRESULT STDMETHODCALLTYPE scrollWidth(
+ /* [retval][out] */ int* result);
- virtual HRESULT STDMETHODCALLTYPE scrollHeight(
- /* [retval][out] */ int *result);
+ virtual HRESULT STDMETHODCALLTYPE scrollHeight(
+ /* [retval][out] */ int* result);
- virtual HRESULT STDMETHODCALLTYPE scrollIntoView(
+ virtual HRESULT STDMETHODCALLTYPE scrollIntoView(
/* [in] */ BOOL alignWithTop);
- virtual HRESULT STDMETHODCALLTYPE scrollIntoViewIfNeeded(
+ virtual HRESULT STDMETHODCALLTYPE scrollIntoViewIfNeeded(
/* [in] */ BOOL centerIfNeeded);
// DOMElement
diff --git a/WebKit/win/DOMHTMLClasses.cpp b/WebKit/win/DOMHTMLClasses.cpp
index 4889ba9..f9634ff 100644
--- a/WebKit/win/DOMHTMLClasses.cpp
+++ b/WebKit/win/DOMHTMLClasses.cpp
@@ -27,6 +27,7 @@
#include "WebKitDLL.h"
#include "DOMHTMLClasses.h"
#include "COMPtr.h"
+#include "WebFrame.h"
#pragma warning(push, 0)
#include <WebCore/BString.h>
@@ -36,6 +37,7 @@
#include <WebCore/HTMLCollection.h>
#include <WebCore/HTMLDocument.h>
#include <WebCore/HTMLFormElement.h>
+#include <WebCore/HTMLIFrameElement.h>
#include <WebCore/HTMLInputElement.h>
#include <WebCore/HTMLNames.h>
#include <WebCore/HTMLOptionElement.h>
@@ -1587,3 +1589,33 @@ HRESULT STDMETHODCALLTYPE DOMHTMLTextAreaElement::isUserEdited(
*result = TRUE;
return S_OK;
}
+
+// DOMHTMLIFrameElement - IUnknown --------------------------------------------------
+
+HRESULT STDMETHODCALLTYPE DOMHTMLIFrameElement::QueryInterface(REFIID riid, void** ppvObject)
+{
+ *ppvObject = 0;
+ if (IsEqualGUID(riid, IID_IDOMHTMLIFrameElement))
+ *ppvObject = static_cast<IDOMHTMLIFrameElement*>(this);
+ else
+ return DOMHTMLElement::QueryInterface(riid, ppvObject);
+
+ AddRef();
+ return S_OK;
+}
+
+// DOMHTMLIFrameElement -------------------------------------------------------------
+
+HRESULT STDMETHODCALLTYPE DOMHTMLIFrameElement::contentFrame(
+ /* [retval][out] */ IWebFrame **result)
+{
+ if (!result)
+ return E_POINTER;
+ *result = 0;
+ ASSERT(m_element && m_element->hasTagName(iframeTag));
+ HTMLIFrameElement* iFrameElement = static_cast<HTMLIFrameElement*>(m_element);
+ COMPtr<IWebFrame> webFrame = kit(iFrameElement->contentFrame());
+ if (!webFrame)
+ return E_FAIL;
+ return webFrame.copyRefTo(result);
+}
diff --git a/WebKit/win/DOMHTMLClasses.h b/WebKit/win/DOMHTMLClasses.h
index f520c3c..baeecc9 100644
--- a/WebKit/win/DOMHTMLClasses.h
+++ b/WebKit/win/DOMHTMLClasses.h
@@ -2356,4 +2356,266 @@ public:
/* [retval][out] */ BOOL *result);
};
+class DOMHTMLIFrameElement : public DOMHTMLElement, public IDOMHTMLIFrameElement
+{
+protected:
+ DOMHTMLIFrameElement();
+public:
+ DOMHTMLIFrameElement(WebCore::Element* e) : DOMHTMLElement(e) {}
+
+ // IUnknown
+ virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void** ppvObject);
+ virtual ULONG STDMETHODCALLTYPE AddRef(void) { return DOMHTMLElement::AddRef(); }
+ virtual ULONG STDMETHODCALLTYPE Release(void) { return DOMHTMLElement::Release(); }
+
+ // IWebScriptObject
+ virtual HRESULT STDMETHODCALLTYPE throwException(
+ /* [in] */ BSTR exceptionMessage,
+ /* [retval][out] */ BOOL *result) { return DOMHTMLElement::throwException(exceptionMessage, result); }
+
+ virtual HRESULT STDMETHODCALLTYPE callWebScriptMethod(
+ /* [in] */ BSTR name,
+ /* [size_is][in] */ const VARIANT args[ ],
+ /* [in] */ int cArgs,
+ /* [retval][out] */ VARIANT *result) { return DOMHTMLElement::callWebScriptMethod(name, args, cArgs, result); }
+
+ virtual HRESULT STDMETHODCALLTYPE evaluateWebScript(
+ /* [in] */ BSTR script,
+ /* [retval][out] */ VARIANT *result) { return DOMHTMLElement::evaluateWebScript(script, result); }
+
+ virtual HRESULT STDMETHODCALLTYPE removeWebScriptKey(
+ /* [in] */ BSTR name) { return DOMHTMLElement::removeWebScriptKey(name); }
+
+ virtual HRESULT STDMETHODCALLTYPE stringRepresentation(
+ /* [retval][out] */ BSTR* stringRepresentation) { return DOMHTMLElement::stringRepresentation(stringRepresentation); }
+
+ virtual HRESULT STDMETHODCALLTYPE webScriptValueAtIndex(
+ /* [in] */ unsigned int index,
+ /* [retval][out] */ VARIANT *result) { return DOMHTMLElement::webScriptValueAtIndex(index, result); }
+
+ virtual HRESULT STDMETHODCALLTYPE setWebScriptValueAtIndex(
+ /* [in] */ unsigned int index,
+ /* [in] */ VARIANT val) { return DOMHTMLElement::setWebScriptValueAtIndex(index, val); }
+
+ virtual HRESULT STDMETHODCALLTYPE setException(
+ /* [in] */ BSTR description) { return DOMHTMLElement::setException(description); }
+
+ // IDOMNode
+ virtual HRESULT STDMETHODCALLTYPE nodeName(
+ /* [retval][out] */ BSTR *result) { return DOMHTMLElement::nodeName(result); }
+
+ virtual HRESULT STDMETHODCALLTYPE nodeValue(
+ /* [retval][out] */ BSTR *result) { return DOMHTMLElement::nodeValue(result); }
+
+ virtual HRESULT STDMETHODCALLTYPE setNodeValue(
+ /* [in] */ BSTR value) { return DOMHTMLElement::setNodeValue(value); }
+
+ virtual HRESULT STDMETHODCALLTYPE nodeType(
+ /* [retval][out] */ unsigned short *result) { return DOMHTMLElement::nodeType(result); }
+
+ virtual HRESULT STDMETHODCALLTYPE parentNode(
+ /* [retval][out] */ IDOMNode **result) { return DOMHTMLElement::parentNode(result); }
+
+ virtual HRESULT STDMETHODCALLTYPE childNodes(
+ /* [retval][out] */ IDOMNodeList **result) { return DOMHTMLElement::childNodes(result); }
+
+ virtual HRESULT STDMETHODCALLTYPE firstChild(
+ /* [retval][out] */ IDOMNode **result) { return DOMHTMLElement::firstChild(result); }
+
+ virtual HRESULT STDMETHODCALLTYPE lastChild(
+ /* [retval][out] */ IDOMNode **result) { return DOMHTMLElement::lastChild(result); }
+
+ virtual HRESULT STDMETHODCALLTYPE previousSibling(
+ /* [retval][out] */ IDOMNode **result) { return DOMHTMLElement::previousSibling(result); }
+
+ virtual HRESULT STDMETHODCALLTYPE nextSibling(
+ /* [retval][out] */ IDOMNode **result) { return DOMHTMLElement::nextSibling(result); }
+
+ virtual HRESULT STDMETHODCALLTYPE attributes(
+ /* [retval][out] */ IDOMNamedNodeMap **result) { return DOMHTMLElement::attributes(result); }
+
+ virtual HRESULT STDMETHODCALLTYPE ownerDocument(
+ /* [retval][out] */ IDOMDocument **result) { return DOMHTMLElement::ownerDocument(result); }
+
+ virtual HRESULT STDMETHODCALLTYPE insertBefore(
+ /* [in] */ IDOMNode *newChild,
+ /* [in] */ IDOMNode *refChild,
+ /* [retval][out] */ IDOMNode **result) { return DOMHTMLElement::insertBefore(newChild, refChild, result); }
+
+ virtual HRESULT STDMETHODCALLTYPE replaceChild(
+ /* [in] */ IDOMNode *newChild,
+ /* [in] */ IDOMNode *oldChild,
+ /* [retval][out] */ IDOMNode **result) { return DOMHTMLElement::replaceChild(newChild, oldChild, result); }
+
+ virtual HRESULT STDMETHODCALLTYPE removeChild(
+ /* [in] */ IDOMNode *oldChild,
+ /* [retval][out] */ IDOMNode **result) { return DOMHTMLElement::removeChild(oldChild, result); }
+
+ virtual HRESULT STDMETHODCALLTYPE appendChild(
+ /* [in] */ IDOMNode *oldChild,
+ /* [retval][out] */ IDOMNode **result) { return DOMHTMLElement::appendChild(oldChild, result); }
+
+ virtual HRESULT STDMETHODCALLTYPE hasChildNodes(
+ /* [retval][out] */ BOOL *result) { return DOMHTMLElement::hasChildNodes(result); }
+
+ virtual HRESULT STDMETHODCALLTYPE cloneNode(
+ /* [in] */ BOOL deep,
+ /* [retval][out] */ IDOMNode **result) { return DOMHTMLElement::cloneNode(deep, result); }
+
+ virtual HRESULT STDMETHODCALLTYPE normalize( void) { return DOMHTMLElement::normalize(); }
+
+ virtual HRESULT STDMETHODCALLTYPE isSupported(
+ /* [in] */ BSTR feature,
+ /* [in] */ BSTR version,
+ /* [retval][out] */ BOOL *result) { return DOMHTMLElement::isSupported(feature, version, result); }
+
+ virtual HRESULT STDMETHODCALLTYPE namespaceURI(
+ /* [retval][out] */ BSTR *result) { return DOMHTMLElement::namespaceURI(result); }
+
+ virtual HRESULT STDMETHODCALLTYPE prefix(
+ /* [retval][out] */ BSTR *result) { return DOMHTMLElement::prefix(result); }
+
+ virtual HRESULT STDMETHODCALLTYPE setPrefix(
+ /* [in] */ BSTR prefix) { return DOMHTMLElement::setPrefix(prefix); }
+
+ virtual HRESULT STDMETHODCALLTYPE localName(
+ /* [retval][out] */ BSTR *result) { return DOMHTMLElement::localName(result); }
+
+ virtual HRESULT STDMETHODCALLTYPE hasAttributes(
+ /* [retval][out] */ BOOL *result) { return DOMHTMLElement::hasAttributes(result); }
+
+ virtual HRESULT STDMETHODCALLTYPE isSameNode(
+ /* [in] */ IDOMNode* other,
+ /* [retval][out] */ BOOL* result) { return DOMHTMLElement::isSameNode(other, result); }
+
+ virtual HRESULT STDMETHODCALLTYPE isEqualNode(
+ /* [in] */ IDOMNode* other,
+ /* [retval][out] */ BOOL* result) { return DOMHTMLElement::isEqualNode(other, result); }
+
+ virtual HRESULT STDMETHODCALLTYPE textContent(
+ /* [retval][out] */ BSTR* result) { return DOMHTMLElement::textContent(result); }
+
+ virtual HRESULT STDMETHODCALLTYPE setTextContent(
+ /* [in] */ BSTR text) { return DOMHTMLElement::setTextContent(text); }
+
+ // IDOMElement
+ virtual HRESULT STDMETHODCALLTYPE tagName(
+ /* [retval][out] */ BSTR *result) { return DOMHTMLElement::tagName(result); }
+
+ virtual HRESULT STDMETHODCALLTYPE getAttribute(
+ /* [in] */ BSTR name,
+ /* [retval][out] */ BSTR *result) { return DOMHTMLElement::getAttribute(name, result); }
+
+ virtual HRESULT STDMETHODCALLTYPE setAttribute(
+ /* [in] */ BSTR name,
+ /* [in] */ BSTR value) { return DOMHTMLElement::setAttribute(name, value); }
+
+ virtual HRESULT STDMETHODCALLTYPE removeAttribute(
+ /* [in] */ BSTR name) { return DOMHTMLElement::removeAttribute(name); }
+
+ virtual HRESULT STDMETHODCALLTYPE getAttributeNode(
+ /* [in] */ BSTR name,
+ /* [retval][out] */ IDOMAttr **result) { return DOMHTMLElement::getAttributeNode(name, result); }
+
+ virtual HRESULT STDMETHODCALLTYPE setAttributeNode(
+ /* [in] */ IDOMAttr *newAttr,
+ /* [retval][out] */ IDOMAttr **result) { return DOMHTMLElement::setAttributeNode(newAttr, result); }
+
+ virtual HRESULT STDMETHODCALLTYPE removeAttributeNode(
+ /* [in] */ IDOMAttr *oldAttr,
+ /* [retval][out] */ IDOMAttr **result) { return DOMHTMLElement::removeAttributeNode(oldAttr, result); }
+
+ virtual HRESULT STDMETHODCALLTYPE getElementsByTagName(
+ /* [in] */ BSTR name,
+ /* [retval][out] */ IDOMNodeList **result) { return DOMHTMLElement::getElementsByTagName(name, result); }
+
+ virtual HRESULT STDMETHODCALLTYPE getAttributeNS(
+ /* [in] */ BSTR namespaceURI,
+ /* [in] */ BSTR localName,
+ /* [retval][out] */ BSTR *result) { return DOMHTMLElement::getAttributeNS(namespaceURI, localName, result); }
+
+ virtual HRESULT STDMETHODCALLTYPE setAttributeNS(
+ /* [in] */ BSTR namespaceURI,
+ /* [in] */ BSTR qualifiedName,
+ /* [in] */ BSTR value) { return DOMHTMLElement::setAttributeNS(namespaceURI, qualifiedName, value); }
+
+ virtual HRESULT STDMETHODCALLTYPE removeAttributeNS(
+ /* [in] */ BSTR namespaceURI,
+ /* [in] */ BSTR localName) { return DOMHTMLElement::removeAttributeNS(namespaceURI, localName); }
+
+ virtual HRESULT STDMETHODCALLTYPE getAttributeNodeNS(
+ /* [in] */ BSTR namespaceURI,
+ /* [in] */ BSTR localName,
+ /* [retval][out] */ IDOMAttr **result) { return DOMHTMLElement::getAttributeNodeNS(namespaceURI, localName, result); }
+
+ virtual HRESULT STDMETHODCALLTYPE setAttributeNodeNS(
+ /* [in] */ IDOMAttr *newAttr,
+ /* [retval][out] */ IDOMAttr **result) { return DOMHTMLElement::setAttributeNodeNS(newAttr, result); }
+
+ virtual HRESULT STDMETHODCALLTYPE getElementsByTagNameNS(
+ /* [in] */ BSTR namespaceURI,
+ /* [in] */ BSTR localName,
+ /* [retval][out] */ IDOMNodeList **result) { return DOMHTMLElement::getElementsByTagNameNS(namespaceURI, localName, result); }
+
+ virtual HRESULT STDMETHODCALLTYPE hasAttribute(
+ /* [in] */ BSTR name,
+ /* [retval][out] */ BOOL *result) { return DOMHTMLElement::hasAttribute(name, result); }
+
+ virtual HRESULT STDMETHODCALLTYPE hasAttributeNS(
+ /* [in] */ BSTR namespaceURI,
+ /* [in] */ BSTR localName,
+ /* [retval][out] */ BOOL *result) { return DOMHTMLElement::hasAttributeNS(namespaceURI, localName, result); }
+
+ virtual HRESULT STDMETHODCALLTYPE focus( void) { return DOMHTMLElement::focus(); }
+
+ virtual HRESULT STDMETHODCALLTYPE blur( void) { return DOMHTMLElement::blur(); }
+
+ // IDOMHTMLElement
+ virtual HRESULT STDMETHODCALLTYPE idName(
+ /* [retval][out] */ BSTR *result) { return DOMHTMLElement::idName(result); }
+
+ virtual HRESULT STDMETHODCALLTYPE setIdName(
+ /* [in] */ BSTR idName) { return DOMHTMLElement::setIdName(idName); }
+
+ virtual HRESULT STDMETHODCALLTYPE title(
+ /* [retval][out] */ BSTR *result) { return DOMHTMLElement::title(result); }
+
+ virtual HRESULT STDMETHODCALLTYPE setTitle(
+ /* [in] */ BSTR title) { return DOMHTMLElement::setTitle(title); }
+
+ virtual HRESULT STDMETHODCALLTYPE lang(
+ /* [retval][out] */ BSTR *result) { return DOMHTMLElement::lang(result); }
+
+ virtual HRESULT STDMETHODCALLTYPE setLang(
+ /* [in] */ BSTR lang) { return DOMHTMLElement::setLang(lang); }
+
+ virtual HRESULT STDMETHODCALLTYPE dir(
+ /* [retval][out] */ BSTR *result) { return DOMHTMLElement::dir(result); }
+
+ virtual HRESULT STDMETHODCALLTYPE setDir(
+ /* [in] */ BSTR dir) { return DOMHTMLElement::setDir(dir); }
+
+ virtual HRESULT STDMETHODCALLTYPE className(
+ /* [retval][out] */ BSTR *result) { return DOMHTMLElement::className(result); }
+
+ virtual HRESULT STDMETHODCALLTYPE setClassName(
+ /* [in] */ BSTR className) { return DOMHTMLElement::setClassName(className); }
+
+ virtual HRESULT STDMETHODCALLTYPE innerHTML(
+ /* [retval][out] */ BSTR *result) { return DOMHTMLElement::innerHTML(result); }
+
+ virtual HRESULT STDMETHODCALLTYPE setInnerHTML(
+ /* [in] */ BSTR html) { return DOMHTMLElement::setInnerHTML(html); }
+
+ virtual HRESULT STDMETHODCALLTYPE innerText(
+ /* [retval][out] */ BSTR *result) { return DOMHTMLElement::innerText(result); }
+
+ virtual HRESULT STDMETHODCALLTYPE setInnerText(
+ /* [in] */ BSTR text) { return DOMHTMLElement::setInnerText(text); }
+
+ // IDOMHTMLIFrameElement
+ virtual HRESULT STDMETHODCALLTYPE contentFrame(
+ /* [retval][out] */ IWebFrame **result);
+};
+
#endif
diff --git a/WebKit/win/ForEachCoClass.h b/WebKit/win/ForEachCoClass.h
index ab7182d..02aa097 100644
--- a/WebKit/win/ForEachCoClass.h
+++ b/WebKit/win/ForEachCoClass.h
@@ -66,6 +66,7 @@
macro(WebScriptWorld) \
macro(WebGeolocationPosition) \
macro(WebSerializedJSValue) \
+ macro(WebUserContentURLPattern) \
// end of macro
// Everything below this point is deprecated. Please do not use.
diff --git a/WebKit/win/FullscreenVideoController.cpp b/WebKit/win/FullscreenVideoController.cpp
index dbfc794..884f46a 100644
--- a/WebKit/win/FullscreenVideoController.cpp
+++ b/WebKit/win/FullscreenVideoController.cpp
@@ -226,12 +226,12 @@ void FullscreenVideoController::enterFullscreen()
void FullscreenVideoController::exitFullscreen()
{
+ SetWindowLongPtr(m_hudWindow, 0, 0);
if (movie())
movie()->exitFullscreen();
+ ASSERT(!IsWindow(m_hudWindow));
m_videoWindow = 0;
- SetWindowLongPtr(m_hudWindow, 0, 0);
- DestroyWindow(m_hudWindow);
m_hudWindow = 0;
}
@@ -368,9 +368,9 @@ void FullscreenVideoController::createHUDWindow()
registerHUDWindowClass();
- m_hudWindow = CreateWindowEx(WS_EX_LAYERED | WS_EX_TRANSPARENT | WS_EX_TOPMOST | WS_EX_TOOLWINDOW,
+ m_hudWindow = CreateWindowEx(WS_EX_LAYERED | WS_EX_TRANSPARENT | WS_EX_TOOLWINDOW,
fullscreenVideeoHUDWindowClassName, 0, WS_POPUP | WS_VISIBLE,
- m_hudPosition.x(), m_hudPosition.y(), 0, 0, 0, 0, gInstance, 0);
+ m_hudPosition.x(), m_hudPosition.y(), 0, 0, m_videoWindow, 0, gInstance, 0);
ASSERT(::IsWindow(m_hudWindow));
SetWindowLongPtr(m_hudWindow, 0, reinterpret_cast<LONG_PTR>(this));
@@ -513,7 +513,7 @@ void FullscreenVideoController::timerFired(Timer<FullscreenVideoController>*)
void FullscreenVideoController::onMouseDown(const IntPoint& point)
{
- IntPoint convertedPoint(fullScreenToHUDCoordinates(point));
+ IntPoint convertedPoint(fullscreenToHUDCoordinates(point));
// Don't bother hit testing if we're outside the bounds of the window
if (convertedPoint.x() < 0 || convertedPoint.x() >= windowWidth || convertedPoint.y() < 0 || convertedPoint.y() >= windowHeight)
@@ -552,7 +552,7 @@ void FullscreenVideoController::onMouseDown(const IntPoint& point)
void FullscreenVideoController::onMouseMove(const IntPoint& point)
{
- IntPoint convertedPoint(fullScreenToHUDCoordinates(point));
+ IntPoint convertedPoint(fullscreenToHUDCoordinates(point));
if (m_hitWidget) {
m_hitWidget->drag(convertedPoint, false);
@@ -567,7 +567,7 @@ void FullscreenVideoController::onMouseMove(const IntPoint& point)
void FullscreenVideoController::onMouseUp(const IntPoint& point)
{
- IntPoint convertedPoint(fullScreenToHUDCoordinates(point));
+ IntPoint convertedPoint(fullscreenToHUDCoordinates(point));
m_movingWindow = false;
if (m_hitWidget) {
diff --git a/WebKit/win/FullscreenVideoController.h b/WebKit/win/FullscreenVideoController.h
index b39e30c..60145ad 100644
--- a/WebKit/win/FullscreenVideoController.h
+++ b/WebKit/win/FullscreenVideoController.h
@@ -128,7 +128,7 @@ private:
void beginScrubbing();
void endScrubbing();
- WebCore::IntPoint fullScreenToHUDCoordinates(const WebCore::IntPoint& point) const
+ WebCore::IntPoint fullscreenToHUDCoordinates(const WebCore::IntPoint& point) const
{
return WebCore::IntPoint(point.x()- m_hudPosition.x(), point.y() - m_hudPosition.y());
}
diff --git a/WebKit/win/Interfaces/DOMHTML.idl b/WebKit/win/Interfaces/DOMHTML.idl
index 7ccb682..0ee651b 100644
--- a/WebKit/win/Interfaces/DOMHTML.idl
+++ b/WebKit/win/Interfaces/DOMHTML.idl
@@ -37,6 +37,7 @@ interface IDOMDocument;
interface IDOMElement;
interface IDOMNode;
interface IDOMNodeList;
+interface IWebFrame;
/*
@interface DOMHTMLCollection : DOMObject
@@ -933,3 +934,17 @@ interface IDOMHTMLTextAreaElement : IDOMHTMLElement
*/
HRESULT select();
}
+
+/*
+ @interface DOMHTMLIFrameElement : DOMHTMLElement
+*/
+[
+ object,
+ oleautomation,
+ uuid(8CFFB1DA-7BA5-4cf7-B7E6-80583354855B),
+ pointer_default(unique)
+]
+interface IDOMHTMLIFrameElement : IDOMHTMLElement
+{
+ HRESULT contentFrame([out, retval] IWebFrame** result);
+}
diff --git a/WebKit/win/Interfaces/IWebEmbeddedView.idl b/WebKit/win/Interfaces/IWebEmbeddedView.idl
index fb47f60..14b61fd 100644
--- a/WebKit/win/Interfaces/IWebEmbeddedView.idl
+++ b/WebKit/win/Interfaces/IWebEmbeddedView.idl
@@ -1,46 +1,46 @@
-/*
- * Copyright (C) 2008 Apple 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:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. 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.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``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 APPLE INC. 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.
- */
-
-
-#ifndef DO_NO_IMPORTS
-import "oaidl.idl";
-import "ocidl.idl";
-#endif
-
-[
- object,
- oleautomation,
- uuid(F2771780-84C2-4684-8D52-D4F923E67F71),
- pointer_default(unique)
-]
-interface IWebEmbeddedView : IUnknown
-{
- HRESULT createViewWindow([in] OLE_HANDLE parentWindow, [in] LPSIZE pluginSize, [out, retval] OLE_HANDLE* window);
-
- HRESULT didReceiveResponse([in] IWebURLResponse* response);
- HRESULT didReceiveData([in] IStream* data);
- HRESULT didFinishLoading();
- HRESULT didFail([in] IWebError* error);
-}
+/*
+ * Copyright (C) 2008 Apple 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:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``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 APPLE INC. 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.
+ */
+
+
+#ifndef DO_NO_IMPORTS
+import "oaidl.idl";
+import "ocidl.idl";
+#endif
+
+[
+ object,
+ oleautomation,
+ uuid(F2771780-84C2-4684-8D52-D4F923E67F71),
+ pointer_default(unique)
+]
+interface IWebEmbeddedView : IUnknown
+{
+ HRESULT createViewWindow([in] OLE_HANDLE parentWindow, [in] LPSIZE pluginSize, [out, retval] OLE_HANDLE* window);
+
+ HRESULT didReceiveResponse([in] IWebURLResponse* response);
+ HRESULT didReceiveData([in] IStream* data);
+ HRESULT didFinishLoading();
+ HRESULT didFail([in] IWebError* error);
+}
diff --git a/WebKit/win/Interfaces/IWebFramePrivate.idl b/WebKit/win/Interfaces/IWebFramePrivate.idl
index 4e26cfa..3172ce6 100755
--- a/WebKit/win/Interfaces/IWebFramePrivate.idl
+++ b/WebKit/win/Interfaces/IWebFramePrivate.idl
@@ -108,4 +108,6 @@ interface IWebFramePrivate : IUnknown
HRESULT pageNumberForElementById([in] BSTR id, [in] float pageWidthInPixels, [in] float pageHeightInPixels, [out, retval] int* pageNumber);
HRESULT numberOfPages([in] float pageWidthInPixels, [in] float pageHeightInPixels, [out, retval] int* pageNumber);
+
+ HRESULT layerTreeAsText([out, retval] BSTR* result);
}
diff --git a/WebKit/win/Interfaces/IWebPreferences.idl b/WebKit/win/Interfaces/IWebPreferences.idl
index 9a52d7c..1c43135 100644
--- a/WebKit/win/Interfaces/IWebPreferences.idl
+++ b/WebKit/win/Interfaces/IWebPreferences.idl
@@ -186,4 +186,7 @@ interface IWebPreferences : IUnknown
HRESULT setZoomsTextOnly(BOOL zoomsTextOnly);
HRESULT zoomsTextOnly(BOOL *zoomsTextOnly);
+
+ HRESULT setAcceleratedCompositingEnabled(BOOL acceleratedCompositingEnabled);
+ HRESULT acceleratedCompositingEnabled(BOOL *acceleratedCompositingEnabled);
}
diff --git a/WebKit/win/Interfaces/IWebPreferencesPrivate.idl b/WebKit/win/Interfaces/IWebPreferencesPrivate.idl
index 54c1d42..76ee3fa 100644
--- a/WebKit/win/Interfaces/IWebPreferencesPrivate.idl
+++ b/WebKit/win/Interfaces/IWebPreferencesPrivate.idl
@@ -79,8 +79,8 @@ interface IWebPreferencesPrivate : IUnknown
HRESULT isXSSAuditorEnabled([out, retval] BOOL *enabled);
HRESULT setXSSAuditorEnabled([in] BOOL enabled);
- HRESULT isFrameSetFlatteningEnabled([out, retval] BOOL *enabled);
- HRESULT setFrameSetFlatteningEnabled([in] BOOL enabled);
+ HRESULT isFrameFlatteningEnabled([out, retval] BOOL *enabled);
+ HRESULT setFrameFlatteningEnabled([in] BOOL enabled);
HRESULT experimentalNotificationsEnabled([out, retval] BOOL *enabled);
HRESULT setExperimentalNotificationsEnabled([in] BOOL enabled);
@@ -103,4 +103,10 @@ interface IWebPreferencesPrivate : IUnknown
HRESULT allowFileAccessFromFileURLs([out, retval] BOOL *allowAccess);
HRESULT setAllowFileAccessFromFileURLs([in] BOOL allowAccess);
+
+ HRESULT setShowDebugBorders([in] BOOL);
+ HRESULT showDebugBorders([out, retval] BOOL*);
+
+ HRESULT setShowRepaintCounter([in] BOOL);
+ HRESULT showRepaintCounter([out, retval] BOOL*);
}
diff --git a/WebKit/win/Interfaces/IWebScriptWorld.idl b/WebKit/win/Interfaces/IWebScriptWorld.idl
index bd8012d..b66c4ec 100644
--- a/WebKit/win/Interfaces/IWebScriptWorld.idl
+++ b/WebKit/win/Interfaces/IWebScriptWorld.idl
@@ -37,4 +37,5 @@ import "JavaScriptCoreAPITypes.idl";
interface IWebScriptWorld : IUnknown {
HRESULT standardWorld([out, retval] IWebScriptWorld**);
[local] HRESULT scriptWorldForGlobalContext([in] JSGlobalContextRef, [out, retval] IWebScriptWorld**);
+ HRESULT unregisterWorld();
}
diff --git a/WebKit/win/Interfaces/IWebUIDelegatePrivate.idl b/WebKit/win/Interfaces/IWebUIDelegatePrivate.idl
index ce00430..d9702de 100755
--- a/WebKit/win/Interfaces/IWebUIDelegatePrivate.idl
+++ b/WebKit/win/Interfaces/IWebUIDelegatePrivate.idl
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -33,6 +33,7 @@ import "IWebView.idl";
cpp_quote("#define WebEmbeddedViewAttributesKey TEXT(\"WebEmbeddedViewAttributesKey\")")
cpp_quote("#define WebEmbeddedViewBaseURLKey TEXT(\"WebEmbeddedViewBaseURLKey\")")
+cpp_quote("#define WebEmbeddedViewSourceURLKey TEXT(\"WebEmbeddedViewSourceURLKey\")")
cpp_quote("#define WebEmbeddedViewContainingElementKey TEXT(\"WebEmbeddedViewContainingElementKey\")")
cpp_quote("#define WebEmbeddedViewMIMETypeKey TEXT(\"WebEmbeddedViewMIMETypeKey\")")
diff --git a/WebKit/win/Interfaces/IWebUserContentURLPattern.idl b/WebKit/win/Interfaces/IWebUserContentURLPattern.idl
new file mode 100644
index 0000000..b261084
--- /dev/null
+++ b/WebKit/win/Interfaces/IWebUserContentURLPattern.idl
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2010 Apple 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:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS 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 APPLE INC. OR ITS 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.
+ */
+
+#ifndef DO_NO_IMPORTS
+import "oaidl.idl";
+import "ocidl.idl";
+#endif
+
+[
+ object,
+ oleautomation,
+ uuid(DBF18E5A-701B-49ab-B490-BED40053B788),
+ pointer_default(unique)
+]
+interface IWebUserContentURLPattern : IUnknown
+{
+ HRESULT parse([in] BSTR patternString);
+ HRESULT isValid([out, retval] BOOL* isValid);
+ HRESULT scheme([out, retval] BSTR*);
+ HRESULT host([out, retval] BSTR*);
+ HRESULT matchesSubdomains([out, retval] BOOL* matches);
+}
diff --git a/WebKit/win/Interfaces/IWebViewPrivate.idl b/WebKit/win/Interfaces/IWebViewPrivate.idl
index 7ab2304..17378ce 100644
--- a/WebKit/win/Interfaces/IWebViewPrivate.idl
+++ b/WebKit/win/Interfaces/IWebViewPrivate.idl
@@ -207,10 +207,13 @@ interface IWebViewPrivate : IUnknown
// - destinationProtocol: The protocol to grant access to.
// - destinationHost: The host to grant access to.
// - allowDestinationSubdomains: If host is a domain, setting this to YES will whitelist host and all its subdomains, recursively.
- HRESULT whiteListAccessFromOrigin([in] BSTR sourceOrigin, [in] BSTR destinationProtocol, [in] BSTR destinationHost, [in] BOOL allowDestinationSubdomains);
+ HRESULT addOriginAccessWhitelistEntry([in] BSTR sourceOrigin, [in] BSTR destinationProtocol, [in] BSTR destinationHost, [in] BOOL allowDestinationSubdomains);
- // Removes all white list entries created with whiteListAccessFromOrigin.
- HRESULT resetOriginAccessWhiteLists();
+ // Removes a white list entry created with addOriginAccessWhitelistEntry. See above.
+ HRESULT removeOriginAccessWhitelistEntry([in] BSTR sourceOrigin, [in] BSTR destinationProtocol, [in] BSTR destinationHost, [in] BOOL allowDestinationSubdomains);
+
+ // Removes all white list entries created with addOriginAccessWhitelistEntry.
+ HRESULT resetOriginAccessWhitelists();
HRESULT setHistoryDelegate([in] IWebHistoryDelegate* historyDelegate);
HRESULT historyDelegate([out,retval] IWebHistoryDelegate** historyDelegate);
@@ -226,4 +229,6 @@ interface IWebViewPrivate : IUnknown
HRESULT geolocationDidFailWithError([in] IWebError* error);
HRESULT setDomainRelaxationForbiddenForURLScheme([in] BOOL forbidden, [in] BSTR scheme);
+
+ HRESULT registerURLSchemeAsSecure([in] BSTR scheme);
}
diff --git a/WebKit/win/Interfaces/WebKit.idl b/WebKit/win/Interfaces/WebKit.idl
index 0de6b0b..d25cdfe 100644
--- a/WebKit/win/Interfaces/WebKit.idl
+++ b/WebKit/win/Interfaces/WebKit.idl
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -24,7 +24,7 @@
*/
cpp_quote("/*")
-cpp_quote(" * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.")
+cpp_quote(" * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.")
cpp_quote(" *")
cpp_quote(" * Redistribution and use in source and binary forms, with or without")
cpp_quote(" * modification, are permitted provided that the following conditions")
@@ -134,6 +134,7 @@ import "ocidl.idl";
#include "IWebURLResponsePrivate.idl"
#include "IWebUndoManager.idl"
#include "IWebUndoTarget.idl"
+#include "IWebUserContentURLPattern.idl"
#include "IWebView.idl"
#include "IWebViewPrivate.idl"
#include "IWebWorkersPrivate.idl"
@@ -293,4 +294,9 @@ library WebKit
coclass WebGeolocationPosition {
[default] interface IWebGeolocationPosition;
}
+
+ [uuid(2D62AE25-DEAA-4945-A76E-CCE05E899664)]
+ coclass WebUserContentURLPattern {
+ [default] interface IWebUserContentURLPattern;
+ }
}
diff --git a/WebKit/win/WebCoreLocalizedStrings.cpp b/WebKit/win/WebCoreLocalizedStrings.cpp
index 5850605..2d2f17f 100644
--- a/WebKit/win/WebCoreLocalizedStrings.cpp
+++ b/WebKit/win/WebCoreLocalizedStrings.cpp
@@ -93,11 +93,12 @@ String WebCore::AXCheckedCheckBoxActionVerb() { return String(LPCTSTR_UI_STRING(
String WebCore::AXUncheckedCheckBoxActionVerb() { return String(LPCTSTR_UI_STRING("check", "Verb stating the action that will occur when an unchecked checkbox is clicked, as used by accessibility")); }
String WebCore::AXLinkActionVerb() { return String(LPCTSTR_UI_STRING("jump", "Verb stating the action that will occur when a link is clicked, as used by accessibility")); }
String WebCore::AXMenuListActionVerb() { return String(LPCTSTR_UI_STRING("open", "Verb stating the action that will occur when a select element is clicked, as used by accessibility")); }
-String WebCore::AXMenuListPopupActionVerb() { return String(LPCTSTR_UI_STRING("press", "Verb stating the action that will occur when a select element's popup list is clicked, as used by accessibility")); }
+String WebCore::AXMenuListPopupActionVerb() { return String(LPCTSTR_UI_STRING_KEY("press", "press (select element)", "Verb stating the action that will occur when a select element's popup list is clicked, as used by accessibility")); }
String WebCore::unknownFileSizeText() { return String(LPCTSTR_UI_STRING("Unknown", "Unknown filesize FTP directory listing item")); }
String WebCore::uploadFileText() { return String(LPCTSTR_UI_STRING("Upload file", "(Windows) Form submit file upload dialog title")); }
String WebCore::allFilesText() { return String(LPCTSTR_UI_STRING("All Files", "(Windows) Form submit file upload all files pop-up")); }
-
+String WebCore::missingPluginText() { return String(LPCTSTR_UI_STRING("Missing Plug-in", "Label text to be used when a plugin is missing")); }
+String WebCore::crashedPluginText() { return String(LPCTSTR_UI_STRING("Plug-in Failure", "Label text to be used if plugin host process has crashed")); }
String WebCore::imageTitle(const String& filename, const IntSize& size)
{
static RetainPtr<CFStringRef> format(AdoptCF, UI_STRING("%@ %d\xC3\x97%d pixels", "window title for a standalone image (uses multiplication symbol, not x)"));
diff --git a/WebKit/win/WebCoreSupport/EmbeddedWidget.cpp b/WebKit/win/WebCoreSupport/EmbeddedWidget.cpp
index 6bd8f44..463a986 100644
--- a/WebKit/win/WebCoreSupport/EmbeddedWidget.cpp
+++ b/WebKit/win/WebCoreSupport/EmbeddedWidget.cpp
@@ -1,238 +1,238 @@
-/*
- * Copyright (C) 2008 Apple 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:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. 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.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``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 APPLE INC. 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 "EmbeddedWidget.h"
-
-#include <WebCore/Document.h>
-#include <WebCore/Element.h>
-#include <WebCore/FrameView.h>
-#include <WebCore/RenderObject.h>
-
-#include "MemoryStream.h"
-#include "WebError.h"
-#include "WebURLResponse.h"
-
-using namespace WebCore;
-
-PassRefPtr<EmbeddedWidget> EmbeddedWidget::create(IWebEmbeddedView* view, Element* element, HWND parentWindow, const IntSize& size)
-{
- RefPtr<EmbeddedWidget> widget = adoptRef(new EmbeddedWidget(view, element));
-
- widget->createWindow(parentWindow, size);
- return widget.release();
-}
-
-EmbeddedWidget::~EmbeddedWidget()
-{
- if (m_window)
- DestroyWindow(m_window);
-}
-
-bool EmbeddedWidget::createWindow(HWND parentWindow, const IntSize& size)
-{
- ASSERT(!m_window);
-
- HWND window;
-
- SIZE pluginSize(size);
-
- HRESULT hr = m_view->createViewWindow((OLE_HANDLE)parentWindow, &pluginSize, (OLE_HANDLE*)&window);
-
- if (FAILED(hr) || !window)
- return false;
-
- m_window = window;
- return true;
-}
-
-void EmbeddedWidget::invalidateRect(const IntRect& rect)
-{
- if (!m_window)
- return;
-
- RECT r = rect;
- ::InvalidateRect(m_window, &r, false);
-}
-
-void EmbeddedWidget::setFrameRect(const IntRect& rect)
-{
- if (m_element->document()->printing())
- return;
-
- if (rect != frameRect())
- Widget::setFrameRect(rect);
-
- frameRectsChanged();
-}
-
-void EmbeddedWidget::frameRectsChanged()
-{
- if (!parent())
- return;
-
- ASSERT(parent()->isFrameView());
- FrameView* frameView = static_cast<FrameView*>(parent());
-
- IntRect oldWindowRect = m_windowRect;
- IntRect oldClipRect = m_clipRect;
-
- m_windowRect = IntRect(frameView->contentsToWindow(frameRect().location()), frameRect().size());
- m_clipRect = windowClipRect();
- m_clipRect.move(-m_windowRect.x(), -m_windowRect.y());
-
- if (!m_window)
- return;
-
- if (m_windowRect == oldWindowRect && m_clipRect == oldClipRect)
- return;
-
- HRGN rgn;
-
- // To prevent flashes while scrolling, we disable drawing during the window
- // update process by clipping the window to the zero rect.
-
- bool clipToZeroRect = true;
-
- if (clipToZeroRect) {
- rgn = ::CreateRectRgn(0, 0, 0, 0);
- ::SetWindowRgn(m_window, rgn, FALSE);
- } else {
- rgn = ::CreateRectRgn(m_clipRect.x(), m_clipRect.y(), m_clipRect.right(), m_clipRect.bottom());
- ::SetWindowRgn(m_window, rgn, TRUE);
- }
-
- if (m_windowRect != oldWindowRect)
- ::MoveWindow(m_window, m_windowRect.x(), m_windowRect.y(), m_windowRect.width(), m_windowRect.height(), TRUE);
-
- if (clipToZeroRect) {
- rgn = ::CreateRectRgn(m_clipRect.x(), m_clipRect.y(), m_clipRect.right(), m_clipRect.bottom());
- ::SetWindowRgn(m_window, rgn, TRUE);
- }
-}
-
-void EmbeddedWidget::setFocus()
-{
- if (m_window)
- SetFocus(m_window);
-
- Widget::setFocus();
-}
-
-void EmbeddedWidget::show()
-{
- m_isVisible = true;
-
- if (m_attachedToWindow && m_window)
- ShowWindow(m_window, SW_SHOWNA);
-
- Widget::show();
-}
-
-void EmbeddedWidget::hide()
-{
- m_isVisible = false;
-
- if (m_attachedToWindow && m_window)
- ShowWindow(m_window, SW_HIDE);
-
- Widget::hide();
-}
-
-IntRect EmbeddedWidget::windowClipRect() const
-{
- // Start by clipping to our bounds.
- IntRect clipRect(m_windowRect);
-
- // Take our element and get the clip rect from the enclosing layer and frame view.
- RenderLayer* layer = m_element->renderer()->enclosingLayer();
- FrameView* parentView = m_element->document()->view();
- clipRect.intersect(parentView->windowClipRectForLayer(layer, true));
-
- return clipRect;
-}
-
-void EmbeddedWidget::setParent(ScrollView* parent)
-{
- Widget::setParent(parent);
-
- if (!m_window)
- return;
-
- if (parent)
- return;
-
- // If the embedded window or one of its children have the focus, we need to
- // clear it to prevent the web view window from being focused because that can
- // trigger a layout while the plugin element is being detached.
- HWND focusedWindow = ::GetFocus();
- if (m_window == focusedWindow || ::IsChild(m_window, focusedWindow))
- ::SetFocus(0);
-}
-
-void EmbeddedWidget::attachToWindow()
-{
- if (m_attachedToWindow)
- return;
-
- m_attachedToWindow = true;
- if (m_isVisible && m_window)
- ShowWindow(m_window, SW_SHOWNA);
-}
-
-void EmbeddedWidget::detachFromWindow()
-{
- if (!m_attachedToWindow)
- return;
-
- if (m_isVisible && m_window)
- ShowWindow(m_window, SW_HIDE);
- m_attachedToWindow = false;
-}
-
-void EmbeddedWidget::didReceiveResponse(const ResourceResponse& response)
-{
- ASSERT(m_view);
-
- COMPtr<IWebURLResponse> urlResponse(AdoptCOM, WebURLResponse::createInstance(response));
- m_view->didReceiveResponse(urlResponse.get());
-}
-
-void EmbeddedWidget::didReceiveData(const char* data, int length)
-{
- COMPtr<MemoryStream> stream = MemoryStream::createInstance(SharedBuffer::create(data, length));
- m_view->didReceiveData(stream.get());
-}
-
-void EmbeddedWidget::didFinishLoading()
-{
- m_view->didFinishLoading();
-}
-
-void EmbeddedWidget::didFail(const ResourceError& error)
-{
- COMPtr<IWebError> webError(AdoptCOM, WebError::createInstance(error));
- m_view->didFail(webError.get());
-}
+/*
+ * Copyright (C) 2008 Apple 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:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``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 APPLE INC. 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 "EmbeddedWidget.h"
+
+#include <WebCore/Document.h>
+#include <WebCore/Element.h>
+#include <WebCore/FrameView.h>
+#include <WebCore/RenderObject.h>
+
+#include "MemoryStream.h"
+#include "WebError.h"
+#include "WebURLResponse.h"
+
+using namespace WebCore;
+
+PassRefPtr<EmbeddedWidget> EmbeddedWidget::create(IWebEmbeddedView* view, Element* element, HWND parentWindow, const IntSize& size)
+{
+ RefPtr<EmbeddedWidget> widget = adoptRef(new EmbeddedWidget(view, element));
+
+ widget->createWindow(parentWindow, size);
+ return widget.release();
+}
+
+EmbeddedWidget::~EmbeddedWidget()
+{
+ if (m_window)
+ DestroyWindow(m_window);
+}
+
+bool EmbeddedWidget::createWindow(HWND parentWindow, const IntSize& size)
+{
+ ASSERT(!m_window);
+
+ HWND window;
+
+ SIZE pluginSize(size);
+
+ HRESULT hr = m_view->createViewWindow((OLE_HANDLE)parentWindow, &pluginSize, (OLE_HANDLE*)&window);
+
+ if (FAILED(hr) || !window)
+ return false;
+
+ m_window = window;
+ return true;
+}
+
+void EmbeddedWidget::invalidateRect(const IntRect& rect)
+{
+ if (!m_window)
+ return;
+
+ RECT r = rect;
+ ::InvalidateRect(m_window, &r, false);
+}
+
+void EmbeddedWidget::setFrameRect(const IntRect& rect)
+{
+ if (m_element->document()->printing())
+ return;
+
+ if (rect != frameRect())
+ Widget::setFrameRect(rect);
+
+ frameRectsChanged();
+}
+
+void EmbeddedWidget::frameRectsChanged()
+{
+ if (!parent())
+ return;
+
+ ASSERT(parent()->isFrameView());
+ FrameView* frameView = static_cast<FrameView*>(parent());
+
+ IntRect oldWindowRect = m_windowRect;
+ IntRect oldClipRect = m_clipRect;
+
+ m_windowRect = IntRect(frameView->contentsToWindow(frameRect().location()), frameRect().size());
+ m_clipRect = windowClipRect();
+ m_clipRect.move(-m_windowRect.x(), -m_windowRect.y());
+
+ if (!m_window)
+ return;
+
+ if (m_windowRect == oldWindowRect && m_clipRect == oldClipRect)
+ return;
+
+ HRGN rgn;
+
+ // To prevent flashes while scrolling, we disable drawing during the window
+ // update process by clipping the window to the zero rect.
+
+ bool clipToZeroRect = true;
+
+ if (clipToZeroRect) {
+ rgn = ::CreateRectRgn(0, 0, 0, 0);
+ ::SetWindowRgn(m_window, rgn, FALSE);
+ } else {
+ rgn = ::CreateRectRgn(m_clipRect.x(), m_clipRect.y(), m_clipRect.right(), m_clipRect.bottom());
+ ::SetWindowRgn(m_window, rgn, TRUE);
+ }
+
+ if (m_windowRect != oldWindowRect)
+ ::MoveWindow(m_window, m_windowRect.x(), m_windowRect.y(), m_windowRect.width(), m_windowRect.height(), TRUE);
+
+ if (clipToZeroRect) {
+ rgn = ::CreateRectRgn(m_clipRect.x(), m_clipRect.y(), m_clipRect.right(), m_clipRect.bottom());
+ ::SetWindowRgn(m_window, rgn, TRUE);
+ }
+}
+
+void EmbeddedWidget::setFocus()
+{
+ if (m_window)
+ SetFocus(m_window);
+
+ Widget::setFocus();
+}
+
+void EmbeddedWidget::show()
+{
+ m_isVisible = true;
+
+ if (m_attachedToWindow && m_window)
+ ShowWindow(m_window, SW_SHOWNA);
+
+ Widget::show();
+}
+
+void EmbeddedWidget::hide()
+{
+ m_isVisible = false;
+
+ if (m_attachedToWindow && m_window)
+ ShowWindow(m_window, SW_HIDE);
+
+ Widget::hide();
+}
+
+IntRect EmbeddedWidget::windowClipRect() const
+{
+ // Start by clipping to our bounds.
+ IntRect clipRect(m_windowRect);
+
+ // Take our element and get the clip rect from the enclosing layer and frame view.
+ RenderLayer* layer = m_element->renderer()->enclosingLayer();
+ FrameView* parentView = m_element->document()->view();
+ clipRect.intersect(parentView->windowClipRectForLayer(layer, true));
+
+ return clipRect;
+}
+
+void EmbeddedWidget::setParent(ScrollView* parent)
+{
+ Widget::setParent(parent);
+
+ if (!m_window)
+ return;
+
+ if (parent)
+ return;
+
+ // If the embedded window or one of its children have the focus, we need to
+ // clear it to prevent the web view window from being focused because that can
+ // trigger a layout while the plugin element is being detached.
+ HWND focusedWindow = ::GetFocus();
+ if (m_window == focusedWindow || ::IsChild(m_window, focusedWindow))
+ ::SetFocus(0);
+}
+
+void EmbeddedWidget::attachToWindow()
+{
+ if (m_attachedToWindow)
+ return;
+
+ m_attachedToWindow = true;
+ if (m_isVisible && m_window)
+ ShowWindow(m_window, SW_SHOWNA);
+}
+
+void EmbeddedWidget::detachFromWindow()
+{
+ if (!m_attachedToWindow)
+ return;
+
+ if (m_isVisible && m_window)
+ ShowWindow(m_window, SW_HIDE);
+ m_attachedToWindow = false;
+}
+
+void EmbeddedWidget::didReceiveResponse(const ResourceResponse& response)
+{
+ ASSERT(m_view);
+
+ COMPtr<IWebURLResponse> urlResponse(AdoptCOM, WebURLResponse::createInstance(response));
+ m_view->didReceiveResponse(urlResponse.get());
+}
+
+void EmbeddedWidget::didReceiveData(const char* data, int length)
+{
+ COMPtr<MemoryStream> stream = MemoryStream::createInstance(SharedBuffer::create(data, length));
+ m_view->didReceiveData(stream.get());
+}
+
+void EmbeddedWidget::didFinishLoading()
+{
+ m_view->didFinishLoading();
+}
+
+void EmbeddedWidget::didFail(const ResourceError& error)
+{
+ COMPtr<IWebError> webError(AdoptCOM, WebError::createInstance(error));
+ m_view->didFail(webError.get());
+}
diff --git a/WebKit/win/WebCoreSupport/EmbeddedWidget.h b/WebKit/win/WebCoreSupport/EmbeddedWidget.h
index 5eee892..7930e0f 100644
--- a/WebKit/win/WebCoreSupport/EmbeddedWidget.h
+++ b/WebKit/win/WebCoreSupport/EmbeddedWidget.h
@@ -1,85 +1,85 @@
-/*
- * Copyright (C) 2008 Apple 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:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. 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.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``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 APPLE INC. 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.
- */
-
-#ifndef EmbeddedWidget_h
-#define EmbeddedWidget_h
-
-#include <WebCore/COMPtr.h>
-#include <WebCore/IntRect.h>
-#include <WebCore/PluginView.h>
-
-namespace WebCore {
- class Element;
- class IntSize;
-}
-
-interface IWebEmbeddedView;
-
-class EmbeddedWidget : public WebCore::Widget, public WebCore::PluginManualLoader {
-public:
- static PassRefPtr<EmbeddedWidget> create(IWebEmbeddedView*, WebCore::Element* element, HWND parentWindow, const WebCore::IntSize&);
- ~EmbeddedWidget();
-
-private:
- EmbeddedWidget(IWebEmbeddedView* view, WebCore::Element* element)
- : m_view(view)
- , m_element(element)
- , m_window(0)
- , m_isVisible(false)
- , m_attachedToWindow(false)
- {
- }
-
- bool createWindow(HWND parentWindow, const WebCore::IntSize& size);
-
- virtual void didReceiveResponse(const WebCore::ResourceResponse&);
- virtual void didReceiveData(const char*, int);
- virtual void didFinishLoading();
- virtual void didFail(const WebCore::ResourceError&);
-
- virtual void invalidateRect(const WebCore::IntRect&);
- virtual void setFrameRect(const WebCore::IntRect&);
- virtual void frameRectsChanged();
- virtual void setFocus();
- virtual void show();
- virtual void hide();
- virtual WebCore::IntRect windowClipRect() const;
- virtual void setParent(WebCore::ScrollView*);
-
- virtual void attachToWindow();
- virtual void detachFromWindow();
-
- COMPtr<IWebEmbeddedView> m_view;
- WebCore::Element* m_element;
- HWND m_window;
-
- bool m_isVisible;
- bool m_attachedToWindow;
-
- WebCore::IntRect m_clipRect; // The clip rect to apply to an embedded view.
- WebCore::IntRect m_windowRect; // Our window rect.
-};
-
-#endif // EmbeddedWidget_h
+/*
+ * Copyright (C) 2008 Apple 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:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``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 APPLE INC. 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.
+ */
+
+#ifndef EmbeddedWidget_h
+#define EmbeddedWidget_h
+
+#include <WebCore/COMPtr.h>
+#include <WebCore/IntRect.h>
+#include <WebCore/PluginView.h>
+
+namespace WebCore {
+ class Element;
+ class IntSize;
+}
+
+interface IWebEmbeddedView;
+
+class EmbeddedWidget : public WebCore::Widget, public WebCore::PluginManualLoader {
+public:
+ static PassRefPtr<EmbeddedWidget> create(IWebEmbeddedView*, WebCore::Element* element, HWND parentWindow, const WebCore::IntSize&);
+ ~EmbeddedWidget();
+
+private:
+ EmbeddedWidget(IWebEmbeddedView* view, WebCore::Element* element)
+ : m_view(view)
+ , m_element(element)
+ , m_window(0)
+ , m_isVisible(false)
+ , m_attachedToWindow(false)
+ {
+ }
+
+ bool createWindow(HWND parentWindow, const WebCore::IntSize& size);
+
+ virtual void didReceiveResponse(const WebCore::ResourceResponse&);
+ virtual void didReceiveData(const char*, int);
+ virtual void didFinishLoading();
+ virtual void didFail(const WebCore::ResourceError&);
+
+ virtual void invalidateRect(const WebCore::IntRect&);
+ virtual void setFrameRect(const WebCore::IntRect&);
+ virtual void frameRectsChanged();
+ virtual void setFocus();
+ virtual void show();
+ virtual void hide();
+ virtual WebCore::IntRect windowClipRect() const;
+ virtual void setParent(WebCore::ScrollView*);
+
+ virtual void attachToWindow();
+ virtual void detachFromWindow();
+
+ COMPtr<IWebEmbeddedView> m_view;
+ WebCore::Element* m_element;
+ HWND m_window;
+
+ bool m_isVisible;
+ bool m_attachedToWindow;
+
+ WebCore::IntRect m_clipRect; // The clip rect to apply to an embedded view.
+ WebCore::IntRect m_windowRect; // Our window rect.
+};
+
+#endif // EmbeddedWidget_h
diff --git a/WebKit/win/WebCoreSupport/WebChromeClient.cpp b/WebKit/win/WebCoreSupport/WebChromeClient.cpp
index 45f7662..587637f 100644
--- a/WebKit/win/WebCoreSupport/WebChromeClient.cpp
+++ b/WebKit/win/WebCoreSupport/WebChromeClient.cpp
@@ -46,7 +46,11 @@
#include <WebCore/FrameLoadRequest.h>
#include <WebCore/FrameView.h>
#include <WebCore/Geolocation.h>
+#if USE(ACCELERATED_COMPOSITING)
+#include <WebCore/GraphicsLayer.h>
+#endif
#include <WebCore/HTMLNames.h>
+#include <WebCore/Icon.h>
#include <WebCore/LocalizedStrings.h>
#include <WebCore/NotImplemented.h>
#include <WebCore/Page.h>
@@ -451,10 +455,22 @@ IntRect WebChromeClient::windowResizerRect() const
return IntRect();
}
-void WebChromeClient::repaint(const IntRect& windowRect, bool contentChanged, bool immediate, bool repaintContentOnly)
+void WebChromeClient::invalidateWindow(const IntRect& windowRect, bool immediate)
+{
+ ASSERT(core(m_webView->topLevelFrame()));
+ m_webView->repaint(windowRect, false /*contentChanged*/, immediate, false /*repaintContentOnly*/);
+}
+
+void WebChromeClient::invalidateContentsAndWindow(const IntRect& windowRect, bool immediate)
{
ASSERT(core(m_webView->topLevelFrame()));
- m_webView->repaint(windowRect, contentChanged, immediate, repaintContentOnly);
+ m_webView->repaint(windowRect, true /*contentChanged*/, immediate /*immediate*/, false /*repaintContentOnly*/);
+}
+
+void WebChromeClient::invalidateContentsForSlowScroll(const IntRect& windowRect, bool immediate)
+{
+ ASSERT(core(m_webView->topLevelFrame()));
+ m_webView->repaint(windowRect, true /*contentChanged*/, immediate, true /*repaintContentOnly*/);
}
void WebChromeClient::scroll(const IntSize& delta, const IntRect& scrollViewRect, const IntRect& clipRect)
@@ -734,10 +750,9 @@ void WebChromeClient::runOpenPanel(Frame*, PassRefPtr<FileChooser> prpFileChoose
// FIXME: Show some sort of error if too many files are selected and the buffer is too small. For now, this will fail silently.
}
-void WebChromeClient::iconForFiles(const Vector<WebCore::String>&, PassRefPtr<WebCore::FileChooser>)
+void WebChromeClient::chooseIconForFiles(const Vector<WebCore::String>& filenames, WebCore::FileChooser* chooser)
{
- // FIXME: Move the code of Icon::createIconForFiles() here.
- notImplemented();
+ chooser->iconLoaded(Icon::createIconForFiles(filenames));
}
bool WebChromeClient::setCursor(PlatformCursorHandle cursor)
@@ -783,7 +798,7 @@ void WebChromeClient::requestGeolocationPermissionForFrame(Frame* frame, Geoloca
#if USE(ACCELERATED_COMPOSITING)
void WebChromeClient::attachRootGraphicsLayer(Frame* frame, GraphicsLayer* graphicsLayer)
{
- m_webView->setRootChildLayer(graphicsLayer ? graphicsLayer->platformLayer() : 0);
+ m_webView->setRootChildLayer(graphicsLayer ? static_cast<WKCACFLayer*>(graphicsLayer->platformLayer()) : 0);
}
void WebChromeClient::scheduleCompositingLayerSync()
diff --git a/WebKit/win/WebCoreSupport/WebChromeClient.h b/WebKit/win/WebCoreSupport/WebChromeClient.h
index 0958cf7..6954fde 100644
--- a/WebKit/win/WebCoreSupport/WebChromeClient.h
+++ b/WebKit/win/WebCoreSupport/WebChromeClient.h
@@ -93,8 +93,11 @@ public:
virtual bool tabsToLinks() const;
virtual WebCore::IntRect windowResizerRect() const;
- virtual void repaint(const WebCore::IntRect&, bool contentChanged, bool immediate = false, bool repaintContentOnly = false);
+ virtual void invalidateWindow(const WebCore::IntRect&, bool);
+ virtual void invalidateContentsAndWindow(const WebCore::IntRect&, bool);
+ virtual void invalidateContentsForSlowScroll(const WebCore::IntRect&, bool);
virtual void scroll(const WebCore::IntSize& scrollDelta, const WebCore::IntRect& rectToScroll, const WebCore::IntRect& clipRect);
+
virtual WebCore::IntPoint screenToWindow(const WebCore::IntPoint& p) const;
virtual WebCore::IntRect windowToScreen(const WebCore::IntRect& r) const;
virtual PlatformPageClient platformPageClient() const;
@@ -123,7 +126,7 @@ public:
virtual bool paintCustomScrollCorner(WebCore::GraphicsContext*, const WebCore::FloatRect&);
virtual void runOpenPanel(WebCore::Frame*, PassRefPtr<WebCore::FileChooser>);
- virtual void iconForFiles(const Vector<WebCore::String>&, PassRefPtr<WebCore::FileChooser>);
+ virtual void chooseIconForFiles(const Vector<WebCore::String>&, WebCore::FileChooser*);
virtual bool setCursor(WebCore::PlatformCursorHandle cursor);
@@ -147,6 +150,7 @@ public:
virtual void scrollRectIntoView(const WebCore::IntRect&, const WebCore::ScrollView*) const {}
virtual void requestGeolocationPermissionForFrame(WebCore::Frame*, WebCore::Geolocation*);
+ virtual void cancelGeolocationPermissionRequestForFrame(WebCore::Frame*, WebCore::Geolocation*) { }
#if ENABLE(VIDEO)
virtual bool supportsFullscreenForNode(const WebCore::Node*);
diff --git a/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.cpp b/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.cpp
index 3f6eb07..8c66d0e 100644
--- a/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.cpp
+++ b/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.cpp
@@ -172,7 +172,7 @@ void WebDesktopNotificationsDelegate::requestPermission(SecurityOrigin* origin,
notificationDelegate()->requestNotificationPermission(org);
}
-NotificationPresenter::Permission WebDesktopNotificationsDelegate::checkPermission(const KURL& url, Document*)
+NotificationPresenter::Permission WebDesktopNotificationsDelegate::checkPermission(const KURL& url)
{
int out = 0;
BString org(SecurityOrigin::create(url)->toString());
diff --git a/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.h b/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.h
index d30b1e7..344c95b 100644
--- a/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.h
+++ b/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.h
@@ -50,7 +50,7 @@ public:
virtual void cancel(WebCore::Notification* object);
virtual void notificationObjectDestroyed(WebCore::Notification* object);
virtual void requestPermission(WebCore::SecurityOrigin* origin, PassRefPtr<WebCore::VoidCallback> callback);
- virtual WebCore::NotificationPresenter::Permission checkPermission(const KURL& url, Document* document);
+ virtual WebCore::NotificationPresenter::Permission checkPermission(const KURL& url);
private:
bool hasNotificationDelegate();
diff --git a/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp b/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp
index 6ae6c5e..fc75ea4 100644
--- a/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp
+++ b/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp
@@ -243,10 +243,6 @@ void WebFrameLoaderClient::dispatchDidFailLoading(DocumentLoader* loader, unsign
resourceLoadDelegate->didFailLoadingWithError(webView, identifier, webError.get(), getWebDataSource(loader));
}
-void WebFrameLoaderClient::dispatchDidLoadResourceByXMLHttpRequest(unsigned long, const ScriptString&)
-{
-}
-
bool WebFrameLoaderClient::shouldCacheResponse(DocumentLoader* loader, unsigned long identifier, const ResourceResponse& response, const unsigned char* data, const unsigned long long length)
{
WebView* webView = m_webFrame->webView();
@@ -513,7 +509,7 @@ void WebFrameLoaderClient::receivedData(const char* data, int length, const Stri
bool userChosen = !encoding.isNull();
if (encoding.isNull())
encoding = textEncoding;
- coreFrame->loader()->setEncoding(encoding, userChosen);
+ coreFrame->loader()->writer()->setEncoding(encoding, userChosen);
coreFrame->loader()->addData(data, length);
}
@@ -841,7 +837,8 @@ PassRefPtr<Widget> WebFrameLoaderClient::createPlugin(const IntSize& pluginSize,
HashMap<String, COMVariant> arguments;
arguments.set(WebEmbeddedViewAttributesKey, viewArgumentsBag);
- arguments.set(WebEmbeddedViewBaseURLKey, url.string());
+ arguments.set(WebEmbeddedViewSourceURLKey, url.string());
+ arguments.set(WebEmbeddedViewBaseURLKey, element->document()->baseURI().string());
arguments.set(WebEmbeddedViewContainingElementKey, containingElement);
arguments.set(WebEmbeddedViewMIMETypeKey, mimeType);
@@ -867,7 +864,7 @@ PassRefPtr<Widget> WebFrameLoaderClient::createPlugin(const IntSize& pluginSize,
dispatchDidFailToStartPlugin(pluginView.get());
- return pluginView;
+ return 0;
}
void WebFrameLoaderClient::redirectDataToPlugin(Widget* pluginWidget)
diff --git a/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h b/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h
index a5f2b1b..0d89b2a 100644
--- a/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h
+++ b/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h
@@ -57,7 +57,6 @@ public:
virtual void dispatchDidReceiveContentLength(WebCore::DocumentLoader*, unsigned long identifier, int lengthReceived);
virtual void dispatchDidFinishLoading(WebCore::DocumentLoader*, unsigned long identifier);
virtual void dispatchDidFailLoading(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::ResourceError&);
- virtual void dispatchDidLoadResourceByXMLHttpRequest(unsigned long identifier, const WebCore::ScriptString&);
virtual bool shouldCacheResponse(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::ResourceResponse&, const unsigned char* data, unsigned long long length);
virtual void dispatchDidHandleOnloadEvents();
diff --git a/WebKit/win/WebCoreSupport/WebInspectorClient.cpp b/WebKit/win/WebCoreSupport/WebInspectorClient.cpp
index 0dd6e58..16ad172 100644
--- a/WebKit/win/WebCoreSupport/WebInspectorClient.cpp
+++ b/WebKit/win/WebCoreSupport/WebInspectorClient.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
+ * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -52,8 +52,6 @@
using namespace WebCore;
-static const char* const inspectorStartsAttachedName = "inspectorStartsAttached";
-
static LPCTSTR kWebInspectorWindowClassName = TEXT("WebInspectorWindowClass");
static ATOM registerWindowClass();
static LPCTSTR kWebInspectorPointerProp = TEXT("WebInspectorPointer");
@@ -71,25 +69,13 @@ static CFBundleRef getWebKitBundle()
WebInspectorClient::WebInspectorClient(WebView* webView)
: m_inspectedWebView(webView)
- , m_hwnd(0)
- , m_webViewHwnd(0)
- , m_shouldAttachWhenShown(false)
- , m_attached(false)
{
ASSERT(m_inspectedWebView);
-
m_inspectedWebView->viewWindow((OLE_HANDLE*)&m_inspectedWebViewHwnd);
-
- // FIXME: Implement window size/position save/restore
-#if 0
- [self setWindowFrameAutosaveName:@"Web Inspector"];
-#endif
}
WebInspectorClient::~WebInspectorClient()
{
- if (m_hwnd)
- ::DestroyWindow(m_hwnd);
}
void WebInspectorClient::inspectorDestroyed()
@@ -97,35 +83,30 @@ void WebInspectorClient::inspectorDestroyed()
delete this;
}
-Page* WebInspectorClient::createPage()
+void WebInspectorClient::openInspectorFrontend(InspectorController* inspectorController)
{
registerWindowClass();
- if (m_hwnd)
- ::DestroyWindow(m_hwnd);
-
- m_hwnd = ::CreateWindowEx(0, kWebInspectorWindowClassName, 0, WS_OVERLAPPEDWINDOW,
+ HWND frontendHwnd = ::CreateWindowEx(0, kWebInspectorWindowClassName, 0, WS_OVERLAPPEDWINDOW,
defaultWindowRect().x(), defaultWindowRect().y(), defaultWindowRect().width(), defaultWindowRect().height(),
0, 0, 0, 0);
- if (!m_hwnd)
- return 0;
-
- ::SetProp(m_hwnd, kWebInspectorPointerProp, reinterpret_cast<HANDLE>(this));
+ if (!frontendHwnd)
+ return;
- m_webView.adoptRef(WebView::createInstance());
+ COMPtr<WebView> frontendWebView(AdoptCOM, WebView::createInstance());
- if (FAILED(m_webView->setHostWindow((OLE_HANDLE)(ULONG64)m_hwnd)))
- return 0;
+ if (FAILED(frontendWebView->setHostWindow((OLE_HANDLE)(ULONG64)frontendHwnd)))
+ return;
RECT rect;
- GetClientRect(m_hwnd, &rect);
- if (FAILED(m_webView->initWithFrame(rect, 0, 0)))
- return 0;
+ GetClientRect(frontendHwnd, &rect);
+ if (FAILED(frontendWebView->initWithFrame(rect, 0, 0)))
+ return;
COMPtr<WebInspectorDelegate> delegate(AdoptCOM, WebInspectorDelegate::createInstance());
- if (FAILED(m_webView->setUIDelegate(delegate.get())))
- return 0;
+ if (FAILED(frontendWebView->setUIDelegate(delegate.get())))
+ return;
// Keep preferences separate from the rest of the client, making sure we are using expected preference values.
// One reason this is good is that it keeps the inspector out of history via "private browsing".
@@ -136,66 +117,126 @@ Page* WebInspectorClient::createPage()
COMPtr<WebPreferences> tempPreferences(AdoptCOM, WebPreferences::createInstance());
COMPtr<IWebPreferences> iPreferences;
if (FAILED(tempPreferences->initWithIdentifier(BString(L"WebInspectorPreferences"), &iPreferences)))
- return 0;
+ return;
COMPtr<WebPreferences> preferences(Query, iPreferences);
if (!preferences)
- return 0;
+ return;
if (FAILED(preferences->setAutosaves(FALSE)))
- return 0;
+ return;
if (FAILED(preferences->setPrivateBrowsingEnabled(TRUE)))
- return 0;
+ return;
if (FAILED(preferences->setLoadsImagesAutomatically(TRUE)))
- return 0;
+ return;
if (FAILED(preferences->setAuthorAndUserStylesEnabled(TRUE)))
- return 0;
+ return;
if (FAILED(preferences->setAllowsAnimatedImages(TRUE)))
- return 0;
+ return;
if (FAILED(preferences->setLoadsImagesAutomatically(TRUE)))
- return 0;
+ return;
if (FAILED(preferences->setPlugInsEnabled(FALSE)))
- return 0;
+ return;
if (FAILED(preferences->setJavaEnabled(FALSE)))
- return 0;
+ return;
if (FAILED(preferences->setUserStyleSheetEnabled(FALSE)))
- return 0;
+ return;
if (FAILED(preferences->setTabsToLinks(FALSE)))
- return 0;
+ return;
if (FAILED(preferences->setMinimumFontSize(0)))
- return 0;
+ return;
if (FAILED(preferences->setMinimumLogicalFontSize(9)))
- return 0;
+ return;
if (FAILED(preferences->setFixedFontFamily(BString(L"Courier New"))))
- return 0;
+ return;
if (FAILED(preferences->setDefaultFixedFontSize(13)))
- return 0;
+ return;
- if (FAILED(m_webView->setPreferences(preferences.get())))
- return 0;
+ if (FAILED(frontendWebView->setPreferences(preferences.get())))
+ return;
- m_webView->setProhibitsMainFrameScrolling(TRUE);
+ frontendWebView->setProhibitsMainFrameScrolling(TRUE);
- if (FAILED(m_webView->viewWindow(reinterpret_cast<OLE_HANDLE*>(&m_webViewHwnd))))
- return 0;
+ HWND frontendWebViewHwnd;
+ if (FAILED(frontendWebView->viewWindow(reinterpret_cast<OLE_HANDLE*>(&frontendWebViewHwnd))))
+ return;
- COMPtr<WebMutableURLRequest> request;
- request.adoptRef(WebMutableURLRequest::createInstance());
+ COMPtr<WebMutableURLRequest> request(AdoptCOM, WebMutableURLRequest::createInstance());
RetainPtr<CFURLRef> htmlURLRef(AdoptCF, CFBundleCopyResourceURL(getWebKitBundle(), CFSTR("inspector"), CFSTR("html"), CFSTR("inspector")));
if (!htmlURLRef)
- return 0;
+ return;
CFStringRef urlStringRef = ::CFURLGetString(htmlURLRef.get());
if (FAILED(request->initWithURL(BString(urlStringRef), WebURLRequestUseProtocolCachePolicy, 60)))
- return 0;
+ return;
- if (FAILED(m_webView->topLevelFrame()->loadRequest(request.get())))
- return 0;
+ if (FAILED(frontendWebView->topLevelFrame()->loadRequest(request.get())))
+ return;
- return core(m_webView.get());
+ Page* page = core(frontendWebView.get());
+ page->inspectorController()->setInspectorFrontendClient(new WebInspectorFrontendClient(m_inspectedWebView, m_inspectedWebViewHwnd, frontendHwnd, frontendWebView, frontendWebViewHwnd, this));
+ m_frontendHwnd = frontendHwnd;
}
+void WebInspectorClient::highlight(Node*)
+{
+ bool creatingHighlight = !m_highlight;
+
+ if (creatingHighlight)
+ m_highlight.set(new WebNodeHighlight(m_inspectedWebView));
-String WebInspectorClient::localizedStringsURL()
+ if (m_highlight->isShowing())
+ m_highlight->update();
+ else
+ m_highlight->setShowsWhileWebViewIsVisible(true);
+
+ if (creatingHighlight && IsWindowVisible(m_frontendHwnd))
+ m_highlight->placeBehindWindow(m_frontendHwnd);
+}
+
+void WebInspectorClient::hideHighlight()
+{
+ if (m_highlight)
+ m_highlight->setShowsWhileWebViewIsVisible(false);
+}
+
+void WebInspectorClient::updateHighlight()
+{
+ if (m_highlight && m_highlight->isShowing())
+ m_highlight->update();
+}
+
+WebInspectorFrontendClient::WebInspectorFrontendClient(WebView* inspectedWebView, HWND inspectedWebViewHwnd, HWND frontendHwnd, const COMPtr<WebView>& frontendWebView, HWND frontendWebViewHwnd, WebInspectorClient* inspectorClient)
+ : InspectorFrontendClientLocal(inspectedWebView->page()->inspectorController(), core(frontendWebView.get()))
+ , m_inspectedWebView(inspectedWebView)
+ , m_inspectedWebViewHwnd(inspectedWebViewHwnd)
+ , m_inspectorClient(inspectorClient)
+ , m_frontendHwnd(frontendHwnd)
+ , m_frontendWebView(frontendWebView)
+ , m_frontendWebViewHwnd(frontendWebViewHwnd)
+ , m_shouldAttachWhenShown(false)
+ , m_attached(false)
+ , m_destroyingInspectorView(false)
+{
+ ::SetProp(frontendHwnd, kWebInspectorPointerProp, reinterpret_cast<HANDLE>(this));
+ // FIXME: Implement window size/position save/restore
+#if 0
+ [self setWindowFrameAutosaveName:@"Web Inspector"];
+#endif
+}
+
+WebInspectorFrontendClient::~WebInspectorFrontendClient()
+{
+ destroyInspectorView();
+}
+
+void WebInspectorFrontendClient::frontendLoaded()
+{
+ InspectorFrontendClientLocal::frontendLoaded();
+
+ setAttachedWindow(m_attached);
+}
+
+String WebInspectorFrontendClient::localizedStringsURL()
{
RetainPtr<CFURLRef> url(AdoptCF, CFBundleCopyResourceURL(getWebKitBundle(), CFSTR("localizedStrings"), CFSTR("js"), 0));
if (!url)
@@ -204,53 +245,45 @@ String WebInspectorClient::localizedStringsURL()
return CFURLGetString(url.get());
}
-
-String WebInspectorClient::hiddenPanels()
+String WebInspectorFrontendClient::hiddenPanels()
{
// FIXME: implement this
return String();
}
-void WebInspectorClient::showWindow()
+void WebInspectorFrontendClient::bringToFront()
{
showWindowWithoutNotifications();
- m_inspectedWebView->page()->inspectorController()->setWindowVisible(true, m_shouldAttachWhenShown);
-}
-
-void WebInspectorClient::closeWindow()
-{
- closeWindowWithoutNotifications();
- m_inspectedWebView->page()->inspectorController()->setWindowVisible(false, m_shouldAttachWhenShown);
}
-bool WebInspectorClient::windowVisible()
+void WebInspectorFrontendClient::closeWindow()
{
- return !!::IsWindowVisible(m_hwnd);
+ destroyInspectorView();
}
-void WebInspectorClient::attachWindow()
+void WebInspectorFrontendClient::attachWindow()
{
if (m_attached)
return;
- m_inspectedWebView->page()->inspectorController()->setSetting(inspectorStartsAttachedName, "true");
+ m_inspectedWebView->page()->inspectorController()->setSetting(InspectorController::inspectorStartsAttachedSettingName(), "true");
closeWindowWithoutNotifications();
showWindowWithoutNotifications();
}
-void WebInspectorClient::detachWindow()
+void WebInspectorFrontendClient::detachWindow()
{
if (!m_attached)
return;
- m_inspectedWebView->page()->inspectorController()->setSetting(inspectorStartsAttachedName, "false");
+ m_inspectedWebView->page()->inspectorController()->setSetting(InspectorController::inspectorStartsAttachedSettingName(), "false");
closeWindowWithoutNotifications();
showWindowWithoutNotifications();
}
-void WebInspectorClient::setAttachedWindowHeight(unsigned height)
+void WebInspectorFrontendClient::setAttachedWindowHeight(unsigned height)
{
if (!m_attached)
return;
@@ -268,98 +301,73 @@ void WebInspectorClient::setAttachedWindowHeight(unsigned height)
int totalHeight = hostWindowRect.bottom - hostWindowRect.top;
int webViewWidth = inspectedRect.right - inspectedRect.left;
- SetWindowPos(m_webViewHwnd, 0, 0, totalHeight - height, webViewWidth, height, SWP_NOZORDER);
+ SetWindowPos(m_frontendWebViewHwnd, 0, 0, totalHeight - height, webViewWidth, height, SWP_NOZORDER);
// We want to set the inspected web view height to the totalHeight, because the height adjustment
// of the inspected web view happens in onWebViewWindowPosChanging, not here.
SetWindowPos(m_inspectedWebViewHwnd, 0, 0, 0, webViewWidth, totalHeight, SWP_NOZORDER);
- RedrawWindow(m_webViewHwnd, 0, 0, RDW_INVALIDATE | RDW_ALLCHILDREN | RDW_UPDATENOW);
+ RedrawWindow(m_frontendWebViewHwnd, 0, 0, RDW_INVALIDATE | RDW_ALLCHILDREN | RDW_UPDATENOW);
RedrawWindow(m_inspectedWebViewHwnd, 0, 0, RDW_INVALIDATE | RDW_ALLCHILDREN | RDW_UPDATENOW);
}
-void WebInspectorClient::highlight(Node*)
-{
- bool creatingHighlight = !m_highlight;
-
- if (creatingHighlight)
- m_highlight.set(new WebNodeHighlight(m_inspectedWebView));
-
- if (m_highlight->isShowing())
- m_highlight->update();
- else
- m_highlight->setShowsWhileWebViewIsVisible(true);
-
- if (creatingHighlight && IsWindowVisible(m_hwnd))
- m_highlight->placeBehindWindow(m_hwnd);
-}
-
-void WebInspectorClient::hideHighlight()
-{
- if (m_highlight)
- m_highlight->setShowsWhileWebViewIsVisible(false);
-}
-
-void WebInspectorClient::inspectedURLChanged(const String& newURL)
+void WebInspectorFrontendClient::inspectedURLChanged(const String& newURL)
{
m_inspectedURL = newURL;
updateWindowTitle();
}
-void WebInspectorClient::inspectorWindowObjectCleared()
+void WebInspectorFrontendClient::closeWindowWithoutNotifications()
{
- notImplemented();
-}
-
-void WebInspectorClient::closeWindowWithoutNotifications()
-{
- if (!m_hwnd)
+ if (!m_frontendHwnd)
return;
if (!m_attached) {
- ShowWindow(m_hwnd, SW_HIDE);
+ ShowWindow(m_frontendHwnd, SW_HIDE);
return;
}
- ASSERT(m_webView);
+ ASSERT(m_frontendWebView);
ASSERT(m_inspectedWebViewHwnd);
- ASSERT(!IsWindowVisible(m_hwnd));
+ ASSERT(!IsWindowVisible(m_frontendHwnd));
// Remove the Inspector's WebView from the inspected WebView's parent window.
WindowMessageBroadcaster::removeListener(m_inspectedWebViewHwnd, this);
m_attached = false;
- m_webView->setHostWindow(reinterpret_cast<OLE_HANDLE>(m_hwnd));
+ m_frontendWebView->setHostWindow(reinterpret_cast<OLE_HANDLE>(m_frontendHwnd));
// Make sure everything has the right size/position.
HWND hostWindow;
if (SUCCEEDED(m_inspectedWebView->hostWindow((OLE_HANDLE*)&hostWindow)))
SendMessage(hostWindow, WM_SIZE, 0, 0);
- if (m_highlight && m_highlight->isShowing())
- m_highlight->update();
+ m_inspectorClient->updateHighlight();
}
-void WebInspectorClient::showWindowWithoutNotifications()
+void WebInspectorFrontendClient::showWindowWithoutNotifications()
{
- if (!m_hwnd)
+ if (!m_frontendHwnd)
return;
- ASSERT(m_webView);
+ ASSERT(m_frontendWebView);
ASSERT(m_inspectedWebViewHwnd);
// If no preference is set - default to an attached window. This is important for inspector LayoutTests.
- String shouldAttach = m_inspectedWebView->page()->inspectorController()->setting(inspectorStartsAttachedName);
+ String shouldAttach = m_inspectedWebView->page()->inspectorController()->setting(InspectorController::inspectorStartsAttachedSettingName());
m_shouldAttachWhenShown = shouldAttach != "false";
-
+
+ if (m_shouldAttachWhenShown && !canAttachWindow())
+ m_shouldAttachWhenShown = false;
+
if (!m_shouldAttachWhenShown) {
// Put the Inspector's WebView inside our window and show it.
- m_webView->setHostWindow(reinterpret_cast<OLE_HANDLE>(m_hwnd));
- SendMessage(m_hwnd, WM_SIZE, 0, 0);
+ m_frontendWebView->setHostWindow(reinterpret_cast<OLE_HANDLE>(m_frontendHwnd));
+ SendMessage(m_frontendHwnd, WM_SIZE, 0, 0);
updateWindowTitle();
- SetWindowPos(m_hwnd, HWND_TOP, 0, 0, 0, 0, SWP_SHOWWINDOW | SWP_NOMOVE | SWP_NOSIZE);
+ SetWindowPos(m_frontendHwnd, HWND_TOP, 0, 0, 0, 0, SWP_SHOWWINDOW | SWP_NOMOVE | SWP_NOSIZE);
return;
}
@@ -370,20 +378,32 @@ void WebInspectorClient::showWindowWithoutNotifications()
if (FAILED(m_inspectedWebView->hostWindow(reinterpret_cast<OLE_HANDLE*>(&hostWindow))))
return;
- m_webView->setHostWindow(reinterpret_cast<OLE_HANDLE>(hostWindow));
+ m_frontendWebView->setHostWindow(reinterpret_cast<OLE_HANDLE>(hostWindow));
// Then hide our own window.
- ShowWindow(m_hwnd, SW_HIDE);
+ ShowWindow(m_frontendHwnd, SW_HIDE);
m_attached = true;
// Make sure everything has the right size/position.
SendMessage(hostWindow, WM_SIZE, 0, 0);
- if (m_highlight && m_highlight->isShowing())
- m_highlight->update();
+ m_inspectorClient->updateHighlight();
+}
+
+void WebInspectorFrontendClient::destroyInspectorView()
+{
+ if (m_destroyingInspectorView)
+ return;
+ m_destroyingInspectorView = true;
+
+ m_inspectedWebView->page()->inspectorController()->disconnectFrontend();
+
+ closeWindowWithoutNotifications();
+ m_inspectorClient->frontendClosing();
+ ::DestroyWindow(m_frontendHwnd);
}
-void WebInspectorClient::updateWindowTitle()
+void WebInspectorFrontendClient::updateWindowTitle()
{
// FIXME: The series of appends should be replaced with a call to String::format()
// when it can be figured out how to get the unicode em-dash to show up.
@@ -391,10 +411,10 @@ void WebInspectorClient::updateWindowTitle()
title.append((UChar)0x2014); // em-dash
title.append(' ');
title.append(m_inspectedURL);
- ::SetWindowText(m_hwnd, title.charactersWithNullTermination());
+ ::SetWindowText(m_frontendHwnd, title.charactersWithNullTermination());
}
-LRESULT WebInspectorClient::onGetMinMaxInfo(WPARAM, LPARAM lParam)
+LRESULT WebInspectorFrontendClient::onGetMinMaxInfo(WPARAM, LPARAM lParam)
{
MINMAXINFO* info = reinterpret_cast<MINMAXINFO*>(lParam);
POINT size = {400, 400};
@@ -403,33 +423,31 @@ LRESULT WebInspectorClient::onGetMinMaxInfo(WPARAM, LPARAM lParam)
return 0;
}
-LRESULT WebInspectorClient::onSize(WPARAM, LPARAM)
+LRESULT WebInspectorFrontendClient::onSize(WPARAM, LPARAM)
{
RECT rect;
- ::GetClientRect(m_hwnd, &rect);
+ ::GetClientRect(m_frontendHwnd, &rect);
- ::SetWindowPos(m_webViewHwnd, 0, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, SWP_NOZORDER);
+ ::SetWindowPos(m_frontendWebViewHwnd, 0, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, SWP_NOZORDER);
return 0;
}
-LRESULT WebInspectorClient::onClose(WPARAM, LPARAM)
+LRESULT WebInspectorFrontendClient::onClose(WPARAM, LPARAM)
{
- ::ShowWindow(m_hwnd, SW_HIDE);
- m_inspectedWebView->page()->inspectorController()->setWindowVisible(false, m_shouldAttachWhenShown);
-
- hideHighlight();
+ ::ShowWindow(m_frontendHwnd, SW_HIDE);
+ m_inspectedWebView->page()->inspectorController()->close();
return 0;
}
-LRESULT WebInspectorClient::onSetFocus()
+LRESULT WebInspectorFrontendClient::onSetFocus()
{
- SetFocus(m_webViewHwnd);
+ SetFocus(m_frontendWebViewHwnd);
return 0;
}
-void WebInspectorClient::onWebViewWindowPosChanging(WPARAM, LPARAM lParam)
+void WebInspectorFrontendClient::onWebViewWindowPosChanging(WPARAM, LPARAM lParam)
{
ASSERT(m_attached);
@@ -440,17 +458,17 @@ void WebInspectorClient::onWebViewWindowPosChanging(WPARAM, LPARAM lParam)
return;
RECT inspectorRect;
- GetClientRect(m_webViewHwnd, &inspectorRect);
+ GetClientRect(m_frontendWebViewHwnd, &inspectorRect);
unsigned inspectorHeight = inspectorRect.bottom - inspectorRect.top;
windowPos->cy -= inspectorHeight;
- SetWindowPos(m_webViewHwnd, 0, windowPos->x, windowPos->y + windowPos->cy, windowPos->cx, inspectorHeight, SWP_NOZORDER);
+ SetWindowPos(m_frontendWebViewHwnd, 0, windowPos->x, windowPos->y + windowPos->cy, windowPos->cx, inspectorHeight, SWP_NOZORDER);
}
static LRESULT CALLBACK WebInspectorWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
- WebInspectorClient* client = reinterpret_cast<WebInspectorClient*>(::GetProp(hwnd, kWebInspectorPointerProp));
+ WebInspectorFrontendClient* client = reinterpret_cast<WebInspectorFrontendClient*>(::GetProp(hwnd, kWebInspectorPointerProp));
if (!client)
return ::DefWindowProc(hwnd, msg, wParam, lParam);
@@ -470,7 +488,7 @@ static LRESULT CALLBACK WebInspectorWndProc(HWND hwnd, UINT msg, WPARAM wParam,
return ::DefWindowProc(hwnd, msg, wParam, lParam);
}
-void WebInspectorClient::windowReceivedMessage(HWND, UINT msg, WPARAM wParam, LPARAM lParam)
+void WebInspectorFrontendClient::windowReceivedMessage(HWND, UINT msg, WPARAM wParam, LPARAM lParam)
{
switch (msg) {
case WM_WINDOWPOSCHANGING:
diff --git a/WebKit/win/WebCoreSupport/WebInspectorClient.h b/WebKit/win/WebCoreSupport/WebInspectorClient.h
index 3f65b0a..455e3a1 100644
--- a/WebKit/win/WebCoreSupport/WebInspectorClient.h
+++ b/WebKit/win/WebCoreSupport/WebInspectorClient.h
@@ -31,6 +31,7 @@
#include <WebCore/COMPtr.h>
#include <WebCore/InspectorClient.h>
+#include <WebCore/InspectorFrontendClientLocal.h>
#include <WebCore/PlatformString.h>
#include <WebCore/WindowMessageListener.h>
#include <wtf/OwnPtr.h>
@@ -39,44 +40,60 @@
class WebNodeHighlight;
class WebView;
-class WebInspectorClient : public WebCore::InspectorClient, WebCore::WindowMessageListener {
+class WebInspectorClient : public WebCore::InspectorClient {
public:
WebInspectorClient(WebView*);
// InspectorClient
virtual void inspectorDestroyed();
- virtual WebCore::Page* createPage();
-
- virtual WebCore::String localizedStringsURL();
-
- virtual WebCore::String hiddenPanels();
-
- virtual void showWindow();
- virtual void closeWindow();
- virtual bool windowVisible();
-
- virtual void attachWindow();
- virtual void detachWindow();
-
- virtual void setAttachedWindowHeight(unsigned height);
+ virtual void openInspectorFrontend(WebCore::InspectorController*);
virtual void highlight(WebCore::Node*);
virtual void hideHighlight();
- virtual void inspectedURLChanged(const WebCore::String& newURL);
-
virtual void populateSetting(const WebCore::String& key, WebCore::String* value);
virtual void storeSetting(const WebCore::String& key, const WebCore::String& value);
- virtual void inspectorWindowObjectCleared();
+ void updateHighlight();
+ void frontendClosing() { m_frontendHwnd = 0; }
private:
~WebInspectorClient();
+ WebView* m_inspectedWebView;
+ HWND m_inspectedWebViewHwnd;
+ HWND m_frontendHwnd;
+
+ OwnPtr<WebNodeHighlight> m_highlight;
+};
+
+class WebInspectorFrontendClient : public WebCore::InspectorFrontendClientLocal, WebCore::WindowMessageListener {
+public:
+ WebInspectorFrontendClient(WebView* inspectedWebView, HWND inspectedWebViewHwnd, HWND frontendHwnd, const COMPtr<WebView>& frotnendWebView, HWND frontendWebViewHwnd, WebInspectorClient* inspectorClient);
+
+ virtual void frontendLoaded();
+
+ virtual WebCore::String localizedStringsURL();
+ virtual WebCore::String hiddenPanels();
+
+ virtual void bringToFront();
+ virtual void closeWindow();
+
+ virtual void attachWindow();
+ virtual void detachWindow();
+
+ virtual void setAttachedWindowHeight(unsigned height);
+ virtual void inspectedURLChanged(const WebCore::String& newURL);
+
+private:
+ ~WebInspectorFrontendClient();
+
void closeWindowWithoutNotifications();
void showWindowWithoutNotifications();
+ void destroyInspectorView();
+
void updateWindowTitle();
LRESULT onGetMinMaxInfo(WPARAM, LPARAM);
@@ -90,16 +107,16 @@ private:
WebView* m_inspectedWebView;
HWND m_inspectedWebViewHwnd;
- HWND m_hwnd;
- COMPtr<WebView> m_webView;
- HWND m_webViewHwnd;
+ HWND m_frontendHwnd;
+ WebInspectorClient* m_inspectorClient;
+ COMPtr<WebView> m_frontendWebView;
+ HWND m_frontendWebViewHwnd;
bool m_shouldAttachWhenShown;
bool m_attached;
- OwnPtr<WebNodeHighlight> m_highlight;
-
WebCore::String m_inspectedURL;
+ bool m_destroyingInspectorView;
static friend LRESULT CALLBACK WebInspectorWndProc(HWND, UINT, WPARAM, LPARAM);
};
diff --git a/WebKit/win/WebDownload.cpp b/WebKit/win/WebDownload.cpp
index 0893a73..fc72232 100644
--- a/WebKit/win/WebDownload.cpp
+++ b/WebKit/win/WebDownload.cpp
@@ -27,7 +27,6 @@
#include "WebKitDLL.h"
#include "WebDownload.h"
-#include "CString.h"
#include "DefaultDownloadDelegate.h"
#include "MarshallingHelpers.h"
#include "WebError.h"
@@ -37,6 +36,7 @@
#include "WebURLAuthenticationChallenge.h"
#include "WebURLCredential.h"
#include "WebURLResponse.h"
+#include <wtf/text/CString.h>
#include <io.h>
#include <sys/stat.h>
diff --git a/WebKit/win/WebDownloadCFNet.cpp b/WebKit/win/WebDownloadCFNet.cpp
index d1ff23d..a199315 100644
--- a/WebKit/win/WebDownloadCFNet.cpp
+++ b/WebKit/win/WebDownloadCFNet.cpp
@@ -27,7 +27,6 @@
#include "WebKitDLL.h"
#include "WebDownload.h"
-#include "CString.h"
#include "DefaultDownloadDelegate.h"
#include "MarshallingHelpers.h"
#include "WebError.h"
@@ -39,6 +38,7 @@
#include "WebURLResponse.h"
#include <wtf/platform.h>
+#include <wtf/text/CString.h>
#include <io.h>
#include <sys/stat.h>
diff --git a/WebKit/win/WebDownloadCurl.cpp b/WebKit/win/WebDownloadCurl.cpp
index 608830b..2025922 100644
--- a/WebKit/win/WebDownloadCurl.cpp
+++ b/WebKit/win/WebDownloadCurl.cpp
@@ -27,7 +27,6 @@
#include "WebKitDLL.h"
#include "WebDownload.h"
-#include "CString.h"
#include "DefaultDownloadDelegate.h"
#include "MarshallingHelpers.h"
#include "WebError.h"
@@ -39,6 +38,7 @@
#include "WebURLResponse.h"
#include <wtf/platform.h>
+#include <wtf/text/CString.h>
#include <io.h>
#include <sys/stat.h>
diff --git a/WebKit/win/WebFrame.cpp b/WebKit/win/WebFrame.cpp
index 8e03794..01cc2b1 100644
--- a/WebKit/win/WebFrame.cpp
+++ b/WebKit/win/WebFrame.cpp
@@ -1074,7 +1074,7 @@ void WebFrame::setTextSizeMultiplier(float multiplier)
{
Frame* coreFrame = core(this);
ASSERT(coreFrame);
- coreFrame->setZoomFactor(multiplier, true);
+ coreFrame->setZoomFactor(multiplier, ZoomTextOnly);
}
HRESULT WebFrame::inViewSourceMode(BOOL* flag)
@@ -1152,7 +1152,7 @@ HRESULT WebFrame::elementDoesAutoComplete(IDOMElement *element, BOOL *result)
if (!inputElement)
*result = false;
else
- *result = (inputElement->inputType() == HTMLInputElement::TEXT && inputElement->autoComplete());
+ *result = inputElement->isTextField() && inputElement->inputType() != HTMLInputElement::PASSWORD && inputElement->autoComplete();
return S_OK;
}
@@ -1435,6 +1435,21 @@ HRESULT WebFrame::canProvideDocumentSource(bool* result)
return hr;
}
+HRESULT STDMETHODCALLTYPE WebFrame::layerTreeAsText(BSTR* result)
+{
+ if (!result)
+ return E_POINTER;
+ *result = 0;
+
+ Frame* frame = core(this);
+ if (!frame)
+ return E_FAIL;
+
+ String text = frame->layerTreeAsText();
+ *result = BString(text).release();
+ return S_OK;
+}
+
void WebFrame::frameLoaderDestroyed()
{
// The FrameLoader going away is equivalent to the Frame going away,
@@ -2410,7 +2425,7 @@ HRESULT WebFrame::stringByEvaluatingJavaScriptInScriptWorld(IWebScriptWorld* iWo
return S_OK;
JSLock lock(SilenceAssertionsOnly);
- String resultString = String(result.toString(anyWorldGlobalObject->globalExec()));
+ String resultString = ustringToString(result.toString(anyWorldGlobalObject->globalExec()));
*evaluationResult = BString(resultString).release();
return S_OK;
@@ -2473,3 +2488,4 @@ void WebFrame::updateBackground()
coreFrame->view()->updateBackgroundRecursively(backgroundColor, webView()->transparent());
}
+
diff --git a/WebKit/win/WebFrame.h b/WebKit/win/WebFrame.h
index f4973ea..0f1e4d8 100644
--- a/WebKit/win/WebFrame.h
+++ b/WebKit/win/WebFrame.h
@@ -265,6 +265,8 @@ public:
virtual HRESULT STDMETHODCALLTYPE visibleContentRect(RECT*);
+ virtual HRESULT STDMETHODCALLTYPE layerTreeAsText(BSTR*);
+
// IWebDocumentText
virtual HRESULT STDMETHODCALLTYPE supportsTextEncoding(
/* [retval][out] */ BOOL* result);
diff --git a/WebKit/win/WebHistoryItem.cpp b/WebKit/win/WebHistoryItem.cpp
index aa839d6..098eb86 100644
--- a/WebKit/win/WebHistoryItem.cpp
+++ b/WebKit/win/WebHistoryItem.cpp
@@ -34,13 +34,13 @@
#pragma warning(push, 0)
#include <WebCore/BString.h>
-#include <WebCore/CString.h>
#include <WebCore/HistoryItem.h>
#include <WebCore/KURL.h>
#pragma warning(pop)
#include <wtf/PassOwnPtr.h>
#include <wtf/RetainPtr.h>
+#include <wtf/text/CString.h>
using namespace WebCore;
diff --git a/WebKit/win/WebInspector.cpp b/WebKit/win/WebInspector.cpp
index e4ac32b..0337711 100644
--- a/WebKit/win/WebInspector.cpp
+++ b/WebKit/win/WebInspector.cpp
@@ -131,19 +131,11 @@ HRESULT STDMETHODCALLTYPE WebInspector::close()
HRESULT STDMETHODCALLTYPE WebInspector::attach()
{
- if (m_webView)
- if (Page* page = m_webView->page())
- page->inspectorController()->attachWindow();
-
return S_OK;
}
HRESULT STDMETHODCALLTYPE WebInspector::detach()
{
- if (m_webView)
- if (Page* page = m_webView->page())
- page->inspectorController()->detachWindow();
-
return S_OK;
}
diff --git a/WebKit/win/WebKit.vcproj/Interfaces.vcproj b/WebKit/win/WebKit.vcproj/Interfaces.vcproj
index c6a0add..0dab8a8 100644
--- a/WebKit/win/WebKit.vcproj/Interfaces.vcproj
+++ b/WebKit/win/WebKit.vcproj/Interfaces.vcproj
@@ -1664,6 +1664,26 @@
</FileConfiguration>
</File>
<File
+ RelativePath="..\Interfaces\IWebUserContentURLPattern.idl"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
RelativePath="..\Interfaces\IWebView.idl"
>
<FileConfiguration
diff --git a/WebKit/win/WebKit.vcproj/WebKit.def b/WebKit/win/WebKit.vcproj/WebKit.def
index 9e6e55f..8d091ec 100644
--- a/WebKit/win/WebKit.vcproj/WebKit.def
+++ b/WebKit/win/WebKit.vcproj/WebKit.def
@@ -20,7 +20,6 @@ EXPORTS
WebKitSetShouldUseFontSmoothing
WebKitShouldUseFontSmoothing
WebKitCreateInstance
- WebKitSystemParameterChanged
; These functions are deprecated
WebLocalizedString
diff --git a/WebKit/win/WebKit.vcproj/WebKit.vcproj b/WebKit/win/WebKit.vcproj/WebKit.vcproj
index 57d1da2..36345ed 100644
--- a/WebKit/win/WebKit.vcproj/WebKit.vcproj
+++ b/WebKit/win/WebKit.vcproj/WebKit.vcproj
@@ -63,7 +63,7 @@
OutputFile="$(OutDir)\$(ProjectName)$(WebKitDLLConfigSuffix).dll"
AdditionalLibraryDirectories="$(DXSDK_DIR)\Lib\x86"
ModuleDefinitionFile="WebKit$(WebKitDLLConfigSuffix).def"
- DelayLoadDLLs="comdlg32.dll;usp10.dll;comctl32.dll;version.dll;libxslt$(LibraryConfigSuffix).dll;SQLite3$(LibraryConfigSuffix).dll;msimg32.dll;QTMovieWin$(WebKitConfigSuffix).dll;iphlpapi.dll;rpcrt4.dll;QuartzCore.dll;QuartzCoreInterface.dll"
+ DelayLoadDLLs="comdlg32.dll;usp10.dll;comctl32.dll;version.dll;libxslt$(LibraryConfigSuffix).dll;SQLite3$(LibraryConfigSuffix).dll;msimg32.dll;QTMovieWin$(WebKitConfigSuffix).dll;iphlpapi.dll;rpcrt4.dll"
/>
<Tool
Name="VCALinkTool"
@@ -140,7 +140,7 @@
OutputFile="$(OutDir)\$(ProjectName)$(WebKitDLLConfigSuffix).dll"
AdditionalLibraryDirectories="$(DXSDK_DIR)\Lib\x86"
ModuleDefinitionFile="WebKit$(WebKitDLLConfigSuffix).def"
- DelayLoadDLLs="comdlg32.dll;usp10.dll;comctl32.dll;version.dll;libxslt$(LibraryConfigSuffix).dll;SQLite3$(LibraryConfigSuffix).dll;msimg32.dll;QTMovieWin$(WebKitConfigSuffix).dll;iphlpapi.dll;rpcrt4.dll;QuartzCore.dll;QuartzCoreInterface.dll"
+ DelayLoadDLLs="comdlg32.dll;usp10.dll;comctl32.dll;version.dll;libxslt$(LibraryConfigSuffix).dll;SQLite3$(LibraryConfigSuffix).dll;msimg32.dll;QTMovieWin$(WebKitConfigSuffix).dll;iphlpapi.dll;rpcrt4.dll"
/>
<Tool
Name="VCALinkTool"
@@ -217,7 +217,7 @@
OutputFile="$(OutDir)\$(ProjectName)$(WebKitDLLConfigSuffix).dll"
AdditionalLibraryDirectories="$(DXSDK_DIR)\Lib\x86"
ModuleDefinitionFile="WebKit$(WebKitDLLConfigSuffix).def"
- DelayLoadDLLs="comdlg32.dll;usp10.dll;comctl32.dll;version.dll;libxslt$(LibraryConfigSuffix).dll;SQLite3$(LibraryConfigSuffix).dll;msimg32.dll;QTMovieWin$(WebKitConfigSuffix).dll;iphlpapi.dll;rpcrt4.dll;QuartzCore.dll;QuartzCoreInterface.dll"
+ DelayLoadDLLs="comdlg32.dll;usp10.dll;comctl32.dll;version.dll;libxslt$(LibraryConfigSuffix).dll;SQLite3$(LibraryConfigSuffix).dll;msimg32.dll;QTMovieWin$(WebKitConfigSuffix).dll;iphlpapi.dll;rpcrt4.dll"
/>
<Tool
Name="VCALinkTool"
@@ -846,6 +846,10 @@
>
</File>
<File
+ RelativePath="..\WebUserContentURLPattern.h"
+ >
+ </File>
+ <File
RelativePath="..\WebView.h"
>
</File>
@@ -1258,6 +1262,10 @@
>
</File>
<File
+ RelativePath="..\WebUserContentURLPattern.cpp"
+ >
+ </File>
+ <File
RelativePath="..\WebView.cpp"
>
</File>
diff --git a/WebKit/win/WebKit.vcproj/WebKit_debug.def b/WebKit/win/WebKit.vcproj/WebKit_debug.def
index fac9d6f..c15957a 100644
--- a/WebKit/win/WebKit.vcproj/WebKit_debug.def
+++ b/WebKit/win/WebKit.vcproj/WebKit_debug.def
@@ -20,7 +20,6 @@ EXPORTS
WebKitSetShouldUseFontSmoothing
WebKitShouldUseFontSmoothing
WebKitCreateInstance
- WebKitSystemParameterChanged
; These functions are deprecated
WebLocalizedString
diff --git a/WebKit/win/WebKitClassFactory.cpp b/WebKit/win/WebKitClassFactory.cpp
index d243588..8a956e3 100644
--- a/WebKit/win/WebKitClassFactory.cpp
+++ b/WebKit/win/WebKitClassFactory.cpp
@@ -54,11 +54,11 @@
#include "WebURLCredential.h"
#include "WebURLProtectionSpace.h"
#include "WebURLResponse.h"
+#include "WebUserContentURLPattern.h"
#include "WebView.h"
#include "WebWorkersPrivate.h"
#pragma warning(push, 0)
#include <JavaScriptCore/InitializeThreading.h>
-#include <WebCore/FontDatabase.h>
#include <WebCore/SoftLinking.h>
#pragma warning(pop)
@@ -87,7 +87,6 @@ WebKitClassFactory::WebKitClassFactory(CLSID targetClass)
#endif
JSC::initializeThreading();
- WebCore::populateFontDatabase();
gClassCount++;
gClassNameCount.add("WebKitClassFactory");
diff --git a/WebKit/win/WebKitDLL.cpp b/WebKit/win/WebKitDLL.cpp
index 9f4eaeb..f8aa261 100644
--- a/WebKit/win/WebKitDLL.cpp
+++ b/WebKit/win/WebKitDLL.cpp
@@ -36,6 +36,7 @@
#include <WebCore/PageGroup.h>
#include <WebCore/RenderThemeWin.h>
#include <WebCore/SharedBuffer.h>
+#include <WebCore/WebCoreInstanceHandle.h>
#include <WebCore/Widget.h>
#include <wtf/Vector.h>
#include <tchar.h>
@@ -60,7 +61,7 @@ STDAPI_(BOOL) DllMain( HMODULE hModule, DWORD ul_reason_for_call, LPVOID /*lpRe
case DLL_PROCESS_ATTACH:
gLockCount = gClassCount = 0;
gInstance = hModule;
- WebCore::Page::setInstanceHandle(hModule);
+ WebCore::setInstanceHandle(hModule);
return TRUE;
case DLL_PROCESS_DETACH:
diff --git a/WebKit/win/WebKitGraphics.cpp b/WebKit/win/WebKitGraphics.cpp
index 444c43c..d7123b4 100644
--- a/WebKit/win/WebKitGraphics.cpp
+++ b/WebKit/win/WebKitGraphics.cpp
@@ -34,7 +34,6 @@
#pragma warning(push, 0)
#include <WebCore/CharacterNames.h>
#include <WebCore/Font.h>
-#include <WebCore/FontDatabase.h>
#include <WebCore/FontDescription.h>
#include <WebCore/FontSelector.h>
#include <WebCore/GraphicsContext.h>
@@ -52,7 +51,6 @@ using namespace WebCore;
static Font makeFont(const WebFontDescription& description)
{
AtomicString::init();
- populateFontDatabase();
String fontFamilyString(description.family, description.familyLength);
@@ -175,9 +173,3 @@ bool WebKitShouldUseFontSmoothing()
{
return WebCoreShouldUseFontSmoothing();
}
-
-void WebKitSystemParameterChanged(UINT parameter)
-{
- if (parameter == SPI_SETFONTSMOOTHING || parameter == SPI_SETFONTSMOOTHINGTYPE || parameter == SPI_SETFONTSMOOTHINGCONTRAST || parameter == SPI_SETFONTSMOOTHINGORIENTATION)
- wkSystemFontSmoothingChanged();
-}
diff --git a/WebKit/win/WebKitGraphics.h b/WebKit/win/WebKitGraphics.h
index 75ab36c..59c874b 100644
--- a/WebKit/win/WebKitGraphics.h
+++ b/WebKit/win/WebKitGraphics.h
@@ -74,8 +74,6 @@ unsigned RightTruncateStringToWidth(LPCTSTR text, int length, const WebFontDescr
void WebKitSetShouldUseFontSmoothing(bool);
bool WebKitShouldUseFontSmoothing();
-void WebKitSystemParameterChanged(UINT parameter);
-
}
#endif // !defined(WebKitGraphics_h)
diff --git a/WebKit/win/WebKitPrefix.h b/WebKit/win/WebKitPrefix.h
index 13cf8e0..9b2fc85 100644
--- a/WebKit/win/WebKitPrefix.h
+++ b/WebKit/win/WebKitPrefix.h
@@ -47,4 +47,5 @@
#define _WINSOCKAPI_ // Prevent inclusion of winsock.h in windows.h
#endif
+#include <CoreFoundation/CoreFoundation.h>
#include <WebKit/WebKit.h>
diff --git a/WebKit/win/WebLocalizableStrings.cpp b/WebKit/win/WebLocalizableStrings.cpp
index 69675e2..ab2db5d 100644
--- a/WebKit/win/WebLocalizableStrings.cpp
+++ b/WebKit/win/WebLocalizableStrings.cpp
@@ -29,9 +29,9 @@
#include "WebLocalizableStrings.h"
#pragma warning(push, 0)
-#include <WebCore/CString.h>
#include <WebCore/PlatformString.h>
#include <WebCore/StringHash.h>
+#include <wtf/text/CString.h>
#pragma warning(pop)
#include <wtf/Assertions.h>
diff --git a/WebKit/win/WebMutableURLRequest.cpp b/WebKit/win/WebMutableURLRequest.cpp
index 69555c8..655b411 100644
--- a/WebKit/win/WebMutableURLRequest.cpp
+++ b/WebKit/win/WebMutableURLRequest.cpp
@@ -33,10 +33,10 @@
#pragma warning(push, 0)
#include <WebCore/BString.h>
#include <WebCore/COMPtr.h>
-#include <WebCore/CString.h>
#include <WebCore/FormData.h>
#include <WebCore/NotImplemented.h>
#include <WebCore/ResourceHandle.h>
+#include <wtf/text/CString.h>
#pragma warning(pop)
#include <wtf/RetainPtr.h>
diff --git a/WebKit/win/WebPreferenceKeysPrivate.h b/WebKit/win/WebPreferenceKeysPrivate.h
index d1e0f5e..c57934c 100644
--- a/WebKit/win/WebPreferenceKeysPrivate.h
+++ b/WebKit/win/WebPreferenceKeysPrivate.h
@@ -131,8 +131,12 @@
#define WebKitPluginAllowedRunTimePreferenceKey "WebKitPluginAllowedRunTime"
-#define WebKitFrameSetFlatteningEnabledPreferenceKey "WebKitFrameSetFlatteningEnabled"
+#define WebKitFrameFlatteningEnabledPreferenceKey "WebKitFrameFlatteningEnabled"
#define WebKitAcceleratedCompositingEnabledPreferenceKey "WebKitAcceleratedCompositingEnabled"
+#define WebKitShowDebugBordersPreferenceKey "WebKitShowDebugBorders"
+
+#define WebKitShowRepaintCounterPreferenceKey "WebKitShowRepaintCounter"
+
#define WebKitCustomDragCursorsEnabledPreferenceKey "WebKitCustomDragCursorsEnabled"
diff --git a/WebKit/win/WebPreferences.cpp b/WebKit/win/WebPreferences.cpp
index 0e44d9f..b5937cb 100644
--- a/WebKit/win/WebPreferences.cpp
+++ b/WebKit/win/WebPreferences.cpp
@@ -32,7 +32,6 @@
#include "WebNotificationCenter.h"
#include "WebPreferenceKeysPrivate.h"
-#include <WebCore/CString.h>
#include <WebCore/FileSystem.h>
#include <WebCore/Font.h>
#include <WebCore/PlatformString.h>
@@ -46,6 +45,7 @@
#include <tchar.h>
#include <wtf/HashMap.h>
#include <wtf/OwnArrayPtr.h>
+#include <wtf/text/CString.h>
#if PLATFORM(CG)
#include <CoreGraphics/CoreGraphics.h>
@@ -207,7 +207,7 @@ void WebPreferences::initializeDefaultSettings()
CFDictionaryAddValue(defaults, CFSTR(WebKitAllowUniversalAccessFromFileURLsPreferenceKey), kCFBooleanFalse);
CFDictionaryAddValue(defaults, CFSTR(WebKitAllowFileAccessFromFileURLsPreferenceKey), kCFBooleanTrue);
CFDictionaryAddValue(defaults, CFSTR(WebKitXSSAuditorEnabledPreferenceKey), kCFBooleanTrue);
- CFDictionaryAddValue(defaults, CFSTR(WebKitFrameSetFlatteningEnabledPreferenceKey), kCFBooleanFalse);
+ CFDictionaryAddValue(defaults, CFSTR(WebKitFrameFlatteningEnabledPreferenceKey), kCFBooleanFalse);
CFDictionaryAddValue(defaults, CFSTR(WebKitJavaScriptCanOpenWindowsAutomaticallyPreferenceKey), kCFBooleanTrue);
CFDictionaryAddValue(defaults, CFSTR(WebKitPluginsEnabledPreferenceKey), kCFBooleanTrue);
CFDictionaryAddValue(defaults, CFSTR(WebKitDatabasesEnabledPreferenceKey), kCFBooleanTrue);
@@ -256,7 +256,9 @@ void WebPreferences::initializeDefaultSettings()
RetainPtr<CFStringRef> pluginAllowedRunTime(AdoptCF, CFStringCreateWithFormat(0, 0, CFSTR("%u"), numeric_limits<unsigned>::max()));
CFDictionaryAddValue(defaults, CFSTR(WebKitPluginAllowedRunTimePreferenceKey), pluginAllowedRunTime.get());
- CFDictionaryAddValue(defaults, CFSTR(WebKitAcceleratedCompositingEnabledPreferenceKey), kCFBooleanTrue);
+ CFDictionaryAddValue(defaults, CFSTR(WebKitAcceleratedCompositingEnabledPreferenceKey), kCFBooleanFalse);
+
+ CFDictionaryAddValue(defaults, CFSTR(WebKitShowDebugBordersPreferenceKey), kCFBooleanFalse);
defaultSettings = defaults;
}
@@ -420,7 +422,7 @@ void WebPreferences::migrateWebKitPreferencesToCFPreferences()
setBoolValue(didMigrateKey, TRUE);
m_autoSaves = oldValue;
- CString path = oldPreferencesPath().utf8();
+ WTF::CString path = oldPreferencesPath().utf8();
RetainPtr<CFURLRef> urlRef(AdoptCF, CFURLCreateFromFileSystemRepresentation(0, reinterpret_cast<const UInt8*>(path.data()), path.length(), false));
if (!urlRef)
@@ -821,17 +823,17 @@ HRESULT STDMETHODCALLTYPE WebPreferences::setXSSAuditorEnabled(
return S_OK;
}
-HRESULT STDMETHODCALLTYPE WebPreferences::isFrameSetFlatteningEnabled(
+HRESULT STDMETHODCALLTYPE WebPreferences::isFrameFlatteningEnabled(
/* [retval][out] */ BOOL* enabled)
{
- *enabled = boolValueForKey(CFSTR(WebKitFrameSetFlatteningEnabledPreferenceKey));
+ *enabled = boolValueForKey(CFSTR(WebKitFrameFlatteningEnabledPreferenceKey));
return S_OK;
}
-HRESULT STDMETHODCALLTYPE WebPreferences::setFrameSetFlatteningEnabled(
+HRESULT STDMETHODCALLTYPE WebPreferences::setFrameFlatteningEnabled(
/* [in] */ BOOL enabled)
{
- setBoolValue(CFSTR(WebKitFrameSetFlatteningEnabledPreferenceKey), enabled);
+ setBoolValue(CFSTR(WebKitFrameFlatteningEnabledPreferenceKey), enabled);
return S_OK;
}
@@ -1403,6 +1405,30 @@ HRESULT WebPreferences::acceleratedCompositingEnabled(BOOL* enabled)
return S_OK;
}
+HRESULT WebPreferences::showDebugBorders(BOOL* enabled)
+{
+ *enabled = boolValueForKey(CFSTR(WebKitShowDebugBordersPreferenceKey));
+ return S_OK;
+}
+
+HRESULT WebPreferences::setShowDebugBorders(BOOL enabled)
+{
+ setBoolValue(CFSTR(WebKitShowDebugBordersPreferenceKey), enabled);
+ return S_OK;
+}
+
+HRESULT WebPreferences::showRepaintCounter(BOOL* enabled)
+{
+ *enabled = boolValueForKey(CFSTR(WebKitShowRepaintCounterPreferenceKey));
+ return S_OK;
+}
+
+HRESULT WebPreferences::setShowRepaintCounter(BOOL enabled)
+{
+ setBoolValue(CFSTR(WebKitShowRepaintCounterPreferenceKey), enabled);
+ return S_OK;
+}
+
HRESULT WebPreferences::setCustomDragCursorsEnabled(BOOL enabled)
{
setBoolValue(CFSTR(WebKitCustomDragCursorsEnabledPreferenceKey), enabled);
diff --git a/WebKit/win/WebPreferences.h b/WebKit/win/WebPreferences.h
index e4af17a..241178d 100644
--- a/WebKit/win/WebPreferences.h
+++ b/WebKit/win/WebPreferences.h
@@ -386,10 +386,10 @@ public:
virtual HRESULT STDMETHODCALLTYPE pluginAllowedRunTime(
/* [retval][out] */ UINT* allowedRunTime);
- virtual HRESULT STDMETHODCALLTYPE isFrameSetFlatteningEnabled(
+ virtual HRESULT STDMETHODCALLTYPE isFrameFlatteningEnabled(
/* [retval][out] */ BOOL* enabled);
- virtual HRESULT STDMETHODCALLTYPE setFrameSetFlatteningEnabled(
+ virtual HRESULT STDMETHODCALLTYPE setFrameFlatteningEnabled(
/* [in] */ BOOL enabled);
virtual HRESULT STDMETHODCALLTYPE setPreferenceForTest(
@@ -402,7 +402,13 @@ public:
virtual HRESULT STDMETHODCALLTYPE setCustomDragCursorsEnabled(BOOL);
virtual HRESULT STDMETHODCALLTYPE customDragCursorsEnabled(BOOL*);
- // WebPreferences
+ virtual HRESULT STDMETHODCALLTYPE setShowDebugBorders(BOOL);
+ virtual HRESULT STDMETHODCALLTYPE showDebugBorders(BOOL*);
+
+ virtual HRESULT STDMETHODCALLTYPE setShowRepaintCounter(BOOL);
+ virtual HRESULT STDMETHODCALLTYPE showRepaintCounter(BOOL*);
+
+ // WebPreferences
// This method accesses a different preference key than developerExtrasEnabled.
// See <rdar://5343767> for the justification.
diff --git a/WebKit/win/WebScriptWorld.cpp b/WebKit/win/WebScriptWorld.cpp
index 7bc04eb..9c661d9 100644
--- a/WebKit/win/WebScriptWorld.cpp
+++ b/WebKit/win/WebScriptWorld.cpp
@@ -136,3 +136,9 @@ HRESULT WebScriptWorld::scriptWorldForGlobalContext(JSGlobalContextRef context,
return E_POINTER;
return findOrCreateWorld(currentWorld(toJS(context))).copyRefTo(outWorld);
}
+
+HRESULT WebScriptWorld::unregisterWorld()
+{
+ m_world->unregisterWorld();
+ return S_OK;
+}
diff --git a/WebKit/win/WebScriptWorld.h b/WebKit/win/WebScriptWorld.h
index dc7e9db..f088a72 100644
--- a/WebKit/win/WebScriptWorld.h
+++ b/WebKit/win/WebScriptWorld.h
@@ -52,6 +52,7 @@ private:
virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID, void** ppvObject);
virtual HRESULT STDMETHODCALLTYPE standardWorld(IWebScriptWorld**);
virtual HRESULT STDMETHODCALLTYPE scriptWorldForGlobalContext(JSGlobalContextRef, IWebScriptWorld**);
+ virtual HRESULT STDMETHODCALLTYPE unregisterWorld();
ULONG m_refCount;
RefPtr<WebCore::DOMWrapperWorld> m_world;
diff --git a/WebKit/win/WebTextRenderer.cpp b/WebKit/win/WebTextRenderer.cpp
index 7ff2ff3..6d6d9a3 100644
--- a/WebKit/win/WebTextRenderer.cpp
+++ b/WebKit/win/WebTextRenderer.cpp
@@ -31,12 +31,6 @@
#include "WebKitDLL.h"
-#include <CoreFoundation/CFString.h>
-#if PLATFORM(CG)
-#include <WebKitSystemInterface/WebKitSystemInterface.h>
-#endif
-#include <wtf/RetainPtr.h>
-
WebTextRenderer* WebTextRenderer::createInstance()
{
WebTextRenderer* instance = new WebTextRenderer;
@@ -91,9 +85,5 @@ HRESULT STDMETHODCALLTYPE WebTextRenderer::registerPrivateFont(
if (!AddFontResourceEx(fontFilePath, FR_PRIVATE, 0))
return E_FAIL;
- RetainPtr<CFStringRef> string(AdoptCF, CFStringCreateWithCharacters(0, reinterpret_cast<const UniChar*>(fontFilePath), static_cast<CFIndex>(wcslen(fontFilePath))));
-#if PLATFORM(CG)
- wkAddFontsAtPath(string.get());
-#endif
return S_OK;
}
diff --git a/WebKit/win/WebUserContentURLPattern.cpp b/WebKit/win/WebUserContentURLPattern.cpp
new file mode 100644
index 0000000..5312fca
--- /dev/null
+++ b/WebKit/win/WebUserContentURLPattern.cpp
@@ -0,0 +1,120 @@
+/*
+ * Copyright (C) 2010 Apple 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:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS 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 APPLE INC. OR ITS 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 "WebKitDLL.h"
+#include "WebUserContentURLPattern.h"
+
+#include <WebCore/BString.h>
+#include <WebCore/KURL.h>
+
+using namespace WebCore;
+
+inline WebUserContentURLPattern::WebUserContentURLPattern()
+ : m_refCount(0)
+{
+ ++gClassCount;
+ gClassNameCount.add("WebUserContentURLPattern");
+}
+
+WebUserContentURLPattern::~WebUserContentURLPattern()
+{
+ --gClassCount;
+ gClassNameCount.remove("WebUserContentURLPattern");
+}
+
+COMPtr<WebUserContentURLPattern> WebUserContentURLPattern::createInstance()
+{
+ return new WebUserContentURLPattern;
+}
+
+ULONG WebUserContentURLPattern::AddRef()
+{
+ return ++m_refCount;
+}
+
+ULONG WebUserContentURLPattern::Release()
+{
+ ULONG newRefCount = --m_refCount;
+ if (!newRefCount)
+ delete this;
+ return newRefCount;
+}
+
+HRESULT WebUserContentURLPattern::QueryInterface(REFIID riid, void** ppvObject)
+{
+ if (!ppvObject)
+ return E_POINTER;
+ *ppvObject = 0;
+
+ if (IsEqualIID(riid, __uuidof(WebUserContentURLPattern)))
+ *ppvObject = this;
+ else if (IsEqualIID(riid, __uuidof(IWebUserContentURLPattern)))
+ *ppvObject = static_cast<IWebUserContentURLPattern*>(this);
+ else if (IsEqualIID(riid, IID_IUnknown))
+ *ppvObject = static_cast<IUnknown*>(this);
+ else
+ return E_NOINTERFACE;
+
+ AddRef();
+ return S_OK;
+}
+
+HRESULT WebUserContentURLPattern::parse(BSTR patternString)
+{
+ m_pattern = UserContentURLPattern(String(patternString, SysStringLen(patternString)));
+ return S_OK;
+}
+
+HRESULT WebUserContentURLPattern::isValid(BOOL* isValid)
+{
+ if (!isValid)
+ return E_POINTER;
+ *isValid = m_pattern.isValid();
+ return S_OK;
+}
+
+HRESULT WebUserContentURLPattern::scheme(BSTR* scheme)
+{
+ if (!scheme)
+ return E_POINTER;
+ *scheme = BString(m_pattern.scheme()).release();
+ return S_OK;
+}
+
+HRESULT WebUserContentURLPattern::host(BSTR* host)
+{
+ if (!host)
+ return E_POINTER;
+ *host = BString(m_pattern.host()).release();
+ return S_OK;
+}
+
+HRESULT WebUserContentURLPattern::matchesSubdomains(BOOL* matches)
+{
+ if (!matches)
+ return E_POINTER;
+ *matches = m_pattern.matchSubdomains();
+ return S_OK;
+}
diff --git a/WebKit/win/WebUserContentURLPattern.h b/WebKit/win/WebUserContentURLPattern.h
new file mode 100644
index 0000000..143f644
--- /dev/null
+++ b/WebKit/win/WebUserContentURLPattern.h
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2010 Apple 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:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS 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 APPLE INC. OR ITS 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.
+ */
+
+#ifndef WebUserContentURLPattern_h
+#define WebUserContentURLPattern_h
+
+#include <WebCore/COMPtr.h>
+#include <WebCore/UserContentURLPattern.h>
+
+namespace WebCore {
+ class UserContentURLPattern;
+}
+
+class WebUserContentURLPattern : public Noncopyable, public IWebUserContentURLPattern {
+public:
+ static COMPtr<WebUserContentURLPattern> createInstance();
+
+ virtual ULONG STDMETHODCALLTYPE AddRef();
+ virtual ULONG STDMETHODCALLTYPE Release();
+
+private:
+ WebUserContentURLPattern();
+ ~WebUserContentURLPattern();
+
+ virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID, void** ppvObject);
+ virtual HRESULT STDMETHODCALLTYPE parse(BSTR patternString);
+ virtual HRESULT STDMETHODCALLTYPE isValid(BOOL*);
+ virtual HRESULT STDMETHODCALLTYPE scheme(BSTR*);
+ virtual HRESULT STDMETHODCALLTYPE host(BSTR*);
+ virtual HRESULT STDMETHODCALLTYPE matchesSubdomains(BOOL* matches);
+
+ ULONG m_refCount;
+ WebCore::UserContentURLPattern m_pattern;
+};
+
+#endif // WebScriptWorld_h
diff --git a/WebKit/win/WebView.cpp b/WebKit/win/WebView.cpp
index 8636d15..da2c436 100644
--- a/WebKit/win/WebView.cpp
+++ b/WebKit/win/WebView.cpp
@@ -66,13 +66,13 @@
#include <WebCore/BString.h>
#include <WebCore/BackForwardList.h>
#include <WebCore/BitmapInfo.h>
-#include <WebCore/CString.h>
#include <WebCore/Cache.h>
#include <WebCore/Chrome.h>
#include <WebCore/ContextMenu.h>
#include <WebCore/ContextMenuController.h>
#include <WebCore/CookieStorageWin.h>
#include <WebCore/Cursor.h>
+#include <WebCore/Database.h>
#include <WebCore/Document.h>
#include <WebCore/DragController.h>
#include <WebCore/DragData.h>
@@ -150,6 +150,7 @@
#include <tchar.h>
#include <windowsx.h>
#include <wtf/HashSet.h>
+#include <wtf/text/CString.h>
// Soft link functions for gestures and panning feedback
SOFT_LINK_LIBRARY(USER32);
@@ -735,6 +736,10 @@ void WebView::deleteBackingStore()
}
m_backingStoreBitmap.clear();
m_backingStoreDirtyRegion.clear();
+#if USE(ACCELERATED_COMPOSITING)
+ if (m_layerRenderer)
+ m_layerRenderer->setBackingStoreDirty(false);
+#endif
m_backingStoreSize.cx = m_backingStoreSize.cy = 0;
}
@@ -783,6 +788,11 @@ void WebView::addToDirtyRegion(HRGN newRegion)
} else
m_backingStoreDirtyRegion.set(newRegion);
+#if USE(ACCELERATED_COMPOSITING)
+ if (m_layerRenderer)
+ m_layerRenderer->setBackingStoreDirty(true);
+#endif
+
if (m_uiDelegatePrivate)
m_uiDelegatePrivate->webViewDidInvalidate(this);
}
@@ -909,6 +919,10 @@ void WebView::updateBackingStore(FrameView* frameView, HDC dc, bool backingStore
m_uiDelegatePrivate->webViewPainted(this);
m_backingStoreDirtyRegion.clear();
+#if USE(ACCELERATED_COMPOSITING)
+ if (m_layerRenderer)
+ m_layerRenderer->setBackingStoreDirty(false);
+#endif
}
if (!dc) {
@@ -2879,9 +2893,9 @@ HRESULT STDMETHODCALLTYPE WebView::setPageSizeMultiplier(
void WebView::setZoomMultiplier(float multiplier, bool isTextOnly)
{
m_zoomMultiplier = multiplier;
- m_page->settings()->setZoomsTextOnly(isTextOnly);
+ m_page->settings()->setZoomMode(isTextOnly ? ZoomTextOnly : ZoomPage);
if (Frame* coreFrame = core(m_mainFrame))
- coreFrame->setZoomFactor(multiplier, isTextOnly);
+ coreFrame->setZoomFactor(multiplier, isTextOnly ? ZoomTextOnly : ZoomPage);
}
HRESULT STDMETHODCALLTYPE WebView::textSizeMultiplier(
@@ -2900,7 +2914,8 @@ HRESULT STDMETHODCALLTYPE WebView::pageSizeMultiplier(
float WebView::zoomMultiplier(bool isTextOnly)
{
- if (isTextOnly != m_page->settings()->zoomsTextOnly())
+ ZoomMode zoomMode = isTextOnly ? ZoomTextOnly : ZoomPage;
+ if (zoomMode != m_page->settings()->zoomMode())
return 1.0f;
return m_zoomMultiplier;
}
@@ -3049,7 +3064,7 @@ HRESULT STDMETHODCALLTYPE WebView::stringByEvaluatingJavaScriptFromString(
else if (scriptExecutionResult.isString()) {
JSLock lock(JSC::SilenceAssertionsOnly);
JSC::ExecState* exec = coreFrame->script()->globalObject(mainThreadNormalWorld())->globalExec();
- *result = BString(String(scriptExecutionResult.getString(exec)));
+ *result = BString(ustringToString(scriptExecutionResult.getString(exec)));
}
return S_OK;
@@ -3125,6 +3140,14 @@ HRESULT STDMETHODCALLTYPE WebView::preferencesIdentifier(
return E_NOTIMPL;
}
+static void systemParameterChanged(WPARAM parameter)
+{
+#if PLATFORM(CG)
+ if (parameter == SPI_SETFONTSMOOTHING || parameter == SPI_SETFONTSMOOTHINGTYPE || parameter == SPI_SETFONTSMOOTHINGCONTRAST || parameter == SPI_SETFONTSMOOTHINGORIENTATION)
+ wkSystemFontSmoothingChanged();
+#endif
+}
+
void WebView::windowReceivedMessage(HWND, UINT message, WPARAM wParam, LPARAM)
{
switch (message) {
@@ -3133,6 +3156,9 @@ void WebView::windowReceivedMessage(HWND, UINT message, WPARAM wParam, LPARAM)
if (!wParam)
deleteBackingStoreSoon();
break;
+ case WM_SETTINGCHANGE:
+ systemParameterChanged(wParam);
+ break;
}
}
@@ -3402,6 +3428,9 @@ HRESULT STDMETHODCALLTYPE WebView::isLoading(
*isLoading = FALSE;
+ if (!m_mainFrame)
+ return E_FAIL;
+
if (SUCCEEDED(m_mainFrame->dataSource(&dataSource)))
dataSource->isLoading(isLoading);
@@ -3669,7 +3698,7 @@ HRESULT STDMETHODCALLTYPE WebView::canMakeTextLarger(
/* [in] */ IUnknown* /*sender*/,
/* [retval][out] */ BOOL* result)
{
- bool canGrowMore = canZoomIn(m_page->settings()->zoomsTextOnly());
+ bool canGrowMore = canZoomIn(m_page->settings()->zoomMode() == ZoomTextOnly);
*result = canGrowMore ? TRUE : FALSE;
return S_OK;
}
@@ -3691,7 +3720,7 @@ bool WebView::canZoomIn(bool isTextOnly)
HRESULT STDMETHODCALLTYPE WebView::makeTextLarger(
/* [in] */ IUnknown* /*sender*/)
{
- return zoomIn(m_page->settings()->zoomsTextOnly());
+ return zoomIn(m_page->settings()->zoomMode() == ZoomTextOnly);
}
HRESULT STDMETHODCALLTYPE WebView::zoomPageIn(
@@ -3712,7 +3741,7 @@ HRESULT STDMETHODCALLTYPE WebView::canMakeTextSmaller(
/* [in] */ IUnknown* /*sender*/,
/* [retval][out] */ BOOL* result)
{
- bool canShrinkMore = canZoomOut(m_page->settings()->zoomsTextOnly());
+ bool canShrinkMore = canZoomOut(m_page->settings()->zoomMode() == ZoomTextOnly);
*result = canShrinkMore ? TRUE : FALSE;
return S_OK;
}
@@ -3734,7 +3763,7 @@ bool WebView::canZoomOut(bool isTextOnly)
HRESULT STDMETHODCALLTYPE WebView::makeTextSmaller(
/* [in] */ IUnknown* /*sender*/)
{
- return zoomOut(m_page->settings()->zoomsTextOnly());
+ return zoomOut(m_page->settings()->zoomMode() == ZoomTextOnly);
}
HRESULT STDMETHODCALLTYPE WebView::zoomPageOut(
@@ -4565,7 +4594,7 @@ HRESULT WebView::notifyPreferencesChanged(IWebNotification* notification)
hr = preferences->zoomsTextOnly(&enabled);
if (FAILED(hr))
return hr;
- settings->setZoomsTextOnly(!!enabled);
+ settings->setZoomMode(enabled ? ZoomTextOnly : ZoomPage);
settings->setShowsURLsInToolTips(false);
settings->setForceFTPDirectoryListings(true);
@@ -4596,10 +4625,12 @@ HRESULT WebView::notifyPreferencesChanged(IWebNotification* notification)
return hr;
settings->setOfflineWebApplicationCacheEnabled(enabled);
+#if ENABLE(DATABASE)
hr = prefsPrivate->databasesEnabled(&enabled);
if (FAILED(hr))
return hr;
- settings->setDatabasesEnabled(enabled);
+ Database::setIsAvailable(enabled);
+#endif
hr = prefsPrivate->localStorageEnabled(&enabled);
if (FAILED(hr))
@@ -4649,10 +4680,10 @@ HRESULT WebView::notifyPreferencesChanged(IWebNotification* notification)
return hr;
settings->setPluginAllowedRunTime(runTime);
- hr = prefsPrivate->isFrameSetFlatteningEnabled(&enabled);
+ hr = prefsPrivate->isFrameFlatteningEnabled(&enabled);
if (FAILED(hr))
return hr;
- settings->setFrameSetFlatteningEnabled(enabled);
+ settings->setFrameFlatteningEnabled(enabled);
#if USE(ACCELERATED_COMPOSITING)
hr = prefsPrivate->acceleratedCompositingEnabled(&enabled);
@@ -4661,6 +4692,16 @@ HRESULT WebView::notifyPreferencesChanged(IWebNotification* notification)
settings->setAcceleratedCompositingEnabled(enabled);
#endif
+ hr = prefsPrivate->showDebugBorders(&enabled);
+ if (FAILED(hr))
+ return hr;
+ settings->setShowDebugBorders(enabled);
+
+ hr = prefsPrivate->showRepaintCounter(&enabled);
+ if (FAILED(hr))
+ return hr;
+ settings->setShowRepaintCounter(enabled);
+
#if ENABLE(3D_CANVAS)
settings->setWebGLEnabled(true);
#endif // ENABLE(3D_CANVAS)
@@ -5993,15 +6034,21 @@ HRESULT WebView::invalidateBackingStore(const RECT* rect)
return S_OK;
}
-HRESULT WebView::whiteListAccessFromOrigin(BSTR sourceOrigin, BSTR destinationProtocol, BSTR destinationHost, BOOL allowDestinationSubdomains)
+HRESULT WebView::addOriginAccessWhitelistEntry(BSTR sourceOrigin, BSTR destinationProtocol, BSTR destinationHost, BOOL allowDestinationSubdomains)
{
- SecurityOrigin::whiteListAccessFromOrigin(*SecurityOrigin::createFromString(String(sourceOrigin, SysStringLen(sourceOrigin))), String(destinationProtocol, SysStringLen(destinationProtocol)), String(destinationHost, SysStringLen(destinationHost)), allowDestinationSubdomains);
+ SecurityOrigin::addOriginAccessWhitelistEntry(*SecurityOrigin::createFromString(String(sourceOrigin, SysStringLen(sourceOrigin))), String(destinationProtocol, SysStringLen(destinationProtocol)), String(destinationHost, SysStringLen(destinationHost)), allowDestinationSubdomains);
return S_OK;
}
-HRESULT WebView::resetOriginAccessWhiteLists()
+HRESULT WebView::removeOriginAccessWhitelistEntry(BSTR sourceOrigin, BSTR destinationProtocol, BSTR destinationHost, BOOL allowDestinationSubdomains)
{
- SecurityOrigin::resetOriginAccessWhiteLists();
+ SecurityOrigin::removeOriginAccessWhitelistEntry(*SecurityOrigin::createFromString(String(sourceOrigin, SysStringLen(sourceOrigin))), String(destinationProtocol, SysStringLen(destinationProtocol)), String(destinationHost, SysStringLen(destinationHost)), allowDestinationSubdomains);
+ return S_OK;
+}
+
+HRESULT WebView::resetOriginAccessWhitelists()
+{
+ SecurityOrigin::resetOriginAccessWhitelists();
return S_OK;
}
@@ -6041,7 +6088,7 @@ void WebView::downloadURL(const KURL& url)
}
#if USE(ACCELERATED_COMPOSITING)
-void WebView::setRootChildLayer(WebCore::PlatformLayer* layer)
+void WebView::setRootChildLayer(WebCore::WKCACFLayer* layer)
{
setAcceleratedCompositing(layer ? true : false);
if (m_layerRenderer)
@@ -6061,7 +6108,7 @@ void WebView::setAcceleratedCompositing(bool accelerated)
// Create the root layer
ASSERT(m_viewWindow);
m_layerRenderer->setHostWindow(m_viewWindow);
- updateRootLayerContents();
+ m_layerRenderer->createRenderer();
}
} else {
m_layerRenderer = 0;
@@ -6100,7 +6147,7 @@ void WebView::updateRootLayerContents()
return;
FrameView* frameView = coreFrame->view();
- m_layerRenderer->setScrollFrame(IntRect(frameView->scrollX(), frameView->scrollY(), frameView->layoutWidth(), frameView->layoutHeight()));
+ m_layerRenderer->setScrollFrame(IntPoint(frameView->scrollX(), frameView->scrollY()), IntSize(frameView->layoutWidth(), frameView->layoutHeight()));
}
#endif
@@ -6242,6 +6289,12 @@ HRESULT WebView::setDomainRelaxationForbiddenForURLScheme(BOOL forbidden, BSTR s
return S_OK;
}
+HRESULT WebView::registerURLSchemeAsSecure(BSTR scheme)
+{
+ SecurityOrigin::registerURLSchemeAsSecure(toString(scheme));
+ return S_OK;
+}
+
class EnumTextMatches : public IEnumTextMatches
{
long m_ref;
diff --git a/WebKit/win/WebView.h b/WebKit/win/WebView.h
index 56fb40c..48f3ef8 100644
--- a/WebKit/win/WebView.h
+++ b/WebKit/win/WebView.h
@@ -761,9 +761,9 @@ public:
virtual HRESULT STDMETHODCALLTYPE invalidateBackingStore(const RECT*);
- virtual HRESULT STDMETHODCALLTYPE whiteListAccessFromOrigin(BSTR sourceOrigin, BSTR destinationProtocol, BSTR destinationHost, BOOL allowDestinationSubdomains);
- virtual HRESULT STDMETHODCALLTYPE resetOriginAccessWhiteLists();
-
+ virtual HRESULT STDMETHODCALLTYPE addOriginAccessWhitelistEntry(BSTR sourceOrigin, BSTR destinationProtocol, BSTR destinationHost, BOOL allowDestinationSubdomains);
+ virtual HRESULT STDMETHODCALLTYPE removeOriginAccessWhitelistEntry(BSTR sourceOrigin, BSTR destinationProtocol, BSTR destinationHost, BOOL allowDestinationSubdomains);
+ virtual HRESULT STDMETHODCALLTYPE resetOriginAccessWhitelists();
virtual HRESULT STDMETHODCALLTYPE setHistoryDelegate(IWebHistoryDelegate* historyDelegate);
virtual HRESULT STDMETHODCALLTYPE historyDelegate(IWebHistoryDelegate** historyDelegate);
@@ -779,6 +779,7 @@ public:
virtual HRESULT STDMETHODCALLTYPE geolocationDidFailWithError(IWebError* error);
virtual HRESULT STDMETHODCALLTYPE setDomainRelaxationForbiddenForURLScheme(BOOL forbidden, BSTR scheme);
+ virtual HRESULT STDMETHODCALLTYPE registerURLSchemeAsSecure(BSTR);
// WebView
bool shouldUseEmbeddedView(const WebCore::String& mimeType) const;
@@ -875,7 +876,7 @@ public:
#if USE(ACCELERATED_COMPOSITING)
void setRootLayerNeedsDisplay() { if (m_layerRenderer) m_layerRenderer->setNeedsDisplay(); }
- void setRootChildLayer(WebCore::PlatformLayer* layer);
+ void setRootChildLayer(WebCore::WKCACFLayer* layer);
#endif
void enterFullscreenForNode(WebCore::Node*);