<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[167030] trunk/Tools</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/167030">167030</a></dd>
<dt>Author</dt> <dd>bfulgham@apple.com</dd>
<dt>Date</dt> <dd>2014-04-09 13:21:36 -0700 (Wed, 09 Apr 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>[Win] Various DumpRenderTree Fixes.
https://bugs.webkit.org/show_bug.cgi?id=131446.
Reviewed by Tim Horton.
* DumpRenderTree/win/AccessibilityUIElementWin.cpp:
(AccessibilityUIElement::title): Switch to _bstr_t. Use JSStringCreateWithBSTR.
(AccessibilityUIElement::description): Ditto.
(AccessibilityUIElement::helpText): Ditto.
(AccessibilityUIElement::intValue): Ditto.
(AccessibilityUIElement::isPressActionSupported): Ditto.
(AccessibilityUIElement::accessibilityValue): Ditto.
* DumpRenderTree/win/DRTDesktopNotificationPresenter.cpp:
(DRTDesktopNotificationPresenter::QueryInterface): Get rid of uneeded STDMETHODCALLTYPE declaration.
(DRTDesktopNotificationPresenter::AddRef): Ditto.
(DRTDesktopNotificationPresenter::Release): Ditto.
(DRTDesktopNotificationPresenter::showDesktopNotification): Switch to _bstr_t. Use JSStringCreateWithBSTR.
(DRTDesktopNotificationPresenter::cancelDesktopNotification): Ditto.
(DRTDesktopNotificationPresenter::notificationDestroyed): Ditto.
(DRTDesktopNotificationPresenter::checkNotificationPermission): Ditto.
(DRTDesktopNotificationPresenter::requestNotificationPermission): Ditto.
* DumpRenderTree/win/DRTDesktopNotificationPresenter.h:
* DumpRenderTree/win/DumpRenderTree.cpp:
(dumpFrameScrollPosition): Ditto.
(dumpFramesAsText): Ditto.
(compareHistoryItems): Ditto.
(dumpHistoryItem): Ditto.
(dump): Ditto.
(resetDefaultsToConsistentValues): Ditto.
(resetWebViewToConsistentStateBeforeTesting): Ditto.
(runTest): Ditto.
(createWebViewAndOffscreenWindow): Ditto.
* DumpRenderTree/win/EditingDelegate.cpp:
(EditingDelegate::QueryInterface): Get rid of uneeded STDMETHODCALLTYPE declaration.
(EditingDelegate::AddRef): Ditto.
(EditingDelegate::Release): Ditto.
(dumpPath): Switch to _bstr_t. Use JSStringCreateWithBSTR
(EditingDelegate::shouldBeginEditingInDOMRange): Get rid of uneeded STDMETHODCALLTYPE declaration.
(EditingDelegate::shouldEndEditingInDOMRange): Ditto.
(EditingDelegate::shouldInsertNode): Ditto.
(EditingDelegate::shouldInsertText): Ditto.
(EditingDelegate::shouldDeleteDOMRange): Ditto.
(EditingDelegate::shouldChangeSelectedDOMRange): Ditto.
(EditingDelegate::shouldApplyStyle): Ditto.
(EditingDelegate::shouldChangeTypingStyle): Ditto.
(EditingDelegate::doPlatformCommand): Ditto.
(EditingDelegate::webViewDidBeginEditing): Switch to _bstr_t. Use JSStringCreateWithBSTR.
(EditingDelegate::webViewDidChange): Ditto.
(EditingDelegate::webViewDidEndEditing): Ditto.
(EditingDelegate::webViewDidChangeTypingStyle): Ditto.
(EditingDelegate::webViewDidChangeSelection): Ditto.
(EditingDelegate::checkSpellingOfString): Ditto.
* DumpRenderTree/win/FrameLoadDelegate.cpp:
(descriptionSuitableForTestResult): Switch to _bstr_t. Use JSStringCreateWithBSTR.
(FrameLoadDelegate::FrameLoadDelegate): Ditto.
(FrameLoadDelegate::QueryInterface): Get rid of uneeded STDMETHODCALLTYPE declaration.
(FrameLoadDelegate::AddRef): Ditto.
(FrameLoadDelegate::Release): Ditto.
(FrameLoadDelegate::didStartProvisionalLoadForFrame): Switch to _bstr_t. Use JSStringCreateWithBSTR.
(FrameLoadDelegate::didReceiveServerRedirectForProvisionalLoadForFrame): Ditto.
(FrameLoadDelegate::didFailProvisionalLoadWithError): Ditto.
(FrameLoadDelegate::didCommitLoadForFrame): Ditto.
(FrameLoadDelegate::didReceiveTitle): Ditto.
(FrameLoadDelegate::didChangeIcons): Ditto.
(delegatesWithDelayedWork): Ditto.
(FrameLoadDelegate::didFinishLoadForFrame): Ditto.
(FrameLoadDelegate::didFailLoadWithError): Ditto.
(FrameLoadDelegate::willPerformClientRedirectToURL): Ditto.
(FrameLoadDelegate::didCancelClientRedirectForFrame): Ditto.
(FrameLoadDelegate::willCloseFrame): Ditto.
(FrameLoadDelegate::didFinishDocumentLoadForFrame): Ditto.
(FrameLoadDelegate::didHandleOnloadEventsForFrame): Ditto.
(FrameLoadDelegate::didFirstVisuallyNonEmptyLayoutInFrame): Ditto.
(FrameLoadDelegate::didDisplayInsecureContent): Ditto.
(FrameLoadDelegate::didRunInsecureContent): Ditto.
* DumpRenderTree/win/FrameLoadDelegate.h:
* DumpRenderTree/win/HistoryDelegate.cpp:
(HistoryDelegate::didNavigateWithNavigationData): Switch to _bstr_t. Use JSStringCreateWithBSTR.
(HistoryDelegate::updateHistoryTitle): Ditto.
(HistoryDelegate::populateVisitedLinksForWebView): Ditto.
* DumpRenderTree/win/PolicyDelegate.cpp:
(dumpPath):
(PolicyDelegate::QueryInterface): Get rid of uneeded STDMETHODCALLTYPE declaration.
(PolicyDelegate::AddRef): Ditto.
(PolicyDelegate::Release): Ditto.
(PolicyDelegate::decidePolicyForNavigationAction): Switch to _bstr_t. Use JSStringCreateWithBSTR.
(PolicyDelegate::unableToImplementPolicyWithError): Ditto.
* DumpRenderTree/win/ResourceLoadDelegate.cpp:
(ResourceLoadDelegate::descriptionSuitableForTestResult): Switch to _bstr_t. Use JSStringCreateWithBSTR.
(ResourceLoadDelegate::QueryInterface): Get rid of uneeded STDMETHODCALLTYPE declaration.
(ResourceLoadDelegate::AddRef): Ditto.
(ResourceLoadDelegate::Release): Ditto.
(ResourceLoadDelegate::identifierForInitialRequest): Switch to _bstr_t. Use JSStringCreateWithBSTR.
(ResourceLoadDelegate::removeIdentifierForRequest): Ditto.
(ResourceLoadDelegate::willSendRequest): Ditto.
(ResourceLoadDelegate::didReceiveAuthenticationChallenge): Ditto.
(ResourceLoadDelegate::didReceiveResponse): Ditto.
(ResourceLoadDelegate::didFinishLoadingFromDataSource): Ditto.
(ResourceLoadDelegate::didFailLoadingWithError): Ditto.
* DumpRenderTree/win/TestRunnerWin.cpp: Ditto.
(TestRunner::queueLoad): Switch to _bstr_t. Use JSStringCreateWithBSTR.
(TestRunner::setUserStyleSheetLocation): Ditto.
(TestRunner::execCommand): Ditto.
(TestRunner::overridePreference): Ditto.
(TestRunner::evaluateScriptInIsolatedWorld): Ditto.
* DumpRenderTree/win/TextInputControllerWin.cpp: Ditto.
(TextInputController::setMarkedText): Switch to _bstr_t. Use JSStringCreateWithBSTR.
(TextInputController::insertText): Ditto.
* DumpRenderTree/win/UIDelegate.cpp:
(UIDelegate::QueryInterface): Get rid of uneeded STDMETHODCALLTYPE declaration.
(UIDelegate::AddRef): Ditto.
(UIDelegate::Release): Ditto.
(UIDelegate::hasCustomMenuImplementation): Switch to _bstr_t. Use JSStringCreateWithBSTR.
(UIDelegate::trackCustomPopupMenu): Ditto.
(UIDelegate::registerUndoWithTarget): Ditto.
(UIDelegate::removeAllActionsWithTarget): Ditto.
(UIDelegate::setActionTitle): Ditto.
(UIDelegate::undo): Ditto.
(UIDelegate::redo): Ditto.
(UIDelegate::canUndo): Ditto.
(UIDelegate::canRedo): Ditto.
(UIDelegate::printFrame): Ditto.
(UIDelegate::ftpDirectoryTemplatePath): Ditto.
(UIDelegate::webViewHeaderHeight): Ditto.
(UIDelegate::webViewFooterHeight): Ditto.
(UIDelegate::drawHeaderInRect): Ditto.
(UIDelegate::drawFooterInRect): Ditto.
(UIDelegate::webViewPrintingMarginRect): Ditto.
(UIDelegate::canRunModal): Ditto.
(UIDelegate::createModalDialog): Ditto.
(UIDelegate::runModal): Ditto.
(UIDelegate::isMenuBarVisible): Ditto.
(UIDelegate::setMenuBarVisible): Ditto.
(UIDelegate::runDatabaseSizeLimitPrompt): Ditto.
(UIDelegate::paintCustomScrollbar): Ditto.
(UIDelegate::paintCustomScrollCorner): Ditto.
(UIDelegate::setFrame): Ditto.
(UIDelegate::webViewFrame): Ditto.
(UIDelegate::runJavaScriptAlertPanelWithMessage): Ditto.
(UIDelegate::runJavaScriptConfirmPanelWithMessage): Ditto.
(UIDelegate::runJavaScriptTextInputPanelWithPrompt): Ditto.
(UIDelegate::runBeforeUnloadConfirmPanelWithMessage): Ditto.
(UIDelegate::webViewAddMessageToConsole): Ditto.
(UIDelegate::doDragDrop): Ditto.
(UIDelegate::webViewGetDlgCode): Ditto.
(UIDelegate::createWebViewWithRequest): Ditto.
(UIDelegate::webViewClose): Ditto.
(UIDelegate::webViewFocus): Ditto.
(UIDelegate::webViewUnfocus): Ditto.
(UIDelegate::webViewPainted): Ditto.
(UIDelegate::exceededDatabaseQuota): Ditto.
(UIDelegate::embeddedViewWithArguments): Ditto.
(UIDelegate::webViewClosing): Ditto.
(UIDelegate::webViewSetCursor): Ditto.
(UIDelegate::webViewDidInvalidate): Ditto.
(UIDelegate::setStatusText): Ditto.
(UIDelegate::desktopNotificationsDelegate): Ditto.
(UIDelegate::drawBackground): Ditto.
(UIDelegate::decidePolicyForGeolocationRequest): Ditto.
(UIDelegate::didPressMissingPluginButton): Ditto.
* DumpRenderTree/win/WorkQueueItemWin.cpp: Ditto.
(LoadItem::invoke): Switch to _bstr_t. Use JSStringCreateWithBSTR.
(LoadHTMLStringItem::invoke): Ditto.
(ScriptItem::invoke): Ditto.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsDumpRenderTreewinAccessibilityUIElementWincpp">trunk/Tools/DumpRenderTree/win/AccessibilityUIElementWin.cpp</a></li>
<li><a href="#trunkToolsDumpRenderTreewinDRTDesktopNotificationPresentercpp">trunk/Tools/DumpRenderTree/win/DRTDesktopNotificationPresenter.cpp</a></li>
<li><a href="#trunkToolsDumpRenderTreewinDRTDesktopNotificationPresenterh">trunk/Tools/DumpRenderTree/win/DRTDesktopNotificationPresenter.h</a></li>
<li><a href="#trunkToolsDumpRenderTreewinDumpRenderTreecpp">trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp</a></li>
<li><a href="#trunkToolsDumpRenderTreewinEditingDelegatecpp">trunk/Tools/DumpRenderTree/win/EditingDelegate.cpp</a></li>
<li><a href="#trunkToolsDumpRenderTreewinFrameLoadDelegatecpp">trunk/Tools/DumpRenderTree/win/FrameLoadDelegate.cpp</a></li>
<li><a href="#trunkToolsDumpRenderTreewinFrameLoadDelegateh">trunk/Tools/DumpRenderTree/win/FrameLoadDelegate.h</a></li>
<li><a href="#trunkToolsDumpRenderTreewinHistoryDelegatecpp">trunk/Tools/DumpRenderTree/win/HistoryDelegate.cpp</a></li>
<li><a href="#trunkToolsDumpRenderTreewinPolicyDelegatecpp">trunk/Tools/DumpRenderTree/win/PolicyDelegate.cpp</a></li>
<li><a href="#trunkToolsDumpRenderTreewinResourceLoadDelegatecpp">trunk/Tools/DumpRenderTree/win/ResourceLoadDelegate.cpp</a></li>
<li><a href="#trunkToolsDumpRenderTreewinTestRunnerWincpp">trunk/Tools/DumpRenderTree/win/TestRunnerWin.cpp</a></li>
<li><a href="#trunkToolsDumpRenderTreewinTextInputControllerWincpp">trunk/Tools/DumpRenderTree/win/TextInputControllerWin.cpp</a></li>
<li><a href="#trunkToolsDumpRenderTreewinUIDelegatecpp">trunk/Tools/DumpRenderTree/win/UIDelegate.cpp</a></li>
<li><a href="#trunkToolsDumpRenderTreewinWorkQueueItemWincpp">trunk/Tools/DumpRenderTree/win/WorkQueueItemWin.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (167029 => 167030)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2014-04-09 19:48:31 UTC (rev 167029)
+++ trunk/Tools/ChangeLog        2014-04-09 20:21:36 UTC (rev 167030)
</span><span class="lines">@@ -1,3 +1,170 @@
</span><ins>+2014-04-09 Brent Fulgham <bfulgham@apple.com>
+
+ [Win] Various DumpRenderTree Fixes.
+ https://bugs.webkit.org/show_bug.cgi?id=131446.
+
+ Reviewed by Tim Horton.
+
+ * DumpRenderTree/win/AccessibilityUIElementWin.cpp:
+ (AccessibilityUIElement::title): Switch to _bstr_t. Use JSStringCreateWithBSTR.
+ (AccessibilityUIElement::description): Ditto.
+ (AccessibilityUIElement::helpText): Ditto.
+ (AccessibilityUIElement::intValue): Ditto.
+ (AccessibilityUIElement::isPressActionSupported): Ditto.
+ (AccessibilityUIElement::accessibilityValue): Ditto.
+ * DumpRenderTree/win/DRTDesktopNotificationPresenter.cpp:
+ (DRTDesktopNotificationPresenter::QueryInterface): Get rid of uneeded STDMETHODCALLTYPE declaration.
+ (DRTDesktopNotificationPresenter::AddRef): Ditto.
+ (DRTDesktopNotificationPresenter::Release): Ditto.
+ (DRTDesktopNotificationPresenter::showDesktopNotification): Switch to _bstr_t. Use JSStringCreateWithBSTR.
+ (DRTDesktopNotificationPresenter::cancelDesktopNotification): Ditto.
+ (DRTDesktopNotificationPresenter::notificationDestroyed): Ditto.
+ (DRTDesktopNotificationPresenter::checkNotificationPermission): Ditto.
+ (DRTDesktopNotificationPresenter::requestNotificationPermission): Ditto.
+ * DumpRenderTree/win/DRTDesktopNotificationPresenter.h:
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (dumpFrameScrollPosition): Ditto.
+ (dumpFramesAsText): Ditto.
+ (compareHistoryItems): Ditto.
+ (dumpHistoryItem): Ditto.
+ (dump): Ditto.
+ (resetDefaultsToConsistentValues): Ditto.
+ (resetWebViewToConsistentStateBeforeTesting): Ditto.
+ (runTest): Ditto.
+ (createWebViewAndOffscreenWindow): Ditto.
+ * DumpRenderTree/win/EditingDelegate.cpp:
+ (EditingDelegate::QueryInterface): Get rid of uneeded STDMETHODCALLTYPE declaration.
+ (EditingDelegate::AddRef): Ditto.
+ (EditingDelegate::Release): Ditto.
+ (dumpPath): Switch to _bstr_t. Use JSStringCreateWithBSTR
+ (EditingDelegate::shouldBeginEditingInDOMRange): Get rid of uneeded STDMETHODCALLTYPE declaration.
+ (EditingDelegate::shouldEndEditingInDOMRange): Ditto.
+ (EditingDelegate::shouldInsertNode): Ditto.
+ (EditingDelegate::shouldInsertText): Ditto.
+ (EditingDelegate::shouldDeleteDOMRange): Ditto.
+ (EditingDelegate::shouldChangeSelectedDOMRange): Ditto.
+ (EditingDelegate::shouldApplyStyle): Ditto.
+ (EditingDelegate::shouldChangeTypingStyle): Ditto.
+ (EditingDelegate::doPlatformCommand): Ditto.
+ (EditingDelegate::webViewDidBeginEditing): Switch to _bstr_t. Use JSStringCreateWithBSTR.
+ (EditingDelegate::webViewDidChange): Ditto.
+ (EditingDelegate::webViewDidEndEditing): Ditto.
+ (EditingDelegate::webViewDidChangeTypingStyle): Ditto.
+ (EditingDelegate::webViewDidChangeSelection): Ditto.
+ (EditingDelegate::checkSpellingOfString): Ditto.
+ * DumpRenderTree/win/FrameLoadDelegate.cpp:
+ (descriptionSuitableForTestResult): Switch to _bstr_t. Use JSStringCreateWithBSTR.
+ (FrameLoadDelegate::FrameLoadDelegate): Ditto.
+ (FrameLoadDelegate::QueryInterface): Get rid of uneeded STDMETHODCALLTYPE declaration.
+ (FrameLoadDelegate::AddRef): Ditto.
+ (FrameLoadDelegate::Release): Ditto.
+ (FrameLoadDelegate::didStartProvisionalLoadForFrame): Switch to _bstr_t. Use JSStringCreateWithBSTR.
+ (FrameLoadDelegate::didReceiveServerRedirectForProvisionalLoadForFrame): Ditto.
+ (FrameLoadDelegate::didFailProvisionalLoadWithError): Ditto.
+ (FrameLoadDelegate::didCommitLoadForFrame): Ditto.
+ (FrameLoadDelegate::didReceiveTitle): Ditto.
+ (FrameLoadDelegate::didChangeIcons): Ditto.
+ (delegatesWithDelayedWork): Ditto.
+ (FrameLoadDelegate::didFinishLoadForFrame): Ditto.
+ (FrameLoadDelegate::didFailLoadWithError): Ditto.
+ (FrameLoadDelegate::willPerformClientRedirectToURL): Ditto.
+ (FrameLoadDelegate::didCancelClientRedirectForFrame): Ditto.
+ (FrameLoadDelegate::willCloseFrame): Ditto.
+ (FrameLoadDelegate::didFinishDocumentLoadForFrame): Ditto.
+ (FrameLoadDelegate::didHandleOnloadEventsForFrame): Ditto.
+ (FrameLoadDelegate::didFirstVisuallyNonEmptyLayoutInFrame): Ditto.
+ (FrameLoadDelegate::didDisplayInsecureContent): Ditto.
+ (FrameLoadDelegate::didRunInsecureContent): Ditto.
+ * DumpRenderTree/win/FrameLoadDelegate.h:
+ * DumpRenderTree/win/HistoryDelegate.cpp:
+ (HistoryDelegate::didNavigateWithNavigationData): Switch to _bstr_t. Use JSStringCreateWithBSTR.
+ (HistoryDelegate::updateHistoryTitle): Ditto.
+ (HistoryDelegate::populateVisitedLinksForWebView): Ditto.
+ * DumpRenderTree/win/PolicyDelegate.cpp:
+ (dumpPath):
+ (PolicyDelegate::QueryInterface): Get rid of uneeded STDMETHODCALLTYPE declaration.
+ (PolicyDelegate::AddRef): Ditto.
+ (PolicyDelegate::Release): Ditto.
+ (PolicyDelegate::decidePolicyForNavigationAction): Switch to _bstr_t. Use JSStringCreateWithBSTR.
+ (PolicyDelegate::unableToImplementPolicyWithError): Ditto.
+ * DumpRenderTree/win/ResourceLoadDelegate.cpp:
+ (ResourceLoadDelegate::descriptionSuitableForTestResult): Switch to _bstr_t. Use JSStringCreateWithBSTR.
+ (ResourceLoadDelegate::QueryInterface): Get rid of uneeded STDMETHODCALLTYPE declaration.
+ (ResourceLoadDelegate::AddRef): Ditto.
+ (ResourceLoadDelegate::Release): Ditto.
+ (ResourceLoadDelegate::identifierForInitialRequest): Switch to _bstr_t. Use JSStringCreateWithBSTR.
+ (ResourceLoadDelegate::removeIdentifierForRequest): Ditto.
+ (ResourceLoadDelegate::willSendRequest): Ditto.
+ (ResourceLoadDelegate::didReceiveAuthenticationChallenge): Ditto.
+ (ResourceLoadDelegate::didReceiveResponse): Ditto.
+ (ResourceLoadDelegate::didFinishLoadingFromDataSource): Ditto.
+ (ResourceLoadDelegate::didFailLoadingWithError): Ditto.
+ * DumpRenderTree/win/TestRunnerWin.cpp: Ditto.
+ (TestRunner::queueLoad): Switch to _bstr_t. Use JSStringCreateWithBSTR.
+ (TestRunner::setUserStyleSheetLocation): Ditto.
+ (TestRunner::execCommand): Ditto.
+ (TestRunner::overridePreference): Ditto.
+ (TestRunner::evaluateScriptInIsolatedWorld): Ditto.
+ * DumpRenderTree/win/TextInputControllerWin.cpp: Ditto.
+ (TextInputController::setMarkedText): Switch to _bstr_t. Use JSStringCreateWithBSTR.
+ (TextInputController::insertText): Ditto.
+ * DumpRenderTree/win/UIDelegate.cpp:
+ (UIDelegate::QueryInterface): Get rid of uneeded STDMETHODCALLTYPE declaration.
+ (UIDelegate::AddRef): Ditto.
+ (UIDelegate::Release): Ditto.
+ (UIDelegate::hasCustomMenuImplementation): Switch to _bstr_t. Use JSStringCreateWithBSTR.
+ (UIDelegate::trackCustomPopupMenu): Ditto.
+ (UIDelegate::registerUndoWithTarget): Ditto.
+ (UIDelegate::removeAllActionsWithTarget): Ditto.
+ (UIDelegate::setActionTitle): Ditto.
+ (UIDelegate::undo): Ditto.
+ (UIDelegate::redo): Ditto.
+ (UIDelegate::canUndo): Ditto.
+ (UIDelegate::canRedo): Ditto.
+ (UIDelegate::printFrame): Ditto.
+ (UIDelegate::ftpDirectoryTemplatePath): Ditto.
+ (UIDelegate::webViewHeaderHeight): Ditto.
+ (UIDelegate::webViewFooterHeight): Ditto.
+ (UIDelegate::drawHeaderInRect): Ditto.
+ (UIDelegate::drawFooterInRect): Ditto.
+ (UIDelegate::webViewPrintingMarginRect): Ditto.
+ (UIDelegate::canRunModal): Ditto.
+ (UIDelegate::createModalDialog): Ditto.
+ (UIDelegate::runModal): Ditto.
+ (UIDelegate::isMenuBarVisible): Ditto.
+ (UIDelegate::setMenuBarVisible): Ditto.
+ (UIDelegate::runDatabaseSizeLimitPrompt): Ditto.
+ (UIDelegate::paintCustomScrollbar): Ditto.
+ (UIDelegate::paintCustomScrollCorner): Ditto.
+ (UIDelegate::setFrame): Ditto.
+ (UIDelegate::webViewFrame): Ditto.
+ (UIDelegate::runJavaScriptAlertPanelWithMessage): Ditto.
+ (UIDelegate::runJavaScriptConfirmPanelWithMessage): Ditto.
+ (UIDelegate::runJavaScriptTextInputPanelWithPrompt): Ditto.
+ (UIDelegate::runBeforeUnloadConfirmPanelWithMessage): Ditto.
+ (UIDelegate::webViewAddMessageToConsole): Ditto.
+ (UIDelegate::doDragDrop): Ditto.
+ (UIDelegate::webViewGetDlgCode): Ditto.
+ (UIDelegate::createWebViewWithRequest): Ditto.
+ (UIDelegate::webViewClose): Ditto.
+ (UIDelegate::webViewFocus): Ditto.
+ (UIDelegate::webViewUnfocus): Ditto.
+ (UIDelegate::webViewPainted): Ditto.
+ (UIDelegate::exceededDatabaseQuota): Ditto.
+ (UIDelegate::embeddedViewWithArguments): Ditto.
+ (UIDelegate::webViewClosing): Ditto.
+ (UIDelegate::webViewSetCursor): Ditto.
+ (UIDelegate::webViewDidInvalidate): Ditto.
+ (UIDelegate::setStatusText): Ditto.
+ (UIDelegate::desktopNotificationsDelegate): Ditto.
+ (UIDelegate::drawBackground): Ditto.
+ (UIDelegate::decidePolicyForGeolocationRequest): Ditto.
+ (UIDelegate::didPressMissingPluginButton): Ditto.
+ * DumpRenderTree/win/WorkQueueItemWin.cpp: Ditto.
+ (LoadItem::invoke): Switch to _bstr_t. Use JSStringCreateWithBSTR.
+ (LoadHTMLStringItem::invoke): Ditto.
+ (ScriptItem::invoke): Ditto.
+
</ins><span class="cx"> 2014-04-09 Gergo Balogh <gbalogh.u-szeged@partner.samsung.com>
</span><span class="cx">
</span><span class="cx"> Stylechecker: False positive on inline asm code.
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreewinAccessibilityUIElementWincpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/win/AccessibilityUIElementWin.cpp (167029 => 167030)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/win/AccessibilityUIElementWin.cpp        2014-04-09 19:48:31 UTC (rev 167029)
+++ trunk/Tools/DumpRenderTree/win/AccessibilityUIElementWin.cpp        2014-04-09 20:21:36 UTC (rev 167030)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2008, 2013 Apple Inc. All Rights Reserved.
</del><ins>+ * Copyright (C) 2008, 2013, 2014 Apple Inc. All Rights Reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -30,6 +30,7 @@
</span><span class="cx"> #include "DumpRenderTree.h"
</span><span class="cx"> #include "FrameLoadDelegate.h"
</span><span class="cx"> #include <JavaScriptCore/JSStringRef.h>
</span><ins>+#include <JavaScriptCore/JSStringRefBSTR.h>
</ins><span class="cx"> #include <wtf/text/WTFString.h>
</span><span class="cx"> #include <comutil.h>
</span><span class="cx"> #include <tchar.h>
</span><span class="lines">@@ -296,12 +297,11 @@
</span><span class="cx"> if (!m_element)
</span><span class="cx"> return JSStringCreateWithCharacters(0, 0);
</span><span class="cx">
</span><del>- BSTR titleBSTR;
- if (FAILED(m_element->get_accName(self(), &titleBSTR)) || !titleBSTR)
</del><ins>+ _bstr_t titleBSTR;
+ if (FAILED(m_element->get_accName(self(), &titleBSTR.GetBSTR())) || !titleBSTR.length())
</ins><span class="cx"> return JSStringCreateWithCharacters(0, 0);
</span><del>- wstring title(titleBSTR, SysStringLen(titleBSTR));
- ::SysFreeString(titleBSTR);
- return JSStringCreateWithCharacters(title.data(), title.length());
</del><ins>+
+ return JSStringCreateWithBSTR(titleBSTR);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> JSStringRef AccessibilityUIElement::description()
</span><span class="lines">@@ -309,12 +309,10 @@
</span><span class="cx"> if (!m_element)
</span><span class="cx"> return JSStringCreateWithCharacters(0, 0);
</span><span class="cx">
</span><del>- BSTR descriptionBSTR;
- if (FAILED(m_element->get_accDescription(self(), &descriptionBSTR)) || !descriptionBSTR)
</del><ins>+ _bstr_t descriptionBSTR;
+ if (FAILED(m_element->get_accDescription(self(), &descriptionBSTR.GetBSTR())) || !descriptionBSTR.length())
</ins><span class="cx"> return JSStringCreateWithCharacters(0, 0);
</span><del>- wstring description(descriptionBSTR, SysStringLen(descriptionBSTR));
- ::SysFreeString(descriptionBSTR);
- return JSStringCreateWithCharacters(description.data(), description.length());
</del><ins>+ return JSStringCreateWithBSTR(descriptionBSTR);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> JSStringRef AccessibilityUIElement::stringValue()
</span><span class="lines">@@ -332,12 +330,10 @@
</span><span class="cx"> if (!m_element)
</span><span class="cx"> return JSStringCreateWithCharacters(0, 0);
</span><span class="cx">
</span><del>- BSTR helpTextBSTR;
- if (FAILED(m_element->get_accHelp(self(), &helpTextBSTR)) || !helpTextBSTR)
</del><ins>+ _bstr_t helpTextBSTR;
+ if (FAILED(m_element->get_accHelp(self(), &helpTextBSTR.GetBSTR())) || !helpTextBSTR.length())
</ins><span class="cx"> return JSStringCreateWithCharacters(0, 0);
</span><del>- wstring helpText(helpTextBSTR, SysStringLen(helpTextBSTR));
- ::SysFreeString(helpTextBSTR);
- return JSStringCreateWithCharacters(helpText.data(), helpText.length());
</del><ins>+ return JSStringCreateWithBSTR(helpTextBSTR);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> double AccessibilityUIElement::x()
</span><span class="lines">@@ -472,13 +468,12 @@
</span><span class="cx"> if (!m_element)
</span><span class="cx"> return 0;
</span><span class="cx">
</span><del>- BSTR valueBSTR;
- if (FAILED(m_element->get_accValue(self(), &valueBSTR)) || !valueBSTR)
</del><ins>+ _bstr_t valueBSTR;
+ if (FAILED(m_element->get_accValue(self(), &valueBSTR.GetBSTR())) || !valueBSTR.length())
</ins><span class="cx"> return 0;
</span><del>- wstring value(valueBSTR, SysStringLen(valueBSTR));
- ::SysFreeString(valueBSTR);
</del><ins>+
</ins><span class="cx"> TCHAR* ignored;
</span><del>- return _tcstod(value.data(), &ignored);
</del><ins>+ return _tcstod(static_cast<TCHAR*>(valueBSTR), &ignored);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> double AccessibilityUIElement::minValue()
</span><span class="lines">@@ -496,11 +491,11 @@
</span><span class="cx"> if (!m_element)
</span><span class="cx"> return 0;
</span><span class="cx">
</span><del>- BSTR valueBSTR;
- if (FAILED(m_element->get_accDefaultAction(self(), &valueBSTR) || !valueBSTR))
</del><ins>+ _bstr_t valueBSTR;
+ if (FAILED(m_element->get_accDefaultAction(self(), &valueBSTR.GetBSTR())))
</ins><span class="cx"> return false;
</span><span class="cx">
</span><del>- if (!::SysStringLen(valueBSTR))
</del><ins>+ if (!valueBSTR.length())
</ins><span class="cx"> return false;
</span><span class="cx">
</span><span class="cx"> return true;
</span><span class="lines">@@ -725,14 +720,11 @@
</span><span class="cx"> if (!m_element)
</span><span class="cx"> return JSStringCreateWithCharacters(0, 0);
</span><span class="cx">
</span><del>- BSTR valueBSTR;
- if (FAILED(m_element->get_accValue(self(), &valueBSTR)) || !valueBSTR)
</del><ins>+ _bstr_t valueBSTR;
+ if (FAILED(m_element->get_accValue(self(), &valueBSTR.GetBSTR())) || !valueBSTR.length())
</ins><span class="cx"> return JSStringCreateWithCharacters(0, 0);
</span><span class="cx">
</span><del>- wstring value(valueBSTR, SysStringLen(valueBSTR));
- ::SysFreeString(valueBSTR);
-
- return JSStringCreateWithCharacters(value.data(), value.length());
</del><ins>+ return JSStringCreateWithBSTR(valueBSTR);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx">
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreewinDRTDesktopNotificationPresentercpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/win/DRTDesktopNotificationPresenter.cpp (167029 => 167030)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/win/DRTDesktopNotificationPresenter.cpp        2014-04-09 19:48:31 UTC (rev 167029)
+++ trunk/Tools/DumpRenderTree/win/DRTDesktopNotificationPresenter.cpp        2014-04-09 20:21:36 UTC (rev 167030)
</span><span class="lines">@@ -1,5 +1,6 @@
</span><span class="cx"> /*
</span><span class="cx"> * Copyright (C) 2009 Google Inc. All rights reserved.
</span><ins>+ * Copyright (C) 2014 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions are
</span><span class="lines">@@ -36,11 +37,12 @@
</span><span class="cx"> #include <JavaScriptCore/JSStringRef.h>
</span><span class="cx"> #include <JavaScriptCore/JSStringRefBSTR.h>
</span><span class="cx"> #include <WebCore/NotificationClient.h>
</span><ins>+#include <comutil.h>
</ins><span class="cx">
</span><span class="cx"> DRTDesktopNotificationPresenter::DRTDesktopNotificationPresenter()
</span><span class="cx"> : m_refCount(1) {}
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE DRTDesktopNotificationPresenter::QueryInterface(REFIID riid, void** ppvObject)
</del><ins>+HRESULT DRTDesktopNotificationPresenter::QueryInterface(REFIID riid, void** ppvObject)
</ins><span class="cx"> {
</span><span class="cx"> *ppvObject = 0;
</span><span class="cx"> if (IsEqualGUID(riid, IID_IUnknown))
</span><span class="lines">@@ -54,12 +56,12 @@
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-ULONG STDMETHODCALLTYPE DRTDesktopNotificationPresenter::AddRef()
</del><ins>+ULONG DRTDesktopNotificationPresenter::AddRef()
</ins><span class="cx"> {
</span><span class="cx"> return ++m_refCount;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-ULONG STDMETHODCALLTYPE DRTDesktopNotificationPresenter::Release()
</del><ins>+ULONG DRTDesktopNotificationPresenter::Release()
</ins><span class="cx"> {
</span><span class="cx"> ULONG newRef = --m_refCount;
</span><span class="cx"> if (!newRef)
</span><span class="lines">@@ -68,23 +70,19 @@
</span><span class="cx"> return newRef;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE DRTDesktopNotificationPresenter::showDesktopNotification(
- /* [in] */ IWebDesktopNotification* notification)
</del><ins>+HRESULT DRTDesktopNotificationPresenter::showDesktopNotification(IWebDesktopNotification* notification)
</ins><span class="cx"> {
</span><del>- BSTR title, text, url;
</del><ins>+ _bstr_t title, text, url;
</ins><span class="cx"> BOOL html;
</span><span class="cx">
</span><span class="cx"> if (!notification->isHTML(&html) && html) {
</span><del>- notification->contentsURL(&url);
- printf("DESKTOP NOTIFICATION: contents at %S\n", url ? url : L"");
</del><ins>+ notification->contentsURL(&url.GetBSTR());
+ printf("DESKTOP NOTIFICATION: contents at %S\n", static_cast<wchar_t*>(url));
</ins><span class="cx"> } else {
</span><del>- notification->iconURL(&url);
- notification->title(&title);
- notification->text(&text);
- printf("DESKTOP NOTIFICATION: icon %S, title %S, text %S\n",
- url ? url : L"",
- title ? title : L"",
- text ? text : L"");
</del><ins>+ notification->iconURL(&url.GetBSTR());
+ notification->title(&title.GetBSTR());
+ notification->text(&text.GetBSTR());
+ printf("DESKTOP NOTIFICATION: icon %S, title %S, text %S\n", static_cast<wchar_t*>(url), static_cast<wchar_t*>(title), static_cast<wchar_t*>(text));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // In this stub implementation, the notification is displayed immediately;
</span><span class="lines">@@ -94,34 +92,30 @@
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE DRTDesktopNotificationPresenter::cancelDesktopNotification(
- /* [in] */ IWebDesktopNotification* notification)
</del><ins>+HRESULT DRTDesktopNotificationPresenter::cancelDesktopNotification(IWebDesktopNotification* notification)
</ins><span class="cx"> {
</span><del>- BSTR identifier;
</del><ins>+ _bstr_t identifier;
</ins><span class="cx"> BOOL html;
</span><span class="cx"> notification->isHTML(&html);
</span><span class="cx"> if (html)
</span><del>- notification->contentsURL(&identifier);
</del><ins>+ notification->contentsURL(&identifier.GetBSTR());
</ins><span class="cx"> else
</span><del>- notification->title(&identifier);
</del><ins>+ notification->title(&identifier.GetBSTR());
</ins><span class="cx">
</span><del>- printf("DESKTOP NOTIFICATION CLOSED: %S\n", identifier ? identifier : L"");
</del><ins>+ printf("DESKTOP NOTIFICATION CLOSED: %S\n", static_cast<wchar_t*>(identifier));
</ins><span class="cx"> notification->notifyClose(false);
</span><span class="cx">
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE DRTDesktopNotificationPresenter::notificationDestroyed(
- /* [in] */ IWebDesktopNotification* notification)
</del><ins>+HRESULT DRTDesktopNotificationPresenter::notificationDestroyed(IWebDesktopNotification* /*notification*/)
</ins><span class="cx"> {
</span><span class="cx"> // Since in these tests events happen immediately, we don't hold on to
</span><span class="cx"> // Notification pointers. So there's no cleanup to do.
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE DRTDesktopNotificationPresenter::checkNotificationPermission(
- /* [in] */ BSTR origin,
- /* [out, retval] */ int* result)
</del><ins>+HRESULT DRTDesktopNotificationPresenter::checkNotificationPermission(BSTR /*origin*/, int* /*result*/)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
</span><span class="cx"> JSStringRef jsOrigin = JSStringCreateWithBSTR(origin);
</span><span class="lines">@@ -137,8 +131,7 @@
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE DRTDesktopNotificationPresenter::requestNotificationPermission(
- /* [in] */ BSTR origin)
</del><ins>+HRESULT DRTDesktopNotificationPresenter::requestNotificationPermission(BSTR origin)
</ins><span class="cx"> {
</span><span class="cx"> printf("DESKTOP NOTIFICATION PERMISSION REQUESTED: %S\n", origin ? origin : L"");
</span><span class="cx"> return S_OK;
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreewinDRTDesktopNotificationPresenterh"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/win/DRTDesktopNotificationPresenter.h (167029 => 167030)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/win/DRTDesktopNotificationPresenter.h        2014-04-09 19:48:31 UTC (rev 167029)
+++ trunk/Tools/DumpRenderTree/win/DRTDesktopNotificationPresenter.h        2014-04-09 20:21:36 UTC (rev 167030)
</span><span class="lines">@@ -30,7 +30,6 @@
</span><span class="cx"> #define DRTDesktopNotificationPresenter_h
</span><span class="cx">
</span><span class="cx"> #include <WebKit/WebKit.h>
</span><del>-#include <wtf/OwnPtr.h>
</del><span class="cx"> #include <windef.h>
</span><span class="cx">
</span><span class="cx"> class DRTDesktopNotificationPresenter : public IWebDesktopNotificationsDelegate {
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreewinDumpRenderTreecpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp (167029 => 167030)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp        2014-04-09 19:48:31 UTC (rev 167029)
+++ trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp        2014-04-09 20:21:36 UTC (rev 167030)
</span><span class="lines">@@ -402,11 +402,10 @@
</span><span class="cx"> if (FAILED(frame->parentFrame(&parent)))
</span><span class="cx"> return;
</span><span class="cx"> if (parent) {
</span><del>- BSTR name;
- if (FAILED(frame->name(&name)))
</del><ins>+ _bstr_t name;
+ if (FAILED(frame->name(&name.GetBSTR())))
</ins><span class="cx"> return;
</span><del>- printf("frame '%S' ", name ? name : L"");
- SysFreeString(name);
</del><ins>+ printf("frame '%S' ", static_cast<wchar_t*>(name));
</ins><span class="cx"> }
</span><span class="cx"> printf("scrolled to %.f,%.f\n", (double)scrollPosition.cx, (double)scrollPosition.cy);
</span><span class="cx"> }
</span><span class="lines">@@ -447,27 +446,23 @@
</span><span class="cx"> if (FAILED(frame->parentFrame(&parent)))
</span><span class="cx"> return L"";
</span><span class="cx"> if (parent) {
</span><del>- BSTR name = L"";
- if (FAILED(frame->name(&name)))
</del><ins>+ _bstr_t name;
+ if (FAILED(frame->name(&name.GetBSTR())))
</ins><span class="cx"> return L"";
</span><span class="cx">
</span><span class="cx"> result.append(L"\n--------\nFrame: '");
</span><del>- result.append(name ? name : L"", SysStringLen(name));
</del><ins>+ result.append(static_cast<wchar_t*>(name), name.length());
</ins><span class="cx"> result.append(L"'\n--------\n");
</span><del>-
- SysFreeString(name);
</del><span class="cx"> }
</span><span class="cx">
</span><del>- BSTR innerText = 0;
</del><ins>+ _bstr_t innerText;
</ins><span class="cx"> COMPtr<IDOMElementPrivate> docPrivate;
</span><span class="cx"> if (SUCCEEDED(documentElement->QueryInterface(&docPrivate)))
</span><del>- docPrivate->innerText(&innerText);
</del><ins>+ docPrivate->innerText(&innerText.GetBSTR());
</ins><span class="cx">
</span><del>- result.append(innerText ? innerText : L"", SysStringLen(innerText));
</del><ins>+ result.append(static_cast<wchar_t*>(innerText), innerText.length());
</ins><span class="cx"> result.append(L"\n");
</span><span class="cx">
</span><del>- SysFreeString(innerText);
-
</del><span class="cx"> if (::gTestRunner->dumpChildFramesAsText()) {
</span><span class="cx"> COMPtr<IEnumVARIANT> enumKids;
</span><span class="cx"> if (FAILED(frame->childFrames(&enumKids)))
</span><span class="lines">@@ -496,20 +491,15 @@
</span><span class="cx"> if (FAILED((*(COMPtr<IUnknown>*)item2)->QueryInterface(&itemB)))
</span><span class="cx"> return 0;
</span><span class="cx">
</span><del>- BSTR targetA;
- if (FAILED(itemA->target(&targetA)))
</del><ins>+ _bstr_t targetA;
+ if (FAILED(itemA->target(&targetA.GetBSTR())))
</ins><span class="cx"> return 0;
</span><span class="cx">
</span><del>- BSTR targetB;
- if (FAILED(itemB->target(&targetB))) {
- SysFreeString(targetA);
</del><ins>+ _bstr_t targetB;
+ if (FAILED(itemB->target(&targetB.GetBSTR())))
</ins><span class="cx"> return 0;
</span><del>- }
</del><span class="cx">
</span><del>- int result = wcsicmp(wstring(targetA, SysStringLen(targetA)).c_str(), wstring(targetB, SysStringLen(targetB)).c_str());
- SysFreeString(targetA);
- SysFreeString(targetB);
- return result;
</del><ins>+ return wcsicmp(static_cast<wchar_t*>(targetA), static_cast<wchar_t*>(targetB));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static void dumpHistoryItem(IWebHistoryItem* item, int indent, bool current)
</span><span class="lines">@@ -524,40 +514,37 @@
</span><span class="cx"> for (int i = start; i < indent; i++)
</span><span class="cx"> putchar(' ');
</span><span class="cx">
</span><del>- BSTR url;
- if (FAILED(item->URLString(&url)))
</del><ins>+ _bstr_t url;
+ if (FAILED(item->URLString(&url.GetBSTR())))
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- if (wcsstr(url, L"file:/") == url) {
</del><ins>+ if (wcsstr(static_cast<wchar_t*>(url), L"file:/") == static_cast<wchar_t*>(url)) {
</ins><span class="cx"> static wchar_t* layoutTestsString = L"/LayoutTests/";
</span><span class="cx"> static wchar_t* fileTestString = L"(file test):";
</span><span class="cx">
</span><del>- wchar_t* result = wcsstr(url, layoutTestsString);
</del><ins>+ wchar_t* result = wcsstr(static_cast<wchar_t*>(url), layoutTestsString);
</ins><span class="cx"> if (result == NULL)
</span><span class="cx"> return;
</span><span class="cx"> wchar_t* start = result + wcslen(layoutTestsString);
</span><span class="cx">
</span><del>- BSTR newURL = SysAllocStringLen(NULL, SysStringLen(url));
- wcscpy(newURL, fileTestString);
- wcscpy(newURL + wcslen(fileTestString), start);
</del><ins>+ _bstr_t newURL(SysAllocStringLen(0, SysStringLen(url)), false);
+ wcscpy(static_cast<wchar_t*>(newURL), fileTestString);
+ wcscpy(static_cast<wchar_t*>(newURL) + wcslen(fileTestString), start);
</ins><span class="cx">
</span><del>- SysFreeString(url);
</del><span class="cx"> url = newURL;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- printf("%S", url ? url : L"");
- SysFreeString(url);
</del><ins>+ printf("%S", static_cast<wchar_t*>(url));
</ins><span class="cx">
</span><span class="cx"> COMPtr<IWebHistoryItemPrivate> itemPrivate;
</span><span class="cx"> if (FAILED(item->QueryInterface(&itemPrivate)))
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- BSTR target;
- if (FAILED(itemPrivate->target(&target)))
</del><ins>+ _bstr_t target;
+ if (FAILED(itemPrivate->target(&target.GetBSTR())))
</ins><span class="cx"> return;
</span><del>- if (SysStringLen(target))
- printf(" (in frame \"%S\")", target);
- SysFreeString(target);
</del><ins>+ if (target.length())
+ printf(" (in frame \"%S\")", static_cast<wchar_t*>(target));
</ins><span class="cx"> BOOL isTargetItem = FALSE;
</span><span class="cx"> if (FAILED(itemPrivate->isTargetItem(&isTargetItem)))
</span><span class="cx"> return;
</span><span class="lines">@@ -698,54 +685,51 @@
</span><span class="cx"> if (SUCCEEDED(frame->dataSource(&dataSource))) {
</span><span class="cx"> COMPtr<IWebURLResponse> response;
</span><span class="cx"> if (SUCCEEDED(dataSource->response(&response)) && response) {
</span><del>- BSTR mimeType;
- if (SUCCEEDED(response->MIMEType(&mimeType)) && !_tcscmp(mimeType, TEXT("text/plain"))) {
</del><ins>+ _bstr_t mimeType;
+ if (SUCCEEDED(response->MIMEType(&mimeType.GetBSTR())) && !_tcscmp(static_cast<TCHAR*>(mimeType), TEXT("text/plain"))) {
</ins><span class="cx"> ::gTestRunner->setDumpAsText(true);
</span><span class="cx"> ::gTestRunner->setGeneratePixelResults(false);
</span><span class="cx"> }
</span><del>- SysFreeString(mimeType);
</del><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>- BSTR resultString = 0;
</del><ins>+ _bstr_t resultString;
</ins><span class="cx">
</span><span class="cx"> if (dumpTree) {
</span><span class="cx"> ::InvalidateRect(webViewWindow, 0, TRUE);
</span><span class="cx"> ::SendMessage(webViewWindow, WM_PAINT, 0, 0);
</span><span class="cx">
</span><span class="cx"> if (::gTestRunner->dumpAsText()) {
</span><del>- wstring result = dumpFramesAsText(frame);
- resultString = SysAllocStringLen(result.data(), result.size());
</del><ins>+ resultString = dumpFramesAsText(frame).data();
</ins><span class="cx"> } else {
</span><span class="cx"> COMPtr<IWebFramePrivate> framePrivate;
</span><span class="cx"> if (FAILED(frame->QueryInterface(&framePrivate)))
</span><span class="cx"> goto fail;
</span><del>- framePrivate->renderTreeAsExternalRepresentation(gTestRunner->isPrinting(), &resultString);
</del><ins>+ framePrivate->renderTreeAsExternalRepresentation(gTestRunner->isPrinting(), &resultString.GetBSTR());
</ins><span class="cx"> }
</span><del>-
- if (!resultString)
- printf("ERROR: nil result from %s", ::gTestRunner->dumpAsText() ? "IDOMElement::innerText" : "IFrameViewPrivate::renderTreeAsExternalRepresentation");
- else {
- unsigned stringLength = SysStringLen(resultString);
</del><ins>+
+ if (resultString.length()) {
+ unsigned stringLength = resultString.length();
</ins><span class="cx"> int bufferSize = ::WideCharToMultiByte(CP_UTF8, 0, resultString, stringLength, 0, 0, 0, 0);
</span><span class="cx"> char* buffer = (char*)malloc(bufferSize + 1);
</span><span class="cx"> ::WideCharToMultiByte(CP_UTF8, 0, resultString, stringLength, buffer, bufferSize + 1, 0, 0);
</span><span class="cx"> fwrite(buffer, 1, bufferSize, stdout);
</span><span class="cx"> free(buffer);
</span><del>- if (!::gTestRunner->dumpAsText())
</del><ins>+
+ if (!::gTestRunner->dumpAsText() && !::gTestRunner->dumpDOMAsWebArchive() && !::gTestRunner->dumpSourceAsWebArchive() && !::gTestRunner->dumpAsAudio())
</ins><span class="cx"> dumpFrameScrollPosition(frame);
</span><ins>+
+ if (::gTestRunner->dumpBackForwardList())
+ dumpBackForwardListForAllWindows();
+ } else
+ printf("ERROR: nil result from %s", ::gTestRunner->dumpAsText() ? "IDOMElement::innerText" : "IFrameViewPrivate::renderTreeAsExternalRepresentation");
+
+ if (printSeparators) {
+ puts("#EOF"); // terminate the content block
+ fputs("#EOF\n", stderr);
</ins><span class="cx"> }
</span><del>- if (::gTestRunner->dumpBackForwardList())
- dumpBackForwardListForAllWindows();
</del><span class="cx"> }
</span><span class="cx">
</span><del>- if (printSeparators) {
- puts("#EOF"); // terminate the content block
- fputs("#EOF\n", stderr);
- fflush(stdout);
- fflush(stderr);
- }
-
</del><span class="cx"> if (dumpPixelsForCurrentTest
</span><span class="cx"> && gTestRunner->generatePixelResults()
</span><span class="cx"> && !gTestRunner->dumpDOMAsWebArchive()
</span><span class="lines">@@ -754,6 +738,7 @@
</span><span class="cx">
</span><span class="cx"> printf("#EOF\n"); // terminate the (possibly empty) pixels block
</span><span class="cx"> fflush(stdout);
</span><ins>+ fflush(stderr);
</ins><span class="cx">
</span><span class="cx"> fail:
</span><span class="cx"> SysFreeString(resultString);
</span><span class="lines">@@ -785,19 +770,19 @@
</span><span class="cx"> static void resetDefaultsToConsistentValues(IWebPreferences* preferences)
</span><span class="cx"> {
</span><span class="cx"> #ifdef USE_MAC_FONTS
</span><del>- static BSTR standardFamily = SysAllocString(TEXT("Times"));
- static BSTR fixedFamily = SysAllocString(TEXT("Courier"));
- static BSTR sansSerifFamily = SysAllocString(TEXT("Helvetica"));
- static BSTR cursiveFamily = SysAllocString(TEXT("Apple Chancery"));
- static BSTR fantasyFamily = SysAllocString(TEXT("Papyrus"));
- static BSTR pictographFamily = SysAllocString(TEXT("Apple Color Emoji"));
</del><ins>+ static _bstr_t standardFamily(TEXT("Times"));
+ static _bstr_t fixedFamily(TEXT("Courier"));
+ static _bstr_t sansSerifFamily(TEXT("Helvetica"));
+ static _bstr_t cursiveFamily(TEXT("Apple Chancery"));
+ static _bstr_t fantasyFamily(TEXT("Papyrus"));
+ static _bstr_t pictographFamily(TEXT("Apple Color Emoji"));
</ins><span class="cx"> #else
</span><del>- static BSTR standardFamily = SysAllocString(TEXT("Times New Roman"));
- static BSTR fixedFamily = SysAllocString(TEXT("Courier New"));
- static BSTR sansSerifFamily = SysAllocString(TEXT("Arial"));
- static BSTR cursiveFamily = SysAllocString(TEXT("Comic Sans MS")); // Not actually cursive, but it's what IE and Firefox use.
- static BSTR fantasyFamily = SysAllocString(TEXT("Times New Roman"));
- static BSTR pictographFamily = SysAllocString(TEXT("Times New Roman"));
</del><ins>+ static _bstr_t standardFamily(TEXT("Times New Roman"));
+ static _bstr_t fixedFamily(TEXT("Courier New"));
+ static _bstr_t sansSerifFamily(TEXT("Arial"));
+ static _bstr_t cursiveFamily(TEXT("Comic Sans MS")); // Not actually cursive, but it's what IE and Firefox use.
+ static _bstr_t fantasyFamily(TEXT("Times New Roman"));
+ static _bstr_t pictographFamily(TEXT("Times New Roman"));
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> preferences->setStandardFontFamily(standardFamily);
</span><span class="lines">@@ -832,9 +817,8 @@
</span><span class="cx"> if (persistentUserStyleSheetLocation) {
</span><span class="cx"> Vector<wchar_t> urlCharacters(CFStringGetLength(persistentUserStyleSheetLocation.get()));
</span><span class="cx"> CFStringGetCharacters(persistentUserStyleSheetLocation.get(), CFRangeMake(0, CFStringGetLength(persistentUserStyleSheetLocation.get())), (UniChar *)urlCharacters.data());
</span><del>- BSTR url = SysAllocStringLen(urlCharacters.data(), urlCharacters.size());
</del><ins>+ _bstr_t url(urlCharacters.data());
</ins><span class="cx"> preferences->setUserStyleSheetLocation(url);
</span><del>- SysFreeString(url);
</del><span class="cx"> preferences->setUserStyleSheetEnabled(TRUE);
</span><span class="cx"> } else
</span><span class="cx"> preferences->setUserStyleSheetEnabled(FALSE);
</span><span class="lines">@@ -901,11 +885,9 @@
</span><span class="cx"> webViewPrivate->clearMainFrameName();
</span><span class="cx"> webViewPrivate->resetOriginAccessWhitelists();
</span><span class="cx">
</span><del>- BSTR groupName;
- if (SUCCEEDED(webView->groupName(&groupName))) {
</del><ins>+ _bstr_t groupName;
+ if (SUCCEEDED(webView->groupName(&groupName.GetBSTR())))
</ins><span class="cx"> webViewPrivate->removeAllUserContentFromGroup(groupName);
</span><del>- SysFreeString(groupName);
- }
</del><span class="cx">
</span><span class="cx"> sharedUIDelegate->resetUndoManager();
</span><span class="cx">
</span><span class="lines">@@ -1004,14 +986,14 @@
</span><span class="cx">
</span><span class="cx"> static void runTest(const string& inputLine)
</span><span class="cx"> {
</span><ins>+ ASSERT(!inputLine.empty());
+
</ins><span class="cx"> TestCommand command = parseInputLine(inputLine);
</span><span class="cx"> const string& pathOrURL = command.pathOrURL;
</span><span class="cx"> dumpPixelsForCurrentTest = command.shouldDumpPixels || dumpPixelsForAllTests;
</span><span class="cx">
</span><del>- static BSTR methodBStr = SysAllocString(TEXT("GET"));
</del><ins>+ static _bstr_t methodBStr(TEXT("GET"));
</ins><span class="cx">
</span><del>- BSTR urlBStr;
-
</del><span class="cx"> CFStringRef str = CFStringCreateWithCString(0, pathOrURL.c_str(), kCFStringEncodingWindowsLatin1);
</span><span class="cx"> CFURLRef url = CFURLCreateWithString(0, str, 0);
</span><span class="cx">
</span><span class="lines">@@ -1025,17 +1007,20 @@
</span><span class="cx"> str = CFURLGetString(url);
</span><span class="cx">
</span><span class="cx"> CFIndex length = CFStringGetLength(str);
</span><del>- UniChar* buffer = new UniChar[length];
</del><ins>+ UniChar* buffer = new UniChar[length + 1];
</ins><span class="cx">
</span><span class="cx"> CFStringGetCharacters(str, CFRangeMake(0, length), buffer);
</span><del>- urlBStr = SysAllocStringLen((OLECHAR*)buffer, length);
</del><ins>+ buffer[length] = 0;
+
+ _bstr_t urlBStr((OLECHAR*)buffer);
+ ASSERT(urlBStr.length() == length);
</ins><span class="cx"> delete[] buffer;
</span><span class="cx">
</span><span class="cx"> CFRelease(url);
</span><span class="cx">
</span><span class="cx"> ::gTestRunner = TestRunner::create(pathOrURL, command.expectedPixelHash);
</span><del>- done = false;
</del><span class="cx"> topLoadingFrame = 0;
</span><ins>+ done = false;
</ins><span class="cx">
</span><span class="cx"> addFontFallbackIfPresent(fallbackPath);
</span><span class="cx">
</span><span class="lines">@@ -1062,12 +1047,12 @@
</span><span class="cx">
</span><span class="cx"> resetWebViewToConsistentStateBeforeTesting();
</span><span class="cx">
</span><del>- if (shouldEnableDeveloperExtras(pathOrURL.c_str()))
</del><ins>+ if (shouldEnableDeveloperExtras(pathOrURL.c_str())) {
</ins><span class="cx"> gTestRunner->setDeveloperExtrasEnabled(true);
</span><del>-
- if (shouldDumpAsText(pathOrURL.c_str())) {
- gTestRunner->setDumpAsText(true);
- gTestRunner->setGeneratePixelResults(false);
</del><ins>+ if (shouldDumpAsText(pathOrURL.c_str())) {
+ gTestRunner->setDumpAsText(true);
+ gTestRunner->setGeneratePixelResults(false);
+ }
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> prevTestBFItem = 0;
</span><span class="lines">@@ -1135,7 +1120,6 @@
</span><span class="cx">
</span><span class="cx"> exit:
</span><span class="cx"> removeFontFallbackIfPresent(fallbackPath);
</span><del>- SysFreeString(urlBStr);
</del><span class="cx"> ::gTestRunner.clear();
</span><span class="cx">
</span><span class="cx"> return;
</span><span class="lines">@@ -1173,10 +1157,8 @@
</span><span class="cx">
</span><span class="cx"> RECT clientRect;
</span><span class="cx"> clientRect.bottom = clientRect.left = clientRect.top = clientRect.right = 0;
</span><del>- BSTR groupName = SysAllocString(L"org.webkit.DumpRenderTree");
- bool failed = FAILED(webView->initWithFrame(clientRect, 0, groupName));
- SysFreeString(groupName);
- if (failed)
</del><ins>+ _bstr_t groupName(L"org.webkit.DumpRenderTree");
+ if (FAILED(webView->initWithFrame(clientRect, 0, groupName)))
</ins><span class="cx"> return 0;
</span><span class="cx">
</span><span class="cx"> COMPtr<IWebViewPrivate> viewPrivate;
</span><span class="lines">@@ -1186,12 +1168,10 @@
</span><span class="cx"> viewPrivate->setShouldApplyMacFontAscentHack(TRUE);
</span><span class="cx"> viewPrivate->setAlwaysUsesComplexTextCodePath(forceComplexText);
</span><span class="cx">
</span><del>- BSTR pluginPath = SysAllocStringLen(0, exePath().length() + _tcslen(TestPluginDir));
- _tcscpy(pluginPath, exePath().c_str());
- _tcscat(pluginPath, TestPluginDir);
- failed = FAILED(viewPrivate->addAdditionalPluginDirectory(pluginPath));
- SysFreeString(pluginPath);
- if (failed)
</del><ins>+ _bstr_t pluginPath(SysAllocStringLen(0, exePath().length() + _tcslen(TestPluginDir)), false);
+ _tcscpy(static_cast<TCHAR*>(pluginPath), exePath().c_str());
+ _tcscat(static_cast<TCHAR*>(pluginPath), TestPluginDir);
+ if (FAILED(viewPrivate->addAdditionalPluginDirectory(pluginPath)))
</ins><span class="cx"> return 0;
</span><span class="cx">
</span><span class="cx"> HWND viewWindow;
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreewinEditingDelegatecpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/win/EditingDelegate.cpp (167029 => 167030)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/win/EditingDelegate.cpp        2014-04-09 19:48:31 UTC (rev 167029)
+++ trunk/Tools/DumpRenderTree/win/EditingDelegate.cpp        2014-04-09 20:21:36 UTC (rev 167030)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2007 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2007, 2014 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "EditingDelegate.h"
</span><span class="cx">
</span><ins>+#include <comutil.h>
</ins><span class="cx"> #include "DumpRenderTree.h"
</span><span class="cx"> #include "TestRunner.h"
</span><span class="cx"> #include <WebCore/COMPtr.h>
</span><span class="lines">@@ -46,7 +47,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // IUnknown
</span><del>-HRESULT STDMETHODCALLTYPE EditingDelegate::QueryInterface(REFIID riid, void** ppvObject)
</del><ins>+HRESULT EditingDelegate::QueryInterface(REFIID riid, void** ppvObject)
</ins><span class="cx"> {
</span><span class="cx"> *ppvObject = 0;
</span><span class="cx"> if (IsEqualGUID(riid, IID_IUnknown))
</span><span class="lines">@@ -60,12 +61,12 @@
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-ULONG STDMETHODCALLTYPE EditingDelegate::AddRef(void)
</del><ins>+ULONG EditingDelegate::AddRef(void)
</ins><span class="cx"> {
</span><span class="cx"> return ++m_refCount;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-ULONG STDMETHODCALLTYPE EditingDelegate::Release(void)
</del><ins>+ULONG EditingDelegate::Release(void)
</ins><span class="cx"> {
</span><span class="cx"> ULONG newRef = --m_refCount;
</span><span class="cx"> if (!newRef)
</span><span class="lines">@@ -80,11 +81,10 @@
</span><span class="cx">
</span><span class="cx"> wstring result;
</span><span class="cx">
</span><del>- BSTR name;
- if (FAILED(node->nodeName(&name)))
</del><ins>+ _bstr_t name;
+ if (FAILED(node->nodeName(&name.GetBSTR())))
</ins><span class="cx"> return result;
</span><del>- result.assign(name, SysStringLen(name));
- SysFreeString(name);
</del><ins>+ result.assign(static_cast<wchar_t*>(name), name.length());
</ins><span class="cx">
</span><span class="cx"> COMPtr<IDOMNode> parent;
</span><span class="cx"> if (SUCCEEDED(node->parentNode(&parent)))
</span><span class="lines">@@ -118,10 +118,7 @@
</span><span class="cx"> return buffer;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE EditingDelegate::shouldBeginEditingInDOMRange(
- /* [in] */ IWebView* webView,
- /* [in] */ IDOMRange* range,
- /* [retval][out] */ BOOL* result)
</del><ins>+HRESULT EditingDelegate::shouldBeginEditingInDOMRange(IWebView* /*webView*/, IDOMRange* range, BOOL* result)
</ins><span class="cx"> {
</span><span class="cx"> if (!result) {
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="lines">@@ -135,10 +132,7 @@
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE EditingDelegate::shouldEndEditingInDOMRange(
- /* [in] */ IWebView* webView,
- /* [in] */ IDOMRange* range,
- /* [retval][out] */ BOOL* result)
</del><ins>+HRESULT EditingDelegate::shouldEndEditingInDOMRange(IWebView* /*webView*/, IDOMRange* range, BOOL* result)
</ins><span class="cx"> {
</span><span class="cx"> if (!result) {
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="lines">@@ -152,11 +146,7 @@
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE EditingDelegate::shouldInsertNode(
- /* [in] */ IWebView* webView,
- /* [in] */ IDOMNode* node,
- /* [in] */ IDOMRange* range,
- /* [in] */ WebViewInsertAction action)
</del><ins>+HRESULT EditingDelegate::shouldInsertNode(IWebView* /*webView*/, IDOMNode* node, IDOMRange* range, WebViewInsertAction action)
</ins><span class="cx"> {
</span><span class="cx"> static LPCTSTR insertactionstring[] = {
</span><span class="cx"> TEXT("WebViewInsertActionTyped"),
</span><span class="lines">@@ -170,12 +160,7 @@
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE EditingDelegate::shouldInsertText(
- /* [in] */ IWebView* webView,
- /* [in] */ BSTR text,
- /* [in] */ IDOMRange* range,
- /* [in] */ WebViewInsertAction action,
- /* [retval][out] */ BOOL* result)
</del><ins>+HRESULT EditingDelegate::shouldInsertText(IWebView* /*webView*/, BSTR text, IDOMRange* range, WebViewInsertAction action, BOOL* result)
</ins><span class="cx"> {
</span><span class="cx"> if (!result) {
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="lines">@@ -195,10 +180,7 @@
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE EditingDelegate::shouldDeleteDOMRange(
- /* [in] */ IWebView* webView,
- /* [in] */ IDOMRange* range,
- /* [retval][out] */ BOOL* result)
</del><ins>+HRESULT EditingDelegate::shouldDeleteDOMRange(IWebView* /*webView*/, IDOMRange* range, BOOL* result)
</ins><span class="cx"> {
</span><span class="cx"> if (!result) {
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="lines">@@ -212,13 +194,8 @@
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE EditingDelegate::shouldChangeSelectedDOMRange(
- /* [in] */ IWebView* webView,
- /* [in] */ IDOMRange* currentRange,
- /* [in] */ IDOMRange* proposedRange,
- /* [in] */ WebSelectionAffinity selectionAffinity,
- /* [in] */ BOOL stillSelecting,
- /* [retval][out] */ BOOL* result)
</del><ins>+HRESULT EditingDelegate::shouldChangeSelectedDOMRange(IWebView* /*webView*/, IDOMRange* currentRange, IDOMRange* proposedRange,
+ WebSelectionAffinity selectionAffinity, BOOL stillSelecting, BOOL* result)
</ins><span class="cx"> {
</span><span class="cx"> if (!result) {
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="lines">@@ -241,11 +218,7 @@
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE EditingDelegate::shouldApplyStyle(
- /* [in] */ IWebView* webView,
- /* [in] */ IDOMCSSStyleDeclaration* style,
- /* [in] */ IDOMRange* range,
- /* [retval][out] */ BOOL* result)
</del><ins>+HRESULT EditingDelegate::shouldApplyStyle(IWebView* /*webView*/, IDOMCSSStyleDeclaration* style, IDOMRange* range, BOOL* result)
</ins><span class="cx"> {
</span><span class="cx"> if (!result) {
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="lines">@@ -259,11 +232,7 @@
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE EditingDelegate::shouldChangeTypingStyle(
- /* [in] */ IWebView* webView,
- /* [in] */ IDOMCSSStyleDeclaration* currentStyle,
- /* [in] */ IDOMCSSStyleDeclaration* proposedStyle,
- /* [retval][out] */ BOOL* result)
</del><ins>+HRESULT EditingDelegate::shouldChangeTypingStyle(IWebView* /*webView*/, IDOMCSSStyleDeclaration* currentStyle, IDOMCSSStyleDeclaration* proposedStyle, BOOL* result)
</ins><span class="cx"> {
</span><span class="cx"> if (!result) {
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="lines">@@ -277,10 +246,7 @@
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE EditingDelegate::doPlatformCommand(
- /* [in] */ IWebView *webView,
- /* [in] */ BSTR command,
- /* [retval][out] */ BOOL *result)
</del><ins>+HRESULT EditingDelegate::doPlatformCommand(IWebView* /*webView*/, BSTR command, BOOL* result)
</ins><span class="cx"> {
</span><span class="cx"> if (!result) {
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="lines">@@ -294,62 +260,52 @@
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE EditingDelegate::webViewDidBeginEditing(
- /* [in] */ IWebNotification* notification)
</del><ins>+HRESULT EditingDelegate::webViewDidBeginEditing(IWebNotification* notification)
</ins><span class="cx"> {
</span><span class="cx"> if (::gTestRunner->dumpEditingCallbacks() && !done) {
</span><del>- BSTR name;
- notification->name(&name);
- _tprintf(TEXT("EDITING DELEGATE: webViewDidBeginEditing:%s\n"), name ? name : TEXT(""));
- SysFreeString(name);
</del><ins>+ _bstr_t name;
+ notification->name(&name.GetBSTR());
+ _tprintf(TEXT("EDITING DELEGATE: webViewDidBeginEditing:%s\n"), static_cast<TCHAR*>(name));
</ins><span class="cx"> }
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE EditingDelegate::webViewDidChange(
- /* [in] */ IWebNotification *notification)
</del><ins>+HRESULT EditingDelegate::webViewDidChange(IWebNotification* notification)
</ins><span class="cx"> {
</span><span class="cx"> if (::gTestRunner->dumpEditingCallbacks() && !done) {
</span><del>- BSTR name;
- notification->name(&name);
- _tprintf(TEXT("EDITING DELEGATE: webViewDidBeginEditing:%s\n"), name ? name : TEXT(""));
- SysFreeString(name);
</del><ins>+ _bstr_t name;
+ notification->name(&name.GetBSTR());
+ _tprintf(TEXT("EDITING DELEGATE: webViewDidBeginEditing:%s\n"), static_cast<TCHAR*>(name));
</ins><span class="cx"> }
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE EditingDelegate::webViewDidEndEditing(
- /* [in] */ IWebNotification *notification)
</del><ins>+HRESULT EditingDelegate::webViewDidEndEditing(IWebNotification* notification)
</ins><span class="cx"> {
</span><span class="cx"> if (::gTestRunner->dumpEditingCallbacks() && !done) {
</span><del>- BSTR name;
- notification->name(&name);
- _tprintf(TEXT("EDITING DELEGATE: webViewDidEndEditing:%s\n"), name ? name : TEXT(""));
- SysFreeString(name);
</del><ins>+ _bstr_t name;
+ notification->name(&name.GetBSTR());
+ _tprintf(TEXT("EDITING DELEGATE: webViewDidEndEditing:%s\n"), static_cast<TCHAR*>(name));
</ins><span class="cx"> }
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE EditingDelegate::webViewDidChangeTypingStyle(
- /* [in] */ IWebNotification *notification)
</del><ins>+HRESULT EditingDelegate::webViewDidChangeTypingStyle(IWebNotification* notification)
</ins><span class="cx"> {
</span><span class="cx"> if (::gTestRunner->dumpEditingCallbacks() && !done) {
</span><del>- BSTR name;
- notification->name(&name);
- _tprintf(TEXT("EDITING DELEGATE: webViewDidChangeTypingStyle:%s\n"), name ? name : TEXT(""));
- SysFreeString(name);
</del><ins>+ _bstr_t name;
+ notification->name(&name.GetBSTR());
+ _tprintf(TEXT("EDITING DELEGATE: webViewDidChangeTypingStyle:%s\n"), static_cast<TCHAR*>(name));
</ins><span class="cx"> }
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE EditingDelegate::webViewDidChangeSelection(
- /* [in] */ IWebNotification *notification)
</del><ins>+HRESULT EditingDelegate::webViewDidChangeSelection(IWebNotification* notification)
</ins><span class="cx"> {
</span><span class="cx"> if (::gTestRunner->dumpEditingCallbacks() && !done) {
</span><del>- BSTR name;
- notification->name(&name);
- _tprintf(TEXT("EDITING DELEGATE: webViewDidChangeSelection:%s\n"), name ? name : TEXT(""));
- SysFreeString(name);
</del><ins>+ _bstr_t name;
+ notification->name(&name.GetBSTR());
+ _tprintf(TEXT("EDITING DELEGATE: webViewDidChangeSelection:%s\n"), static_cast<TCHAR*>(name));
</ins><span class="cx"> }
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="lines">@@ -370,7 +326,7 @@
</span><span class="cx"> return cursor - text;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE EditingDelegate::checkSpellingOfString(
</del><ins>+HRESULT EditingDelegate::checkSpellingOfString(
</ins><span class="cx"> /* [in] */ IWebView* view,
</span><span class="cx"> /* [in] */ LPCTSTR text,
</span><span class="cx"> /* [in] */ int length,
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreewinFrameLoadDelegatecpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/win/FrameLoadDelegate.cpp (167029 => 167030)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/win/FrameLoadDelegate.cpp        2014-04-09 19:48:31 UTC (rev 167029)
+++ trunk/Tools/DumpRenderTree/win/FrameLoadDelegate.cpp        2014-04-09 20:21:36 UTC (rev 167030)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2005, 2006, 2007, 2009 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2005, 2006, 2007, 2009, 2014 Apple Inc. All rights reserved.
</ins><span class="cx"> * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved.
</span><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="lines">@@ -31,6 +31,7 @@
</span><span class="cx"> #include "FrameLoadDelegate.h"
</span><span class="cx">
</span><span class="cx"> #include "AccessibilityController.h"
</span><ins>+#include <comutil.h>
</ins><span class="cx"> #include "DumpRenderTree.h"
</span><span class="cx"> #include "EventSender.h"
</span><span class="cx"> #include "GCController.h"
</span><span class="lines">@@ -45,7 +46,7 @@
</span><span class="cx"> #include <stdio.h>
</span><span class="cx"> #include <string>
</span><span class="cx"> #include <wtf/Assertions.h>
</span><del>-#include <wtf/PassOwnPtr.h>
</del><ins>+#include <wtf/NeverDestroyed.h>
</ins><span class="cx"> #include <wtf/Vector.h>
</span><span class="cx">
</span><span class="cx"> using std::string;
</span><span class="lines">@@ -62,22 +63,21 @@
</span><span class="cx"> if (FAILED(webView->mainFrame(&mainFrame)))
</span><span class="cx"> return string();
</span><span class="cx">
</span><del>- BSTR frameNameBSTR;
- if (FAILED(webFrame->name(&frameNameBSTR)) || toUTF8(frameNameBSTR).empty())
</del><ins>+ _bstr_t frameNameBSTR;
+ if (FAILED(webFrame->name(&frameNameBSTR.GetBSTR())) || !frameNameBSTR.length())
</ins><span class="cx"> return (webFrame == mainFrame) ? "main frame" : string();
</span><span class="cx">
</span><span class="cx"> string frameName = (webFrame == mainFrame) ? "main frame" : "frame";
</span><span class="cx"> frameName += " \"" + toUTF8(frameNameBSTR) + "\"";
</span><span class="cx">
</span><del>- SysFreeString(frameNameBSTR);
</del><span class="cx"> return frameName;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> FrameLoadDelegate::FrameLoadDelegate()
</span><span class="cx"> : m_refCount(1)
</span><del>- , m_gcController(adoptPtr(new GCController))
- , m_accessibilityController(adoptPtr(new AccessibilityController))
- , m_textInputController(adoptPtr(new TextInputController))
</del><ins>+ , m_gcController(std::make_unique<GCController>())
+ , m_accessibilityController(std::make_unique<AccessibilityController>())
+ , m_textInputController(std::make_unique<TextInputController>())
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -85,7 +85,7 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE FrameLoadDelegate::QueryInterface(REFIID riid, void** ppvObject)
</del><ins>+HRESULT FrameLoadDelegate::QueryInterface(REFIID riid, void** ppvObject)
</ins><span class="cx"> {
</span><span class="cx"> *ppvObject = 0;
</span><span class="cx"> if (IsEqualGUID(riid, IID_IUnknown))
</span><span class="lines">@@ -103,12 +103,12 @@
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-ULONG STDMETHODCALLTYPE FrameLoadDelegate::AddRef(void)
</del><ins>+ULONG FrameLoadDelegate::AddRef(void)
</ins><span class="cx"> {
</span><span class="cx"> return ++m_refCount;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-ULONG STDMETHODCALLTYPE FrameLoadDelegate::Release(void)
</del><ins>+ULONG FrameLoadDelegate::Release(void)
</ins><span class="cx"> {
</span><span class="cx"> ULONG newRef = --m_refCount;
</span><span class="cx"> if (!newRef)
</span><span class="lines">@@ -118,9 +118,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE FrameLoadDelegate::didStartProvisionalLoadForFrame(
- /* [in] */ IWebView* webView,
- /* [in] */ IWebFrame* frame)
</del><ins>+HRESULT FrameLoadDelegate::didStartProvisionalLoadForFrame(IWebView* /*webView*/, IWebFrame* frame)
</ins><span class="cx"> {
</span><span class="cx"> if (!done && gTestRunner->dumpFrameLoadCallbacks())
</span><span class="cx"> printf("%s - didStartProvisionalLoadForFrame\n", descriptionSuitableForTestResult(frame).c_str());
</span><span class="lines">@@ -133,9 +131,7 @@
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE FrameLoadDelegate::didReceiveServerRedirectForProvisionalLoadForFrame(
- /* [in] */ IWebView *webView,
- /* [in] */ IWebFrame *frame)
</del><ins>+HRESULT FrameLoadDelegate::didReceiveServerRedirectForProvisionalLoadForFrame(IWebView* /*webView*/, IWebFrame* frame)
</ins><span class="cx"> {
</span><span class="cx"> if (!done && gTestRunner->dumpFrameLoadCallbacks())
</span><span class="cx"> printf("%s - didReceiveServerRedirectForProvisionalLoadForFrame\n", descriptionSuitableForTestResult(frame).c_str());
</span><span class="lines">@@ -143,10 +139,7 @@
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE FrameLoadDelegate::didFailProvisionalLoadWithError(
- /* [in] */ IWebView *webView,
- /* [in] */ IWebError *error,
- /* [in] */ IWebFrame *frame)
</del><ins>+HRESULT FrameLoadDelegate::didFailProvisionalLoadWithError(IWebView* /*webView*/, IWebError* error, IWebFrame* frame)
</ins><span class="cx"> {
</span><span class="cx"> if (!done && gTestRunner->dumpFrameLoadCallbacks())
</span><span class="cx"> printf("%s - didFailProvisionalLoadWithError\n", descriptionSuitableForTestResult(frame).c_str());
</span><span class="lines">@@ -155,9 +148,7 @@
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE FrameLoadDelegate::didCommitLoadForFrame(
- /* [in] */ IWebView *webView,
- /* [in] */ IWebFrame *frame)
</del><ins>+HRESULT FrameLoadDelegate::didCommitLoadForFrame(IWebView* webView, IWebFrame* frame)
</ins><span class="cx"> {
</span><span class="cx"> if (!done && gTestRunner->dumpFrameLoadCallbacks())
</span><span class="cx"> printf("%s - didCommitLoadForFrame\n", descriptionSuitableForTestResult(frame).c_str());
</span><span class="lines">@@ -171,10 +162,7 @@
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE FrameLoadDelegate::didReceiveTitle(
- /* [in] */ IWebView *webView,
- /* [in] */ BSTR title,
- /* [in] */ IWebFrame *frame)
</del><ins>+HRESULT FrameLoadDelegate::didReceiveTitle(IWebView* /*webView*/, BSTR title, IWebFrame* frame)
</ins><span class="cx"> {
</span><span class="cx"> if (!done && gTestRunner->dumpFrameLoadCallbacks())
</span><span class="cx"> printf("%s - didReceiveTitle: %S\n", descriptionSuitableForTestResult(frame).c_str(), title);
</span><span class="lines">@@ -184,7 +172,7 @@
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE FrameLoadDelegate::didChangeIcons(
</del><ins>+HRESULT FrameLoadDelegate::didChangeIcons(
</ins><span class="cx"> /* [in] */ IWebView* webView,
</span><span class="cx"> /* [in] */ IWebFrame* frame)
</span><span class="cx"> {
</span><span class="lines">@@ -213,7 +201,7 @@
</span><span class="cx"> typedef Vector<COMPtr<FrameLoadDelegate> > DelegateVector;
</span><span class="cx"> static DelegateVector& delegatesWithDelayedWork()
</span><span class="cx"> {
</span><del>- DEPRECATED_DEFINE_STATIC_LOCAL(DelegateVector, delegates, ());
</del><ins>+ static NeverDestroyed<DelegateVector> delegates;
</ins><span class="cx"> return delegates;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -253,9 +241,7 @@
</span><span class="cx"> dump();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE FrameLoadDelegate::didFinishLoadForFrame(
- /* [in] */ IWebView* webView,
- /* [in] */ IWebFrame* frame)
</del><ins>+HRESULT FrameLoadDelegate::didFinishLoadForFrame(IWebView* /*webView*/, IWebFrame* frame)
</ins><span class="cx"> {
</span><span class="cx"> if (!done && gTestRunner->dumpFrameLoadCallbacks())
</span><span class="cx"> printf("%s - didFinishLoadForFrame\n", descriptionSuitableForTestResult(frame).c_str());
</span><span class="lines">@@ -264,10 +250,7 @@
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE FrameLoadDelegate::didFailLoadWithError(
- /* [in] */ IWebView* webView,
- /* [in] */ IWebError* error,
- /* [in] */ IWebFrame* frame)
</del><ins>+HRESULT FrameLoadDelegate::didFailLoadWithError(IWebView* /*webView*/, IWebError* error, IWebFrame* frame)
</ins><span class="cx"> {
</span><span class="cx"> if (!done && gTestRunner->dumpFrameLoadCallbacks())
</span><span class="cx"> printf("%s - didFailLoadWithError\n", descriptionSuitableForTestResult(frame).c_str());
</span><span class="lines">@@ -276,12 +259,7 @@
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE FrameLoadDelegate::willPerformClientRedirectToURL(
- /* [in] */ IWebView *webView,
- /* [in] */ BSTR url,
- /* [in] */ double delaySeconds,
- /* [in] */ DATE fireDate,
- /* [in] */ IWebFrame *frame)
</del><ins>+HRESULT FrameLoadDelegate::willPerformClientRedirectToURL(IWebView* /*webView*/, BSTR url, double /*delaySeconds*/, DATE /*fireDate*/, IWebFrame* frame)
</ins><span class="cx"> {
</span><span class="cx"> if (!done && gTestRunner->dumpFrameLoadCallbacks())
</span><span class="cx"> printf("%s - willPerformClientRedirectToURL: %S \n", descriptionSuitableForTestResult(frame).c_str(),
</span><span class="lines">@@ -290,9 +268,7 @@
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE FrameLoadDelegate::didCancelClientRedirectForFrame(
- /* [in] */ IWebView *webView,
- /* [in] */ IWebFrame *frame)
</del><ins>+HRESULT FrameLoadDelegate::didCancelClientRedirectForFrame(IWebView* /*webView*/, IWebFrame* frame)
</ins><span class="cx"> {
</span><span class="cx"> if (!done && gTestRunner->dumpFrameLoadCallbacks())
</span><span class="cx"> printf("%s - didCancelClientRedirectForFrame\n", descriptionSuitableForTestResult(frame).c_str());
</span><span class="lines">@@ -301,9 +277,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE FrameLoadDelegate::willCloseFrame(
- /* [in] */ IWebView *webView,
- /* [in] */ IWebFrame *frame)
</del><ins>+HRESULT FrameLoadDelegate::willCloseFrame(IWebView* /*webView*/, IWebFrame* /*frame*/)
</ins><span class="cx"> {
</span><span class="cx"> return E_NOTIMPL;
</span><span class="cx"> }
</span><span class="lines">@@ -380,9 +354,7 @@
</span><span class="cx"> WebCoreTestSupport::injectInternalsObject(context);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE FrameLoadDelegate::didFinishDocumentLoadForFrame(
- /* [in] */ IWebView *sender,
- /* [in] */ IWebFrame *frame)
</del><ins>+HRESULT FrameLoadDelegate::didFinishDocumentLoadForFrame(IWebView* /*sender*/, IWebFrame* frame)
</ins><span class="cx"> {
</span><span class="cx"> if (!done && gTestRunner->dumpFrameLoadCallbacks())
</span><span class="cx"> printf("%s - didFinishDocumentLoadForFrame\n",
</span><span class="lines">@@ -404,9 +376,7 @@
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE FrameLoadDelegate::didHandleOnloadEventsForFrame(
- /* [in] */ IWebView *sender,
- /* [in] */ IWebFrame *frame)
</del><ins>+HRESULT FrameLoadDelegate::didHandleOnloadEventsForFrame(IWebView* /*sender*/, IWebFrame* frame)
</ins><span class="cx"> {
</span><span class="cx"> if (!done && gTestRunner->dumpFrameLoadCallbacks())
</span><span class="cx"> printf("%s - didHandleOnloadEventsForFrame\n",
</span><span class="lines">@@ -415,15 +385,12 @@
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE FrameLoadDelegate::didFirstVisuallyNonEmptyLayoutInFrame(
- /* [in] */ IWebView *sender,
- /* [in] */ IWebFrame *frame)
</del><ins>+HRESULT FrameLoadDelegate::didFirstVisuallyNonEmptyLayoutInFrame(IWebView* /*sender*/, IWebFrame* /*frame*/)
</ins><span class="cx"> {
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE FrameLoadDelegate::didDisplayInsecureContent(
- /* [in] */ IWebView *sender)
</del><ins>+HRESULT FrameLoadDelegate::didDisplayInsecureContent(IWebView* /*sender*/)
</ins><span class="cx"> {
</span><span class="cx"> if (!done && gTestRunner->dumpFrameLoadCallbacks())
</span><span class="cx"> printf("didDisplayInsecureContent\n");
</span><span class="lines">@@ -431,13 +398,10 @@
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE FrameLoadDelegate::didRunInsecureContent(
- /* [in] */ IWebView *sender,
- /* [in] */ IWebSecurityOrigin *origin)
</del><ins>+HRESULT FrameLoadDelegate::didRunInsecureContent(IWebView* /*sender*/, IWebSecurityOrigin* /*origin*/)
</ins><span class="cx"> {
</span><span class="cx"> if (!done && gTestRunner->dumpFrameLoadCallbacks())
</span><span class="cx"> printf("didRunInsecureContent\n");
</span><span class="cx">
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><del>-
</del></span></pre></div>
<a id="trunkToolsDumpRenderTreewinFrameLoadDelegateh"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/win/FrameLoadDelegate.h (167029 => 167030)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/win/FrameLoadDelegate.h        2014-04-09 19:48:31 UTC (rev 167029)
+++ trunk/Tools/DumpRenderTree/win/FrameLoadDelegate.h        2014-04-09 20:21:36 UTC (rev 167030)
</span><span class="lines">@@ -30,7 +30,6 @@
</span><span class="cx"> #define FrameLoadDelegate_h
</span><span class="cx">
</span><span class="cx"> #include <WebKit/WebKit.h>
</span><del>-#include <wtf/OwnPtr.h>
</del><span class="cx">
</span><span class="cx"> class AccessibilityController;
</span><span class="cx"> class TextInputController;
</span><span class="lines">@@ -169,9 +168,9 @@
</span><span class="cx"> void locationChangeDone(IWebError*, IWebFrame*);
</span><span class="cx">
</span><span class="cx"> ULONG m_refCount;
</span><del>- OwnPtr<GCController> m_gcController;
- OwnPtr<AccessibilityController> m_accessibilityController;
- OwnPtr<TextInputController> m_textInputController;
</del><ins>+ std::unique_ptr<GCController> m_gcController;
+ std::unique_ptr<AccessibilityController> m_accessibilityController;
+ std::unique_ptr<TextInputController> m_textInputController;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> #endif // FrameLoadDelegate_h
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreewinHistoryDelegatecpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/win/HistoryDelegate.cpp (167029 => 167030)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/win/HistoryDelegate.cpp        2014-04-09 19:48:31 UTC (rev 167029)
+++ trunk/Tools/DumpRenderTree/win/HistoryDelegate.cpp        2014-04-09 20:21:36 UTC (rev 167030)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2009 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2009, 2014 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx"> #include "DumpRenderTree.h"
</span><span class="cx"> #include "DumpRenderTreeWin.h"
</span><span class="cx"> #include "TestRunner.h"
</span><ins>+#include <comutil.h>
</ins><span class="cx"> #include <string>
</span><span class="cx"> #include <WebKit/WebKit.h>
</span><span class="cx">
</span><span class="lines">@@ -83,33 +84,24 @@
</span><span class="cx"> if (!gTestRunner->dumpHistoryDelegateCallbacks())
</span><span class="cx"> return S_OK;
</span><span class="cx">
</span><del>- BSTR urlBSTR;
- if (FAILED(navigationData->url(&urlBSTR)))
</del><ins>+ _bstr_t urlBSTR;
+ if (FAILED(navigationData->url(&urlBSTR.GetBSTR())))
</ins><span class="cx"> return E_FAIL;
</span><span class="cx"> wstring url;
</span><del>- if (urlBSTR)
</del><ins>+ if (urlBSTR.length())
</ins><span class="cx"> url = urlSuitableForTestResult(wstringFromBSTR(urlBSTR));
</span><del>- SysFreeString(urlBSTR);
</del><span class="cx">
</span><del>- BSTR titleBSTR;
- if (FAILED(navigationData->title(&titleBSTR)))
</del><ins>+ _bstr_t titleBSTR;
+ if (FAILED(navigationData->title(&titleBSTR.GetBSTR())))
</ins><span class="cx"> return E_FAIL;
</span><del>- wstring title;
- if (titleBSTR)
- title = wstringFromBSTR(titleBSTR);
- SysFreeString(titleBSTR);
</del><span class="cx">
</span><span class="cx"> COMPtr<IWebURLRequest> request;
</span><span class="cx"> if (FAILED(navigationData->originalRequest(&request)))
</span><span class="cx"> return E_FAIL;
</span><span class="cx">
</span><del>- BSTR httpMethodBSTR;
- if (FAILED(request->HTTPMethod(&httpMethodBSTR)))
</del><ins>+ _bstr_t httpMethodBSTR;
+ if (FAILED(request->HTTPMethod(&httpMethodBSTR.GetBSTR())))
</ins><span class="cx"> return E_FAIL;
</span><del>- wstring httpMethod;
- if (httpMethodBSTR)
- httpMethod = wstringFromBSTR(httpMethodBSTR);
- SysFreeString(httpMethodBSTR);
</del><span class="cx">
</span><span class="cx"> COMPtr<IWebURLResponse> response;
</span><span class="cx"> if (FAILED(navigationData->response(&response)))
</span><span class="lines">@@ -127,21 +119,20 @@
</span><span class="cx"> if (FAILED(navigationData->hasSubstituteData(&hasSubstituteData)))
</span><span class="cx"> return E_FAIL;
</span><span class="cx">
</span><del>- BSTR clientRedirectSourceBSTR;
- if (FAILED(navigationData->clientRedirectSource(&clientRedirectSourceBSTR)))
</del><ins>+ _bstr_t clientRedirectSourceBSTR;
+ if (FAILED(navigationData->clientRedirectSource(&clientRedirectSourceBSTR.GetBSTR())))
</ins><span class="cx"> return E_FAIL;
</span><del>- bool hasClientRedirect = clientRedirectSourceBSTR && SysStringLen(clientRedirectSourceBSTR);
</del><ins>+ bool hasClientRedirect = clientRedirectSourceBSTR.length();
</ins><span class="cx"> wstring redirectSource;
</span><del>- if (clientRedirectSourceBSTR)
</del><ins>+ if (clientRedirectSourceBSTR.length())
</ins><span class="cx"> redirectSource = urlSuitableForTestResult(wstringFromBSTR(clientRedirectSourceBSTR));
</span><del>- SysFreeString(clientRedirectSourceBSTR);
</del><span class="cx">
</span><span class="cx"> bool wasFailure = hasSubstituteData || (httpResponse && statusCode >= 400);
</span><span class="cx">
</span><span class="cx"> printf("WebView navigated to url \"%S\" with title \"%S\" with HTTP equivalent method \"%S\". The navigation was %s and was %s%S.\n",
</span><span class="cx"> url.c_str(),
</span><del>- title.c_str(),
- httpMethod.c_str(),
</del><ins>+ static_cast<wchar_t*>(titleBSTR),
+ static_cast<wchar_t*>(httpMethodBSTR),
</ins><span class="cx"> wasFailure ? "a failure" : "successful",
</span><span class="cx"> hasClientRedirect ? "a client redirect from " : "not a client redirect",
</span><span class="cx"> redirectSource.c_str());
</span><span class="lines">@@ -192,11 +183,7 @@
</span><span class="cx"> if (urlBSTR)
</span><span class="cx"> url = urlSuitableForTestResult(wstringFromBSTR(urlBSTR));
</span><span class="cx">
</span><del>- wstring title;
- if (titleBSTR)
- title = wstringFromBSTR(titleBSTR);
-
- printf("WebView updated the title for history URL \"%S\" to \"%S\".\n", url.c_str(), title.c_str());
</del><ins>+ printf("WebView updated the title for history URL \"%S\" to \"%S\".\n", url.c_str(), titleBSTR ? titleBSTR : L"");
</ins><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -205,14 +192,13 @@
</span><span class="cx"> if (!gTestRunner->dumpHistoryDelegateCallbacks())
</span><span class="cx"> return S_OK;
</span><span class="cx">
</span><del>- BSTR urlBSTR;
- if (FAILED(webView->mainFrameURL(&urlBSTR)))
</del><ins>+ _bstr_t urlBSTR;
+ if (FAILED(webView->mainFrameURL(&urlBSTR.GetBSTR())))
</ins><span class="cx"> return E_FAIL;
</span><span class="cx">
</span><span class="cx"> wstring url;
</span><del>- if (urlBSTR)
</del><ins>+ if (urlBSTR.length())
</ins><span class="cx"> url = urlSuitableForTestResult(wstringFromBSTR(urlBSTR));
</span><del>- SysFreeString(urlBSTR);
</del><span class="cx">
</span><span class="cx"> if (gTestRunner->dumpVisitedLinksCallback())
</span><span class="cx"> printf("Asked to populate visited links for WebView \"%S\"\n", url.c_str());
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreewinPolicyDelegatecpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/win/PolicyDelegate.cpp (167029 => 167030)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/win/PolicyDelegate.cpp        2014-04-09 19:48:31 UTC (rev 167029)
+++ trunk/Tools/DumpRenderTree/win/PolicyDelegate.cpp        2014-04-09 20:21:36 UTC (rev 167030)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2007, 2009 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2007, 2009, 2014 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -31,6 +31,7 @@
</span><span class="cx">
</span><span class="cx"> #include "DumpRenderTree.h"
</span><span class="cx"> #include "TestRunner.h"
</span><ins>+#include <comutil.h>
</ins><span class="cx"> #include <string>
</span><span class="cx">
</span><span class="cx"> using std::wstring;
</span><span class="lines">@@ -41,11 +42,10 @@
</span><span class="cx">
</span><span class="cx"> wstring result;
</span><span class="cx">
</span><del>- BSTR name;
- if (FAILED(node->nodeName(&name)))
</del><ins>+ _bstr_t name;
+ if (FAILED(node->nodeName(&name.GetBSTR())))
</ins><span class="cx"> return result;
</span><del>- result.assign(name, SysStringLen(name));
- SysFreeString(name);
</del><ins>+ result.assign(name, name.length());
</ins><span class="cx">
</span><span class="cx"> COMPtr<IDOMNode> parent;
</span><span class="cx"> if (SUCCEEDED(node->parentNode(&parent)))
</span><span class="lines">@@ -62,7 +62,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // IUnknown
</span><del>-HRESULT STDMETHODCALLTYPE PolicyDelegate::QueryInterface(REFIID riid, void** ppvObject)
</del><ins>+HRESULT PolicyDelegate::QueryInterface(REFIID riid, void** ppvObject)
</ins><span class="cx"> {
</span><span class="cx"> *ppvObject = 0;
</span><span class="cx"> if (IsEqualGUID(riid, IID_IUnknown))
</span><span class="lines">@@ -76,12 +76,12 @@
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-ULONG STDMETHODCALLTYPE PolicyDelegate::AddRef(void)
</del><ins>+ULONG PolicyDelegate::AddRef(void)
</ins><span class="cx"> {
</span><span class="cx"> return ++m_refCount;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-ULONG STDMETHODCALLTYPE PolicyDelegate::Release(void)
</del><ins>+ULONG PolicyDelegate::Release(void)
</ins><span class="cx"> {
</span><span class="cx"> ULONG newRef = --m_refCount;
</span><span class="cx"> if (!newRef)
</span><span class="lines">@@ -90,16 +90,16 @@
</span><span class="cx"> return newRef;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE PolicyDelegate::decidePolicyForNavigationAction(
</del><ins>+HRESULT PolicyDelegate::decidePolicyForNavigationAction(
</ins><span class="cx"> /*[in]*/ IWebView* /*webView*/,
</span><span class="cx"> /*[in]*/ IPropertyBag* actionInformation,
</span><span class="cx"> /*[in]*/ IWebURLRequest* request,
</span><span class="cx"> /*[in]*/ IWebFrame* frame,
</span><span class="cx"> /*[in]*/ IWebPolicyDecisionListener* listener)
</span><span class="cx"> {
</span><del>- BSTR url;
- request->URL(&url);
- wstring wurl = urlSuitableForTestResult(wstring(url, SysStringLen(url)));
</del><ins>+ _bstr_t url;
+ request->URL(&url.GetBSTR());
+ wstring wurl = urlSuitableForTestResult(wstring(url, url.length()));
</ins><span class="cx">
</span><span class="cx"> int navType = 0;
</span><span class="cx"> VARIANT var;
</span><span class="lines">@@ -146,8 +146,6 @@
</span><span class="cx">
</span><span class="cx"> printf("%S\n", message.c_str());
</span><span class="cx">
</span><del>- SysFreeString(url);
-
</del><span class="cx"> if (m_permissiveDelegate)
</span><span class="cx"> listener->use();
</span><span class="cx"> else
</span><span class="lines">@@ -162,26 +160,21 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE PolicyDelegate::unableToImplementPolicyWithError(
</del><ins>+HRESULT PolicyDelegate::unableToImplementPolicyWithError(
</ins><span class="cx"> /*[in]*/ IWebView* /*webView*/,
</span><span class="cx"> /*[in]*/ IWebError* error,
</span><span class="cx"> /*[in]*/ IWebFrame* frame)
</span><span class="cx"> {
</span><del>- BSTR domainStr;
- error->domain(&domainStr);
- wstring domainMessage = domainStr;
</del><ins>+ _bstr_t domainStr;
+ error->domain(&domainStr.GetBSTR());
</ins><span class="cx">
</span><span class="cx"> int code;
</span><span class="cx"> error->code(&code);
</span><span class="cx">
</span><del>- BSTR frameName;
- frame->name(&frameName);
- wstring frameNameMessage = frameName;
</del><ins>+ _bstr_t frameName;
+ frame->name(&frameName.GetBSTR());
</ins><span class="cx">
</span><del>- printf("Policy delegate: unable to implement policy with error domain '%S', error code %d, in frame '%S'", domainMessage.c_str(), code, frameNameMessage.c_str());
</del><ins>+ printf("Policy delegate: unable to implement policy with error domain '%S', error code %d, in frame '%S'", static_cast<wchar_t*>(domainStr), code, static_cast<TCHAR*>(frameName));
</ins><span class="cx">
</span><del>- SysFreeString(domainStr);
- SysFreeString(frameName);
-
</del><span class="cx"> return S_OK;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreewinResourceLoadDelegatecpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/win/ResourceLoadDelegate.cpp (167029 => 167030)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/win/ResourceLoadDelegate.cpp        2014-04-09 19:48:31 UTC (rev 167029)
+++ trunk/Tools/DumpRenderTree/win/ResourceLoadDelegate.cpp        2014-04-09 20:21:36 UTC (rev 167030)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2007 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2007, 2014 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -74,28 +74,23 @@
</span><span class="cx"> if (!request)
</span><span class="cx"> return L"(null)";
</span><span class="cx">
</span><del>- BSTR urlBSTR;
- if (FAILED(request->URL(&urlBSTR)))
</del><ins>+ _bstr_t urlBSTR;
+ if (FAILED(request->URL(&urlBSTR.GetBSTR())))
</ins><span class="cx"> return wstring();
</span><span class="cx">
</span><span class="cx"> wstring url = urlSuitableForTestResult(wstringFromBSTR(urlBSTR));
</span><del>- ::SysFreeString(urlBSTR);
</del><span class="cx">
</span><del>- BSTR mainDocumentURLBSTR;
- if (FAILED(request->mainDocumentURL(&mainDocumentURLBSTR)))
</del><ins>+ _bstr_t mainDocumentURLBSTR;
+ if (FAILED(request->mainDocumentURL(&mainDocumentURLBSTR.GetBSTR())))
</ins><span class="cx"> return wstring();
</span><span class="cx">
</span><span class="cx"> wstring mainDocumentURL = urlSuitableForTestResult(wstringFromBSTR(mainDocumentURLBSTR));
</span><del>- ::SysFreeString(mainDocumentURLBSTR);
</del><span class="cx">
</span><del>- BSTR httpMethodBSTR;
- if (FAILED(request->HTTPMethod(&httpMethodBSTR)))
</del><ins>+ _bstr_t httpMethodBSTR;
+ if (FAILED(request->HTTPMethod(&httpMethodBSTR.GetBSTR())))
</ins><span class="cx"> return wstring();
</span><span class="cx">
</span><del>- wstring httpMethod = wstringFromBSTR(httpMethodBSTR);
- ::SysFreeString(httpMethodBSTR);
-
- return L"<NSURLRequest URL " + url + L", main document URL " + mainDocumentURL + L", http method " + httpMethod + L">";
</del><ins>+ return L"<NSURLRequest URL " + url + L", main document URL " + mainDocumentURL + L", http method " + static_cast<wchar_t*>(httpMethodBSTR) + L">";
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> wstring ResourceLoadDelegate::descriptionSuitableForTestResult(IWebURLResponse* response)
</span><span class="lines">@@ -103,12 +98,11 @@
</span><span class="cx"> if (!response)
</span><span class="cx"> return L"(null)";
</span><span class="cx">
</span><del>- BSTR urlBSTR;
- if (FAILED(response->URL(&urlBSTR)))
</del><ins>+ _bstr_t urlBSTR;
+ if (FAILED(response->URL(&urlBSTR.GetBSTR())))
</ins><span class="cx"> return wstring();
</span><span class="cx">
</span><span class="cx"> wstring url = urlSuitableForTestResult(wstringFromBSTR(urlBSTR));
</span><del>- ::SysFreeString(urlBSTR);
</del><span class="cx">
</span><span class="cx"> int statusCode = 0;
</span><span class="cx"> COMPtr<IWebHTTPURLResponse> httpResponse;
</span><span class="lines">@@ -122,12 +116,11 @@
</span><span class="cx"> {
</span><span class="cx"> wstring result = L"<NSError ";
</span><span class="cx">
</span><del>- BSTR domainSTR;
- if (FAILED(error->domain(&domainSTR)))
</del><ins>+ _bstr_t domainSTR;
+ if (FAILED(error->domain(&domainSTR.GetBSTR())))
</ins><span class="cx"> return wstring();
</span><span class="cx">
</span><span class="cx"> wstring domain = wstringFromBSTR(domainSTR);
</span><del>- ::SysFreeString(domainSTR);
</del><span class="cx">
</span><span class="cx"> int code;
</span><span class="cx"> if (FAILED(error->code(&code)))
</span><span class="lines">@@ -150,14 +143,12 @@
</span><span class="cx"> result += L"domain " + domain;
</span><span class="cx"> result += L", code " + wstringFromInt(code);
</span><span class="cx">
</span><del>- BSTR failingURLSTR;
- if (FAILED(error->failingURL(&failingURLSTR)))
</del><ins>+ _bstr_t failingURLSTR;
+ if (FAILED(error->failingURL(&failingURLSTR.GetBSTR())))
</ins><span class="cx"> return wstring();
</span><span class="cx">
</span><del>- if (failingURLSTR) {
</del><ins>+ if (failingURLSTR.length())
</ins><span class="cx"> result += L", failing URL \"" + urlSuitableForTestResult(wstringFromBSTR(failingURLSTR)) + L"\"";
</span><del>- ::SysFreeString(failingURLSTR);
- }
</del><span class="cx">
</span><span class="cx"> result += L">";
</span><span class="cx">
</span><span class="lines">@@ -173,7 +164,7 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE ResourceLoadDelegate::QueryInterface(REFIID riid, void** ppvObject)
</del><ins>+HRESULT ResourceLoadDelegate::QueryInterface(REFIID riid, void** ppvObject)
</ins><span class="cx"> {
</span><span class="cx"> *ppvObject = 0;
</span><span class="cx"> if (IsEqualGUID(riid, IID_IUnknown))
</span><span class="lines">@@ -189,12 +180,12 @@
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-ULONG STDMETHODCALLTYPE ResourceLoadDelegate::AddRef(void)
</del><ins>+ULONG ResourceLoadDelegate::AddRef(void)
</ins><span class="cx"> {
</span><span class="cx"> return ++m_refCount;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-ULONG STDMETHODCALLTYPE ResourceLoadDelegate::Release(void)
</del><ins>+ULONG ResourceLoadDelegate::Release(void)
</ins><span class="cx"> {
</span><span class="cx"> ULONG newRef = --m_refCount;
</span><span class="cx"> if (!newRef)
</span><span class="lines">@@ -203,15 +194,11 @@
</span><span class="cx"> return newRef;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE ResourceLoadDelegate::identifierForInitialRequest(
- /* [in] */ IWebView* webView,
- /* [in] */ IWebURLRequest* request,
- /* [in] */ IWebDataSource* dataSource,
- /* [in] */ unsigned long identifier)
</del><ins>+HRESULT ResourceLoadDelegate::identifierForInitialRequest(IWebView* webView, IWebURLRequest* request, IWebDataSource* dataSource, unsigned long identifier)
</ins><span class="cx"> {
</span><span class="cx"> if (!done && gTestRunner->dumpResourceLoadCallbacks()) {
</span><del>- BSTR urlStr;
- if (FAILED(request->URL(&urlStr)))
</del><ins>+ _bstr_t urlStr;
+ if (FAILED(request->URL(&urlStr.GetBSTR())))
</ins><span class="cx"> return E_FAIL;
</span><span class="cx">
</span><span class="cx"> ASSERT(!urlMap().contains(identifier));
</span><span class="lines">@@ -221,7 +208,7 @@
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE ResourceLoadDelegate::removeIdentifierForRequest(
</del><ins>+HRESULT ResourceLoadDelegate::removeIdentifierForRequest(
</ins><span class="cx"> /* [in] */ IWebView* webView,
</span><span class="cx"> /* [in] */ unsigned long identifier)
</span><span class="cx"> {
</span><span class="lines">@@ -230,13 +217,8 @@
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE ResourceLoadDelegate::willSendRequest(
- /* [in] */ IWebView* webView,
- /* [in] */ unsigned long identifier,
- /* [in] */ IWebURLRequest* request,
- /* [in] */ IWebURLResponse* redirectResponse,
- /* [in] */ IWebDataSource* dataSource,
- /* [retval][out] */ IWebURLRequest **newRequest)
</del><ins>+HRESULT ResourceLoadDelegate::willSendRequest(IWebView* webView, unsigned long identifier, IWebURLRequest* request,
+ IWebURLResponse* redirectResponse, IWebDataSource* dataSource, IWebURLRequest** newRequest)
</ins><span class="cx"> {
</span><span class="cx"> if (!done && gTestRunner->dumpResourceLoadCallbacks()) {
</span><span class="cx"> printf("%S - willSendRequest %S redirectResponse %S\n",
</span><span class="lines">@@ -267,20 +249,15 @@
</span><span class="cx"> request->mutableCopy(&requestCopy);
</span><span class="cx"> const set<string>& clearHeaders = gTestRunner->willSendRequestClearHeaders();
</span><span class="cx"> for (set<string>::const_iterator header = clearHeaders.begin(); header != clearHeaders.end(); ++header) {
</span><del>- BSTR bstrHeader = BSTRFromString(*header);
- requestCopy->setValue(0, bstrHeader);
- SysFreeString(bstrHeader);
</del><ins>+ _bstr_t bstrHeader(header->data());
+ requestCopy->setValue(0, bstrHeader);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> *newRequest = requestCopy;
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE ResourceLoadDelegate::didReceiveAuthenticationChallenge(
- /* [in] */ IWebView *webView,
- /* [in] */ unsigned long identifier,
- /* [in] */ IWebURLAuthenticationChallenge *challenge,
- /* [in] */ IWebDataSource *dataSource)
</del><ins>+HRESULT ResourceLoadDelegate::didReceiveAuthenticationChallenge(IWebView* webView, unsigned long identifier, IWebURLAuthenticationChallenge* challenge, IWebDataSource* dataSource)
</ins><span class="cx"> {
</span><span class="cx"> COMPtr<IWebURLAuthenticationChallengeSender> sender;
</span><span class="cx"> if (!challenge || FAILED(challenge->sender(&sender)))
</span><span class="lines">@@ -306,7 +283,7 @@
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE ResourceLoadDelegate::didReceiveResponse(
</del><ins>+HRESULT ResourceLoadDelegate::didReceiveResponse(
</ins><span class="cx"> /* [in] */ IWebView* webView,
</span><span class="cx"> /* [in] */ unsigned long identifier,
</span><span class="cx"> /* [in] */ IWebURLResponse* response,
</span><span class="lines">@@ -318,31 +295,24 @@
</span><span class="cx"> descriptionSuitableForTestResult(response).c_str());
</span><span class="cx"> }
</span><span class="cx"> if (!done && gTestRunner->dumpResourceResponseMIMETypes()) {
</span><del>- BSTR mimeTypeBSTR;
- if (FAILED(response->MIMEType(&mimeTypeBSTR)))
</del><ins>+ _bstr_t mimeTypeBSTR;
+ if (FAILED(response->MIMEType(&mimeTypeBSTR.GetBSTR())))
</ins><span class="cx"> E_FAIL;
</span><span class="cx">
</span><del>- wstring mimeType = wstringFromBSTR(mimeTypeBSTR);
- ::SysFreeString(mimeTypeBSTR);
-
- BSTR urlBSTR;
- if (FAILED(response->URL(&urlBSTR)))
</del><ins>+ _bstr_t urlBSTR;
+ if (FAILED(response->URL(&urlBSTR.GetBSTR())))
</ins><span class="cx"> E_FAIL;
</span><span class="cx">
</span><span class="cx"> wstring url = wstringFromBSTR(urlBSTR);
</span><del>- ::SysFreeString(urlBSTR);
</del><span class="cx">
</span><del>- printf("%S has MIME type %S\n", lastPathComponent(url).c_str(), mimeType.c_str());
</del><ins>+ printf("%S has MIME type %S\n", lastPathComponent(url).c_str(), static_cast<wchar_t*>(mimeTypeBSTR));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE ResourceLoadDelegate::didFinishLoadingFromDataSource(
- /* [in] */ IWebView* webView,
- /* [in] */ unsigned long identifier,
- /* [in] */ IWebDataSource* dataSource)
</del><ins>+HRESULT ResourceLoadDelegate::didFinishLoadingFromDataSource(IWebView* webView, unsigned long identifier, IWebDataSource* dataSource)
</ins><span class="cx"> {
</span><span class="cx"> if (!done && gTestRunner->dumpResourceLoadCallbacks()) {
</span><span class="cx"> printf("%S - didFinishLoading\n",
</span><span class="lines">@@ -354,11 +324,7 @@
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE ResourceLoadDelegate::didFailLoadingWithError(
- /* [in] */ IWebView* webView,
- /* [in] */ unsigned long identifier,
- /* [in] */ IWebError* error,
- /* [in] */ IWebDataSource* dataSource)
</del><ins>+HRESULT ResourceLoadDelegate::didFailLoadingWithError(IWebView* webView, unsigned long identifier, IWebError* error, IWebDataSource* dataSource)
</ins><span class="cx"> {
</span><span class="cx"> if (!done && gTestRunner->dumpResourceLoadCallbacks()) {
</span><span class="cx"> printf("%S - didFailLoadingWithError: %S\n",
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreewinTestRunnerWincpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/win/TestRunnerWin.cpp (167029 => 167030)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/win/TestRunnerWin.cpp        2014-04-09 19:48:31 UTC (rev 167029)
+++ trunk/Tools/DumpRenderTree/win/TestRunnerWin.cpp        2014-04-09 20:21:36 UTC (rev 167030)
</span><span class="lines">@@ -233,11 +233,10 @@
</span><span class="cx"> if (FAILED(dataSource->response(&response)) || !response)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- BSTR responseURLBSTR;
- if (FAILED(response->URL(&responseURLBSTR)))
</del><ins>+ _bstr_t responseURLBSTR;
+ if (FAILED(response->URL(&responseURLBSTR.GetBSTR())))
</ins><span class="cx"> return;
</span><del>- wstring responseURL(responseURLBSTR, SysStringLen(responseURLBSTR));
- SysFreeString(responseURLBSTR);
</del><ins>+ wstring responseURL(responseURLBSTR, responseURLBSTR.length());
</ins><span class="cx">
</span><span class="cx"> // FIXME: We should do real relative URL resolution here.
</span><span class="cx"> int lastSlash = responseURL.rfind('/');
</span><span class="lines">@@ -656,9 +655,8 @@
</span><span class="cx">
</span><span class="cx"> resultPath = cfStringRefToWString(CFURLGetString(url.get()));
</span><span class="cx">
</span><del>- BSTR resultPathBSTR = SysAllocStringLen(resultPath.data(), resultPath.size());
</del><ins>+ _bstr_t resultPathBSTR(resultPath.data());
</ins><span class="cx"> preferences->setUserStyleSheetLocation(resultPathBSTR);
</span><del>- SysFreeString(resultPathBSTR);
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void TestRunner::setValueForUser(JSContextRef context, JSValueRef element, JSStringRef value)
</span><span class="lines">@@ -738,9 +736,6 @@
</span><span class="cx">
</span><span class="cx"> void TestRunner::execCommand(JSStringRef name, JSStringRef value)
</span><span class="cx"> {
</span><del>- wstring wName = jsStringRefToWString(name);
- wstring wValue = jsStringRefToWString(value);
-
</del><span class="cx"> COMPtr<IWebView> webView;
</span><span class="cx"> if (FAILED(frame->webView(&webView)))
</span><span class="cx"> return;
</span><span class="lines">@@ -749,12 +744,9 @@
</span><span class="cx"> if (FAILED(webView->QueryInterface(&viewPrivate)))
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- BSTR nameBSTR = SysAllocStringLen((OLECHAR*)wName.c_str(), wName.length());
- BSTR valueBSTR = SysAllocStringLen((OLECHAR*)wValue.c_str(), wValue.length());
</del><ins>+ _bstr_t nameBSTR(JSStringCopyBSTR(name), false);
+ _bstr_t valueBSTR(JSStringCopyBSTR(value), false);
</ins><span class="cx"> viewPrivate->executeCoreCommandByName(nameBSTR, valueBSTR);
</span><del>-
- SysFreeString(nameBSTR);
- SysFreeString(valueBSTR);
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool TestRunner::findString(JSContextRef /* context */, JSStringRef /* target */, JSObjectRef /* optionsArray */)
</span><span class="lines">@@ -822,11 +814,9 @@
</span><span class="cx"> if (!prefsPrivate)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- BSTR keyBSTR = JSStringCopyBSTR(key);
- BSTR valueBSTR = JSStringCopyBSTR(value);
</del><ins>+ _bstr_t keyBSTR(JSStringCopyBSTR(key), false);
+ _bstr_t valueBSTR(JSStringCopyBSTR(value), false);
</ins><span class="cx"> prefsPrivate->setPreferenceForTest(keyBSTR, valueBSTR);
</span><del>- SysFreeString(keyBSTR);
- SysFreeString(valueBSTR);
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void TestRunner::setDatabaseQuota(unsigned long long quota)
</span><span class="lines">@@ -1036,10 +1026,9 @@
</span><span class="cx"> world = worldSlot;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- BSTR result;
- if (FAILED(framePrivate->stringByEvaluatingJavaScriptInScriptWorld(world.get(), globalObject, bstrT(script).GetBSTR(), &result)))
</del><ins>+ _bstr_t result;
+ if (FAILED(framePrivate->stringByEvaluatingJavaScriptInScriptWorld(world.get(), globalObject, bstrT(script).GetBSTR(), &result.GetBSTR())))
</ins><span class="cx"> return;
</span><del>- SysFreeString(result);
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void TestRunner::removeAllVisitedLinks()
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreewinTextInputControllerWincpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/win/TextInputControllerWin.cpp (167029 => 167030)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/win/TextInputControllerWin.cpp        2014-04-09 19:48:31 UTC (rev 167029)
+++ trunk/Tools/DumpRenderTree/win/TextInputControllerWin.cpp        2014-04-09 20:21:36 UTC (rev 167030)
</span><span class="lines">@@ -30,6 +30,7 @@
</span><span class="cx"> #include "TextInputController.h"
</span><span class="cx">
</span><span class="cx"> #include "DumpRenderTree.h"
</span><ins>+#include <JavaScriptCore/JSStringRefBSTR.h>
</ins><span class="cx"> #include <WebCore/COMPtr.h>
</span><span class="cx"> #include <WebKit/WebKit.h>
</span><span class="cx"> #include <comutil.h>
</span><span class="lines">@@ -47,7 +48,7 @@
</span><span class="cx"> if (FAILED(webView->QueryInterface(&viewPrivate)))
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- _bstr_t bstr(wstring(JSStringGetCharactersPtr(text), JSStringGetLength(text)).data());
</del><ins>+ _bstr_t bstr(JSStringCopyBSTR(text), false);
</ins><span class="cx">
</span><span class="cx"> viewPrivate->setCompositionForTesting(bstr, from, length);
</span><span class="cx"> }
</span><span class="lines">@@ -115,7 +116,7 @@
</span><span class="cx"> if (FAILED(webView->QueryInterface(&viewPrivate)))
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- _bstr_t bstr(wstring(JSStringGetCharactersPtr(text), JSStringGetLength(text)).data());
</del><ins>+ _bstr_t bstr(JSStringCopyBSTR(text), false);
</ins><span class="cx">
</span><span class="cx"> viewPrivate->confirmCompositionForTesting(bstr);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreewinUIDelegatecpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/win/UIDelegate.cpp (167029 => 167030)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/win/UIDelegate.cpp        2014-04-09 19:48:31 UTC (rev 167029)
+++ trunk/Tools/DumpRenderTree/win/UIDelegate.cpp        2014-04-09 20:21:36 UTC (rev 167030)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2005, 2006, 2007, 2008, 2014 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -42,6 +42,7 @@
</span><span class="cx"> #include <JavaScriptCore/JavaScriptCore.h>
</span><span class="cx"> #include <WebKit/WebKit.h>
</span><span class="cx"> #include <WebKit/WebKitCOMAPI.h>
</span><ins>+#include <comutil.h>
</ins><span class="cx"> #include <stdio.h>
</span><span class="cx">
</span><span class="cx"> using std::wstring;
</span><span class="lines">@@ -170,7 +171,7 @@
</span><span class="cx"> m_undoManager = adoptPtr(new DRTUndoManager);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE UIDelegate::QueryInterface(REFIID riid, void** ppvObject)
</del><ins>+HRESULT UIDelegate::QueryInterface(REFIID riid, void** ppvObject)
</ins><span class="cx"> {
</span><span class="cx"> *ppvObject = 0;
</span><span class="cx"> if (IsEqualGUID(riid, IID_IUnknown))
</span><span class="lines">@@ -192,12 +193,12 @@
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-ULONG STDMETHODCALLTYPE UIDelegate::AddRef()
</del><ins>+ULONG UIDelegate::AddRef()
</ins><span class="cx"> {
</span><span class="cx"> return ++m_refCount;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-ULONG STDMETHODCALLTYPE UIDelegate::Release()
</del><ins>+ULONG UIDelegate::Release()
</ins><span class="cx"> {
</span><span class="cx"> ULONG newRef = --m_refCount;
</span><span class="cx"> if (!newRef)
</span><span class="lines">@@ -206,61 +207,51 @@
</span><span class="cx"> return newRef;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE UIDelegate::hasCustomMenuImplementation(
- /* [retval][out] */ BOOL *hasCustomMenus)
</del><ins>+HRESULT UIDelegate::hasCustomMenuImplementation(BOOL* hasCustomMenus)
</ins><span class="cx"> {
</span><span class="cx"> *hasCustomMenus = TRUE;
</span><span class="cx">
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE UIDelegate::trackCustomPopupMenu(
- /* [in] */ IWebView *sender,
- /* [in] */ OLE_HANDLE menu,
- /* [in] */ LPPOINT point)
</del><ins>+HRESULT UIDelegate::trackCustomPopupMenu(IWebView* /*sender*/, OLE_HANDLE /*menu*/, LPPOINT /*point*/)
</ins><span class="cx"> {
</span><span class="cx"> // Do nothing
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE UIDelegate::registerUndoWithTarget(
- /* [in] */ IWebUndoTarget* target,
- /* [in] */ BSTR actionName,
- /* [in] */ IUnknown* actionArg)
</del><ins>+HRESULT UIDelegate::registerUndoWithTarget(IWebUndoTarget* target, BSTR actionName, IUnknown* actionArg)
</ins><span class="cx"> {
</span><span class="cx"> m_undoManager->registerUndoWithTarget(target, actionName, actionArg);
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE UIDelegate::removeAllActionsWithTarget(
- /* [in] */ IWebUndoTarget*)
</del><ins>+HRESULT UIDelegate::removeAllActionsWithTarget(IWebUndoTarget*)
</ins><span class="cx"> {
</span><span class="cx"> m_undoManager->removeAllActions();
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE UIDelegate::setActionTitle(
- /* [in] */ BSTR actionTitle)
</del><ins>+HRESULT UIDelegate::setActionTitle(BSTR /*actionTitle*/)
</ins><span class="cx"> {
</span><span class="cx"> // It is not neccessary to implement this for DRT because there is
</span><span class="cx"> // menu to write out the title to.
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE UIDelegate::undo()
</del><ins>+HRESULT UIDelegate::undo()
</ins><span class="cx"> {
</span><span class="cx"> m_undoManager->undo();
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE UIDelegate::redo()
</del><ins>+HRESULT UIDelegate::redo()
</ins><span class="cx"> {
</span><span class="cx"> m_undoManager->redo();
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE UIDelegate::canUndo(
- /* [retval][out] */ BOOL* result)
</del><ins>+HRESULT UIDelegate::canUndo(BOOL* result)
</ins><span class="cx"> {
</span><span class="cx"> if (!result)
</span><span class="cx"> return E_POINTER;
</span><span class="lines">@@ -269,8 +260,7 @@
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE UIDelegate::canRedo(
- /* [retval][out] */ BOOL* result)
</del><ins>+HRESULT UIDelegate::canRedo(BOOL* result)
</ins><span class="cx"> {
</span><span class="cx"> if (!result)
</span><span class="cx"> return E_POINTER;
</span><span class="lines">@@ -279,16 +269,12 @@
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE UIDelegate::printFrame(
- /* [in] */ IWebView *webView,
- /* [in] */ IWebFrame *frame)
</del><ins>+HRESULT UIDelegate::printFrame(IWebView* /*webView*/, IWebFrame* /*frame*/)
</ins><span class="cx"> {
</span><span class="cx"> return E_NOTIMPL;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE UIDelegate::ftpDirectoryTemplatePath(
- /* [in] */ IWebView *webView,
- /* [retval][out] */ BSTR *path)
</del><ins>+HRESULT UIDelegate::ftpDirectoryTemplatePath(IWebView* /*webView*/, BSTR* path)
</ins><span class="cx"> {
</span><span class="cx"> if (!path)
</span><span class="cx"> return E_POINTER;
</span><span class="lines">@@ -297,9 +283,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE UIDelegate::webViewHeaderHeight(
- /* [in] */ IWebView *webView,
- /* [retval][out] */ float *result)
</del><ins>+HRESULT UIDelegate::webViewHeaderHeight(IWebView* /*webView*/, float* result)
</ins><span class="cx"> {
</span><span class="cx"> if (!result)
</span><span class="cx"> return E_POINTER;
</span><span class="lines">@@ -307,9 +291,7 @@
</span><span class="cx"> return E_NOTIMPL;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE UIDelegate::webViewFooterHeight(
- /* [in] */ IWebView *webView,
- /* [retval][out] */ float *result)
</del><ins>+HRESULT UIDelegate::webViewFooterHeight(IWebView* /*webView*/, float* result)
</ins><span class="cx"> {
</span><span class="cx"> if (!result)
</span><span class="cx"> return E_POINTER;
</span><span class="lines">@@ -317,55 +299,37 @@
</span><span class="cx"> return E_NOTIMPL;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE UIDelegate::drawHeaderInRect(
- /* [in] */ IWebView *webView,
- /* [in] */ RECT *rect,
- /* [in] */ OLE_HANDLE drawingContext)
</del><ins>+HRESULT UIDelegate::drawHeaderInRect(IWebView* /*webView*/, RECT* /*rect*/, OLE_HANDLE /*drawingContext*/)
</ins><span class="cx"> {
</span><span class="cx"> return E_NOTIMPL;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE UIDelegate::drawFooterInRect(
- /* [in] */ IWebView *webView,
- /* [in] */ RECT *rect,
- /* [in] */ OLE_HANDLE drawingContext,
- /* [in] */ UINT pageIndex,
- /* [in] */ UINT pageCount)
</del><ins>+HRESULT UIDelegate::drawFooterInRect(IWebView* /*webView*/, RECT* /*rect*/, OLE_HANDLE /*drawingContext*/, UINT /*pageIndex*/, UINT /*pageCount*/)
</ins><span class="cx"> {
</span><span class="cx"> return E_NOTIMPL;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE UIDelegate::webViewPrintingMarginRect(
- /* [in] */ IWebView *webView,
- /* [retval][out] */ RECT *rect)
</del><ins>+HRESULT UIDelegate::webViewPrintingMarginRect(IWebView* /*webView*/, RECT* /*rect*/)
</ins><span class="cx"> {
</span><span class="cx"> return E_NOTIMPL;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE UIDelegate::canRunModal(
- /* [in] */ IWebView *webView,
- /* [retval][out] */ BOOL *canRunBoolean)
</del><ins>+HRESULT UIDelegate::canRunModal(IWebView* /*webView*/, BOOL* /*canRunBoolean*/)
</ins><span class="cx"> {
</span><span class="cx"> return E_NOTIMPL;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE UIDelegate::createModalDialog(
- /* [in] */ IWebView *sender,
- /* [in] */ IWebURLRequest *request,
- /* [retval][out] */ IWebView **newWebView)
</del><ins>+HRESULT UIDelegate::createModalDialog(IWebView* /*sender*/, IWebURLRequest* /*request*/, IWebView** /*newWebView*/)
</ins><span class="cx"> {
</span><span class="cx"> return E_NOTIMPL;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE UIDelegate::runModal(
- /* [in] */ IWebView *webView)
</del><ins>+HRESULT UIDelegate::runModal(IWebView* /*webView*/)
</ins><span class="cx"> {
</span><span class="cx"> return E_NOTIMPL;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE UIDelegate::isMenuBarVisible(
- /* [in] */ IWebView *webView,
- /* [retval][out] */ BOOL *visible)
</del><ins>+HRESULT UIDelegate::isMenuBarVisible(IWebView* /*webView*/, BOOL* visible)
</ins><span class="cx"> {
</span><span class="cx"> if (!visible)
</span><span class="cx"> return E_POINTER;
</span><span class="lines">@@ -373,18 +337,12 @@
</span><span class="cx"> return E_NOTIMPL;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE UIDelegate::setMenuBarVisible(
- /* [in] */ IWebView *webView,
- /* [in] */ BOOL visible)
</del><ins>+HRESULT UIDelegate::setMenuBarVisible(IWebView* /*webView*/, BOOL /*visible*/)
</ins><span class="cx"> {
</span><span class="cx"> return E_NOTIMPL;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE UIDelegate::runDatabaseSizeLimitPrompt(
- /* [in] */ IWebView *webView,
- /* [in] */ BSTR displayName,
- /* [in] */ IWebFrame *initiatedByFrame,
- /* [retval][out] */ BOOL *allowed)
</del><ins>+HRESULT UIDelegate::runDatabaseSizeLimitPrompt(IWebView* /*webView*/, BSTR /*displayName*/, IWebFrame* /*initiatedByFrame*/, BOOL* allowed)
</ins><span class="cx"> {
</span><span class="cx"> if (!allowed)
</span><span class="cx"> return E_POINTER;
</span><span class="lines">@@ -392,48 +350,30 @@
</span><span class="cx"> return E_NOTIMPL;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE UIDelegate::paintCustomScrollbar(
- /* [in] */ IWebView *webView,
- /* [in] */ HDC hDC,
- /* [in] */ RECT rect,
- /* [in] */ WebScrollBarControlSize size,
- /* [in] */ WebScrollbarControlState state,
- /* [in] */ WebScrollbarControlPart pressedPart,
- /* [in] */ BOOL vertical,
- /* [in] */ float value,
- /* [in] */ float proportion,
- /* [in] */ WebScrollbarControlPartMask parts)
</del><ins>+HRESULT UIDelegate::paintCustomScrollbar(IWebView* /*webView*/, HDC /*hDC*/, RECT /*rect*/, WebScrollBarControlSize /*size*/, WebScrollbarControlState /*state*/,
+ WebScrollbarControlPart /*pressedPart*/, BOOL /*vertical*/, float /*value*/, float /*proportion*/, WebScrollbarControlPartMask /*parts*/)
</ins><span class="cx"> {
</span><span class="cx"> return E_NOTIMPL;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE UIDelegate::paintCustomScrollCorner(
- /* [in] */ IWebView *webView,
- /* [in] */ HDC hDC,
- /* [in] */ RECT rect)
</del><ins>+HRESULT UIDelegate::paintCustomScrollCorner(IWebView* /*webView*/, HDC /*hDC*/, RECT /*rect*/)
</ins><span class="cx"> {
</span><span class="cx"> return E_NOTIMPL;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE UIDelegate::setFrame(
- /* [in] */ IWebView* /*sender*/,
- /* [in] */ RECT* frame)
</del><ins>+HRESULT UIDelegate::setFrame(IWebView* /*sender*/, RECT* frame)
</ins><span class="cx"> {
</span><span class="cx"> m_frame = *frame;
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE UIDelegate::webViewFrame(
- /* [in] */ IWebView* /*sender*/,
- /* [retval][out] */ RECT* frame)
</del><ins>+HRESULT UIDelegate::webViewFrame(IWebView* /*sender*/, RECT* frame)
</ins><span class="cx"> {
</span><span class="cx"> *frame = m_frame;
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE UIDelegate::runJavaScriptAlertPanelWithMessage(
- /* [in] */ IWebView* /*sender*/,
- /* [in] */ BSTR message)
</del><ins>+HRESULT UIDelegate::runJavaScriptAlertPanelWithMessage(IWebView* /*sender*/, BSTR message)
</ins><span class="cx"> {
</span><span class="cx"> printf("ALERT: %S\n", message ? message : L"");
</span><span class="cx"> fflush(stdout);
</span><span class="lines">@@ -441,10 +381,7 @@
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE UIDelegate::runJavaScriptConfirmPanelWithMessage(
- /* [in] */ IWebView* sender,
- /* [in] */ BSTR message,
- /* [retval][out] */ BOOL* result)
</del><ins>+HRESULT UIDelegate::runJavaScriptConfirmPanelWithMessage(IWebView* /*sender*/, BSTR message, BOOL* result)
</ins><span class="cx"> {
</span><span class="cx"> printf("CONFIRM: %S\n", message ? message : L"");
</span><span class="cx"> *result = TRUE;
</span><span class="lines">@@ -452,11 +389,7 @@
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE UIDelegate::runJavaScriptTextInputPanelWithPrompt(
- /* [in] */ IWebView *sender,
- /* [in] */ BSTR message,
- /* [in] */ BSTR defaultText,
- /* [retval][out] */ BSTR *result)
</del><ins>+HRESULT UIDelegate::runJavaScriptTextInputPanelWithPrompt(IWebView* /*sender*/, BSTR message, BSTR defaultText, BSTR* result)
</ins><span class="cx"> {
</span><span class="cx"> printf("PROMPT: %S, default text: %S\n", message ? message : L"", defaultText ? defaultText : L"");
</span><span class="cx"> *result = SysAllocString(defaultText);
</span><span class="lines">@@ -464,11 +397,7 @@
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE UIDelegate::runBeforeUnloadConfirmPanelWithMessage(
- /* [in] */ IWebView* /*sender*/,
- /* [in] */ BSTR message,
- /* [in] */ IWebFrame* /*initiatedByFrame*/,
- /* [retval][out] */ BOOL* result)
</del><ins>+HRESULT UIDelegate::runBeforeUnloadConfirmPanelWithMessage(IWebView* /*sender*/, BSTR message, IWebFrame* /*initiatedByFrame*/, BOOL* result)
</ins><span class="cx"> {
</span><span class="cx"> if (!result)
</span><span class="cx"> return E_POINTER;
</span><span class="lines">@@ -477,12 +406,7 @@
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE UIDelegate::webViewAddMessageToConsole(
- /* [in] */ IWebView* sender,
- /* [in] */ BSTR message,
- /* [in] */ int lineNumber,
- /* [in] */ BSTR url,
- /* [in] */ BOOL isError)
</del><ins>+HRESULT UIDelegate::webViewAddMessageToConsole(IWebView* /*sender*/, BSTR message, int lineNumber, BSTR url, BOOL isError)
</ins><span class="cx"> {
</span><span class="cx"> wstring newMessage;
</span><span class="cx"> if (message) {
</span><span class="lines">@@ -499,12 +423,7 @@
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE UIDelegate::doDragDrop(
- /* [in] */ IWebView* sender,
- /* [in] */ IDataObject* object,
- /* [in] */ IDropSource* source,
- /* [in] */ DWORD okEffect,
- /* [retval][out] */ DWORD* performedEffect)
</del><ins>+HRESULT UIDelegate::doDragDrop(IWebView* /*sender*/, IDataObject* object, IDropSource* source, DWORD /*okEffect*/, DWORD* performedEffect)
</ins><span class="cx"> {
</span><span class="cx"> if (!performedEffect)
</span><span class="cx"> return E_POINTER;
</span><span class="lines">@@ -522,10 +441,7 @@
</span><span class="cx"> return oleDragAndDropReturnValue;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE UIDelegate::webViewGetDlgCode(
- /* [in] */ IWebView* /*sender*/,
- /* [in] */ UINT /*keyCode*/,
- /* [retval][out] */ LONG_PTR *code)
</del><ins>+HRESULT UIDelegate::webViewGetDlgCode(IWebView* /*sender*/, UINT /*keyCode*/, LONG_PTR* code)
</ins><span class="cx"> {
</span><span class="cx"> if (!code)
</span><span class="cx"> return E_POINTER;
</span><span class="lines">@@ -533,10 +449,7 @@
</span><span class="cx"> return E_NOTIMPL;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE UIDelegate::createWebViewWithRequest(
- /* [in] */ IWebView *sender,
- /* [in] */ IWebURLRequest *request,
- /* [retval][out] */ IWebView **newWebView)
</del><ins>+HRESULT UIDelegate::createWebViewWithRequest(IWebView* /*sender*/, IWebURLRequest* /*request*/, IWebView** newWebView)
</ins><span class="cx"> {
</span><span class="cx"> if (!::gTestRunner->canOpenWindows())
</span><span class="cx"> return E_FAIL;
</span><span class="lines">@@ -544,8 +457,7 @@
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE UIDelegate::webViewClose(
- /* [in] */ IWebView *sender)
</del><ins>+HRESULT UIDelegate::webViewClose(IWebView* sender)
</ins><span class="cx"> {
</span><span class="cx"> HWND hostWindow;
</span><span class="cx"> sender->hostWindow(reinterpret_cast<OLE_HANDLE*>(&hostWindow));
</span><span class="lines">@@ -553,8 +465,7 @@
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE UIDelegate::webViewFocus(
- /* [in] */ IWebView *sender)
</del><ins>+HRESULT UIDelegate::webViewFocus(IWebView* sender)
</ins><span class="cx"> {
</span><span class="cx"> HWND hostWindow;
</span><span class="cx"> sender->hostWindow(reinterpret_cast<OLE_HANDLE*>(&hostWindow));
</span><span class="lines">@@ -562,39 +473,30 @@
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE UIDelegate::webViewUnfocus(
- /* [in] */ IWebView *sender)
</del><ins>+HRESULT UIDelegate::webViewUnfocus(IWebView* /*sender*/)
</ins><span class="cx"> {
</span><span class="cx"> SetForegroundWindow(GetDesktopWindow());
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE UIDelegate::webViewPainted(
- /* [in] */ IWebView *sender)
</del><ins>+HRESULT UIDelegate::webViewPainted(IWebView* /*sender*/)
</ins><span class="cx"> {
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE UIDelegate::exceededDatabaseQuota(
- /* [in] */ IWebView *sender,
- /* [in] */ IWebFrame *frame,
- /* [in] */ IWebSecurityOrigin *origin,
- /* [in] */ BSTR databaseIdentifier)
</del><ins>+HRESULT UIDelegate::exceededDatabaseQuota(IWebView* sender, IWebFrame* frame, IWebSecurityOrigin* origin, BSTR databaseIdentifier)
</ins><span class="cx"> {
</span><del>- BSTR protocol;
- BSTR host;
</del><ins>+ _bstr_t protocol;
+ _bstr_t host;
</ins><span class="cx"> unsigned short port;
</span><span class="cx">
</span><del>- origin->protocol(&protocol);
- origin->host(&host);
</del><ins>+ origin->protocol(&protocol.GetBSTR());
+ origin->host(&host.GetBSTR());
</ins><span class="cx"> origin->port(&port);
</span><span class="cx">
</span><span class="cx"> if (!done && gTestRunner->dumpDatabaseCallbacks())
</span><span class="cx"> printf("UI DELEGATE DATABASE CALLBACK: exceededDatabaseQuotaForSecurityOrigin:{%S, %S, %i} database:%S\n", protocol, host, port, databaseIdentifier);
</span><span class="cx">
</span><del>- SysFreeString(protocol);
- SysFreeString(host);
-
</del><span class="cx"> unsigned long long defaultQuota = 5 * 1024 * 1024;
</span><span class="cx"> double testDefaultQuota = gTestRunner->databaseDefaultQuota();
</span><span class="cx"> if (testDefaultQuota >= 0)
</span><span class="lines">@@ -633,11 +535,7 @@
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE UIDelegate::embeddedViewWithArguments(
- /* [in] */ IWebView *sender,
- /* [in] */ IWebFrame *frame,
- /* [in] */ IPropertyBag *arguments,
- /* [retval][out] */ IWebEmbeddedView **view)
</del><ins>+HRESULT UIDelegate::embeddedViewWithArguments(IWebView* /*sender*/, IWebFrame* /*frame*/, IPropertyBag* /*arguments*/, IWebEmbeddedView** view)
</ins><span class="cx"> {
</span><span class="cx"> if (!view)
</span><span class="cx"> return E_POINTER;
</span><span class="lines">@@ -645,54 +543,50 @@
</span><span class="cx"> return E_NOTIMPL;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE UIDelegate::webViewClosing(
- /* [in] */ IWebView *sender)
</del><ins>+HRESULT UIDelegate::webViewClosing(IWebView* /*sender*/)
</ins><span class="cx"> {
</span><span class="cx"> return E_NOTIMPL;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE UIDelegate::webViewSetCursor(
- /* [in] */ IWebView *sender,
- /* [in] */ OLE_HANDLE cursor)
</del><ins>+HRESULT UIDelegate::webViewSetCursor(IWebView* /*sender*/, OLE_HANDLE /*cursor*/)
</ins><span class="cx"> {
</span><span class="cx"> return E_NOTIMPL;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE UIDelegate::webViewDidInvalidate(
- /* [in] */ IWebView *sender)
</del><ins>+HRESULT UIDelegate::webViewDidInvalidate(IWebView* /*sender*/)
</ins><span class="cx"> {
</span><span class="cx"> return E_NOTIMPL;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE UIDelegate::setStatusText(IWebView*, BSTR text)
</del><ins>+HRESULT UIDelegate::setStatusText(IWebView*, BSTR text)
</ins><span class="cx"> {
</span><span class="cx"> if (gTestRunner->dumpStatusCallbacks())
</span><del>- printf("UI DELEGATE STATUS CALLBACK: setStatusText:%s\n", text ? toUTF8(text).c_str() : "");
</del><ins>+ printf("UI DELEGATE STATUS CALLBACK: setStatusText:%S\n", text ? text : L"");
</ins><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE UIDelegate::desktopNotificationsDelegate(IWebDesktopNotificationsDelegate** result)
</del><ins>+HRESULT UIDelegate::desktopNotificationsDelegate(IWebDesktopNotificationsDelegate** result)
</ins><span class="cx"> {
</span><span class="cx"> m_desktopNotifications.copyRefTo(result);
</span><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE UIDelegate::createWebViewWithRequest(IWebView* sender, IWebURLRequest* request, IPropertyBag* windowFeatures, IWebView** newWebView)
</del><ins>+HRESULT UIDelegate::createWebViewWithRequest(IWebView* /*sender*/, IWebURLRequest* /*request*/, IPropertyBag* /*windowFeatures*/, IWebView** /*newWebView*/)
</ins><span class="cx"> {
</span><span class="cx"> return E_NOTIMPL;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE UIDelegate::drawBackground(IWebView* sender, OLE_HANDLE hdc, const RECT* dirtyRect)
</del><ins>+HRESULT UIDelegate::drawBackground(IWebView* /*sender*/, OLE_HANDLE hdc, const RECT* dirtyRect)
</ins><span class="cx"> {
</span><span class="cx"> return E_NOTIMPL;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE UIDelegate::decidePolicyForGeolocationRequest(IWebView* sender, IWebFrame* frame, IWebSecurityOrigin* origin, IWebGeolocationPolicyListener* listener)
</del><ins>+HRESULT UIDelegate::decidePolicyForGeolocationRequest(IWebView* /*sender*/, IWebFrame* frame, IWebSecurityOrigin* /*origin*/, IWebGeolocationPolicyListener* /*listener*/)
</ins><span class="cx"> {
</span><span class="cx"> return E_NOTIMPL;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HRESULT STDMETHODCALLTYPE UIDelegate::didPressMissingPluginButton(IDOMElement* element)
</del><ins>+HRESULT UIDelegate::didPressMissingPluginButton(IDOMElement* /*element*/)
</ins><span class="cx"> {
</span><span class="cx"> printf("MISSING PLUGIN BUTTON PRESSED\n");
</span><span class="cx"> return S_OK;
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreewinWorkQueueItemWincpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/win/WorkQueueItemWin.cpp (167029 => 167030)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/win/WorkQueueItemWin.cpp        2014-04-09 19:48:31 UTC (rev 167029)
+++ trunk/Tools/DumpRenderTree/win/WorkQueueItemWin.cpp        2014-04-09 20:21:36 UTC (rev 167030)
</span><span class="lines">@@ -29,11 +29,13 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "WorkQueueItem.h"
</span><span class="cx">
</span><ins>+#include <comutil.h>
</ins><span class="cx"> #include "DumpRenderTree.h"
</span><span class="cx"> #include <WebCore/COMPtr.h>
</span><span class="cx"> #include <WebKit/WebKit.h>
</span><span class="cx"> #include <WebKit/WebKitCOMAPI.h>
</span><span class="cx"> #include <JavaScriptCore/JSStringRef.h>
</span><ins>+#include <JavaScriptCore/JSStringRefBSTR.h>
</ins><span class="cx"> #include <JavaScriptCore/JSStringRefCF.h>
</span><span class="cx"> #include <wtf/RetainPtr.h>
</span><span class="cx"> #include <wtf/Vector.h>
</span><span class="lines">@@ -53,28 +55,20 @@
</span><span class="cx">
</span><span class="cx"> bool LoadItem::invoke() const
</span><span class="cx"> {
</span><del>- wstring targetString = jsStringRefToWString(m_target.get());
</del><ins>+ _bstr_t targetBSTR(JSStringCopyBSTR(m_target.get()), false);
</ins><span class="cx">
</span><span class="cx"> COMPtr<IWebFrame> targetFrame;
</span><del>- if (targetString.empty())
</del><ins>+ if (!targetBSTR.length())
</ins><span class="cx"> targetFrame = frame;
</span><del>- else {
- BSTR targetBSTR = SysAllocString(targetString.c_str());
- bool failed = FAILED(frame->findFrameNamed(targetBSTR, &targetFrame));
- SysFreeString(targetBSTR);
- if (failed)
- return false;
- }
</del><ins>+ else if (FAILED(frame->findFrameNamed(targetBSTR, &targetFrame)))
+ return false;
</ins><span class="cx">
</span><span class="cx"> COMPtr<IWebURLRequest> request;
</span><span class="cx"> if (FAILED(WebKitCreateInstance(CLSID_WebURLRequest, 0, IID_IWebURLRequest, (void**)&request)))
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- wstring urlString = jsStringRefToWString(m_url.get());
- BSTR urlBSTR = SysAllocString(urlString.c_str());
- bool failed = FAILED(request->initWithURL(urlBSTR, WebURLRequestUseProtocolCachePolicy, 60));
- SysFreeString(urlBSTR);
- if (failed)
</del><ins>+ _bstr_t urlBSTR(JSStringCopyBSTR(m_url.get()), false);
+ if (FAILED(request->initWithURL(urlBSTR, WebURLRequestUseProtocolCachePolicy, 60)))
</ins><span class="cx"> return false;
</span><span class="cx">
</span><span class="cx"> targetFrame->loadRequest(request.get());
</span><span class="lines">@@ -83,27 +77,17 @@
</span><span class="cx">
</span><span class="cx"> bool LoadHTMLStringItem::invoke() const
</span><span class="cx"> {
</span><del>- wstring content = jsStringRefToWString(m_content.get());
- wstring baseURL = jsStringRefToWString(m_baseURL.get());
</del><ins>+ _bstr_t contentBSTR(JSStringCopyBSTR(m_content.get()), false);
+ _bstr_t baseURLBSTR(JSStringCopyBSTR(m_baseURL.get()), false);
</ins><span class="cx">
</span><del>- BSTR contentBSTR = SysAllocString(content.c_str());
- BSTR baseURLBSTR = SysAllocString(baseURL.c_str());
-
</del><span class="cx"> if (m_unreachableURL) {
</span><del>- wstring unreachableURL = jsStringRefToWString(m_unreachableURL.get());
- BSTR unreachableURLBSTR = SysAllocString(unreachableURL.c_str());
</del><ins>+ _bstr_t unreachableURLBSTR(JSStringCopyBSTR(m_unreachableURL.get()), false);
</ins><span class="cx"> frame->loadAlternateHTMLString(contentBSTR, baseURLBSTR, unreachableURLBSTR);
</span><del>- SysFreeString(contentBSTR);
- SysFreeString(baseURLBSTR);
- SysFreeString(unreachableURLBSTR);
</del><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> frame->loadHTMLString(contentBSTR, baseURLBSTR);
</span><span class="cx">
</span><del>- SysFreeString(contentBSTR);
- SysFreeString(baseURLBSTR);
-
</del><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -127,13 +111,10 @@
</span><span class="cx"> if (FAILED(frame->webView(&webView)))
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- wstring scriptString = jsStringRefToWString(m_script.get());
</del><ins>+ _bstr_t scriptBSTR(JSStringCopyBSTR(m_script.get()), false);
</ins><span class="cx">
</span><del>- BSTR result;
- BSTR scriptBSTR = SysAllocString(scriptString.c_str());
- webView->stringByEvaluatingJavaScriptFromString(scriptBSTR, &result);
- SysFreeString(result);
- SysFreeString(scriptBSTR);
</del><ins>+ _bstr_t result;
+ webView->stringByEvaluatingJavaScriptFromString(scriptBSTR, &result.GetBSTR());
</ins><span class="cx">
</span><span class="cx"> return true;
</span><span class="cx"> }
</span></span></pre>
</div>
</div>
</body>
</html>